alexxy/gromacs.git
6 years agoClean up pick_nbnxn_resources
Mark Abraham [Fri, 30 Jun 2017 21:16:22 +0000 (23:16 +0200)]
Clean up pick_nbnxn_resources

GMX_NO_NONBONDED should not trigger GPU emulation, it should disable
nonbonded calculations. Removed that logic, and amended the
documentation.

Made emulateGpu a field of nonbonded_verlet_t, set by the environment
variable, and used it to trigger the subsequent paths.

This simplifies pick_nbnxn_resources.

Change-Id: I5ce4f69e470fe7e24bb554556211697d25f11b0f

6 years agoRemove gmx_constexpr
Berk Hess [Fri, 30 Jun 2017 20:01:26 +0000 (22:01 +0200)]
Remove gmx_constexpr

gmx_constexpr was introduced because MSVC 2013 does not support
constexpr, but we no longer support version 2013. It was noted
that version 2015 also has issues, but our Jenkins MSVC 2015 setup
only produces a warning for a single line, which is now fixed inline.

Change-Id: I4f9321b5845ad89f3c13af3a0c9fa3c9f00b59d4

6 years agoCleaned up GPU emulation logic
Mark Abraham [Thu, 22 Jun 2017 17:19:24 +0000 (19:19 +0200)]
Cleaned up GPU emulation logic

It was unclear how GPU emulation was intended to work. I assume that
it should trigger construction of a GPU pairlist and the use of the
matching plain C kernel, but otherwise function like mdrun -nb cpu.

A new fatal error for an inappropriate combination is introduced.

gmx_select_rank_gpu_ids() now cannot be run if emulation is active,
because it does not make sense to run it.

Change-Id: I1ff687afa26a9daee437f72441c856b4963d2272

6 years agoRemove outdated cmake nvcc logic
Aleksei Iupinov [Fri, 30 Jun 2017 17:03:15 +0000 (19:03 +0200)]
Remove outdated cmake nvcc logic

Change-Id: Id51f680a9237bc6fcbb7a9b7441a5fc158be1d47

6 years agoMark unmodified input parameter as const.
M. Eric Irrgang [Thu, 29 Jun 2017 22:25:36 +0000 (18:25 -0400)]
Mark unmodified input parameter as const.

Change-Id: I9d84ae7d4635a5132b3d1c9ff2d17ed5b344ff0d

6 years agoFix boolean serialization
Teemu Murtola [Fri, 30 Jun 2017 06:08:45 +0000 (09:08 +0300)]
Fix boolean serialization

Serialize the value instead of address of the value...

Also, write out more information for key-value tree
serialization/deserialization tests in case they fail, which would have
helped seeing the problem in Jenkins.

Change-Id: I427b80f38522e1b9792a8c49aa46ed2e85ff2ff7

6 years agoExtend key-value tree comparison and tests
Teemu Murtola [Mon, 27 Mar 2017 19:11:59 +0000 (22:11 +0300)]
Extend key-value tree comparison and tests

Cover comparison support for key-value trees for all basic option types
with tests, and implement support for missing types.

With this, all the basic option types should now be supported through
the whole chain of t_inputrec handling.

Change-Id: Id8f821e2bb7485eecea0922872d86bddcc69ef6f

6 years agoMark unmodified input parameter const
M. Eric Irrgang [Thu, 29 Jun 2017 22:16:00 +0000 (18:16 -0400)]
Mark unmodified input parameter const

Change-Id: I01a6b180d8d4684e7888a9c5d753e6012df83779

6 years agoGeneralize IForceProvider
Teemu Murtola [Sun, 25 Jun 2017 14:24:01 +0000 (17:24 +0300)]
Generalize IForceProvider

- Remove knowledge of individual modules from t_forcerec, and hide the
  number of modules, and whether they contribute to a virial or not,
  behind a generic interface.
- Improve hard-to-understand initialization of separate f_novirsum,
  resolving some TODOs.
- Add some parameters that probably make sense for other modules beyond
  the electric field one.

This also makes the requirement for all modules to have the same
parameters for the calculateForces() call explicit.

Change-Id: I4952515c4b707ba458fd267565fd000532ec281e

6 years agoExtend key-value tree serialization and tests
Teemu Murtola [Mon, 27 Mar 2017 15:32:38 +0000 (18:32 +0300)]
Extend key-value tree serialization and tests

Cover serialization support for key-value tree with basic option types
with tests, and implement missing support for bool values.

Change-Id: I630387393fce1435f64f9115870552067182145b

6 years agoCleaned up high-level boolean variable naming
Mark Abraham [Thu, 22 Jun 2017 17:17:57 +0000 (19:17 +0200)]
Cleaned up high-level boolean variable naming

Variables like bSIMD and bGPU were rather unclear about what
they actually meant.

Modernized to remove b prefixes and to use C++ bool type. Clarified
that some variables related to the use of a physical, rather than
emulated, GPU.

No changes to logic, just renaming.

Change-Id: I2bce7e1d554d3910fbbe685bae0d6a32bf50ac91

6 years agoMerge branch release-2016
Mark Abraham [Wed, 28 Jun 2017 10:42:15 +0000 (12:42 +0200)]
Merge branch release-2016

Change-Id: Idb888bea9e78a9979468ff0c2bc2c02443e02026

6 years agoMerge "Merge branch release-2016"
Roland Schulz [Wed, 28 Jun 2017 00:30:46 +0000 (02:30 +0200)]
Merge "Merge branch release-2016"

6 years agoFix ICC workaround for C++11 feature check
Roland Schulz [Tue, 27 Jun 2017 18:36:16 +0000 (11:36 -0700)]
Fix ICC workaround for C++11 feature check

- Fix that move constructor check was disabled for non-ICC
- Disable check for all supported ICC versions

Change-Id: I295ffb9190d6c02540e709fafd9330a581afd1de

6 years agoDo not use conf-man.py for non-manpage doc builds
Teemu Murtola [Tue, 23 May 2017 18:06:45 +0000 (21:06 +0300)]
Do not use conf-man.py for non-manpage doc builds

