alexxy/gromacs.git
10 years agoremove legacy CUDA non-bonded kernels
Szilard Pall [Sun, 1 Dec 2013 21:53:42 +0000 (22:53 +0100)]
remove legacy CUDA non-bonded kernels

This commit drops the legacy set of kernels which were optimized for use
with CUDA compilers 3.2 and 4.0 (previous to the switch to llvm backend
in 4.1).

For now the only consequence is slight performance degradation with CUDA
3.2/4.0, the build system still requires CUDA >=3.2 as the kernels do
build with the older CUDA compilers. Whether to require at least CUDA
4.1 will be decided later.

Refs #1382

Change-Id: I75d31b449e5b5e10f823408e23f35b9a7ac68bae

10 years agoMade cutoff-scheme=Verlet the default
Berk Hess [Mon, 2 Dec 2013 16:20:01 +0000 (17:20 +0100)]
Made cutoff-scheme=Verlet the default

Since the most common options are now supported by the Verlet
cut-off scheme and is it more accurate by default, supports GPUs
and is faster for any non-water system, this is now the default.
Not supported yet are pbc!=xyz and generalized-Born.

Change-Id: Iba292d22c6f3a4dce18d0911b062f2beb70365cb

10 years agoRenamed verlet-buffer-drift to verlet-buffer-tolerance
Berk Hess [Wed, 27 Nov 2013 16:27:41 +0000 (17:27 +0100)]
Renamed verlet-buffer-drift to verlet-buffer-tolerance

Old mdp files are still processed correctly.
Also let mdrun tune nstlist with CPU-only runs. Added mdrun option
-nstlist to set nstlist manually.

Change-Id: Iac2c2b480c1f7f4233e57af6740424715c1bd1f1

10 years agoMerge "Merge branch 'release-4-6'"
Roland Schulz [Mon, 2 Dec 2013 20:23:31 +0000 (21:23 +0100)]
Merge "Merge branch 'release-4-6'"

10 years agoCalculating LJ-interactions using Particle mesh Ewald
Christian Wennberg [Wed, 9 Oct 2013 17:43:54 +0000 (19:43 +0200)]
Calculating LJ-interactions using Particle mesh Ewald

The calls to ewald_LRcorrection and gmx_pme_do in force.c have been
changed to also handle LJ-PME. The unused implementation with
tables in ewald_LRcorrection have been removed, but would in principle
be faster. But since the Verlet kernels won't call the routine and
group kernels are on a limited lifespan we do not do this optimization.

The switch-statement over the different electrostatic interactions in
force.c are now handled with if-statements.

The grids in PME have been modified to now be larger "arrays of grids",
where the first two are reserved for electrostatics(A and B-state) and
the remaining ones are for LJ-PME.

The code in gmx_pme_do have been changed to also handle LJ-PME.
Previous loop over 2 states in electrostatic PME now also loops
over two additional states for LJ-PME with geometric combination
rules. At the end it contains a separate part which loops over
the various terms for the case with LB combination rules.

Added a new enum for the parameters to be communicated in pme_pp.c

A lot of small changes in various other files mostly to fix
variable-names and small LJ-PME related details. Kernel-generating
scripts for AVX are modified to access fr->ewaldcoeff_q instead of
fr->ewaldcoeff, which doesn't exist any more.

Turning on LJ-PME in simulations is just a matter of setting
vdw-type = PME in the .mdp-file and setting "lj-pme-comb-rule"
to either "LB" or "geometric"

Manual updated with new section called "Long-range Wan der
Waals interactions" which includes the old "Dispersion correction"
and a section for LJ-PME.

Uncrustified files and updated copyright headers

TODO:
1. Full functionality for LJ-PME with free energy calculations, the basic
   framework is there but currently it gives a gmx_fatal
2. LJ-PME with verlet-kernels, currently gives gmx_fatal
3. Integrate with PME tuning

Change-Id: I6395b0a6bcb887b30311143415fde5496c6f3d38

10 years agoMerge branch 'release-4-6'
Mark Abraham [Mon, 2 Dec 2013 15:01:51 +0000 (16:01 +0100)]
Merge branch 'release-4-6'

Conflicts:
src/gromacs/legacyheaders/topsort.h
Resolved in favour of comment change in release-4-6

Change-Id: Ib930277635cdd260c136ab9b3e02809682587252

10 years agoRemove remaining uses of programs.txt
Teemu Murtola [Wed, 27 Nov 2013 20:18:16 +0000 (22:18 +0200)]
Remove remaining uses of programs.txt

Other uses have been replaced with direct generation from the wrapper
binary.  Since the manual no longer has the program man pages, there is
no particular need to list the programs either, in particular since this
is potentially more maintenance.  A reference to the online help and/or
'gmx help' should be sufficient.

Related to #685.

Change-Id: Ie865e955416cdc28f654cf2f988994bac7550ac6

10 years agoUniform behavior for 'make man' and 'make html'
Teemu Murtola [Mon, 25 Nov 2013 18:11:33 +0000 (20:11 +0200)]
Uniform behavior for 'make man' and 'make html'

Both man and HTML pages are now generated and installed using similar
installation rules.  GMX_BUILD_HELP controls automatic generation of
both.  They are also put into the source distribution using the same
mechanism for both.

Part of #685 and #1242.

Change-Id: Id61e75623861b46f765da49c4b34047a6b327083

10 years agoFix [CHEVRON]/[chevron] for HTML output
Teemu Murtola [Sun, 1 Dec 2013 14:26:08 +0000 (16:26 +0200)]
Fix [CHEVRON]/[chevron] for HTML output

Change-Id: I7a74d9eaf5e9d04093355b74ab8282ee671afff4

10 years agoReplace SUM_SIMD with gmx_sum_simd
Roland Schulz [Fri, 15 Nov 2013 01:48:14 +0000 (20:48 -0500)]
Replace SUM_SIMD with gmx_sum_simd

Allows easy usage of hardware reduction (e.g. on MIC)

Change-Id: Ia4b4daec7c182faa42468892067f36968b923851

10 years agoRemove GMX_DOUBLE from config.h
Teemu Murtola [Wed, 27 Nov 2013 17:12:36 +0000 (19:12 +0200)]
Remove GMX_DOUBLE from config.h

It is not feasible for us to remove GMX_DOUBLE from installed headers
any time in the foreseeable future.  And we cannot define it in the
installed headers, since we want to use the same set of headers for both
single- and double-precision binaries.

This means that code calling Gromacs will always need to define it
somehow external to the headers, and ensure that it is always there.
Now, our own build system also uses the same approach and defines it on
the compiler command line.  Another alternative would be to have a
gmxpre.h header that would get included into each and every source file.
We may need such a header for some other purposes, but it should be much
more static than the current config.h...

This removes one of the main obstacles of getting rid of config.h
dependencies throughout the code.

Change-Id: I20cb66d5e58c56212a3b23f8bdea8dd6b9eefb2c

10 years agoDon't install headers depending on GMX_INTERNAL_XDR
Teemu Murtola [Tue, 26 Nov 2013 19:14:42 +0000 (21:14 +0200)]
Don't install headers depending on GMX_INTERNAL_XDR

There should be no need to install xdrf.h; if some user wants to use the
API, some higher-level API is probably better suitable.  With some
reorganization of the headers, all cases where the header was included
from some other installed header were actually unnecessary:
 - gmx_fio_getxdr() is now in xdrf.h (somewhat ugly, but so are the
   alternatives).
 - xdr_datatype is mainly used for edr reading (also for checkpoint
   precision), but put it into a separate header for now that can be
   installed.  It is actually completely independent of the other stuff
   in xdrf.h.

