Teemu Murtola [Wed, 1 Jul 2015 03:36:49 +0000 (06:36 +0300)]
Minor include sorting changes
Make the include sorter sort files based on the basename of the file,
i.e., not including the extension into the string sort. This fixes an
unintuitive behavior that causes changes in the include order if a
'-' <-> '_' replacement is done for a file name (because '-' and '_' are
on different sides of '.' in ASCII).
Change-Id: Icd4bf58b0d60178e33f6840f24adb1e4108fb92a
Teemu Murtola [Tue, 30 Jun 2015 04:09:58 +0000 (07:09 +0300)]
Clean up unused code from gmxfio
- gmx_fio_do_*() are only used for writing xdr-based formats, so remove
other implementations (has been unused since support for .tpa and .tpb
formats was removed). Further decoupling should be possible, but
left for later to keep this change smaller.
- gmx_fio_read/write_*() were not used with the exception of
gmx_fio_write_string(), so removed. gmx_fio_do_*() should be
sufficient.
- Remove USE_XDR, as it is not feasible to turn off xdr support from
these few files alone. There are several file formats (most notably,
run input files and checkpoints) that can only be written in xdr, and
functionality is severely limited without those.
- Remove unused (and mistyped) HAVE_XML #ifdefs. It's not feasible to
inject XML support at this level...
- Move confusingly placed check for not opening .tng files with gmxfio.
- Removed unnecessary checks for debug files (debug files are no longer
opened with gmx_fio_fopen()).
- Remove a few other fields, enum members, and methods that had no effect.
- Rename gmxfio_int.h to gmxfio-impl.h to make its role clearer and to
make it follow the current naming conventions.
- Remove unnecessary #includes.
Change-Id: Ida39a076969da116c9a5f68d7bfd0355c2d2363b
Mark Abraham [Mon, 20 Apr 2015 22:13:17 +0000 (00:13 +0200)]
Document how to add and use NVML support
Change-Id: I8ca7c5d1b163a78559a048ca6cc5b099f34c6cd6
Mark Abraham [Mon, 29 Jun 2015 22:32:52 +0000 (00:32 +0200)]
Avoid GPU data race also with OpenCL
Implements the same change to non-local stream synchronization as now
used for CUDA.
Fixes #1756
Change-Id: I720edc0951f97dcff0bd477084fff45a149f01d9
Berk Hess [Tue, 5 Aug 2014 10:07:36 +0000 (12:07 +0200)]
enabled 1 PP + 1 PME node
Change-Id: I18a4c2bac71f1b5b81d9d374b212bfb9edc7a1e8
Berk Hess [Fri, 24 Apr 2015 13:27:27 +0000 (15:27 +0200)]
Add checks for inefficient resource usage
Checks have been added for using too many OpenMP threads and when
using GPUs for using single OpenMP thread. A fatal error is generated
in case where we are quite sure performance is very sub-optimal. This
is nasty, but a fatal error is the only way to ensure that users don't
ignore this warning. The fatal error can be circumvented by explicitly
setting -ntomp, in that case a note is printed to log and stderr.
Now also avoids ranks counts with thread-MPI that don't fit with the
total number of threads requested.
With a GPU without DD thread count limit is now doubled.
Disabled GPU sharing with OpenCL.
Change-Id: Ib2d892dbac3d5716246fbfdb2e8f246cdc169787
Mark Abraham [Wed, 25 Mar 2015 13:41:40 +0000 (14:41 +0100)]
Add support for flushing WDDM queue
Relevant only with CUDA on Windows (and profiling?)
On Windows the WDDM driver (default for non-Tesla) can prevent
immediate submission of CUDA tasks to the GPU in an attempt
to try to amortize driver overheads. However, as we need
tasks to start immediately for optimal concurrent execution,
this "feature" will result in large overheads. A well-
documented workaround is implemented by this change.
Change-Id: I69a6bb59dc8cae18fba539de49c977c0ee814d07
Mark Abraham [Mon, 29 Jun 2015 20:25:11 +0000 (22:25 +0200)]
Merge "Merge branch release-5-0"
Erik Lindahl [Sat, 27 Jun 2015 12:16:53 +0000 (14:16 +0200)]
Fix OS X openCL builds
OS X does not like the quotes previously used to handle
OpenCL include paths with spaces - escape them instead.
With this change, OpenCL works at least on Yosemite
(OS X 10.10) using a GeForce GT 750M card, and passes
all Gromacs regression tests.
Change-Id: I2acd30256e2ff11ca1fde10361cc0cc55ee7fc05
Erik Lindahl [Thu, 25 Jun 2015 19:01:26 +0000 (15:01 -0400)]
Replace functions deprecated in OpenCL 1.2
Check for CL_VERSION_1_2 in the source, and
use newer versions in that case to avoid
warnings about deprecated functions.
Change-Id: I6f70e0178fa06c59be57168d94aae0fd7df148f5
Teemu Murtola [Mon, 29 Jun 2015 17:48:33 +0000 (20:48 +0300)]
Only accept exact matches for selection keywords
The selection parser tried to be nice to the user and also accept
unambiguous prefixes of keywords, but this also has a lot of side
effects that can be confusing (e.g., it was impossible to create
variables that had names that were prefixes to keywords or to other
variable names). Additionally, this was the only case where user input
could cause an exception during tokenization of the input string, and
that wasn't handled very well during interactive input, either (it
caused the whole program to stop, instead of just reporting the error
like is done for other parsing errors).
Remove the logic, and only make the parser accept exact matches.
Add a few synonyms for keywords where there is a natural abbreviation.
Change-Id: I6041baa2f5a3b7dab87c3d5991e883d2d74ace66
Mark Abraham [Mon, 29 Jun 2015 18:52:12 +0000 (20:52 +0200)]
Merge branch release-5-0
Conflicts:
src/gromacs/gmxpreprocess/hackblock.c
Used new name for header file for gmx_warning.
src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda.cu
Moved code to the other side of the sync point as
in release-5-0. Renamed cu_nb to nb.
src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.cu
Changed name of event to destroy. Renamed cu_nb to nb.
Change-Id: Iee9e2ea372ee704057a4a51ad9e4ab9a22ab7fe6
Mark Abraham [Mon, 29 Jun 2015 11:04:12 +0000 (13:04 +0200)]
Documented build types in developer guide
Change-Id: I9212c0399b59c69845f20322b7d8ace3de0b61c5
Mark Abraham [Mon, 29 Jun 2015 14:43:51 +0000 (16:43 +0200)]
Merge release-4-6 into release-5-0
Conflicts:
src/gmxlib/nonbonded/nb_free_energy.c
Deleted - change already exists in release-5-0
src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda.cu
Applied same reordering to the (unchanged) release-5-0 code
src/mdlib/nbnxn_cuda/nbnxn_cuda_types.h
Renamed misc_ops_and_local_H2D_done, and added Doxygen for it
Change-Id: I4c34d168af347a59b7821da6fea71a4715ec5bae
anca [Sat, 10 Jan 2015 21:41:39 +0000 (23:41 +0200)]
Implement OpenCL support
StreamComputing (http://www.streamcomputing.eu) has implemented the
short-ranged non-bonded interaction accleration features previously
accelerated with CUDA using OpenCL 1.1. Supported devices include
GCN-based AMD GPUs and NVIDIA GPUs.
Compilation requires an OpenCL SDK installed. This is included in
the CUDA SDK in that case.
The overall project is not complete, but Gromacs runs correctly on
supported devices. It only runs fast on AMD devices, because of a
limitation in the Nvidia driver. A list of known TODO items can be
found in docs/OpenCLTODOList.txt. Only devices with a warp/wavefront
size that is a multiple of 32 are compatible with the implementation.
Known issues include that tabulated Ewald kernels do not work (but the
analytical kernels are on by default, as with CUDA), and the blocking
behaviour of clEnqueue in Nvidia drivers means no overlap of CPU and
GPU computation occurs. Concerns about concurrency correctness with
context management, JIT compilation, and JIT caching means several
features are disabled for now. FastGen is enabled by default, so the
JIT compilation will only compile kernels needed for the current
simulation.
There is some duplication between the two GPU implementations, but
the active development expected for both of them suggests it is
not worthwhile consolidating the implementations more closely.
Change-Id: Ideaf16929028eb60e785feb8298c08e917394d0f
Mark Abraham [Wed, 9 Jul 2014 13:50:17 +0000 (15:50 +0200)]
Add MSAN build type
This permits GROMACS to build with Memory Sanitizer in clang >= 3.4.
Refactored the tests that linking to libxml2 and zlib work, which is
simpler to follow now that there are three paths. The new MSAN path is
useful because making try_compile tests work with MSAN is tricky, and
only useful for very few developers.
Fixed a missing header exposed by using a different C++ library.
Documented use in the deveoper guide
Change-Id: Ia3e8077ac732386563eebfa54f2f7d71ebd74a33
Erik Lindahl [Tue, 23 Jun 2015 20:20:00 +0000 (16:20 -0400)]
Fix bug removing multiple dihedrals in main rtp entries
The Gromacs-5.0 series has had a serious bug where pdb2gmx
would only consider the first entry when several explicit
bonds were listed for the same atoms in an RTP entry. Older
topologies have worked fine.
Fixes #1704, #1755.
Change-Id: I0b34aeb905dab8ea66196cabc0745583ef6d7209
Mark Abraham [Thu, 25 Jun 2015 20:46:51 +0000 (22:46 +0200)]
Fix all use of nbnxn_simd.h
Added nbnxn_simd.h to the set of SIMD headers for which we do
per-commit testing for correct use.
Fixed a bunch of files that were acquiring the dependency
transitively, which is error-prone.
Change-Id: Ic8fb462c7790a5e723f901700dd06fd09543e58a
Teemu Murtola [Wed, 24 Jun 2015 09:16:54 +0000 (12:16 +0300)]
Make some unit tests skip file system access
Make unit tests for FileNameOptionManager not use the file system.
Introduce a FileInputRedirectorInterface to support mocking file
existence checks, and use a mock implementation in the tests.
These particular tests did quite a bit of file system access, and the
speedup is only a few ms, although significant percentually (something
like 80%). But there can be tests where this has more effect, and this
approach provides a starting point for more work on eliminating
unnecessary file system access from the tests.
The main benefit is clearer and more robust test code, as it is no
longer necessary to construct actual files and ensure that they do not
conflict with other tests or cause issues if the test crashes or such.
Change-Id: Ib9a171331e988fa7e74b16078164f477f8296c6e
Erik Lindahl [Sun, 28 Jun 2015 12:47:08 +0000 (14:47 +0200)]
Removed gmx protonate tool
This tool appears to have been largely unused, since
testing shows it crashes for a normal trajectory all
the way back to 4.6. Since it is only relevant for
united-atom force fields, we'll reduce the maintenance
load by simply removing it for now - it might reappear
in the future.
Refs #1618.
Change-Id: If57e250f0ffbe32bcc948d09b54b225db9724c35
Berk Hess [Mon, 4 Aug 2014 15:51:03 +0000 (17:51 +0200)]
Improve DLB+PME tuning with GPUs
With GPUs and the DD DLB can quickly limit the PME load balancing
room too much. In such cases (and only with DLB=auto) we now first
do PME load balancing without DLB and then, if DLB gets turned on,
a second round of PME load balancing.
Also fixed that when DLB limited the tuning, the fastest choice was
reset, which would often lead to stronger limitations.
Change-Id: I0087e6b8512d5574d8d0fa2db82e6e38279a82f1
Szilard Pall [Mon, 29 Jun 2015 01:58:35 +0000 (03:58 +0200)]
Fix CUDA inter-stream synchronization issue
With the introduction of multiple hardware queues in CC 3.5 and later
NVIDIA GPUs, the implicit dependency between tasks in the local and
non-local kernel got eliminated. However, as the misc_ops_done event
that we sync with in the non-local stream preceded the local coordinate
transfer, even though the tasks in the local stream are always issued
first, under rare circumstances the non-local kernel could start before
the local coordinate transfer completes. This would lead to non-local
interactions being calculated using coordinates (and charges) from the
previous step.
This change moves the synchronization point to creating a dependency
between the local coordinate transfer and non-local non-bonded kernel.
Change-Id: I0b3837d46db6469f6b1d9869a3a73b5176d93d99
Erik Lindahl [Fri, 5 Jun 2015 06:18:16 +0000 (07:18 +0100)]
Fix double precision reference SIMD and gcc bug
The double precision logical operations on floats were
incorrect for the reference SIMD implementation for C
source, and GCC appears to be buggy with C++, likely
due to strict aliasing assumptions at -O3 interfering
with the required casts - solved by sticking to unions
for now. This might be slower, but the reference
implementation is not used for production anyway.
Change-Id: If048bda298618ae67968861c4a850d080c8cce31
Erik Lindahl [Fri, 12 Jun 2015 20:17:47 +0000 (22:17 +0200)]
Fix one error and compiler warnings with Cuda & clang-3.6
Clang-3.6 on OS X can now be used by nvcc. clang found one
error related to || being used instead of | to set flag bits,
and a handful of warnings variables in headers not being used.
The latter is caused by declaring constants in headers, and
making then static to avoid clashing symbols. However, this emits
them in every single compile unit that includes the header. Fixed
by either moving names to a cpp file, or changing to defines.
Change-Id: Ib4d59c40aa8caffc667cc202a3efe45891b2abe3
Peter Kasson [Mon, 22 Jun 2015 21:32:26 +0000 (17:32 -0400)]
Append _pullx_ and _pullf to pull files when -deffnm used.
Changes -deffnm behavior for pulling so that the pullx and pullf
files don't collide. Previously, this resulted in one being
backed up and checkpoint restarts failing when -deffnm was used.
(Technically this applies to anything where -px and -pf are identical
and not explicitly set, but that only happens with -deffnm.)
Additionally return fatal error if -px or -pf set and output files
collide.
Fix is now localized to the pull code.
Fixes #942 except for log file collision with pull-rotation.
Change-Id: I27b8b4ced0f307905e2c2ea4fb260376dd25dc32
Roland Schulz [Sat, 27 Jun 2015 23:20:15 +0000 (19:20 -0400)]
Remove unused cmake files
Change-Id: Id1a132e316539243dafa06a17ae2e8f69dc9f448
Roland Schulz [Sat, 27 Jun 2015 22:23:50 +0000 (18:23 -0400)]
Don't use check_library for libm
Using check_library doesn't work with build-ins like sqrt
with Werror. sqrt was anyhow only a placeholder for a standard
libm function. We really only need to know whether the library
exists.
Fixes #1750
Change-Id: I6a550cf8c8b8ea985b28130a4339935fb8c9741a
Berk Hess [Wed, 10 Jun 2015 08:07:35 +0000 (10:07 +0200)]
Improve pair search thread load balance
With very small systems and many OpenMP threads, especially when
using GPUs, some threads can end up without pair search work. Better
load balancing reduces the pair search time. Also the CPU non-bonded
kernel time is slightly reduced in the extreme parallelization limit.
Change-Id: Ib036ea3ba59f497eeee7afa73a71fb0e0ccd216e
Berk Hess [Mon, 3 Nov 2014 16:25:51 +0000 (17:25 +0100)]
Improved the intra-GPU load balancing
The splitting of the pair list to improve load balancing on the GPU
was based on the number of generated lists. But this number can be
high(er) due to small lists before splitting. This lead to too few
lists for small systems and too many for large systems.
Now the splitting is based on the number of pairs in the list up till
now. This produces much more stable results.
Because of the more stable results, we increased the min_ci_balanced
factor from 40 to 44 (closer to the ideal 48).
With small systems on many threads we used to generate many more lists
than targeted. Because the algorithm is now far better, we increased
the minimum list size from 32 to 36 and still get fewer lists.
Change-Id: Id2210171a409ef1a27f7dc919fe806f0fe4d869c
Szilard Pall [Wed, 24 Jun 2015 21:19:46 +0000 (23:19 +0200)]
Fix CUDA architecture dependent issues
Only device code gets generated in multiple passes and therefore
target architecture-dependent macros like __CUDA_ARCH__ or our own
IATYPE_SHMEM (which also depends on __CUDA_ARCH__) are not usable in
host code as these will be both undefined. As a result, current code
over-allocated dynamic shared memory. This has no negative side-effect.
This change replaces the use of macros with runtime device compute
capability checks. Also texture objects are now actually enabled,
which give very minor performance improvements.
Note that on Maxwell + CUDA 7.0 there is a 20% performance regression
for the tabulated Ewald kernel (which is not used by default), which
magically disappears when texture references are used instead.
Change-Id: I1f911caad85eb38d6a8e95f3b3923561dbfccd0e
Erik Lindahl [Fri, 12 Jun 2015 18:49:29 +0000 (20:49 +0200)]
Fix IBM VSX SIMD compiles with xlc
Remove most of the previous inline asm to improve
performance (the optimizer works better w/o asm),
and make sure the VSX SIMD code compiles with XLC.
Change-Id: I3e8e9b4dd6102dd5503210e3b49b844ee5492342
Berk Hess [Mon, 15 Jun 2015 15:33:54 +0000 (17:33 +0200)]
Reduce the use of nbnxn_consts.h
Removed reference to "half-width SIMD" (got reworked a long time ago)
Change-Id: Ifcf4f8ae7d18ac14dae7c843ffe1b5787a3dbff3
Berk Hess [Mon, 25 May 2015 13:54:19 +0000 (15:54 +0200)]
Corrected nstcalclr/nstfep/nst_repl_ex checks
Several checks with twin-range electrostatics still checked for
multiples of nstlist instead of nstcalclr and nst_repl_ex was not
checked at all.
Free-energy with small nstdhdl triggered frequent, unnecessary
neighbor search. It seems this can't have caused isssues with
free-energy, because nstfep needs to be a multiple of nstcalcenergy
which again needs to be a multiple of nstcalclr (was nstlist).
Change-Id: I20b8e8ab8329a3aaf904ddfa21573aee8d58c0e4
Erik Lindahl [Sat, 27 Jun 2015 16:11:02 +0000 (18:11 +0200)]
Fix single-prec. softcore issue in 4.6 branch
This is a backport of
412e2974 which we likely
forgot to put in 4.6. It primarily fixes
numerical issues in single precision for
sc_power==48, but it can also improve stability
of lower-power softcore free energy.
This should not be merged into 5.0 or master.
Refs #1580. Fixes #1306.
Change-Id: I5506d714214f0eb7e0517a0eda8d74cdba816dab
Erik Lindahl [Sat, 27 Jun 2015 10:58:34 +0000 (12:58 +0200)]
Merge "Merge release-5-0 into master"
Teemu Murtola [Tue, 23 Jun 2015 12:20:29 +0000 (15:20 +0300)]
Document tool changes in 5.1
Add documentation for tool changes done in 5.1, and improve the
documentation for some of the previous changes.
Change-Id: If7b194392f4516d9a98de2adcbbd436a9acebd2d
Mark Abraham [Fri, 26 Jun 2015 12:53:15 +0000 (14:53 +0200)]
Merge release-5-0 into master
Conflicts:
src/gromacs/mdlib/calc_verletbuf.c
Included nbnxn_simd.h, consistent with fix incoming from release-5-0.
src/programs/mdrun/runner.cpp
One of the changes in release-5-0 was in the -testverlet feature,
which has been removed in master. Other changes applied normally.
Change-Id: Id5b507bce1d6f907e97ac694f02fbe7e486f6208
Erik Lindahl [Fri, 8 May 2015 07:42:11 +0000 (09:42 +0200)]
Fix compile issues on K computer
Fix a compiler bug in the latest K environment (1.2-17)
related to a bug in the system heaers that we work around
by temporarily altering the ISOC99 define.
Change-Id: Ifd60c7062880ecc81bc704a0695c54c2cb342776
Berk Hess [Fri, 26 Jun 2015 07:21:22 +0000 (09:21 +0200)]
Fixed Verlet buffer issue with 2-wide SIMD
The Verlet buffer size for CPUs was always calculated for 4x4.
With 2-wide SIMD the estimate should be for 4x2, which results
in a slighly larger list buffer.
grompp now always sets rlist for a 4x4 list setup; mdrun anyhow
redetermines rlist at run time (added a note for this in grompp).
Fixes #1757.
Change-Id: If4bf9ad17b82b22c9d9f7c1dd3f88e66f2314df4
Mark Abraham [Fri, 26 Jun 2015 07:06:01 +0000 (09:06 +0200)]
Merge release-4-6 into release-5-0
Conflicts:
src/gromacs/fileio/strdb.c
src/gromacs/utility/cstringutil.c
These were not actually conflicts; the code changed here was simply
relocated in release-5-0.
src/programs/mdrun/md.c
Trajectory-writing code has moved in release-5-0, so applied some
changes to src/gromacs/fileio/trajectory_writing.c
Uncrustified, copyright bumps.
Change-Id: I11626cbf2a3efa89adf7c975df2a43b4eb3680fb
Erik Lindahl [Mon, 22 Jun 2015 12:14:15 +0000 (08:14 -0400)]
Fix buffer size issues in string database
We have cool quotes of the than 255 characters which was the buffer
size of buffers in the string database code. Now the buffers are
extended to STRLEN and an fscanf is replaced by fgets in an
infrequently used routine.
Change-Id: I6cd09e6e33f9a4ff3302fb2e1ab8235e2253e87c
Mark Abraham [Wed, 24 Jun 2015 14:42:47 +0000 (16:42 +0200)]
Fix mdrun -confout sometimes affecting final .edr frame
This makes a two-part run write .edr files that can be concatenated to
be identical to that from a one-part run. Otherwise, a single-domain
run might make molecules whole, do an update with the modified x
vector, and write a slightly different final .edr frame, even though
the .trr and .cpt (and thus the restart) were still fine.
Allocating an array of natoms rvecs isn't great, but we only need it
at the end of runs in cases where we ran a single domain, so this is
not a scaling bottleneck. Maybe the "optimization" of setting state
equal to state_global in this case is not such a good thing.
Change-Id: I4d1b49e7de0a5c1691084a612b46a10820784307
Alexey Shvetsov [Thu, 25 Jun 2015 22:07:08 +0000 (01:07 +0300)]
Fix recent compilation issue in pullcode
Undeclared variable names were used in a code path without
MPI_IN_PLACE_EXISTS. Introduced recently in
581ebdfd.
Change-Id: Ib124b7083a74bb4a3cb3e9971d8975ccf7eb0889
Erik Lindahl [Mon, 22 Jun 2015 15:48:15 +0000 (11:48 -0400)]
Fix edr appending and exact continuation
The nsteps field was not written to checkpoint files when
nstcalcenergy=nstenergy. This caused differences in nsteps
in appended energy files, which in turn caused issues in averages
and RMSD in g_energy (which is now fixed by another patch).
Also added the nsteps_sim field to the checkpoint file for
consistency.
Fixes #1342.
Change-Id: Iff8bf51aaa307a379f0e7cdb7d76d9bafb13cf13
Berk Hess [Wed, 21 Aug 2013 15:30:36 +0000 (17:30 +0200)]
Intermolecular bonded interaction support added
The .top file can now contain an [ intermolecular_interactions ]
directive, after which bonded interactions can be entered using
global atom indices.
Added a molecule defition section to the topologies chapter in the
manual. A description of the moleculetype directive was missing.
This section has a subsection on intermolecular interactions.
Change-Id: I383287dd0729fef1c54f27a4fe9f5d628445549c
Erik Lindahl [Mon, 22 Jun 2015 12:18:53 +0000 (08:18 -0400)]
Fix binary exact continuation for trajectories
The initial call to compute_globals() after
continuation would remove COM motion, which meant
trajectories would not be exactly (binary)
identical to a single trajectory - it was likely
introduced with the velocity verlet code.
Refs #1342.
Change-Id: I061648774c7625810a8b693c631c61ae377ba297
Szilard Pall [Wed, 24 Jun 2015 21:16:49 +0000 (23:16 +0200)]
Add missing macro undef in CUDA NB kernel
Harmless as different architecture code-path get generated such that
they don't end up in the same compilation unit, so the two macros
remaining defined did not affect code where the __CUDA_ARCH__ >= 300
is not true.
Change-Id: Ic6911e5c13781ac8a2835c3aef1457df6da60412
Roland Schulz [Fri, 5 Jun 2015 00:34:38 +0000 (20:34 -0400)]
Fix Wundef warnings
Also fixes a performance bug in gmx_simd_invsqrt_pair_d. Previuosly it
did unnecessary number of iterations because it used an non-existing
preprocessor variable.
Change-Id: Idcdf3872b5a169e8690721bbe83922a4ab280da8
Teemu Murtola [Tue, 23 Jun 2015 06:49:40 +0000 (09:49 +0300)]
Move documentation on tool changes from wiki
Move the text on tool changes from the wiki page to the user guide,
where it is much easier to maintain together with the code changes.
For now, this only contains the 5.0-era changes more or less directly
from the wiki, but I will improve this (as a separate change) once I
have more time.
Change-Id: I4ccea605783de2949221d604e232b36c726dcaa7
Mark Abraham [Thu, 25 Jun 2015 16:57:44 +0000 (18:57 +0200)]
Merge "Merge release-5-0 into master"
Berk Hess [Wed, 4 Mar 2015 21:46:00 +0000 (22:46 +0100)]
Reenabled SIMD kernels without cut-offs
In 4.6 there was a bug that caused incorrect results with group scheme
SIMD kernels with systems without cut-offs. This seems to have been
resolved already in 5.0.
Refs #1249.
Change-Id: I86c2b2ae097769472c1748e6e03a673a58a938eb
Mark Abraham [Thu, 25 Jun 2015 08:47:53 +0000 (10:47 +0200)]
Merge release-5-0 into master
Conflicts:
docs/install-guide/install-guide.md
Applied release-5-0 changes to docs/install-guide/index.rst
docs/manual/install.tex
Applied release-5-0 changes to docs/user-guide/environment-variables.rst
src/gromacs/commandline/cmdlineprogramcontext.cpp
Applied comment from release-5-0
src/gromacs/gmxana/gmx_hbond.c
Removed smooth_tail as in release-5-0
src/gromacs/gmxlib/gmx_detect_hardware.cpp
Removed GMX_MAX_THREADS implementation as in release-5-0
(adjacent changes)
src/gromacs/utility/init.cpp
Combined changes to include statements
src/gromacs/utility/path.cpp
Combined changes to include statements
src/programs/mdrun/mdrun.cpp
Added new please_cite calls from release-5-0 to new call site
in runner.cpp
Change-Id: I5b75b12bb8a49a606b086184017b754477d65068
Mark Abraham [Wed, 24 Jun 2015 21:33:24 +0000 (23:33 +0200)]
Merge release-4-6 into release-5-0
Change-Id: I6cc179f767cc4e0fc1dc3fc0b85428df986c16df
Erik Lindahl [Tue, 23 Jun 2015 20:43:33 +0000 (16:43 -0400)]
Avoid accessing hackblocks for x2top
Previous fixes for generating dihedrals would cause us to access
the hackblock even when using x2top, which we should not do.
Fixes #1711.
Change-Id: Id0ea6d524d80b87fe257c9fd4f1c48c4be828654
Magnus Lundborg [Fri, 27 Mar 2015 11:20:38 +0000 (12:20 +0100)]
Update header when appending to TNG file.
The library now handles updating the size of the headers
by moving the first frame sets to make room (if necessary).
Therefore this is now enabled when appending to a trajectory
from mdrun.
Change-Id: I7334a1b0c251856f30e116b63161f7676055dce1
Berk Hess [Mon, 15 Jun 2015 21:56:26 +0000 (23:56 +0200)]
GPU Ewald table kernel now uses CPU spacing
The tabulated Ewald GPU kernels (only used by default on Fermi),
used a fixed table spacing. Now the same adaptive spacing as on the
CPU is used. With default settings this leads to a coarser table.
Change-Id: I35f0c89e00301ac7e1260b1c0dcc1604300da5aa
Berk Hess [Sun, 21 Jun 2015 06:17:21 +0000 (08:17 +0200)]
Avoid GPU selection with GPU emulation
Change-Id: Iee5949fa11419b0c1344edb6c85ab475baa77719
Berk Hess [Mon, 22 Jun 2015 07:33:29 +0000 (09:33 +0200)]
Minor reformatting of SIMD mismatch message
Added extra newline, removed parentheses.
Change-Id: I2ec3f6d078dfa3b4587213c5ec421d36443a01af
Berk Hess [Mon, 22 Jun 2015 12:03:39 +0000 (14:03 +0200)]
Add sugar to print empty line in printBinaryInformation
The binary information print was missing a prefix and suffix
on an empty line which caused invalid xvg file formatting.
Change-Id: I8faa76502fc44ebd698387e4ab0f85f1473be710
Erik Lindahl [Thu, 18 Jun 2015 16:44:33 +0000 (18:44 +0200)]
Updated physical constants from NIST 2010 CODATA
Minor fixes (usually to the 5-6th decimal), and
more constants have been derived the basic ones instead
of specifying values directly. The units section in
the manual has been updated accordingly.
Fixes #1671.
Change-Id: Ic1d853a4fb6c70c81c3969d3d8ba86f52956ef67
Erik Lindahl [Sun, 21 Jun 2015 13:49:03 +0000 (15:49 +0200)]
Removed buggy -smooth hack in hbond module
As discussed in redmine #1553, this was a hack
added a while ago, but apparently it leads to
segfaults. We should avoid hacks in the first
place, and since nobody has been interested in
fixing it for the last year it's time to kill it.
Fixes #1553.
Change-Id: I94faa3c543bcca4c729753c8b5cdaf5a5775d0ff
Berk Hess [Mon, 22 Jun 2015 14:50:53 +0000 (16:50 +0200)]
Fix g_energy average/RMSD bug
Made g_energy produce correct output for energy files from continued
and appended runs with nstcalcenergy=nstenergy. In that case a count
in the energy file is/was incorrect, but that entry is actually not
necessary for determining the average and RMSD of energy terms. The
RMSD would be NaN and the average would be off in the last decimal.
Fixes #1342.
Change-Id: I82007bfe508023e1c1e17366e10f76bc4470d238
Berk Hess [Sun, 21 Jun 2015 09:02:10 +0000 (11:02 +0200)]
Update launch configuration for physical nodes
OpenMP thread count now prints thread count ranges over ranks.
GPU usage report adds host name with multiple MPI processes.
Change-Id: I9011415957ad5d875d2c215abb0f7f60810c372c
Roland Schulz [Fri, 19 Jun 2015 03:37:16 +0000 (23:37 -0400)]
Fix GMX_ALIGNMENT for MSVC 2012 and 2013
Issue previously identified for 2010 is not fixed
until 2015.
Change-Id: I617ac9524a2e054b325fdc19675fdee0a60370c8
Berk Hess [Thu, 18 Jun 2015 09:42:40 +0000 (11:42 +0200)]
Avoid fp exceptions in pair search debug
Also extended GPU list statistics debug prints.
Change-Id: I8100aac2f3433bf06b3d11c8fedcdd2d3cf5c286
Erik Lindahl [Wed, 17 Jun 2015 06:54:20 +0000 (08:54 +0200)]
Fix compiler warnings in cmake tests
This will not be visible to users, and it won't make it
possible to run cmake with -Werror since lots of internal tests
do not work, but since I fixed a couple of them we might
as well put it in gerrit.
Known remaining issues:
- HAVE_LIBM
Refs #1750.
Change-Id: I734f83f229108e50e2914d455f4032137f924773
Erik Lindahl [Thu, 18 Jun 2015 19:57:11 +0000 (21:57 +0200)]
Use MPI_THREAD_FUNNELED when available
We have never observed any problems with MPI and OpenMP,
but for compliance we should call MPI_Init_thread() and
try to get MPI_THREAD_FUNNELED support level. However,
if that level is not supported we simply call the old
MPI_Init() instead - at least for Gromacs that seems fine.
If we get an error return code we warn the user, but if
MPI_init_thread() still worked we hope for the best and
don't bother the user.
Fixes #1127.
Change-Id: I11b81a65125e32b95255dbb769cf86b835bd62ab
Roland Schulz [Thu, 18 Jun 2015 05:37:23 +0000 (01:37 -0400)]
Fix cmake 3.1 warnings with MSVC
Change-Id: I4c080cd547fdb36695d6d906ea56a1393e4f42aa
Erik Lindahl [Sat, 20 Jun 2015 09:54:26 +0000 (11:54 +0200)]
Fix segfault in random access XTC searching
The XTC random access routine was accessing natoms
in a substructure that could be a null pointer. Fixed
by adding natoms as a separate field in the
high-level status, so we don't depend on frame data.
Fixes #1705.
Change-Id: I88c961b33ae21b16d64ed5d7514a1e0287c89baf
Erik Lindahl [Tue, 16 Jun 2015 22:18:27 +0000 (00:18 +0200)]
Fix argument order error for g_rmsdist
Incorrect argument order to calc_rms() caused
command options to be permuted.
Fixes #1709.
Change-Id: I82042dac463c8bb305ab3d3bc2a122b5409c55ef
Erik Lindahl [Sat, 20 Jun 2015 14:01:46 +0000 (16:01 +0200)]
Fix gro errors with PDB insertion codes
The insertion codes are discarded when converting to GRO files,
which results in adjacent residues with different names but
identical numbers. The reading code has been altered to identify
new residues also when the resname changes; this does not fix
the duplicate numbers (it cannot be fixed in GRO files), but it
will correctly propagate all data so the correct labels can
be recovered by using gmx trjconv with the original PDB file for
the -s argument.
Fixes #1600.
Change-Id: Iaf79f3f9e548e8555d78cb39e869410aa8186029
Berk Hess [Sun, 21 Jun 2015 06:13:37 +0000 (08:13 +0200)]
Replaced hardware threads by logical cores in output
All output (except for debug output) now uses the term logical cores
to report the number of hardware threads.
Add indentation for per node hardware property prints.
Change-Id: I821c8d76ab498b37aa1b510d8a3dd67bb42ffdf9
Szilard Pall [Sat, 20 Jun 2015 23:04:28 +0000 (01:04 +0200)]
fix CPU core oversubscription detection
The detection became non-functional due to unlucky incorrect order in
which the arguments were passed.
Change-Id: Id29ff87e504585f783be742b92a861c06c5e42ac
Erik Lindahl [Fri, 19 Jun 2015 08:02:26 +0000 (10:02 +0200)]
Updated docs for g_gyrate
Added the equations we use for the axis
components.
Fixes #1564.
Change-Id: Ifce17326f738a72386bf24f949e418d2550568b5
Erik Lindahl [Thu, 18 Jun 2015 12:44:14 +0000 (14:44 +0200)]
Fix potential buffer overflow in pdb2gmx
Residue rename database entries were read into 6-char
string variables. We now check and issue fatal errors
if the lengths are above 5 characters.
Fixes #1649.
Change-Id: Id4d88a565b212ef279d400f42b5f2732550eded6
Erik Lindahl [Fri, 19 Jun 2015 08:20:23 +0000 (10:20 +0200)]
Disallow infinite epsilon with PME or GB.
This leads to divide-by-zero errors, and since it just turns off
electrostatics it will be faster to use a plain cutoff, which we
now recommend instead.
Fixes #1297.
Change-Id: Ia5eba7a1d4bd3b387174c9cb4878a2d65ead2c6c
Erik Lindahl [Fri, 19 Jun 2015 07:29:40 +0000 (09:29 +0200)]
Remove GMX_MAX_MPI_THREADS
This variable has been orpaned for quite a while, and
it's a good example how we introduce bugs by introducing
lots of ways to control the same functionality, and then
we forget to update some of them later. Let's focus on
the command line options as the single way to control
the number of threads in Gromacs.
Fixes #1550.
Change-Id: I37a87125b9dcac36362b561418d787167bb64cec
Erik Lindahl [Fri, 19 Jun 2015 10:16:23 +0000 (12:16 +0200)]
Fix reproducibility bug in fft5d
fft5d has been accessing FFTW directly instead of using the
Gromacs FFT interface, and while doing so the estimate flag was
not correctly set for reproducible runs. For now we have just
fixed it, but this FFTW-specific code should be removed from fft5d,
or we will likely see more fft bugs due to duplicated code paths.
Fixes #1690.
Change-Id: Ib03f7af710ed208d2824f105bd15712d32632cfa
Erik Lindahl [Thu, 18 Jun 2015 17:26:27 +0000 (19:26 +0200)]
Handle multidir/multisim with single argument correctly
Mdrun would only initialize the multi option correctly
with more than one argument, which caused mdrun to fail
in strange ways since it looked for topol.tpr in the
current directory instead.
Fixes #1712.
Change-Id: Ib89860fdff5f8523eee6c2f5a068390b8d4e3c8d
Erik Lindahl [Tue, 16 Jun 2015 22:15:18 +0000 (00:15 +0200)]
Fix incorrect shift with g_density -center
Fixes #1698.
Change-Id: I22be246eded9c1fc6f421f14eb3938584afed0de
Roland Schulz [Thu, 18 Jun 2015 05:58:23 +0000 (01:58 -0400)]
Fix missing include
Didn't compile with MSVC 2013
Change-Id: Ice8af840ba52dc7b6c9fe54c269a641f0ccc3c60
Berk Hess [Mon, 11 Aug 2014 16:11:17 +0000 (18:11 +0200)]
Reduced the cost of the pull communication
With more than 32 ranks, a sub-communicator will be used
for the pull communication. This reduces the pull communication
significantly with small pull groups. With large pull groups the total
simulation performance might not improve much, because ranks
that are not in the sub-communicator will later wait for the pull
ranks during the communication for the constraints.
Added a pull_comm_t struct to separate the data used for communication.
Change-Id: I92b64d098b508b11718ef3ae175b771032ad7be2
Mark Abraham [Wed, 17 Jun 2015 21:16:04 +0000 (23:16 +0200)]
Fix typo in GMX_BUILD_OWN_FFTW message
Change-Id: Ieec8b7d1bccd7e9654a14091e42f5047d441db31
Szilard Pall [Wed, 17 Jun 2015 22:59:57 +0000 (00:59 +0200)]
fix minor CUDA NB kernel performance regression
Commit
f2b9db26 introduced the thread index z component as a stride in
the middle j4 loop. As this index is not a constant but a value
loaded from a special register, this change caused up to a few %
performance loss in the force kernels. This went unnoticed because
some architectures (cc 3.5/5.2) and some compilers (CUDA 7.0) were
barely affected.
Change-Id: I423790e8fb01a35f7234d26ff064dcc555e73c48
Teemu Murtola [Wed, 17 Jun 2015 10:53:54 +0000 (13:53 +0300)]
Minor clean up for refdata.*
- Remove global functions that are no longer necessary. All the state
about the reference data mode is stored internally in refdata.cpp.
These were remnants from an old implementation where the code was
split into multiple .cpp files to support compilation of testutils/
without libxml2 dependencies.
- Make the self-tests for the reference data code not use the source
tree as a location for the transient data they create.
In addition to clarifying the code, these should make it harder to
misuse the constructor intended for self-testing, since it will be
difficult to pass Jenkins if someone tries to use it for other tests.
Change-Id: I204ddadfc224a79c587f0588a4d510b7b8486f9b
Teemu Murtola [Tue, 16 Jun 2015 09:53:02 +0000 (12:53 +0300)]
Improve logic for automatic selection names
If a selection is directly provided from an external index group, the
name of the selection is set to be the name of the group, irrespective
of the exact way the group is selected. The code that did this was a
bit too eager, and used the name of the group that appeared around the
beginning of a more complex selection in some other cases, leading to
confusion.
Make the code only use the name of the group if the group is really used
as-is, and otherwise use the selection text. Add explicit tests for
this behavior.
Change-Id: Ic7fe2626a07cfd3cac3773046ed9f83484ba4368
Berk Hess [Mon, 13 Apr 2015 08:55:04 +0000 (10:55 +0200)]
Refactored pull data structures
Moved the pull work variables into a new pull_t struct.
Only the pull input parameters remain in (renamed) pull_params_t.
For the moment struct pull_t pull_work is still present in t_inputrec.
This should later be moved to a more appropriate place.
Change-Id: I78f6f9736d52514f0327c86e43d4fb2ac88d60cd
Mark Abraham [Fri, 22 May 2015 11:42:21 +0000 (13:42 +0200)]
Stop people installing into the build tree
Several users have tried this and run into problems.
Also patch the install guide so people can find useful information
about using CMAKE_INSTALL_PREFIX
Change-Id: I43b3d9959e0a2fc93dc1d80fb8fb0727cf459f11
Erik Lindahl [Fri, 12 Jun 2015 21:16:07 +0000 (23:16 +0200)]
Fix CUDA version info in NVML application clock warning
Report driver and runtime versions, not the compute capability
of the card (since we already detected the card is recent enough).
Fixes #1706.
Change-Id: Ida8b36203f56dcda20dc367c69dc02586edf40e4
Erik Lindahl [Sat, 13 Jun 2015 08:22:28 +0000 (10:22 +0200)]
Add membrane embedding docs
These were killed by mistake in
86601a237df when the
separate g_membed program was merged into mdrun.
Fixes #1724.
Change-Id: If97dbf13c269e0711cda9798fac03225920c0d6f
Berk Hess [Tue, 16 Jun 2015 18:16:56 +0000 (20:16 +0200)]
Added missing DD cycle counting
Cycle counting was missing for DD repartitioning after replica
exchange or coord swap. Removed DD cycle counting for initial DD.
Moved DD cycle counting into dd_partition_system and added
subract_cycles function with assertion to detect cycle wrapping.
Fixes #1677.
Change-Id: I7f1b19397b36456f1d120dbc0080146a384def5a
Erik Lindahl [Fri, 12 Jun 2015 21:32:56 +0000 (23:32 +0200)]
Updated FFTW recommendations in install-guide.
Both SSE2 and AVX should be used, and there is now
info about the upcoming FFTW-3.3.5 with more SIMD support,
as well as a link to an unofficial prerelease on the gmx site.
Fixes #1696.
Change-Id: I6413d5e0e06c78a3c9f62acbf6fa0bfc1bd0a561
Mark Abraham [Tue, 20 Jan 2015 11:05:31 +0000 (12:05 +0100)]
Move code for managing mdrun -cpi and -append
Prepares for refactoring to simplify and fix this handling. Kept logic
peculiar to handling mdrun command-line options near other such code.
Renamed functions to better suit their roles. Renamed bAppend
variables, in particular to separate the role of "the user asked for
appending" from "whether mdrun is actually going to do appending."
Change-Id: I063138a49d210e92cebe19e290dc6a0e7b72b1cf
Berk Hess [Thu, 7 May 2015 20:28:06 +0000 (22:28 +0200)]
Automated the -gpu_id option
With #PPrank <= #gpu in a node, the GPU id's were already assigned
automatically. Now with #PPrank a multiple of #GPU they are assigned
automatically with GPU sharing.
Change-Id: I59079b542b5703553c3e1b841c47abdc65f64459
Erik Lindahl [Fri, 12 Jun 2015 19:49:27 +0000 (21:49 +0200)]
Fix segfault with timer reset and -nb cpu
Fixes #1710.
Change-Id: I701b8bb6111fd43379997b7af0aedae7a5fe567a
Erik Lindahl [Fri, 12 Jun 2015 20:46:24 +0000 (22:46 +0200)]
Avoid warning about affinity on Blue Gene, reduce warnings
- Blue Gene does not migrate threads, so don't warn about
affinity setting not being available.
- To avoid flooding users with warnings, just use warnings
when it is very likely the user did something incorrect
when setting pinning options, but notes when it might be
a property of the platform, or when it is not severe.
Fixes #1703.
Change-Id: Idaa781959e0997f6737593a8fd9243d6a979a493
Mark Abraham [Thu, 28 May 2015 14:15:29 +0000 (16:15 +0200)]
Fix pairs_nb not recognized as part of moleculetype
Old code gives "unknown directive" error from the default of the
switch statement.
Fixes #1749
Change-Id: I54977f76f82cfdbfd4a7070129aa365d4fe5e188
Mark Abraham [Wed, 18 Mar 2015 08:52:15 +0000 (08:52 +0000)]
Add unit tests for ArrayRef
This fixes mdrun signalling on BG/Q. The templated constructor for
ArrayRef does not work with xlc 12 on BG/Q with array fields of
structs unless the base type has size equal to char. Presumably this
is another example of the way that attributes of struct fields just
get thrown away by compilers.
Changed name of local variable to sig, just in case "signal" clashes
with a preprocessor symbol somewhere...
Some changes to the arrayref.h implementation to make it easier to
write the tests as type-parameterized, by making the factory functions
also appear as members of the corresponding classes, with the same
name for both ArrayRef and ConstArrayRef. While there, remove some
documentation duplication.
Fixes #1701
Change-Id: I6894706b224dc5f3db7893503371107f1ff324d2
Roland Schulz [Tue, 16 Jun 2015 06:15:36 +0000 (02:15 -0400)]
Fix warning in uncrustify
Change-Id: I101a3fcfe4d50191a2237ac0743979a841349cce
Roland Schulz [Tue, 16 Jun 2015 06:29:53 +0000 (02:29 -0400)]
Fix consts in bonded and clincs
- binary constants are not valid C++03
- extra unnecessary bits give warnings with ICC 15
Change-Id: I7645e2c489e6371bfabcbbf460fb3acbda447108