Avoid importing conf-man.py for Sphinx invocations that do not build man
pages.  Since it only specifies man page build rules, it is not
necessary, and some of the targets do not have dependencies that would
ensure that it is present.

Fixes #2184.

Change-Id: I3fe9cb03667c9a4e1d4bb9e02b65544e8250be31

6 years agoMerge branch release-2016
Roland Schulz [Tue, 27 Jun 2017 22:46:13 +0000 (15:46 -0700)]
Merge branch release-2016

Conflicts:
admin/builds/pre-submit-matrix.txt

Checked that intent of test configs is implemented appropriately in
new context. The cuda-8 config newly introduced in release-2016
is already covered in this branch, so we don't need to have that
new configuration here.

src/gromacs/gpu_utils/gpu_utils.cu
src/gromacs/simd/impl_ibm_qpx/impl_ibm_qpx_simd4_double.h
src/gromacs/domdec/domdec.cpp

Trivial

Change-Id: I9b06bb476f5b62c9652c0e5186340ed11b0c31cc

6 years agoMinor improvements to test configs
Mark Abraham [Wed, 21 Jun 2017 12:37:09 +0000 (14:37 +0200)]
Minor improvements to test configs

No functional changes - this just improves the way we specify and
document intent.

Unless there's interaction effects being tested, only one
configuration should document that it is intended to test e.g. "thread
MPI with CUDA".

Made that specific for one such config, and removed the documentation
from a second config, even though it incidentally tests such code
(because it is currently the default).

Added a config that specifically tests thread-MPI (which it was
coincidentally already doing).

Clarified that the test config that covers the SIMD implementation of
search for pair lists to use on the GPU - which SIMD implementation of
the search is tested is merely coincidental, rather than a specific
choice.

Change-Id: Id1889753623f7808cd1bb2fb060ee2b2852dfd94

6 years agoFix ARM NEON simd debug builds
Erik Lindahl [Sat, 24 Jun 2017 08:44:36 +0000 (10:44 +0200)]
Fix ARM NEON simd debug builds

Fixes compile-time logical errors. This cannot have
caused any incorrect runs since the code would not
even compile before with a debug build.

Fixes #2209.

Change-Id: Iabdf3ba113e0ddb329ae917f511955cf4c65ed4f

6 years agoAdd ARM_NEON_ASIMD post-submit test
Szilárd Páll [Wed, 21 Jun 2017 20:49:19 +0000 (22:49 +0200)]
Add ARM_NEON_ASIMD post-submit test

Will run on the Jetson TX1 dev board.

Change-Id: Ia7907d2c11cdd46dd6680f984a6d52e1913c0453

6 years agoUpdated application clock handling on Pascal+ GPUs
Jiri Kraus [Tue, 23 May 2017 08:29:49 +0000 (10:29 +0200)]
Updated application clock handling on Pascal+ GPUs

Starting with Pascal (CC >= 6.0) it is no longer possible to change
application clocks without root privileges. With this patch application
clocks are only reported for Pascal+. To avoid meaningless warnings in
case applicaitons clocks have already been set externally the function
init_gpu_application_clocks is now exited early if no application clock
changes are necessary.

Change-Id: I1d99ebff1fa32ba1fd44a37dcb43158da733daed

6 years agoFixed #2206 IMD interface malfunctions
Carsten Kutzner [Fri, 23 Jun 2017 11:28:49 +0000 (13:28 +0200)]
Fixed #2206 IMD interface malfunctions

Change-Id: Ia58586a281591cefea8a382a40e92e3e30b56b75

6 years agoConsolidated logic for choosing number of thread-MPI ranks
Mark Abraham [Thu, 22 Jun 2017 00:19:11 +0000 (02:19 +0200)]
Consolidated logic for choosing number of thread-MPI ranks

Noted TODO to handle issue that was always present, but is now
easy to see needs handling.

Added explicit fatal error for a case that a comment claimed was
handled later, but for which I could not find handling.

Removed some logic for nthreads_tot == 1 that was redundant with
that in get_nthreads_mpi and check_and_update_hw_opt_3.

Added explicit checks for -ntmpi and -ntomp greater than -nt,
replacing an old check that gave an incorrect message, and was only
used when -nt selected 1 total threads.

Change-Id: I6b6634ac4dd726a784a626624de4405a4ddb07f0

6 years agoReplace misnamed nbnxn_gpu_acceleration_supported
Mark Abraham [Thu, 22 Jun 2017 00:12:03 +0000 (02:12 +0200)]
Replace misnamed nbnxn_gpu_acceleration_supported

Historically, there were paths that could not run on GPUs, but the
only remaining condition here relates to a path that merely is not
useful to run on a GPU. Thus, I renamed the function, and relocated it
to the single point of use, preparing for future clean up there.

Removed a TODO that is no longer applicable.

Change-Id: I7ace37af14b01b8f6bc7944073951f79aecb8e65

6 years agoConsolidate and fix logic for mdrun -nb and -gpuid
Mark Abraham [Wed, 21 Jun 2017 22:10:13 +0000 (00:10 +0200)]
Consolidate and fix logic for mdrun -nb and -gpuid

Several aspects of task assignment did not work as well as it should.

If gmx mdrun -gpu_id 01 is intended specify that work run on those
GPUs, then e.g. if the tpr uses the Group scheme, then mdrun should
refuse to run, just like it does for mdrun -nb gpu. Now it does
refuse.

gmx mdrun -nb cpu -gpu_id 01 should always give a fatal error, and now
does.

CUDA_VISIBLE_DEVICES="" gmx mdrun -nb gpu and the same with -gpu_id
should give a fatal error, and now does.

After this change, if the user has required short-ranged work on a GPU
with -nb gpu, or made an explicit GPU task assignment with -gpu_id
without using -nb cpu, exit quickly unless GPU support is compiled,
the Verlet scheme is active, and GPUs were found.

Introduced a helper function for whether compatible GPUs have been
found, to help improve encapsulation and readability.

Removed hack from mdrun integration tests that coped with early
implementations of -gpu_id, which is no longer needed.

Fixes #2067