Change-Id: I74a66388a8c09cbf4eb9b7b44d7cd13be2776e9c

10 years agoDocument how to add C++ tools
Teemu Murtola [Thu, 31 Oct 2013 18:56:00 +0000 (20:56 +0200)]
Document how to add C++ tools

Add documentation for how analysis tool code differs from a standalone
tool written using the template.  Include step-by-step instructions for
converting a standalone tool for inclusion in the library and the
wrapper binary.

Change-Id: Id777c7f17e6513208da1b2710622932be32762ff

10 years agoFix scope and naming of some variables
Mark Abraham [Fri, 29 Nov 2013 13:11:51 +0000 (14:11 +0100)]
Fix scope and naming of some variables

Not sure why ASAN did not complain that the old code sometimes used
dvdl when uninitialized under RF.

Updated copyright header

Change-Id: Ib534dc4aa8128f58a80689d5f33282fb16967b1e

10 years agoTurn on -Wunused-parameter where applicable
Mark Abraham [Tue, 29 Oct 2013 17:53:39 +0000 (18:53 +0100)]
Turn on -Wunused-parameter where applicable

There are no longer any function parameters that have function
arguments that are unused (under at least some code paths), unless
they are so noted with gmx_unused attributes. This commit activates
the applicable compiler warnings, so that we can keep it that way!

Some extra changes in gmxomp.c to satisfy Doxygen and remove unused
variable warnings as well (moved the file to C++ compilation).
As a side effect, simplify the #ifdef logic.  The only visible effect of
the reorganization should be that if both affinity environment variables
are set, then the warnings get printed in reverse order.

Also run uncrustify and copyright on changed files.

Change-Id: Ifbaba7543f30c94b44b649718c0c5d7ff1fe5db0

10 years agoFixed zero hardware thread count
Berk Hess [Thu, 28 Nov 2013 18:35:29 +0000 (19:35 +0100)]
Fixed zero hardware thread count

A missing include caused sysconf not to be called, which lead
to the hardware thread count being zero on most non-Windows systems.

Change-Id: I102c04f494f2946725bb5714482cb861aa8f69fc

10 years agoAdjust more copyright headers
Teemu Murtola [Sat, 30 Nov 2013 11:16:48 +0000 (13:16 +0200)]
Adjust more copyright headers

Replace old copyright headers with the new in files that have been moved
to the new module layout.  Adjust the script to handle the cases
encountered, and add some exclusions to the attributes.

Put best-guess estimates for the copyright years based on when the files
were created (if recently) and when they have been modified.  Unless
obvious that the file was created for 4.6 or otherwise recently, did not
trace back beyond the time the files were moved to their current
locations.

Files under directories moved as a whole from release-4-6
(legacyheaders, gmxlib etc.) have not been considered yet.

Part of #818.

Change-Id: Ida30498a97606ec652008299fc1652ca9609539e

10 years agoFix -Wstrict-overflow in domdec.c
Alexey Shvetsov [Fri, 29 Nov 2013 18:22:31 +0000 (22:22 +0400)]
Fix -Wstrict-overflow in domdec.c

d1 > d for all iterations except first one
so now we dont trigger warning

Change-Id: I581297bfafe4157659134aefc1df3c2c6a75e2fa
Signed-off-by: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
10 years agoAdd machinery for integration tests
Mark Abraham [Fri, 27 Sep 2013 17:09:07 +0000 (19:09 +0200)]
Add machinery for integration tests

This code permits the construction of script-like test cases. Examples
can be seen in src/programs/mdrun/tests/rerun.cpp and
src/gromacs/gmxana/legacytests/gmx_traj_tests.cpp.

Initially, this will permit us to check things like "this combination
of inputs to grompp led correctly to error/success in grompp or mdrun,
and did not segfault." This will permit us to enumerate test cases
over ranges of legal inputs to .mdp in a more automated fashion, using
things like the enumerations in the source code, without needing to
store and maintain all the input cases. This is particularly valuable
for detecting unknown side effects when refactoring (e.g. removing
PD).

Also permits test cases like CheckMdrunCanWriteCheckpoint.

Reporting of failures when run under MPI is a long way from perfect.
Only rank 0 can be allowed to write to stdout and the GTest XML output
file. On stdout, ranks of failing tests and their expected and actual
values are reported. In the XML, only the ranks are reported. Fixing
this later would require serializing in rank > 0 either the
TestPartResult object, or its result string, and sending those to rank
0 for processing.

Later, it would be good to refactor these tests so that we do not have
to do things like disk I/O for .tpr files, so they run faster and
we can have more of them.

Also later, machinery to get things like energies and forces from
mdrun for sanity checks would be great, too, so that we can prevent
bugs like "this combination of inputs incorrectly computes zero
energies" when somebody forgets to extend a switch statement, etc.

Change-Id: I8072355b44c12d4a47c181734c83c961fd306666

10 years agoCreated SIMD module
Berk Hess [Fri, 12 Apr 2013 17:11:09 +0000 (19:11 +0200)]
Created SIMD module

Moved header files to new module, renamed their #include guards
appropriately.

Removed two unused headers (content mostly duplicated)

Refs #1173

Change-Id: Ieda78cc3bcb499e8c17ef8ef539c49cbc2d6d74d

10 years agoRemove unused config.h defines
Teemu Murtola [Wed, 27 Nov 2013 17:25:50 +0000 (19:25 +0200)]
Remove unused config.h defines

Also remove some unnecessary inclusions of gmx_header_config.h in source
files.

Change-Id: I1f48a7f112956938b1a77130631f15c532830647

10 years agoRemove obsolete FindGit.cmake
Teemu Murtola [Thu, 28 Nov 2013 18:11:34 +0000 (20:11 +0200)]
Remove obsolete FindGit.cmake

Now that we require CMake 2.8.8, we don't need to package FindGit.cmake,
which is available since 2.8.2.  From 2.8.8 onwards, FindGit.cmake also
provides a version string directly, so we don't need to get it
ourselves.

Change-Id: Id5739af8d8e026a87a478b669b5c9c23adb28aee

10 years agoMake help texts refer to gmx-something
Teemu Murtola [Sat, 23 Nov 2013 05:22:20 +0000 (07:22 +0200)]
Make help texts refer to gmx-something

Help text written by -h, as well as man pages and the HTML help now
refer to programs as gmx-something instead of the old names that are now
only symbolic links.  Cross-references in the HTML pages should be there
again.

Related to #685.

Change-Id: I41ce99cc224aa2c13f94d61e625115a8c991daba

10 years agoMove gmx_omp.* into src/gromacs/utility/
Teemu Murtola [Fri, 22 Nov 2013 18:54:00 +0000 (20:54 +0200)]
Move gmx_omp.* into src/gromacs/utility/

Changes:
 - Rename the file to gmxomp.*, analogous to other headers in the
   directory.
 - Replace the copyright headers with the new format, and put years
   there when the files have been in existence.
 - Fix Doxygen documentation to produce something reasonable.  Some
   brief descriptions are still very long...
 - Add extern "C" guards.
 - Don't install the header, as it is only an internal implementation
   detail.

Change-Id: I22d876b333534b783ef0638202939a89ce62e9d9