Change-Id: Ic5091edc892b0fcb0371720a5000b80019b5b3d2

6 years agoRe-enable lost DD warning + minor code modernization
Szilárd Páll [Mon, 19 Jun 2017 21:37:44 +0000 (23:37 +0200)]
Re-enable lost DD warning + minor code modernization

After the message got refactored in 147de64 the dd_warn() call was left
out and therefore a DD warning message would get assembled but never
printed.

Change-Id: I860f52cf7b15e18b8a3533237dcc217b3b844b7e

6 years agoReform ngpu variable
Mark Abraham [Wed, 31 May 2017 23:56:51 +0000 (01:56 +0200)]
Reform ngpu variable

This had different interpretations before and after MPI, and you had
to read the MPI call to work out the meaning.  Made different
variables that directly reflect the two meanings.

Change-Id: I55b6f0b7d05c3286244231af7a5ef3e031079859

6 years agoRemove bUserSetGpuIds field
Mark Abraham [Wed, 31 May 2017 18:19:26 +0000 (19:19 +0100)]
Remove bUserSetGpuIds field

This is only used for a short time during setup, so might be better as
a temporary variable, rather than a field of a struct that persists
for the whole of mdrun.

Moved a single-use const string for an error message from
gmx_parse_gpu_ids to its place of use, and fixed that its content had
fallen out of date because it was in that other place.

Change-Id: I1d1a771a2de423a65a22714ecf86795a0dcfe2a9

6 years agoRe-enable accidentally lost DD warning
Szilárd Páll [Mon, 19 Jun 2017 21:35:38 +0000 (23:35 +0200)]
Re-enable accidentally lost DD warning

After the message got refactored in 147de64 the dd_warn() call was left
out and therefore a DD warning message would get assembled but never
printed.

NOTE: skip when merging into master, the fix has been added together
with modernization (Change-Id I860f52cf)

Change-Id: Ieaeae3bae69e029b671bf18a3cce6b1d2aebcea9

6 years agoRefactoring + clarification of DLB state handling
Szilárd Páll [Fri, 19 May 2017 16:02:01 +0000 (18:02 +0200)]
Refactoring + clarification of DLB state handling

The change does a few refactoring and renaming steps in order to clarify
DLB internal state handling code:
- separates the two DLB "off" states depending on whether the user
  turned it off or mdrun switched it off due to some internal condition;
- clarifies the naming of user-requested "on"/"off" states;
- disallow override of user-requested DLB "on"/"off" only allowing
  defaulting to disabling when "auto" is passed on the command line.

Change-Id: I5d7ed07deeded3f135884fc22fe558eabfe68533

6 years agoAdd tolerance to calc_verletbuf test
Berk Hess [Sat, 17 Jun 2017 09:36:53 +0000 (11:36 +0200)]
Add tolerance to calc_verletbuf test

Change-Id: I4cf79e7ca4411fb326d90916f8afcb218f01b176

6 years agoFixed a consistency check in make_edi for flooding
Carsten Kutzner [Thu, 15 Jun 2017 11:40:15 +0000 (13:40 +0200)]
Fixed a consistency check in make_edi for flooding

If one sets up a flooding .edi input file with gmx make_edi,
the code should check that one does not use of the last 6 eigenvectors
of the covariance matrix, which correspond to the rotational and
translational degrees of freedom.
The check that was in the code erroneously checked against the
number of eigenvalues neig that was stored in the .xvg file,
not against the total number of eigenvectors which depends on
the number of atoms nav used in gmx covar. Thus the original
check would always fail if the .xvg eigenvalue file contained
1-6 values only.

Change-Id: Ib293f6b69b80fbf014a7507431beaf1f939849ac

6 years agoAllow disabling the explicit use of CUDA textures
Szilárd Páll [Mon, 27 Mar 2017 17:19:19 +0000 (19:19 +0200)]
Allow disabling the explicit use of CUDA textures

This change implements fallback for the explicit CUDA texture loads
in the non-bonded kernels. This can be done by defining
DISABLE_CUDA_TEXTURES. When disabled texture objects/references
are not initialized either.

Also removed unnecessary extern declarations of texture references
in nbnxn_cuda_kernel_utils.cuh; this was only needed because texture
reference accesses were previously compiled unconditionally (and were
also generated in the nvcc host pass).

Change-Id: Id7cdd6f80da0abe6be5639e80bed6530c3ce25c0

6 years agoSimplify reporting from init_gpu
Mark Abraham [Wed, 31 May 2017 17:55:17 +0000 (18:55 +0100)]
Simplify reporting from init_gpu

makeGpuUsageReport reports whether the usage was selected by the user
or not, and has been run before we call init_gpu.

In any case, the reporting from init_gpu should only happen if mygpu
contains an invalid value, which should never happen so late in the
code, ie after all the previous consistency checks. Knowing whether
the user selected the GPUs or not doesn't help much, and that
information is available from makeGpuUsageReport, anyway.

Change-Id: I1b701dceb4f4c5ee62175827b6a70bb134b0f66a

6 years agoMore quotes
Erik Lindahl [Fri, 9 Jun 2017 22:07:34 +0000 (00:07 +0200)]
More quotes

Change-Id: Ia60e6cac8acbddad4857af8a56dee173002dcba9

6 years agoFix null pointer print in DD
Berk Hess [Mon, 12 Jun 2017 15:42:37 +0000 (17:42 +0200)]
Fix null pointer print in DD

Fixed a (rather harmless) print of a null pointer string during
DD initialization. This would only show up with mdrun -dlb yes.

Change-Id: I2ea16ce11a969d6102c6b6cac0d3853aa9dd4c86

6 years agoMove gmx_parse_gpu_id out of checking function
Mark Abraham [Wed, 31 May 2017 17:52:10 +0000 (18:52 +0100)]
Move gmx_parse_gpu_id out of checking function

Parsing user input should happen separately from running checks for
consistency or sanity. Some of the content of gmx_parse_gpu_id is more
like consistency checking, so left that where it was, using the output
of the parsing to run the checks. Doing so means that the first such
check now works when GMX_GPU_ID is used, when previously it did not.

Made minor improvement to error message text for that check.

Noted TODO to remove helper functionality for GPU sharing checks,
since it is now supported everywhere.

Change-Id: I2ea5841f0fdf461f3024b442a2fe641ea1435f49

6 years agoStore a physical node communicator in t_commrec
Aleksei Iupinov [Thu, 11 May 2017 15:03:11 +0000 (17:03 +0200)]
Store a physical node communicator in t_commrec

Introduced a physical node communicator and a corresponding barrier
function, which is called within thread-MPI builds before
the GPU context deallocation, instead of a task-group (PP/PME) barrier.

Change-Id: I394db9d223f32dc2e093c0757889ba48485a8a88

6 years agoUpdated TNG to version 1.8
Magnus Lundborg [Wed, 7 Jun 2017 10:08:36 +0000 (12:08 +0200)]
Updated TNG to version 1.8

Corresponds to commit 9d76cd757cfe13eefc554407683b462c4f414390
in the TNG repository.

Added data block for atom masses.
Fixed some bugs and warnings.

Change-Id: I45cfd2f183b338fb1ac43719d62a5c63c3e35f94

6 years agoPut replica exchange parameters in a struct
Berk Hess [Fri, 9 Jun 2017 19:38:58 +0000 (21:38 +0200)]
Put replica exchange parameters in a struct

Change-Id: I56d3b19c3e3c83bf99ac622930fb20c1efdc129d

6 years agoMoved essential dynamics initialization call into do_md()
Carsten Kutzner [Tue, 1 Mar 2016 14:43:13 +0000 (15:43 +0100)]
Moved essential dynamics initialization call into do_md()

- init_edsam is now called in do_md() in the same code block
  where the membed and the swap code gets initialized
- the ed struct is removed from the integrator calls
- removed a TODO, which was actually already done (closing of edo file)
- Fixes one of the TODOs left from gerrit.gromacs.org/#/c/5660/

Change-Id: I396cf943fe34ef1683204effd4d5e935e6132dd7

6 years agoReplace iso by instead of
Berk Hess [Fri, 9 Jun 2017 15:18:03 +0000 (17:18 +0200)]
Replace iso by instead of

Replaced "iso" by "instead of" in all user-facing text.

Fixes #2202.

Change-Id: I126b5d06bb933d68c22faae3b8f39de38b704b78

6 years agoAdopt and document implementation policy for MD modules
Carsten Kutzner [Mon, 29 May 2017 15:00:53 +0000 (17:00 +0200)]
Adopt and document implementation policy for MD modules

This approach concisely expresses intent in a way that a tool/compiler
could enforce, and which provides a hint to discourage development
from using module classes as bases of inheritance. This conforms to
CppCoreGuidelines C.128 and is now documented in the high-level
developer docs.

Change-Id: I8312af73d1ffd8c0a4234fc30488d016dd969a9f

6 years agoFix COM pull force with SD
Berk Hess [Thu, 8 Jun 2017 09:38:17 +0000 (11:38 +0200)]
Fix COM pull force with SD

The reported COM pull force when using the SD integrator was random
only. Now the pull force is summed over the systematic and random
SD update components.
A better solution is to not add the random force at all, but such
a change should not be done in a release branch.

Fixes #2201.

Change-Id: I10a56b30b952869396d170914bcbc0163299a1c8

6 years agoAvoid grompp charge warning with rounding
Berk Hess [Fri, 2 Jun 2017 08:35:16 +0000 (10:35 +0200)]
Avoid grompp charge warning with rounding

Even though the grompp total charge check uses double for summation,
there are rounding errors for each charge when charges are stored
in single precision. Now the charge check rounds the net charge of
molecules to integer when the difference is less than the maximum
possible sum of charge rounding errors.

Fixes #2192.

Change-Id: I4e24620ed4ff0901b297db4689e75f0befd23944

6 years agoDocument floating-point arithmetic
Vedran Miletić [Tue, 6 Jun 2017 15:21:50 +0000 (17:21 +0200)]
Document floating-point arithmetic

From the wiki, expanded with the links to David Goldberg's legendary
paper and its appendix.

Change-Id: Idb18ff37d4e8495412847f06872af693283dd747

6 years agoExpand Performance section of the user guide
Vedran Miletić [Tue, 6 Jun 2017 15:21:21 +0000 (17:21 +0200)]
Expand Performance section of the user guide

Salvage and clean up the content from the wiki to expand the user
guide. Minor fixes to the rest of the Performance section.

Change-Id: I39aba257c4c761a3a1ef428c64424da6fa449158

6 years agoSuppress sm_2x deprecation warning with CUDA 8.0
Szilárd Páll [Thu, 1 Jun 2017 12:47:39 +0000 (14:47 +0200)]
Suppress sm_2x deprecation warning with CUDA 8.0

The nvcc that comes with CUDA is is very noisy about deprecation of
Fermi hardware which is not nice and it also interferes with our CI
collecting nvcc warnings.

Refs #2142

Change-Id: I67b53eaab5744b59599d489735f80684580b89e7

6 years agoAdd CUDA 8.0 + SIMD pre-submit test
Szilárd Páll [Thu, 1 Jun 2017 13:27:25 +0000 (15:27 +0200)]
Add CUDA 8.0 + SIMD pre-submit test

We've only tested gcc 4.8 + CUDA 7.5 because that was about the newest
setup supported at the time of the release. Shortly after CUDA 8.0 was
released and gcc 5 has been supported since. At the same time this
test also covers the SIMD code in the GPU path (i.e. search) that has
previously not been covered.

Change-Id: Idc8855deea931c5906f9eaa3d53e96bc282632db

6 years agoFix checkpoint reading without energy history
Berk Hess [Fri, 2 Jun 2017 06:31:53 +0000 (08:31 +0200)]
Fix checkpoint reading without energy history

When reading a checkpoint file without energy history a null pointer
could be dereferenced.

Fixes #2197.

Change-Id: Icf0e3022a62bdbcd890d1c79c4a0f6c748df4402