10 years agoUpdated to gmock-1.7.0
Rossen Apostolov [Tue, 26 Nov 2013 11:47:13 +0000 (12:47 +0100)]
Updated to gmock-1.7.0

The previous gmock-1.6.0 was failing to compile on Mac OS 10.9
with clang-500.2.79 from XCode-5.0.2 due to issues with finding
the TR1 tuple library.

Update C++11 check to check for constructs used in Google Mock and
suppress valgrind reachable memory warnings on Mac OS X about
localtime.

Change-Id: I0703e581373aba8d2cf5cf42b9443a76ac0f6032

10 years agoGenerate gromacs.7 from the wrapper binary
Teemu Murtola [Mon, 25 Nov 2013 04:51:01 +0000 (06:51 +0200)]
Generate gromacs.7 from the wrapper binary

Use the same mechanism for generating gromacs.7 as with the by-topic
list of programs for the HTML pages.  Now the man page content is
up-to-date, no longer requires programs.txt, and uses the new
gmx-something names for the referenced programs.

Part of #685

Change-Id: I070f88fd366b37d1ba287a3c2e8e26a846774002

10 years agoFix some #include problems.
Teemu Murtola [Tue, 29 Oct 2013 18:58:35 +0000 (20:58 +0200)]
Fix some #include problems.

- Include files by relative paths for installed headers.
- Install all headers used by other installed headers.
- Use
    #include "..."
  for our own headers and
    #include <...>
  for system headers.
- Remove one unused header.

Updated the includedeps.py/.cmake script to be able to check also legacy
stuff without complaining too much.  As part of this, updated the
installation rules for legacyheaders to explicitly specify the list of
files (using globbing).

The script now also includes some new directories into the include
dependency graph generated by 'make depgraphs'.  Will try to make the
graph a bit more useful at some point.

Change-Id: Id24d37672194770ebd7552b7d5c7d8bc964c0ffb

10 years agoRemove IMD manual section
Mark Abraham [Wed, 27 Nov 2013 19:48:18 +0000 (20:48 +0100)]
Remove IMD manual section

This should be re-attached to the code patch in due course.

Change-Id: Iad750fe3bc5f855e5a5831bf29b0c00e6cf4e6a9

10 years agoUniform headers in HTML pages
Teemu Murtola [Tue, 19 Nov 2013 04:47:05 +0000 (06:47 +0200)]
Uniform headers in HTML pages

The version number is now also automatically updated in the page headers
for 'make html'.  Also, fix most links in the file format pages.
If we in the future move into some proper HTML publishing system (e.g.,
based on Markdown), it should probably take care of this and also
cross-links between these pages and the generated pages, so not much
effort has been put to make the approach or the headers/footers
particularly elegant.

Related to #685 and #1242.

Change-Id: I083d1f9714ddf68dfc2977799378299a43a05b73

10 years agoRemove unused gmx_membed.c
Teemu Murtola [Sat, 23 Nov 2013 04:54:44 +0000 (06:54 +0200)]
Remove unused gmx_membed.c

Change-Id: I43a86b09b892f3fc1529032708747db6d53923d0

10 years agoFix strange character in manual
Mark Abraham [Wed, 27 Nov 2013 18:57:28 +0000 (19:57 +0100)]
Fix strange character in manual

Fixes #1389

Change-Id: I577a174c807f813e8070bb4ac9f30a66b39c124a

10 years agoFixed return value of gmx_mtop_bondeds_free_energy
Berk Hess [Mon, 25 Nov 2013 16:46:48 +0000 (17:46 +0100)]
Fixed return value of gmx_mtop_bondeds_free_energy

The return value was always true, which was harmless, since it
could only cause a small performance hit of useless sorting.

Fixes #1387

Change-Id: I088a3747ddb3517fbb5e416b791bd542bd49fed2

10 years agoRemove #ifdef GMX_THREAD_MPI for basic thread safety.
Teemu Murtola [Sat, 14 Sep 2013 12:05:06 +0000 (15:05 +0300)]
Remove #ifdef GMX_THREAD_MPI for basic thread safety.

Simplifies the code, and at least most of this should have zero impact
on performance.  Basic thread support from thread-MPI is already
required for compilation anyways even with GMX_THREAD_MPI off.
This removes about 70% of the #ifdefs, making it clearer what is
different between MPI and thread-MPI implementation in Gromacs.

Also set MPI_IN_PLACE_EXISTS with GMX_THREAD_MPI instead of checking for
GMX_THREAD_MPI separately each time.  Adjust one #ifdef in network.c to
replace an GMX_LIB_MPI made unnecessary by this with GMX_MPI.

Related to #948 and #1320.

Change-Id: I03a54b0bffde090100afe5ed2e91c184af36c189

10 years agoMoved gromos87 writing code into fileio module
Mark Abraham [Sun, 24 Nov 2013 12:02:15 +0000 (13:02 +0100)]
Moved gromos87 writing code into fileio module

Fixed copyright, include guards, uncrustify. Removed
a useless #include and comment. Renamed files and functions
to avoid cryptic "gms" abbreviation.

Change-Id: I17422d9a46398162710a6e768aeb5c2a5e5c5d8f

10 years agoAdd license for Sun XDR routines
Mark Abraham [Sun, 24 Nov 2013 12:50:04 +0000 (13:50 +0100)]
Add license for Sun XDR routines

I can find no distribution from Sun, and the original GROMACS import
does not reproduce a coyright statement, if one existed. If this ever
proves to be a problem, we can replace these routines with LGPL
alternatives.

Fixes #1241

Change-Id: I12061672599bf17daa40ad85315ec242a1be6593

10 years agoUpdate copyright headers in kernels.
Teemu Murtola [Fri, 11 Oct 2013 04:19:44 +0000 (07:19 +0300)]
Update copyright headers in kernels.

Update copyright headers in kernel files to match the new format.
Since all the kernel code has been introduced in 2012, removed copyright
years older than that.  The Python script for Verlet kernels was updated
to strip a copyright header from the templates to allow adding one there
as well.  This commit processes all files that are not produced by the
kernel generators, but contain _kernel_ in their path.

Part of #818.

Change-Id: I5d7babc137cdbe0c427cbaa44209b9e8f7be55bb

10 years agoUpdate copyright headers in generated kernels.
Teemu Murtola [Fri, 11 Oct 2013 03:57:51 +0000 (06:57 +0300)]
Update copyright headers in generated kernels.

Update copyright headers in generated kernel files to the new format.
Update also some copyright years.

Adjust the generating scripts to reuse the copyright header from
admin/copyright.py to keep it up-to-date.  For the Verlet kernels, some
changes may be required if/when we want to add a copyright header also
into the .pre files.

Part of #818.

Change-Id: I6b5060f12a3c469d0080c73bc9d674e074ce44a4

10 years agoScript to automatically update copyright
Teemu Murtola [Sat, 27 Jul 2013 19:16:58 +0000 (22:16 +0300)]
Script to automatically update copyright

Adapt the automatic uncrustification script to also update the
copyright header for changed files.  Add a Python script to do the
actual copyright header processing.  The Python script can also do other
copyright header tasks.  Make the pre-commit hook more flexible to be
able to do either only uncrustify or only copyright checking, as well as
temporarily skipping the hook for a commit.

Related to #818.

Change-Id: Ie21365acbe07e1f097e6d72c6a5e0d0826631ff0

10 years agoAdd some missing copyright headers.
Teemu Murtola [Mon, 7 Oct 2013 03:59:58 +0000 (06:59 +0300)]
Add some missing copyright headers.