7 years agoFix initial temperature reporting
Berk Hess [Fri, 2 Jun 2017 07:22:23 +0000 (09:22 +0200)]
Fix initial temperature reporting

When continuing a simulation from a checkpoint, mdrun could report
double the intial temperature when nstcalcenergy=1 of nsttcoupl=1.
Note that this only affected reporting, the actual velocities were
correct.
Now the initial temperature is no longer reported for continuation
runs, since at continuation there is no "initial" temperature.

Fixes #2199.

Change-Id: Ib165620f0b6228e96b412ce7b8fdb681d7701b68

7 years agoAdd ARM_NEON post-submit test
Szilárd Páll [Mon, 8 May 2017 10:37:32 +0000 (12:37 +0200)]
Add ARM_NEON post-submit test

Change-Id: Ie70d6b6793061c3632cb5015b5a5ff6c4ad410ba

7 years agoNew quote
Mark Abraham [Wed, 31 May 2017 13:15:28 +0000 (15:15 +0200)]
New quote

Change-Id: I66252b4543212758c5b283d60049ec594862bfe9

7 years agoFix NVML error messages
Mark Abraham [Mon, 29 May 2017 17:18:10 +0000 (19:18 +0200)]
Fix NVML error messages

These should refer to the API calls that failed, e.g. when users lack
permissions to change clocks.

Change-Id: If92fbcecb874b4853e2b4085bee6cfca012ab62a

7 years agoUpdate FindNVML to fix #2061
Jiri Kraus [Tue, 23 May 2017 08:29:49 +0000 (10:29 +0200)]
Update FindNVML to fix #2061

Fixes FindNVML to reflect move of the NVML development files from the
GDK to the CUDA Toolkit with CUDA 8.

Change-Id: I1d99ebff1fa32ba1fd44a37dcb43158da733daed

7 years agoAvoid some incorrect behavior with gmx solvate
Teemu Murtola [Thu, 25 May 2017 10:23:31 +0000 (13:23 +0300)]
Avoid some incorrect behavior with gmx solvate

gmx solvate cannot replicate non-rectangular solvent boxes correctly
(there are several different places that assume a diagonal box matrix),
so give a fatal error if that is attempted.  To support some uses with
triclinic boxes, skip the replication step if the solvent and target box
sizes are already equal.

Support for general triclinic boxes can be added separately, and the
check introduced here can be valuable even in that case: it keeps a
pre-equilibrated solvent box intact if the target box size is the same.

Related to #2148.

Change-Id: I078df1f2279ccb758b11787becb89f5dbbbdfca7

7 years agoRemove pbcutil <-> mdtypes cyclic dependency
Teemu Murtola [Thu, 25 May 2017 06:28:15 +0000 (09:28 +0300)]
Remove pbcutil <-> mdtypes cyclic dependency

This may not be the cleanest solution, but it separates the
responsibilities of having knowledge of t_state and t_inputrec from
the low-level code of preserving the box shape.  For a cleaner solution,
do_box_rel() could be separated into separate init and perform
functions, and having an internal data structure so that only the init
function would need parameters like the dimensions to correct.
Other alternative would be to move also do_box_rel() into state.cpp, but
not sure if there was a deeper reason putting it in pbcutil in the first
place.

Part of #1854.

Change-Id: I7ae16d3c2e795bd08d28da6111debf5d9d17599e

7 years agoStandardize use of |Gromacs| in reST docs
Vedran Miletić [Wed, 24 May 2017 12:40:46 +0000 (14:40 +0200)]
Standardize use of |Gromacs| in reST docs

Where possible, replace all occurences of GROMACS with |Gromacs|.

Change-Id: I4835a148aefb2d8b088ca63b444bb1107520fc52

7 years agoQuotes are cool, typo-free ones are even "cooler"
Szilárd Páll [Tue, 23 May 2017 18:05:47 +0000 (20:05 +0200)]
Quotes are cool, typo-free ones are even "cooler"

Applied spell check. Corrected obvious errors.

Change-Id: I2197e8faac72d6487fb607127ef1815335b749a8

7 years agoMade duplicate atoms in bondeds an error
Berk Hess [Fri, 5 May 2017 13:36:15 +0000 (15:36 +0200)]
Made duplicate atoms in bondeds an error

Having duplicate atom indices in bonded interactios used to be only
a warning. But since in nearly all cases this will lead to issues,
this is now a error, except for angle restraints where it can be
useful so there it is now a note.

Refs #2141.

Change-Id: I359257cc1685a8944d6bada74523d6c8fea62126

7 years agoQuotes from Gottingen workshop
Mark Abraham [Mon, 22 May 2017 11:49:20 +0000 (13:49 +0200)]
Quotes from Gottingen workshop

Change-Id: I7b12a04d19c98a349668a95108fd899673c59386

7 years agoImprove Verlet buffer constraint estimate
Berk Hess [Tue, 21 Mar 2017 15:30:10 +0000 (16:30 +0100)]
Improve Verlet buffer constraint estimate

The displacement estimate for a constrained atom (typically H)
rotating around the COM with a partner atom was not thoroughly
derived and the code documentation was not fully correct.
Now there is an exact MSD integral. Approximating that gives
the same v/(1+av+bv^2) variance scaling formula with a=1/6, but b
changed from 5/180 to 8/180, slightly lowering the buffer size.
Note that we (still) use a Gaussian with matched variance, which
results in a much larger buffer than necessary, since the tail of
the distribution sets the buffer size and the Gaussian has a long
tail whereas the actual distribution has no tail.

Also added a test for this estimate.

Change-Id: Ie6fb817dcd55177e5992facc7b68616f318572a3

7 years agoTest invsixthroot function as intended
Mark Abraham [Thu, 25 May 2017 23:59:34 +0000 (01:59 +0200)]
Test invsixthroot function as intended

Change-Id: I33fab8d4b8e848eb5d0bebec8e0f60f213bfd77d

7 years agoUpdated cool quotes
Erik Lindahl [Tue, 23 May 2017 09:43:36 +0000 (11:43 +0200)]
Updated cool quotes

Removed two recent purely political quotes, based on a gmx-users
discussion a few months ago. We aim for quotes to be fun, thought-provoking,
and preferrable have some relation to science or discovery, rather
than moving too far into pushing political ideas. Added some new quotes
too.

Change-Id: Icfd489af501f5c10bdc466f6fb0e41f06c707a23

7 years agoAdd conserved quantity for Berendsen P-couple
Berk Hess [Thu, 18 Aug 2016 08:36:30 +0000 (10:36 +0200)]
Add conserved quantity for Berendsen P-couple

The work the Berendsen barostat applies on the system is calculated
and integrated. This work is stored in a new entry in t_state.
Note that this makes it impossible to checkpoint continue or
concatenate energy files from older runs with Berendsen P-coupling.

Added formula for conserved quantity to the manual.

Now nearly all coupling algorithms support the conserved energy
quantity, added a paragraph on this in the manual.

Change-Id: I357fcd9edaba957a11bb02e39c746abfff37189e

7 years agoAdd basic doxygen for the Verlet nonbonded module
Szilárd Páll [Thu, 18 May 2017 00:47:45 +0000 (02:47 +0200)]
Add basic doxygen for the Verlet nonbonded module

Docs for the nb_verlet module in the main header.
Doxygen module definition is avoided to wokraround the requirement of
modulename == dirname.

Change-Id: I6f32216a6643f317de89f5fe68c2141c614425fd

7 years agoAdd conserved q. for PR and Berendsen T-couple
Berk Hess [Tue, 16 Aug 2016 11:55:24 +0000 (13:55 +0200)]
Add conserved q. for PR and Berendsen T-couple

Added the conserved energy quantities for Parrinello-Rahman
pressure coupling and Berendsen temperature coupling.
Note that this makes it impossible to checkpoint continue or
concatenate energy files from older runs with these coupling
algorithms.
Added corresponding formulas to the manual.

Change-Id: I1527592711f7c9d8fe6e2f7dbe325c8d3356e6bf

7 years agoMake DD setup obey PME restrictions
Berk Hess [Mon, 15 May 2017 06:40:19 +0000 (08:40 +0200)]
Make DD setup obey PME restrictions

When running with many MPI ranks relative to the system size
combined with OpenMP, the domain decomposition could choose a setup
with to few PME grid lines per rank along x, which resulted in
a fatal error. Now the PME grid restrictions are checked during
the domain decomposition setup.

Fixes #2177.

Change-Id: I2f3ded51d9f447a0571f78e7d6ead4d262f599d5

7 years agoRemove TMPI_ATOMICS from config.h
Roland Schulz [Wed, 17 May 2017 02:08:37 +0000 (19:08 -0700)]
Remove TMPI_ATOMICS from config.h

TMPI_ATOMICS isn't needed in config.h because
thread_mpi/atomic.h can always be included
and it sets TMPI_ATOMICS based on whether atomics
are available.

Change-Id: I4fb91ffc5f4e5d767b5333050fd18bcc3590a6bd

7 years agoIntroduce ObservablesHistory container
Berk Hess [Tue, 18 Oct 2016 13:09:34 +0000 (15:09 +0200)]
Introduce ObservablesHistory container

Introduces a ObservablesHistory class and moved energyhistory_t,
edsamstate_t and swapstate_t into this.

TODO: Move more observables history from t_state into this container.

Also added documentation in state.h.

Part of #2059.

Change-Id: Ic1efd95c5be2dede137763bfd24e3fb7d676eadd

7 years agoFix confout.gro with energy minimization
Berk Hess [Mon, 15 May 2017 15:40:10 +0000 (17:40 +0200)]
Fix confout.gro with energy minimization

Commit 5b88d3c18 caused the confout.gro with energy minimization
without domain decomposition to be the same as the starting structure.

Fixes #2179.

Change-Id: I02389d47573bca0d730608a831ceb393cfec792f

7 years agoUpdated use of compiler specifiers in testing
Mark Abraham [Mon, 15 May 2017 11:05:56 +0000 (13:05 +0200)]
Updated use of compiler specifiers in testing

Per #2161, we want to name newer gcc and clang via symlinks like
gcc-5, so that bug-fix updates can go smoothly.

Updated matrices, and coverage job script. Nothing else seems
to need it.

Refs #2161

Change-Id: I35bc20b160c1b1d90cca341f53dd366033c16c86

7 years agoUpdated use of gcc-5 specifiers
Mark Abraham [Mon, 15 May 2017 13:32:27 +0000 (15:32 +0200)]
Updated use of gcc-5 specifiers

Removed some TODOs that have been resolved by previous merge to
master.

Refs #2161

Change-Id: Ic4d47bcd282f9f973eca996168234a8b48948214

7 years agoUpdate clang static analyzer slave to use version 4
Mark Abraham [Sun, 14 May 2017 23:43:43 +0000 (01:43 +0200)]
Update clang static analyzer slave to use version 4

Change-Id: I2867683384fd85c28a6b807de6b72e331bd4383e

7 years agoFix LJPME + switch grompp error
Berk Hess [Mon, 15 May 2017 08:49:44 +0000 (10:49 +0200)]
Fix LJPME + switch grompp error

An error call was missing in grompp when LJPME was requested in
combination with a force or potential switch modifier.

Fixes #2174.

Change-Id: I92bc718869bf98b17efef1bab16c6457e07d0544

7 years agoUpdate clang-4
Mark Abraham [Tue, 9 May 2017 17:16:36 +0000 (19:16 +0200)]
Update clang-4

Test it in pre- and post-submit matrices

Refs #2161

Change-Id: I4b67920cb2c5a8caad07426ed98f06eeea8bd57e

7 years agoClarifications to editconf help text.
Justin Lemkul [Thu, 11 May 2017 00:45:37 +0000 (20:45 -0400)]
Clarifications to editconf help text.

It is possible that users can confuse -c with -center so this
patch makes it clear that -center doesn't do anything unless the
user really wants to shift the center of the system away from the
middle of the box.

Fixes #2171