Went through files that were modified by
  git ls-tree --name-only -r HEAD | git check-attr filter --stdin | \
  sed -Ene '/(copyright|uncrustify)$/ {s/:.*//;p;}' | \
  grep -v '_kernel_' | xargs admin/copyright.py --add-missing
and updated the copyright years for those where I know the history or
could easily dig it out.  Mostly this is CMake build system files, which
came to existence at earliest 2009, so it wasn't too hard to dig out
when the code was actually introduced/changed, using git log and
git log --follow.

Part of #818.

Change-Id: Ibba6d8bacc700efd76b7bc429228d751b8e17a27

10 years agoFix DD load balancing bug with GPU sharing
Szilárd Páll [Tue, 19 Nov 2013 02:00:24 +0000 (03:00 +0100)]
Fix DD load balancing bug with GPU sharing

The recent DD load balancing fix which solved the issue of incorrect
imbalance measure with GPU sharing (ba8232e9) addressed GPUs with
incorrect indexing. This caused out of bounds indexing in the GPU ID
query function. The query function also had a bug in the error checking
which allowed the incorrect indexing.
Now also mdrun -nb cpu -gpu_id ... is allowed, which before would give
a fatal error.

This commit addresses both issues; fixes #1385

Change-Id: I2800f610b873da92afe78bbfd869258f378ba2d7

10 years agoFix incorrect variable name in documentation
Mark Abraham [Tue, 19 Nov 2013 14:00:23 +0000 (15:00 +0100)]
Fix incorrect variable name in documentation

Change-Id: I312e3886ebc692f2331ac2f9a612d530b5d4914c

10 years agoAdd back mechanism for cross-tool hyperlinks.
Teemu Murtola [Sun, 22 Sep 2013 18:11:56 +0000 (21:11 +0300)]
Add back mechanism for cross-tool hyperlinks.

The exported HTML pages again can contain hyperlinks to other tools.
Instead of replicating the old functionality, made the links of the form
[gmx-distance] instead of recognizing plain text words.  This requires
all the output formats to be aware of them (not a big deal in the
current code layout), and makes it possible to define the appearance of
the links centrally instead of relying on all links being wrapped in,
e.g., [TT]...[tt].  The new link syntax is similar to Markdown implicit
links (at least Doxygen accepts them without the second []).

Also added support for [THISMODULE] tag in the help text, which expands
to the name of the current module, again allowing the appearance to be
defined centrally.

Only changed the help text for gmx-mindist to take advantage of the new
mechanism as a proof-of-concept.  Bulk work for other tools is better
done as a separate commit once the general approach is accepted.

Part of #685 and #1242.

Change-Id: Ibd263cc2c131dc18d2a5d9046fecc6b1c08734f9

10 years agoBump CMake requirement to 2.8.8
Mark Abraham [Sun, 3 Nov 2013 12:33:29 +0000 (13:33 +0100)]
Bump CMake requirement to 2.8.8

Permits use of CMake "object libraries," and CMake-based detection of
compiler ID and version. Avoids bug in add_library(GLOBAL). Various
minor CMake logic simplifications ensue.

2.8.8 will be 21 months old by the time we release GROMACS 5. Anybody
who installed the latest CMake since we released 4.6 betas already has
a suitable version. Most distros already supply a higher version, with
the notable exception of Ubuntu 12.04 LTS (supplies 2.8.7). A new
Ubuntu LTS is due shortly after GROMACS 5.0, and it will have a
suitable CMake.

Also moved the code supporting storing the compiler info in
buildinfo.h to where it is first used, instead of some point in
top-level CMake scope.

Fixes #1287

Change-Id: I7b82412d2b51a7a0b2e94022e8e39cf3ae06cc35

10 years agoReformat existing LGPL copyright notices.
Teemu Murtola [Sun, 6 Oct 2013 05:06:01 +0000 (08:06 +0300)]
Reformat existing LGPL copyright notices.

Update files that already had the new-style LGPL copyright notice to
match what the new copyright script expects (slightly different author
list).  Generated kernels need a somewhat separate approach, so skipped
in this change.

Applied with
  git ls-tree --name-only -r HEAD | git check-attr filter --stdin | \
  sed -Ene '/(copyright|uncrustify)$/ {s/:.*//;p;}' | \
  grep -v '_kernel_' | xargs admin/copyright.py --update-header
with the .gitattributes and copyright.py from Ie21365a.

Also adapt COPYING to match more or less the contents of the file in
release-4-6.

Part of #818.

Change-Id: I2885b36f65ac3599a7dfb66efdb7faed55fa9557

10 years agoMove binary directory search to ProgramInfo.
Teemu Murtola [Mon, 1 Jul 2013 05:05:54 +0000 (08:05 +0300)]
Move binary directory search to ProgramInfo.

This makes it possible to print the real executable location in the
startup header.  Probably useful diagnostic if one has multiple Gromacs
installations in different paths.  Also, now the search for the path is
done at most once per invocation, and not for each library file.

This is mainly moving code around and converting it to C++:
- Part of get_libdir() gets moved into gmx::ProgramInfo, and the
  remainder is now using C++.
- Move gmx_is_file() to gmx::File, since it is only used in the code
  moved to gmx::ProgramInfo.

There are some minor behavior changes:
- The search now works correctly if PATH contains an empty entry
  (i.e., the working directory is in the path).
- If PATH does not contain the working directory explicity, the search
  only considers the working directory on Windows.
- If the working directory has been changed in code (but not before call
  to gmx::init()), the search still works.

Change-Id: If1d548be6b4dd031617a6019bcad20466ad91994

10 years agoRemove more obsolete content from share/html.
Teemu Murtola [Sun, 17 Nov 2013 13:03:47 +0000 (15:03 +0200)]
Remove more obsolete content from share/html.

- yourown.html was not referenced.
- Will replace ADD_INCLUDE and include_*.html with something more useful
  in the future.
- FAQ link in online.html was referencing a file deleted in release-4-6.
- Other changes remove content that was referencing share/tutor/, which
  was removed earlier.

Related to #1242.

Change-Id: I0e04438694cf251eae789c08e2ae1087d6fd99fc

10 years agoAllow copying of HelpWriterContext.
Teemu Murtola [Fri, 20 Sep 2013 03:50:57 +0000 (06:50 +0300)]
Allow copying of HelpWriterContext.

It is now possible to create copies of HelpWriterContext.  The copies
share the same base state (output file, format and links).
This makes it possible to add support for customizing some aspects of
the substitution (done in a later commit).

Change-Id: I8af70ef35269edc5fd216728e8d962f4839ef29c

10 years agoAdd listing of programs by topic to HTML output.
Teemu Murtola [Tue, 8 Oct 2013 18:34:40 +0000 (21:34 +0300)]
Add listing of programs by topic to HTML output.

Now the HTML-exported help contains also a list of programs by topic,
similar to what used to be generated from programs.txt.  Removed the
mkhtml script, since it is now fully replaced by the mechanism in the
wrapper binary.

The same mechanism could also be used to replace the gromacs.7 man page,
but in its current form, it contains so much boilerplate code that I
didn't want to copy-paste that all into the source file.  And it could
also be used to make the output of 'gmx help' more structured.

Related to #685, #969, and #1242.

Change-Id: I6c2efe10c53f10f7fde90b3386ddea7fbea34b89

10 years agoSome module dependency cleanup.
Teemu Murtola [Tue, 29 Oct 2013 20:25:10 +0000 (22:25 +0200)]
Some module dependency cleanup.

Move wman.* from onlinehelp/ to commandline/, since they depend on stuff
from commandline, and are not used by anything else than statutil.cpp
for command-line stuff.  Also, don't let exceptions from write_man()
propagate into C code potentially calling parse_common_args().

Move some additional file I/O stuff into trxio.c from statutil.cpp,
removing otherwise unnecessary dependencies to fileio.

Change-Id: I43ededf3c729239cd0e6bd8ddaf97386747c4363

10 years agoReorganize help writing code.
Teemu Murtola [Wed, 18 Sep 2013 18:37:51 +0000 (21:37 +0300)]
Reorganize help writing code.

Move all code related to printing the help (console or other formats)
into wman.cpp from pargs.c and filenm.c.  This allows making a lot of
functions internal to this file.

Move code related to markup substitution from wman.cpp into
helpwritercontext.cpp, making it a bit more C++-like in the process.

This commit is mostly cut&pasting code, but some small changes here and
there were required to make it compile (mostly, replacing direct access
to deffile[] with ftp2*() function calls).

Change-Id: I233be210f98c65ffc6308bc91021100bacf7c831

10 years agoMake gmx-gangle more flexible with multiple angles
Teemu Murtola [Wed, 23 Oct 2013 18:41:33 +0000 (21:41 +0300)]
Make gmx-gangle more flexible with multiple angles

Add support for providing only a single selection and/or a single vector
while the second group of selections is larger.  In such cases, expand
the smaller selection to match the size of the larger selection.

This makes it easier to compute multiple angles against the same vector.
For example, computing the relative angle of N molecules against a
single reference molecule.

Change-Id: I464acc8655c1bae09a88dff7d7301d20712d270e

10 years agoTurn on most -Wunused warnings for C++ code.
Teemu Murtola [Mon, 11 Nov 2013 18:33:36 +0000 (20:33 +0200)]
Turn on most -Wunused warnings for C++ code.

They used to be on, but some merge from release-4-6 ages ago removed
the flags.  Now, also -Wunused-parameter can be enabled.  At least new
code can now be kept free of these warnings; there is still ~150
warnings left for non(-thread)-MPI compiled C code.

Fix remaining warnings in C++ code.

Change-Id: I15628665ae9214c8d44b58bab5f963a3e1bc74bd

10 years agoConsistently handle NULL at argv[argc].
Teemu Murtola [Sat, 9 Nov 2013 14:36:06 +0000 (16:36 +0200)]
Consistently handle NULL at argv[argc].

The command-line test classes now provide a trailing NULL for the argv
array, to match what the C/C++ standard says about argv for main().
The new command-line parser also adds such a NULL at the end if it
modifies the array.

Change-Id: I723d45ee599c47db205544878d547ee6d5dad230

10 years agoMerge "Merge branch release-4-6"
Erik Lindahl [Fri, 15 Nov 2013 20:51:19 +0000 (21:51 +0100)]
Merge "Merge branch release-4-6"

10 years agoSimplify GMX_X11 handling.
Teemu Murtola [Sat, 9 Nov 2013 14:24:41 +0000 (16:24 +0200)]
Simplify GMX_X11 handling.

Now user request for GMX_X11 is always honored, or a fatal error given
if that is not possible instead of overriding the user-set option.
Use GMX_X11 consistently to turn on X11 compilation.
Reorganize code in view.cpp to have (nearly) all #ifdef'd code within a
single block for easier readability.  The main function is also now at
the end, making it easier to find by casual browsing.

Change-Id: Ic7f8908d117bacb6140f6e422c0e2c24bba85443

10 years agoMerge branch release-4-6
Mark Abraham [Thu, 14 Nov 2013 17:35:56 +0000 (18:35 +0100)]
Merge branch release-4-6

Conflicts:
CMakeLists.txt
cmake/gmxDetectAcceleration.cmake
cmake/gmxSetBuildInformation.cmake
include/gpu_utils.h
include/nbnxn_cuda_data_mgmt.h
include/string2.h
src/gromacs/gmxlib/gmx_detect_hardware.c
src/gromacs/legacyheaders/domdec.h
src/gromacs/legacyheaders/force.h
src/gromacs/legacyheaders/gmx_detect_hardware.h
src/gromacs/legacyheaders/network.h
src/programs/mdrun/mdrun.cpp
src/programs/mdrun/runner.c
Resolved in favour of release-4-6, except for details like
the use of gmx_unused and changes to include file locations

share/html/gmxfaq.html
Deleted as in release-4-6

share/html/online.html
Retained master version because this file is not generated
in master branch.

Did a little bit of uncrustify on areas that were already changing

Change-Id: I3ecf623a65eb4dac208a239e1b35141d08512483

10 years agocorrected potential nbnxn SIMD memory issue
Berk Hess [Fri, 15 Nov 2013 14:51:36 +0000 (15:51 +0100)]
corrected potential nbnxn SIMD memory issue

A fixed size array on the stack was declared with one element
too few. Probably this never caused trouble with 64-bit builds,
but it might have caused trouble with 32-bit builds.

Change-Id: I4dad0a7a9e80f5d27ac6ee7e4383082db654481a

10 years agoBump version after 4.6.4 release
Mark Abraham [Wed, 13 Nov 2013 17:11:09 +0000 (18:11 +0100)]
Bump version after 4.6.4 release

Change-Id: Ied0463a471657e39cb6c4c41d6112f5778ef00d5

10 years agoFix minor things before release
Mark Abraham [Fri, 8 Nov 2013 11:31:40 +0000 (12:31 +0100)]
Fix minor things before release

Bumped various version numbers

Trivial fix to install guide

Removed out-of-date gmxfaq.html and links to it, replaced links with
links to up-to-date FAQ

share/html/online.html is generated by mkhtml, so stopped caching it
in the repo.

Change-Id: I52265e1174f6e42a2a9d056c3a1751c1cd5886ac

10 years agoClarified GPU selection output and mdrun help
Szilard Pall [Fri, 8 Nov 2013 17:05:25 +0000 (18:05 +0100)]
Clarified GPU selection output and mdrun help

The reporting of GPU selection has been confusing when devices are
shared as GPU IDs would show up multiple times in a list of "devices
selected to be used." The reporting has been modified to print the
number of devices selected followed by the GPU to PP rank mapping which
is in fact exactly the previously printed list of IDs.

Additionally, the mdrun help page now explicitly states that the GPU ID
string passed with -gpu_id specifies a per-node GPU to PP rank mapping
and that multiple ranks can share GPUs.

Change-Id: Id98c592c1dd38573df003247281e4edf50debba7

10 years agoAdded rotation to the tests run by ctest
Roland Schulz [Tue, 12 Nov 2013 21:42:31 +0000 (16:42 -0500)]
Added rotation to the tests run by ctest

Was forgotten when the rotation tests were added and thus
they weren't run by Jenkins

Change-Id: I27fc51b1314e6377d1e866a8ba4658700cc71cfa

10 years agoUpgrade Doxygen layout to 1.8.5.
Teemu Murtola [Thu, 26 Sep 2013 15:16:38 +0000 (18:16 +0300)]
Upgrade Doxygen layout to 1.8.5.

Second part of Doxygen layout file changes.  Add sections that have been
added between 1.7.6.1 and 1.8.5.

Related to #1239.

Change-Id: Ie2656448aafbce2687fbc00350663771f9dd52fb