Change-Id: Icd9048b00219ff83eb0297046bb7dfd8e8d7de10
(cherry picked from commit 36138bbb4ddcf28080819b11e9302f2825f4ebab)

7 years agoClarifications to editconf help text.
Justin Lemkul [Thu, 11 May 2017 00:45:37 +0000 (20:45 -0400)]
Clarifications to editconf help text.

It is possible that users can confuse -c with -center so this
patch makes it clear that -center doesn't do anything unless the
user really wants to shift the center of the system away from the
middle of the box.

Fixes #2171

Change-Id: Icd9048b00219ff83eb0297046bb7dfd8e8d7de10

7 years agoFix bugs in double Simd4 implementations
Berk Hess [Tue, 9 May 2017 20:45:18 +0000 (22:45 +0200)]
Fix bugs in double Simd4 implementations

The double precision version of reduce() and dotProduct()
returned a float with AVX_128_FMA, AVX_512, MIC and IBM_QPX.
Only reduce() is used in double, in the PME force gather.
The same bugs were fixed before for AVX(2)_256.

Refs #2162.

Change-Id: If1a5f044fc70ba1e8d7928a61e4e2c3d170a3922

7 years agoRemove static-intel from default flags
Roland Schulz [Thu, 11 May 2017 22:12:30 +0000 (15:12 -0700)]
Remove static-intel from default flags

Isn't guranteed to work with shared libraries. Also inconsistent
with other libraries, which default to shared libraries. Thus
should only be added with GMX_PREFER_STATIC_LIBS=on. Simpler to
just leave it to the user.

Change-Id: I9d8e0a6a81cd6ec961a2bd4f370714a2421f646c

7 years agoGeneralize command-line test output file checking
Teemu Murtola [Mon, 24 Apr 2017 15:34:29 +0000 (18:34 +0300)]
Generalize command-line test output file checking

Add a separate interface that gets passed a path to the temporary file
created by the program under test, instead of only supporting checking a
TextInputStream.  This makes it possible 1) to use old I/O routines such
as read_tps_conf() for the checks, and 2) to support binary files.

For now, all existing matchers still use streams; any matcher using the
old interface can be wrapped in the new implementation, and overloads
for setOutputFile() exist that do just that.  At least conftest.h could
be easily generalized with the new approach quite a bit.

Change-Id: Ibe71e22e568a54044d5fe64f88c43bb60cc530cb

7 years agoFix formatting of MKL cmake docs
Mark Abraham [Tue, 9 May 2017 19:52:15 +0000 (21:52 +0200)]
Fix formatting of MKL cmake docs

Change-Id: Ibd97e75b416e19fdf183abfe2381ddc2ffd8b490

7 years agoMerge branch release-2016
Mark Abraham [Tue, 9 May 2017 11:06:37 +0000 (13:06 +0200)]
Merge branch release-2016

Change-Id: I4c632a9ac632f73afe4e9ac43f31dcc5f4b520fc

7 years agoCleaned up memory usage in gmx traj and trjconv
Mark Abraham [Mon, 17 Apr 2017 14:40:12 +0000 (16:40 +0200)]
Cleaned up memory usage in gmx traj and trjconv

These have test coverage, so their memory leaks can show up in
Jenkins, so need fixing.

Removed the frame title from t_trxframe. This was only ever relevant
for the non-binary file formats, and was not really used consistently
there. For example, trjconv always constructed a title, because it
needs to do so if the file that it read was a binary trajectory file,
which is a frequent use case when writing a non-binary trajectory file
(e.g. export xtc to pdb). The g96 format was also handled differently
from gro and pdb, which was not necessary. Because sometimes a
non-binary conformation file is read and used to create a topology, a
symbol table entry was managed when it was not required when that file
was actually being treated as a trajectory file. Nowhere was a title
being read into a t_trxframe, and later written from that t_trxframe
in a different scope, so there is no need to store it.

Removed close_trj. This duplicated function makes it hard to implement
C-style cleanup that works properly and is maintainable without
leaking memory in one place or another.

Removed premature initialization of t_topology in trjconv. The initial
contents are over-written in read_tps_conf(). Documented that the caller
of that function must call done_top().

Reading g96 files was uselessly creating a symtab. This is only needed
if fr->atoms is valid, but if so then there would be a symtab to pass
in. fr->atoms is valid when we write, and in read_stx_conf, but this
is not the case for general trajectory-frame reading.

Memory allocated by TNG was leaking, so created free_wrapper() so
we can have an RAII guard for that.

Initialized some more pointers in trjconv.

Change-Id: I3c7ca63cc39f21c69810997a90ae2b45b6845263

7 years agoXpm test for gmx clustsize
David van der Spoel [Fri, 24 Mar 2017 15:29:44 +0000 (16:29 +0100)]
Xpm test for gmx clustsize

Made computation of RGB colors for matrix double precision.

Removed printing of binary information in xpm files
since it makes the header not reproducible. This is
not very useful anyway and the alternative to write
an XPM matcher would be overkill.

Change-Id: I4b12da5aaae246e4a146496b6973d5d6880fbf91

7 years agoMinor header file cleanup in ED, IMD and CompEL modules
Carsten Kutzner [Thu, 20 Apr 2017 13:02:58 +0000 (15:02 +0200)]
Minor header file cleanup in ED, IMD and CompEL modules

- removed dependency on wallcycle.h by forward declaring gmx_wallcycle,
  same with gmx_domdec_t
- merged and sorted "struct xyz" statements in these headers
- removed an unused gmx_wallcycle declaration in bonded.h
- removed unnecessary extern "C" statement in bonbded.h
- included <cstdio> instead of <stdio.h>

Change-Id: Ic397cdccb735b409b10802971ab60d8e078cd32e

7 years agoignore OS X Finder metadata
M. Eric Irrgang [Sat, 22 Apr 2017 19:47:47 +0000 (15:47 -0400)]
ignore OS X Finder metadata

Change-Id: I15dbf21ccf4157372c0f4f2d5b699a5d36a0618c

7 years agosort ignored file extensions
M. Eric Irrgang [Sat, 22 Apr 2017 19:42:05 +0000 (15:42 -0400)]
sort ignored file extensions