10 years agofix nbnxn atom sorting with distant bondeds
Berk Hess [Fri, 8 Nov 2013 17:44:23 +0000 (18:44 +0100)]
fix nbnxn atom sorting with distant bondeds

Atoms communicated for bonded interactions can be beyond the non-local
search grid. Only a single cell extra was accounted for, which could
give inconsistency errors. Now any distance is handled correctly.
Fixes #1379

Change-Id: I7b12efeeab4074f2b356c0d0739105ce38371901

10 years agoFix malformed CMake
Mark Abraham [Fri, 8 Nov 2013 17:25:37 +0000 (18:25 +0100)]
Fix malformed CMake

Change-Id: Ic23e3444d4cae568cd9fedfa17f095fad1ab6da9

10 years agocorrected dynamic load balancing when sharing GPUs
Berk Hess [Fri, 27 Sep 2013 12:24:58 +0000 (14:24 +0200)]
corrected dynamic load balancing when sharing GPUs

When sharing GPUs over MPI ranks, the time the GPU is busy might not
reflect the actual load. To make the dynamic load balancing between
domains work correctly, the GPU wait times are now redistributed over
the ranks/domains sharing a GPU.

Change-Id: Id9414e3ef7cc5a73a2b4560a0e10c2ee8ab1257f

10 years ago12 new quotes
David van der Spoel [Sat, 2 Nov 2013 15:56:39 +0000 (16:56 +0100)]
12 new quotes

Change-Id: I232f55577594c2632931fe6162bb83082c872a80

10 years agoAdded enumeration of valid build types for CMake GUI
Marcus D. Hanwell [Tue, 29 Oct 2013 20:25:41 +0000 (16:25 -0400)]
Added enumeration of valid build types for CMake GUI

The CMake GUI (cmake-gui) will display a drop-down list if they are
added as a property to the CMAKE_BUILD_TYPE, making it easier to
select a valid type from the list.

Change-Id: I50b2d8c951b68a13ac7dd80812c2c35365530bb7

10 years agoenable GPU sharing among tMPI ranks
Szilard Pall [Fri, 4 Oct 2013 00:01:44 +0000 (02:01 +0200)]
enable GPU sharing among tMPI ranks

It turns out that the only issue preventing sharing GPUs among thread-MPI
threads was that when the thread arriving to free_gpu() first destroys
the context, it is highly likely that the other thread(s) sharing a GPU
with this are still freeing their resources - operation which fails as
soon as the context is destroyed by the "fast" thread.

Simply placing a barrier between the GPU resource freeing and context
destruction solves the issue. However, there is still a very unlikely
concurrency hazard after CUDA texture reference updates (non-bonded
parameter table and coulomb force table initialization). To be on the
safe side, with tMPI a barrier is placed after these operations.

Change-Id: Iac7a39f841ca31a32ab979ee0012cfc18a811d76

10 years agoGPU detection is done once per physical node
Berk Hess [Thu, 17 Oct 2013 10:11:55 +0000 (12:11 +0200)]
GPU detection is done once per physical node

Only one MPI rank in each physical node now run the GPU detection.
The resulting information is broadcasted to the other ranks.
Note that we should also implement this for the CPU detection.
Fixes #1358

Change-Id: I16c6ccc40bd53d96b99d3f6a0abed69cc89136d8

10 years agoremoved (harmless) left-over in nbnxn SIMD kernels
Berk Hess [Mon, 21 Oct 2013 14:05:20 +0000 (16:05 +0200)]
removed (harmless) left-over in nbnxn SIMD kernels

This improves performance of PME + p-coupling by about 5%.
With Ewald and virial, the nbnxn SIMD energy kernels were used
(some left-over development code). The plain-C code did not do this.

Change-Id: I039044fcb393bf0bcaa06f38498b2a57d60cf080

10 years agoAdded gmx_omp_nthreads_set for use in testing
Mark Abraham [Wed, 31 Jul 2013 08:32:05 +0000 (10:32 +0200)]
Added gmx_omp_nthreads_set for use in testing

Also added extern-C guards in gmx_omp_nthreads.h,
and removed an unused return value.

Change-Id: I46e1df5ddbb0de0c86aabdb9866c1a7638eaa586

10 years agoreorganized GPU detection and selection
Berk Hess [Thu, 10 Oct 2013 15:39:25 +0000 (17:39 +0200)]
reorganized GPU detection and selection

The GPU selection has been separated from the GPU detection
and now happens after the thread-MPI threads are started.
The GPU user/auto-selected options have been removed from
gmx_hw_info_t, such that it only contains hardware info
and can be passed around as const.
As both the CPU and GPU options structs are now tMPI rank local,
tMPI thread concurrency issues are avoided.
Fixes #1334 #1359