Change-Id: I9c84e10c2371f841cf530239d8748dacd12c4b63

7 years agoignore g++ precompiler header output
M. Eric Irrgang [Sat, 22 Apr 2017 19:40:15 +0000 (15:40 -0400)]
ignore g++ precompiler header output

Change-Id: Id23eca3422a50817b9e3b49ff49c6fb4e85b4d11

7 years agoClean up memory usage with oenv and xvg writing
Mark Abraham [Thu, 20 Apr 2017 09:18:29 +0000 (11:18 +0200)]
Clean up memory usage with oenv and xvg writing

Change-Id: I41386eaa7a045d115599b8f8a1839d12f7e4400d

7 years agoFix bugs in double AVX(2)_256 Simd4
Berk Hess [Fri, 21 Apr 2017 13:59:37 +0000 (15:59 +0200)]
Fix bugs in double AVX(2)_256 Simd4

The double precision version of reduce() and dotProduct()
returned a float with AVX_256 and AVX2_256.
Only reduce() is used in double, in the PME force gather.

Fixes #2162.

Change-Id: Iaa44921215e726726b2da223f3677c8637bc65ae

7 years agoRemove unused forward declarations of t_commrec in two headers
Carsten Kutzner [Wed, 19 Apr 2017 14:39:13 +0000 (16:39 +0200)]
Remove unused forward declarations of t_commrec in two headers

Change-Id: If2121af1baf280ffdcf028d5093db113e8fede6e

7 years agoFix unused SIMD PME table kernel
Berk Hess [Wed, 22 Mar 2017 18:16:31 +0000 (19:16 +0100)]
Fix unused SIMD PME table kernel

The nbnxn 2xNN PME kernel with tabulated correction had incorrect
forces by a factor 1 to 2. This kernel flavor could only be selected
manually by setting an environment variable.

Change-Id: I9a0ab8b155000ed43abbea3a9a7a58f692a884ec

7 years agoSuppress two compiler warnings
Berk Hess [Thu, 13 Apr 2017 19:57:24 +0000 (21:57 +0200)]
Suppress two compiler warnings

Change-Id: I61c0d9921e6e7a29d7e1380036a7519d91787128

7 years agoFixed AVX-512F compiler flags
Erik Lindahl [Sat, 1 Apr 2017 08:14:03 +0000 (10:14 +0200)]
Fixed AVX-512F compiler flags

Avoid using the MIC code generation flags for
the Xeon code path.

Change-Id: Ife0d36b95dda53edcd62959bd513c7d74b263766

7 years agoMinor change to GPU compatibility reporting handling
Mark Abraham [Mon, 17 Apr 2017 14:22:12 +0000 (16:22 +0200)]
Minor change to GPU compatibility reporting handling

The old code returned an int that was used to look up an
array of strings, and analysis programs can't tell whether
the use was valid.

While we could try to return an enum, instead the logic
of whether a device is compatible is separated from
describing why it isn't.

Noted TODO to move the definition of those strings to a good single
place, when there is one.

Change-Id: I504f4e7efcfcb76f97873ff1f98bee9c67b157a3

7 years agoPropose a post-submit matrix
Mark Abraham [Thu, 9 Mar 2017 17:49:12 +0000 (18:49 +0100)]
Propose a post-submit matrix

A recent bug would have been prevented if some testing of
separate PME ranks had been occuring.

Extended gromacs.py to permit regressiontests to run
with separate PME ranks, and/or designated numbers of
ranks, or GPU ids.

Quieted some newly exposed warnings.

Documented more of the reasoning behind matrix choices, to help us
maintain better. Noted various TODOs for better testing coverage.

Refs #2134

Change-Id: Ib9828ca769d7a446c61fb8bb7a68128a38991aba

7 years agoConsistent approach for whole-program tests
Teemu Murtola [Fri, 31 Mar 2017 19:34:02 +0000 (22:34 +0300)]
Consistent approach for whole-program tests

All tests that essentially execute one command-line program as the test
are now using CommandLineTestBase, which makes them much simpler, easier
to read, and a better source for copy-pasting new tests.  Move the
functionality of IntegrationTestFixture to a helper class that can be
used in any kind of test and not excluding other types of useful
fixtures from tests that need that functionality.

Tests that execute mdrun are not changed here to keep the scope limited.

Change-Id: Ic49593d6e27c48be43021e4fc9b1fcd685d43ffd

7 years agoImprove key-value tree gmx dump support
Teemu Murtola [Sun, 26 Mar 2017 11:31:08 +0000 (14:31 +0300)]
Improve key-value tree gmx dump support

Add test coverage for basic option types with the functionality used by
gmx dump, and implement missing types.  Move the dump functionality into
a free function.  Expose the to-string conversion for basic Variant
values outside keyvaluetree.cpp, as that will be at least transitionally
needed elsewhere, and it can also be useful for debugging.

Change-Id: I8d85ea308bec9369557b54528622948ead3fbed5

7 years agoReally enable avx512 in fftw only for select compilers
Vedran Miletić [Mon, 3 Apr 2017 15:46:05 +0000 (17:46 +0200)]
Really enable avx512 in fftw only for select compilers

Commit aa905d6 attempted to enable avx512 on GCC 4.9 or newer and
Clang 3.9 or newer, but had elseif() in place of else() and resulted
in no SIMD being enabled.

This patch really enables avx512 on supported compilers, and takes
care of all compilers we officially support (MSVC, GCC, Clang, ICC).

Change-Id: Ia626b4cc6c82a2155d633f1482b99d3b2601fa3a

7 years agoFix memory access issues in gmx solvate
Teemu Murtola [Tue, 28 Mar 2017 17:16:38 +0000 (20:16 +0300)]
Fix memory access issues in gmx solvate

There were out-of-bounds access if
 1) the solvent configuration was given as a .pdb file, or
 2) there were more than one type of residue in the solvent (which
    triggered sorting).

Also fix a memory leak in the sorting routine.

Should fix crashes mentioned in #2148.

Change-Id: If08a7bea989803dc5641f53478004e830268750d