The GPU detection is now skipped with mdrun -nb cpu
CPU acceleration binary/hardware mismatch is now only printed once
to stderr (instead of #MPI-rank times to stdout).
Removed the master_inf_t struct.

Change-Id: If497f611b911808f6d01ca83f41ae288061dd361

10 years agoRename GMX_IS_* to GMX_TARGET_*
Mark Abraham [Fri, 19 Jul 2013 07:23:43 +0000 (09:23 +0200)]
Rename GMX_IS_* to GMX_TARGET_*

This addresses some confusion that developed between release-4-6 and
master with me trying to develop the kernels in master branch so I
could have unit testing support, and then cherry-pick them back.  I
had intended to solve #1269 in a separate commit, but it didn't happen
that way.

As #1269 discusses, the code sometimes needs to know what architecture
is being targetted by the compiler. This information is held in the
GMX_TARGET_X86 and GMX_TARGET_BGQ CMake and preprocessor
variables. Note that this information is distinct from what CPU
acceleration is being used (which might be "None" on either platform).

gmx_cpuid.c needs GMX_TARGET_X86 defined to work correctly on x86, and
is called at configure time (at which time config.h is
unavailable). So, this in CMake is treated via a command-line
definition of GMX_TARGET_X86 when required.

Fixes #1269 (even though I98c5791ec silently did this already)

Change-Id: I94e0756856e7d49ff09a87b8283189976b48ea49

10 years agoMove more timing routines into timing/.
Teemu Murtola [Wed, 30 Oct 2013 04:52:03 +0000 (06:52 +0200)]
Move more timing routines into timing/.

Move both gmx_cyclecounter.* and gmx_wallcycle.* into
src/gromacs/timing/, and remove the superfluous gmx_ prefix from the
file names.

These are low-level functionality that can't easily be used or extended
in user code, so there is no need to install them (they are even not
referenced by any currently installed header).  This allows including
config.h directly in cyclecounter.h and get rid of an explicit define on
the compiler command line.

Change-Id: If7c5fa282812c88b3208223cfe3f2982e3b968e9

10 years agoSilence warnings about scanner.cpp
Mark Abraham [Tue, 29 Oct 2013 17:15:36 +0000 (18:15 +0100)]
Silence warnings about scanner.cpp

This file is generated, so it is awkward to suppress inline.
So we suppress on the compiler command line, and test to
make sure that will work cleanly.

Change-Id: I8d7b78d71f13fb91b900ff994e319f6360a4bb86

10 years agogromacs cpp: clean up -Wunused-parameter warnings
Alexey Shvetsov [Fri, 26 Jul 2013 00:08:25 +0000 (04:08 +0400)]
gromacs cpp: clean up -Wunused-parameter warnings

Clean up unused function arguments in cpp code

Change-Id: I7f935d99dd6e9611b551f31c238a4c1f301335f9

10 years agonbnxn_kernels: Clean up -Wunused-parameter warnings
Alexey Shvetsov [Thu, 26 Sep 2013 08:33:18 +0000 (12:33 +0400)]
nbnxn_kernels: Clean up -Wunused-parameter warnings

Update kernel generator and regen kernels
so they want produce warnings with gcc

Change-Id: I0be6bb001afebe03706f9bede2ae10b5de3af5ea
Signed-off-by: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
10 years agoMarkup substitution through HelpWriterContext.
Teemu Murtola [Tue, 17 Sep 2013 17:49:12 +0000 (20:49 +0300)]
Markup substitution through HelpWriterContext.

Make all calls to process the in-source strings to help output go
through HelpWriterContext.  This makes it easy to implement common
functionality using C++ mechanisms.

Moved all the HTML link processing stuff into HelpWriterContext as well
and cleaned up links.dat.  The generated HTML pages should no longer
contain broken links (but links between program pages are not there
yet).

The markup substitution itself is still done by functions in wman.cpp;
will move those into private functions in helpwritercontext.cpp as a
separate change.

Related to #685 and #969.

Change-Id: I37d45549214e49a6edab82fb64ec7b38b9e72094

10 years agoMerge "Merge release-4-6 into master"
Mark Abraham [Wed, 30 Oct 2013 14:22:24 +0000 (15:22 +0100)]
Merge "Merge release-4-6 into master"

10 years agoFix build with GMX_CYCLE_SUBCOUNTERS
Roland Schulz [Fri, 18 Oct 2013 17:40:37 +0000 (13:40 -0400)]
Fix build with GMX_CYCLE_SUBCOUNTERS

Was broken by 4d2f9bcee0734a

Changed that the function signature isn't depending on the
compile options.

Change-Id: I7c3e9d6bdcadc80b02dd0f523358c8122f0f9fcc

10 years agoMerge release-4-6 into master
Roland Schulz [Wed, 30 Oct 2013 03:03:45 +0000 (23:03 -0400)]
Merge release-4-6 into master

Change-Id: I584e5fb2d70e90e5ac8a1439268ee185b0a4105f

10 years agomdlib: Clean up -Wunused-parameter warnings
Alexey Shvetsov [Thu, 26 Sep 2013 08:00:32 +0000 (12:00 +0400)]
mdlib: Clean up -Wunused-parameter warnings

Change-Id: I555d418ca21e03ba891b0cf9f9eebbe2fb19a316

10 years agocorrected volume with serial NPT replica exchange
Berk Hess [Mon, 28 Oct 2013 14:11:27 +0000 (15:11 +0100)]
corrected volume with serial NPT replica exchange

Replica exchange with replicas run in serial would only update
x and v, not the other state data. This gave incorrect volumes
with NPT replica exchange.
Fixes #1362

Change-Id: Ib726fbb75e800c624ef61f31e76a5d4a4e408b9c

10 years agoRenamed and removed last references to GMX_CRAY_XT3
Mark Abraham [Thu, 3 Oct 2013 18:00:57 +0000 (20:00 +0200)]
Renamed and removed last references to GMX_CRAY_XT3

These systems were around in 2006, so probably out of commission by
now. XT5 had replaced catamount with something else. Not sure about
XT4, which might still be around. In any case, the machinery to test
for Cray's catamount should be named more generally, spam the
CMake status and cache less, and use the standard CMake mechanism
to avoid repeating try_compile().

Change-Id: Ic23b195f500662a6a0c4e27b4dc1c9c647b03fc1

10 years agoFixed memory leak in gmxdump.
Magnus Lundborg [Mon, 28 Oct 2013 14:36:01 +0000 (15:36 +0100)]
Fixed memory leak in gmxdump.

Release memory allocated when reading xtc.

Change-Id: I51ab413e598ce937e836b183b29775bc246055cd

10 years agoimproved the nbnxn buffer size estimate with GPUs
Berk Hess [Wed, 2 Oct 2013 15:43:12 +0000 (17:43 +0200)]
improved the nbnxn buffer size estimate with GPUs

The nbnxn Verlet buffer estimate now takes into account that
constrained atoms rotate, and don't move linearly, around the atom
they are constrained to. This significantly lower the buffer size
estimate for long neighborlist life times (as used with GPUs).
The buffer for most CPU runs is not affected (significantly).
Because of the smaller buffer, mdrun now uses smaller list increase
limits for increasing nstlist when using GPUs. This improves
performance.

Also activated and tested the virtual site effective mass calculation
(vsites were ignored in the drift calculation).

Change-Id: I2cb349f483610eabcc97bfbc23d17f189dec19d6

10 years agoOverview Doxygen pages for analysis framework.
Teemu Murtola [Sat, 28 Sep 2013 19:59:01 +0000 (22:59 +0300)]
Overview Doxygen pages for analysis framework.

Main content:
- General overview page for the whole framework.
- Reorganized the way the documentation for the analysis template is
  generated.
- Separate page for describing the concepts for the analysisdata module
  in more detail.
- Separate page for giving an overview of the selection engine.
  Also minor clean up for related documentation pages.
- Add missing installation rule for analysisdata/modules/lifetime.h.

The module pages could now use some restructuring to reference the
information here and provide relevant details instead of duplicating any
of it.  Left for later.

Change-Id: I159a2d913fe6f9114c60804d30fa3714b23df262

10 years agoSome overview content for Doxygen documentation.
Teemu Murtola [Sat, 28 Sep 2013 03:49:05 +0000 (06:49 +0300)]
Some overview content for Doxygen documentation.

Make the main page more useful by providing some explanation of the
purpose of the documentation and adding a (currently very short) list of
links to more detailed pages, making it easier to start consuming the
documentation.

Added a page that contains some information from the wiki
http://www.gromacs.org/Developer_Zone/Programming_Guide/Library_Structure

Once the documentation is more complete, some wiki pages (including the
above) could go away.

Requires Doxygen >=1.8, because separate Markdown pages are used.

Change-Id: I2bf6e00976b47b0d34c79f4ea09452d40701f753

10 years agoMisc. Doxygen updates for src/gromacs/utility/.
Teemu Murtola [Thu, 26 Sep 2013 19:05:47 +0000 (22:05 +0300)]
Misc. Doxygen updates for src/gromacs/utility/.

Add some missing documentation, fix problems noticed, make the
documentation appear more uniform etc.
The biggest improvement is a better overview of the whole directory.
Some Markdown syntax used (requires Doxygen >=1.8), but not much.

Change-Id: Ib4505219536679b17f323c65a9c3f005b655e229

10 years agoCreate fileio module
Mark Abraham [Tue, 17 Sep 2013 08:07:13 +0000 (10:07 +0200)]
Create fileio module

This patch contains only code motion. There are no functional code
changes. Moves lots of I/O code into src/gromacs/fileio. This means
lots of changes to avoid having everything as a compile-time dependency
of everything else because everything is pulled in via typedefs.h,
etc. Note that src/gromacs/legacyheaders/filenm.h and
src/gromacs/legacyheaders/types/filenm.h have been consolidated into
src/gromacs/fileio/filenm.h.

I/O code in files named stat*[ch] now lives in various new files in
fileio.

Files outside of the module now #include its header files in a proper
way, e.g. #include #include "../fileio/filenm.h" or
"gromacs/fileio/filenm.h" according to whether they are an installed
header, or not. Files within the module are blessed and do not need
that qualifier.

This module installs most of its headers (because they're almost all
inter-dependent; gmxfio_int.h is not installed because it is
only useful internally, vmdio.h is not installed because it
relies on a header from src/external)

Files in new module
* conform to preferred include-guard format.
* have up-to-date copyright headers thanks to Teemu's automatic
  script
* that are installed headers refer to other GROMACS include files via
  relative paths

Moves mdrun trajectory writing into wrapper function.

Removes small pieces of I/O code that was hiding behind "#if 0".

Some pieces of I/O code specific to the gmxpreprocess module have
remained there.

Moved a cppcheck suppression to follow matio.cpp to its new home.

Minor fix to xdrf.h logic, since it is now the subject of a CMake
test.

Refs #1292, #1193, #1137

Change-Id: I820036298d574966d596ab9e258ed8676e359184

10 years agoSimplify code structure for C++ analysis tools
Teemu Murtola [Tue, 22 Oct 2013 04:34:36 +0000 (07:34 +0300)]
Simplify code structure for C++ analysis tools

Move all the code for declaring the actual analysis tool into the source
file, and leave only a stub info object in the headers.  Make the class
declared in the header provide a static factory method to allow this.

This has several benefits:
 - Easier to write and maintain the tools, as all the logic is in one
   file only.
 - Clearer about the intended level of encapsulation of the tools.
 - Makes the tools in the library more closely resemble those written
   using the template.  The only difference now is that the main()
   method is replaced by the info object, and that the info object
   provides the names to pass to TrajectoryAnalysisModule constructor.

Change-Id: Ib545cc1d8900fe88cb58811df2cd4a63a6a99b2f

10 years agoFix NBNxN SIMD reference kernels
Roland Schulz [Wed, 23 Oct 2013 22:12:12 +0000 (18:12 -0400)]
Fix NBNxN SIMD reference kernels

nbfp_stride was added independently by both 25eb0e14 and 5deee8a0.

Removing static is not OK for gcc. Mark will resolve later whether
this was even needed for his upstream work.

Change-Id: I97ea4131163512354b5e339dd19549c3e49e9de2

10 years agoEncapsulate gmx_wallclock_accounting_t into new timing module
Mark Abraham [Sat, 28 Sep 2013 13:45:30 +0000 (15:45 +0200)]
Encapsulate gmx_wallclock_accounting_t into new timing module

Started a timing module where things like gmx_wallcycle.c and
gmx_cyclecounter.c will eventually also live.

Renamed s/runtime/wallclock_accounting/ to avoid ambiguity with
"compile time," "simulation time," etc.

This patch preserves the release-4-6 behaviour of the reported times
with all supported combinations of MPI, thread-MPI, GPUs, OpenMP.  I
think the old behaviour of -ntomp_pme != -ntomp was buggy with respect
to timing, and this patch fixes that.

Change-Id: I22cba17cdf866e17d9d0732de204b85b0ab31994

10 years agoCleaned up run time measurement
Mark Abraham [Wed, 25 Sep 2013 22:25:20 +0000 (00:25 +0200)]
Cleaned up run time measurement

Removed all use of clock(), in favour of using clock_gettime for
per-node timer and (where available) per-thread timer. This is better
than using gettimeofday(), which is deprecated by POSIX. clock() has
no real advantages, and requires us to keep bumping our own counter if
we use it (in particular, on any remaining 32-bit
machines). Eliminated related dead code.

Cleaned up struct gmx_runtime_t and related code by
* renaming variables more descriptively
* removing variables that should be local variables in a function
* eliminating variables associated with using clock()

The behaviour of print_perf is preserved (tested real MPI, thread MPI;
serial looks like it should work also); namely that the "(%)" should
be a crude reflection of machine load.

Change-Id: Icdf506150045bee88cf04200b25cd010a9bb5419

10 years agoAdded documentation for gmx_runtime_t struct
Mark Abraham [Wed, 25 Sep 2013 21:22:50 +0000 (23:22 +0200)]
Added documentation for gmx_runtime_t struct

Now it is clear what should be done to simplify things, noted inline
with TODO comments.

Change-Id: If66157d9fe924ca1f02b6ffbdd4526feb9ac9784

10 years agoMerge branch release-4-6 into master
Mark Abraham [Tue, 22 Oct 2013 16:42:04 +0000 (18:42 +0200)]
Merge branch release-4-6 into master

Conflicts:
CMakeLists.txt
admin/installguide/installguide.tex
cmake/gmxDetectAcceleration.cmake
cmake/gmxSetBuildInformation.cmake
Resolved generally in favour of release-4-6, but some changes in
master branch associated with new CMake functionality was kept in the
expected way. Behaviour detecting hardware (particularly on non-x86
platforms) is not optimal in this commit, but is fixed in
I94e0756856e7.

src/gromacs/gmxlib/checkpoint.c
src/gromacs/legacyheaders/typedefs.h
src/gromacs/mdlib/expanded.c
Resolved in favour of release-4-6 (expanded ensemble fixes)

src/gromacs/mdlib/pme.c
Resolved in favour of release-4-6 (SIMD generalization)

src/gromacs/mdlib/pme_sse_single.h
Deleted (superseded by src/gromacs/mdlib/pme_simd4.h)

src/mdlib/CMakeLists.txt
Relocated new comment to correct place in src/gromacs/CMakeLists.txt
(BUILD_OWN_FFTW fixing)

src/mdlib/nbnxn_cuda/nbnxn_cuda_types.h
Replaced src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_types.h with this file,
but preserved corrected comments from master branch

src/gromacs/legacyheaders/mdrun.h
src/programs/mdrun/md.c
Resolved in trajectory_writing.c (removed df_history parameter that is
now useless)

Change-Id: I44ffdc7eb15039b98910f6b3f32252f5849ecfce

10 years agofixed recent bug with CUDA texture objects
Berk Hess [Tue, 22 Oct 2013 20:01:32 +0000 (22:01 +0200)]
fixed recent bug with CUDA texture objects

On GPUs with CUDA architecture 3.0, mdrun would exit with an error.
This bug was introduced very recently in 43b41cb8
Fixes #1361

Change-Id: I0c46867b987cbf3c0da3aa9384d985fef1e4aa73

10 years agofixed OpenMP threads being pinned to the same cores
Berk Hess [Tue, 22 Oct 2013 10:02:44 +0000 (12:02 +0200)]
fixed OpenMP threads being pinned to the same cores

Due to the thread id not being a thread-local variable in the OpenMP
loop setting the thread affinities, different OpenMP threads could be
pinned to the same physical cores.
Fixes #1360

Change-Id: I7bc39aef9a8854ec24006895da6005c1326033a3

10 years agoRemove useless warnings from Doxygen logs.
Teemu Murtola [Fri, 18 Oct 2013 19:22:39 +0000 (22:22 +0300)]
Remove useless warnings from Doxygen logs.

Remove warnings about too big include dependency graphs for some files
from the logs; these may cause issues for Jenkins if/when graphviz gets
installed there.

Related to #1239.

Change-Id: Ic20f5939bfa3a0b641f7c372d2f705a8dbd463e7

10 years agoRemove html target from and excessive PDFs for manual
Mark Abraham [Sun, 20 Oct 2013 17:45:41 +0000 (19:45 +0200)]
Remove html target from and excessive PDFs for manual

Change-Id: I0049fcb1f96aa2b2253bf8029f5172bae4747b69