alexxy/gromacs.git
6 years agoMerge branch release-2018
Mark Abraham [Wed, 28 Mar 2018 11:19:26 +0000 (13:19 +0200)]
Merge branch release-2018

Some meaningful conflicts in init_multisim associated with multisim
fixes and clarifications in release-2018 combining with reorganization
in master branch.

Preserved the master-branch pre-submit matrix, since all branches have
separate changes that cope with gpu_id=2 no longer being valid.

Change-Id: Idefe4f1ec3bbbc76dfedf03a81abef8233328de2

6 years agoMore gcc-8 fixes for POWER
Mark Abraham [Tue, 20 Mar 2018 07:39:37 +0000 (08:39 +0100)]
More gcc-8 fixes for POWER

Fixes #2421

Change-Id: I43c13df3a217d0f2154dca0ef215efd9cd27474a

6 years agominor fix to flag strings for gmx potential
Joe Jordan [Thu, 22 Mar 2018 08:59:25 +0000 (09:59 +0100)]
minor fix to flag strings for gmx potential

Change-Id: I2dadc8d74888dc2ebcd4fcf71e275c21fdd23cd6

6 years agoUpdated to prepare for 2018.2 release
Mark Abraham [Wed, 21 Mar 2018 15:04:44 +0000 (16:04 +0100)]
Updated to prepare for 2018.2 release

Change-Id: I1c72e8a3ac1b6b2e29b39c2d52bad5b87a884912

6 years agoAdded cool quote.
Viveca Lindahl [Thu, 22 Mar 2018 09:36:31 +0000 (10:36 +0100)]
Added cool quote.

Change-Id: I89d86d788f45f0d9124f5d00133709de83a73f38

6 years agoRenamed entropy.* to thermochemistry.*
David van der Spoel [Tue, 20 Mar 2018 21:04:42 +0000 (22:04 +0100)]
Renamed entropy.* to thermochemistry.*

This is a content-less patch to get the renaming history
correct in git.
Change-Id: I34f1d15f2e9136962b1718a60863b3b20a66fda5

6 years agoVersion 2018.1
Mark Abraham [Fri, 23 Feb 2018 13:20:17 +0000 (14:20 +0100)]
Version 2018.1

Change-Id: I3285c77fc557c1a6f34796c4bfb4843846b0d8a5

6 years agoMerge "Merge branch release-2016 into release-2018" into release-2018
Mark Abraham [Wed, 21 Mar 2018 11:07:16 +0000 (12:07 +0100)]
Merge "Merge branch release-2016 into release-2018" into release-2018

6 years agoUpdate release notes for 2018.1
Mark Abraham [Tue, 27 Feb 2018 16:10:15 +0000 (17:10 +0100)]
Update release notes for 2018.1

Change-Id: Ia60d523647e1915856ae3b00a0cb9eacd939fc56

6 years agoMerge branch release-2016 into release-2018
Mark Abraham [Tue, 20 Mar 2018 22:17:51 +0000 (23:17 +0100)]
Merge branch release-2016 into release-2018

Conflict in pre-submit matrix, kept 2018 content that already
has the same logical change made.

Change-Id: I40b2db8d149388bed07471fcdb8082b0fc92b9b5

6 years agoDocument matrix_convert function in PBC
Vedran Miletić [Tue, 20 Mar 2018 11:27:45 +0000 (12:27 +0100)]
Document matrix_convert function in PBC

The brief documentation was in place, but the documentation of the
function parameters was missing. This patch adds it and also fixes
incorrect Doxygen syntax at pbc_dx_d.

Change-Id: Ic897911bf4b8866bb7c4dc3aea982493cc03874c

6 years agoFix gmx dump AWH formatting issue
Berk Hess [Tue, 20 Mar 2018 12:19:01 +0000 (13:19 +0100)]
Fix gmx dump AWH formatting issue

A comma was missing in the list of AWH checkpoint entry string
which caused the naming to be messed up in the gmx dump output.

Change-Id: I85d0722236f3f9559c1117fdcee39766d04b424d

6 years agoUpdate use of gpu_id in Jenkins
Mark Abraham [Tue, 20 Mar 2018 11:50:17 +0000 (12:50 +0100)]
Update use of gpu_id in Jenkins

We plan to remove one of the GPUs from the slave that had three, so we
need to update the testing configurations. The new configuration might
balance load a little better.

Refs #2408, #2410

Change-Id: I3b5d9c8702c021f0676ea3ca12f9e7f1d3317ed1

6 years agoDisallow single simulation with multisim
Berk Hess [Mon, 19 Mar 2018 13:33:47 +0000 (14:33 +0100)]
Disallow single simulation with multisim

To avoid many untested code paths, we, at least temporarily,
disable a single simulation with mdrun -multisim and -multidir.

Refs #2448

Change-Id: I9befdb677f3c77bcc6dc0c77abc3478f0b83ba8d

6 years agoUpdate use of gpu_id in Jenkins
Mark Abraham [Tue, 20 Mar 2018 11:51:56 +0000 (12:51 +0100)]
Update use of gpu_id in Jenkins

We plan to remove one of the GPUs from the slave that had three, so we
need to update the testing configurations. The new configuration might
balance load a little better.

Refs #2408, #2410

Change-Id: Ie253ef07998cf45c5fc2e118a5394f0817e66f75

6 years agoUpdate use of gpu_id in Jenkins
Mark Abraham [Sun, 18 Mar 2018 19:34:53 +0000 (20:34 +0100)]
Update use of gpu_id in Jenkins

We plan to remove one of the GPUs from the slave that had three, so we
need to update the testing configurations. The new configuration might
balance load a little better.

Refs #2408, #2410

Change-Id: Ia63cb701049a02ad86fdd9f9c03388cd11a14bcc

6 years agoClarify the mdrun GPU options docs
Aleksei Iupinov [Thu, 1 Mar 2018 22:32:03 +0000 (23:32 +0100)]
Clarify the mdrun GPU options docs

Refs #2359

Change-Id: If112077a59f875ffb1c689b2ac67dad7cdf2adb9

6 years agoAdd helper function to make a vector from an ArrayRef
Mark Abraham [Tue, 6 Mar 2018 09:53:19 +0000 (10:53 +0100)]
Add helper function to make a vector from an ArrayRef

This syntactic sugar makes it easy to make a vector with a copy of the
contents.

Change-Id: Ib51c8a1d88aee7ca35fe1715d6f094b60e90e0b2

6 years agoFix VSX SIMD with gcc 8
Mark Abraham [Fri, 16 Mar 2018 21:21:48 +0000 (22:21 +0100)]
Fix VSX SIMD with gcc 8

gcc 8 apparently generates different code for the former GROMACS
code, which seems buggy. See
https://bugzilla.redhat.com/show_bug.cgi?id=1556989#c3
and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84907

Fixes #2421

Change-Id: I31492cd582b785cdfb42e8b999a165a7339ce4be

6 years agoOnly free topology when allocated
Paul Bauer [Wed, 14 Mar 2018 09:15:42 +0000 (10:15 +0100)]
Only free topology when allocated

Fix trjconv so that the topology only gets free'd when it has been
previously allocated.

Fixes #2430

Change-Id: Idc9a4219d988e1794ef86f7cc79f0d00750394ca

6 years agoAdd a basic TPI sanity test
Aleksei Iupinov [Thu, 1 Feb 2018 16:16:52 +0000 (17:16 +0100)]
Add a basic TPI sanity test

The floating point exceptions are for now toggled off
in the test body instead of mdrun itself.

Refs #2391

Change-Id: I41b584f4753b9b0e126256a94c1304f0a870aa73

6 years agoStop gmx_feenableexcept() from returning previous exception settings on Apple
Aleksei Iupinov [Fri, 16 Mar 2018 10:18:47 +0000 (11:18 +0100)]
Stop gmx_feenableexcept() from returning previous exception settings on Apple

This makes the function return value unambiguous.

Change-Id: I3e64e769b27fb0fa59b650d18b2fd099a9181025

6 years agoSplit off entropy calculation to separate file.
David van der Spoel [Fri, 29 Dec 2017 20:56:09 +0000 (21:56 +0100)]
Split off entropy calculation to separate file.

The calculation of the quasiharmonic entropy or the one
through the Schlitter formula has some popularity. In
order to allow computation from a normal mode analysis
as well as from a PCA (essential dynamics analysis) the
code was split off into a separate file. Proper documentation
and five tests are provided as well. Minor cleanups
were done as well.

Change-Id: Ic5e4feab6a304946947d6e69be75c06b46aff75c

6 years agoCorrect PMF sign error in AWH bias sharing
Berk Hess [Fri, 16 Mar 2018 10:00:41 +0000 (11:00 +0100)]
Correct PMF sign error in AWH bias sharing

Recent commit 229c8f63 was though to fix a sign error in
the calculation of the deconvolution of the AWH PMF when sharing
the bias over multiple simulations, but this sign was misplaced.

Fixes #2439

Change-Id: I67ec06ff4d832a857467b58b362f9f6f88671aa8

6 years agoFix recent mdrun signaling bug
Berk Hess [Thu, 15 Mar 2018 17:09:55 +0000 (18:09 +0100)]
Fix recent mdrun signaling bug

Recent commit e4deba12 accidentally negated the locality condition
for signaling checkpoint and termination in mdrun.

Fixes #2457

Change-Id: I1b7a4c26637766a44cad2581c9c9ec420aa4ab6e

6 years agoRestore the lost mc_temp check in grompp
Aleksei Iupinov [Tue, 23 Jan 2018 11:45:04 +0000 (12:45 +0100)]
Restore the lost mc_temp check in grompp

The expression for checking whether the reference temperature
is defined is moved into a helper function.

Change-Id: Ib331f52e8031a5e5d7c32234cfe936024c49ac28

6 years agoFix virial with external pull potential and MPI
Berk Hess [Thu, 15 Mar 2018 10:25:50 +0000 (11:25 +0100)]
Fix virial with external pull potential and MPI

When using an external pull potential with domain decomposition,
currently this is only used by AWH, the virial contribution would
be multiplied with the number of MPI ranks.

Fixes #2455

Change-Id: I61452fb9eca6e68fea3256cc25b39033a9c5d8e7

6 years agoImprove inter-simulation signaling
Berk Hess [Wed, 14 Mar 2018 10:59:53 +0000 (11:59 +0100)]
Improve inter-simulation signaling

Use a single boolean for controlling inter-simulation signaling.
This would have prevented issue #2447.
Introduce an inter-simulating signaling frequency. This both
simplifies the code and significantly reduces communiation overhead
for many simulations and/or many ranks per simulation.
Correct the terminimation step print with replica exchange.

Refs #2440 and #2447

Change-Id: I8ed50c5b11564d9a967bcacb15c4fcd3be05caea

6 years agoMake a persistent physical node communicator
Mark Abraham [Thu, 25 Jan 2018 14:47:35 +0000 (15:47 +0100)]
Make a persistent physical node communicator

Rather than make and re-make this communicator multiple times for for
almost all common run configurations, build one, and keep it in a
place distinct from commrec (which has too many responsibilities
already).

Note that the master thread-MPI rank builds a fake one initially,
because MPI is not yet initialized, then coordinates to build the real
one with the newly launched threads. However that communicator is not
actually used until after the execution paths have re-joined.

Simplifies IThreadAffinityAccess while retaining the ability to test
the affinity-setting logic without requiring specific attributes of
the node. Note that some of the tests already required that a
particular MPI environment exists.

Change-Id: Ie0800b07a65f9579ddc8af8f418cd14b85671de7

6 years agoFix mdrun signalling with AWH bias sharing
Berk Hess [Wed, 14 Mar 2018 08:32:23 +0000 (09:32 +0100)]
Fix mdrun signalling with AWH bias sharing

The recent commit 717fd5b8, which should have fixed issue #2440,
disabled checkpointing and termination by disabled signalling
between AWH runs that share a bias.

Fixes #2447
Refs #2440

Change-Id: Ic80ea07cfa1bde1b31fa9d660f00492b794b000f

6 years agoFix COM pulling with external potential with #ranks>32
Berk Hess [Mon, 12 Mar 2018 15:54:04 +0000 (16:54 +0100)]
Fix COM pulling with external potential with #ranks>32

With more than 32 PP-ranks, the pull code could use only a subset
of the PP-ranks. This change forces all ranks to do pulling when
external potentials are present (currently only used by AWH).

Fixes #2441

Change-Id: I8501024b7961600ec79f3707e239ddf25525aa79

6 years agoFix pull bug with geometry=direction-periodic
Berk Hess [Tue, 13 Mar 2018 13:59:19 +0000 (14:59 +0100)]
Fix pull bug with geometry=direction-periodic

When doing COM pulling with geometry direction-periodic,
the reference location needs to be used to compute the current
distance. This reference was taken from the previous step instead
of the current. In practice this only caused issues at restarts
when the distance was more than half the box length.

Fixes #2446

Change-Id: Ie0c0341ad8c6ce1e78951270cab27ecaf95d65eb

6 years agoAdd AWH fixes to release notes
Berk Hess [Tue, 13 Mar 2018 13:18:45 +0000 (14:18 +0100)]
Add AWH fixes to release notes

Change-Id: I17531da77495367b0e62b4e0b0e912bbd16659f9

6 years agoAdd more const to uses of t_commrec and t_inputrec
Mark Abraham [Mon, 26 Feb 2018 16:47:02 +0000 (17:47 +0100)]
Add more const to uses of t_commrec and t_inputrec

Also removed some pointless struct keywords.

Refs #2423

Change-Id: Iacc008fb11a31646e798364e253de322c16ccaee

6 years agoRequire OpenCL 1.2
Szilárd Páll [Tue, 13 Mar 2018 02:24:58 +0000 (03:24 +0100)]
Require OpenCL 1.2

This commit bumps the requirement and removes OpenCL 1.1 API
compatibility support.

Refs #2438

Change-Id: Iaedf5fbdfd24a2d020983847815c2c21bac0f74c

6 years agoFix AWH ensemble checkpointing
Berk Hess [Mon, 12 Mar 2018 15:43:53 +0000 (16:43 +0100)]
Fix AWH ensemble checkpointing

AWH multi-runs with shared bias could terminate at different steps
leading to checkpointing from which continuation was impossible.

Fixes #2440.

Change-Id: I728c6aea9d030fcfad04efc6082309dafe3408bd

6 years agoFix AWH deconvolution when sharing a bias
Berk Hess [Mon, 12 Mar 2018 20:36:07 +0000 (21:36 +0100)]
Fix AWH deconvolution when sharing a bias

When sharing an AWH bias over multiple simulations, the PMF output
was garbage due to a missing minus sign in the reduction.
Note that this only affected the PMF output, not the sampling.

Fixes #2439

Change-Id: I688cda045f5e757e58b392d64384705b3ac73a17

6 years agoIntroduce constrain_shake
Mark Abraham [Wed, 21 Feb 2018 15:02:46 +0000 (16:02 +0100)]
Introduce constrain_shake

Also move various functions and fields of general constraint code and
data to the SHAKE code and data structures. Made some use of inputrec
const, to suit later changes.

Change-Id: I09b7a719b58f8f8192762431edc139674eaf23ae

6 years agoFix clang 6.0 with CUDA 9.0
Szilárd Páll [Mon, 12 Mar 2018 23:23:07 +0000 (00:23 +0100)]
Fix clang 6.0 with CUDA 9.0

This enables clang 6.0 CUDA build for sm_70 and works around an issue
which seems to affect sm_37 support.

Fixes #2443

Change-Id: Ib9c52e4a3a8ac1e05e851c8166eec4a6b5df4825

6 years agoMerge "Merge branch release-2018"
Mark Abraham [Tue, 13 Mar 2018 08:52:50 +0000 (09:52 +0100)]
Merge "Merge branch release-2018"

6 years agoAvoid icc-specific -march=core-avx2 flag with gcc/clang
Szilárd Páll [Wed, 15 Nov 2017 19:48:50 +0000 (20:48 +0100)]
Avoid icc-specific -march=core-avx2 flag with gcc/clang

This change makes sure that the -march=core-avx2 icc-specific
optimization flag is only used for Intel compilers. It is not only
unnecessary for gcc/clang but also undocumented (and not proven to be
useful, actually potentually harmful with gcc <=6, measured 1-3% lower
perf.).

Change-Id: Ic2f05554ea6e460c53fa307fc1da3de1b6868e2f

6 years agoTest gcc-6 and cuda-9.0
Mark Abraham [Fri, 23 Feb 2018 12:20:56 +0000 (13:20 +0100)]
Test gcc-6 and cuda-9.0

Change-Id: Iba9436d9629a404290eb02d897b8d48f2a77b5ee

6 years agoCorrect pdb2gmx -missing option
Berk Hess [Wed, 7 Mar 2018 12:48:42 +0000 (13:48 +0100)]
Correct pdb2gmx -missing option

The help text for the pdb2gmx -missing option only mentioned
missing atoms, but when atoms are missing also bonded interactions
will be missing. Now bonds are mentioned in the help text.
Since -missing allows for missing bonds, it now also allows for
dangling bonds at termini (which can actually be useful in special
cases).

Change-Id: I8d7215691ffc7dbb49f41964af9639c01355d775

6 years agoFix memory leak in PME
Berk Hess [Wed, 7 Mar 2018 07:18:04 +0000 (08:18 +0100)]
Fix memory leak in PME

Now pme_spline_work is freed.

Change-Id: Ia959a85929b794c94a2befcce455151be1b6eca1

6 years agoExtend "Finding out how to run mdrun better" section
Szilárd Páll [Tue, 6 Mar 2018 18:10:55 +0000 (19:10 +0100)]
Extend "Finding out how to run mdrun better" section

Change-Id: I76c75504ef505e2547861015eb20d6d6b1f31383

6 years agoIsolate PME GPU spline parameter indexing in inline functions
Aleksei Iupinov [Fri, 2 Mar 2018 17:15:52 +0000 (18:15 +0100)]
Isolate PME GPU spline parameter indexing in inline functions

This makes the spread/gather kernels more readable and allows
to change the spline indexing scheme much easier in
the future. Performance should not be affected.
More TODO regarding the spline indexing scheme is marked.

Change-Id: If735cccf2ce82f46b483c9ada6f309425c51f67e

6 years agoConvert t_filenm to C++
Berk Hess [Fri, 23 Feb 2018 12:17:10 +0000 (13:17 +0100)]
Convert t_filenm to C++

This change is only refactoring.
Struct members opt and fn are now const char * const.
Replaced nfiles and fns by a vector of strings.
Removed, now unnecessary, copy and delete functions.

Change-Id: I7122f06e7264ad378022321b4c61acf1e3caabd6

6 years agoMerge branch release-2018
Mark Abraham [Tue, 6 Mar 2018 14:07:45 +0000 (15:07 +0100)]
Merge branch release-2018

Minor conflicts from separation of multisim from commrec,
and code movement in constraints code.

Change-Id: Id1fea8a7de0726e34eb2d43b2420b4753631f303

6 years agoFixed dvdlambda for SHAKE + FE
Mark Abraham [Fri, 2 Mar 2018 10:22:42 +0000 (11:22 +0100)]
Fixed dvdlambda for SHAKE + FE

Garbage values have been accumulated to dvdlambda whenever SHAKE was
used.

Refactoring in 513813b514 removed the lam variable. Previously, it was
used as a temporary iteration variable over SHAKE blocks, but that
refactoring to use the main variable changed the logic of the
following loop.

Fixes #2434

Change-Id: Ia9642f50358ab31ec98f8317f7a1dcda8622a9f1

6 years agoMake multi-atom TPI reproducible
Berk Hess [Mon, 5 Mar 2018 15:34:38 +0000 (16:34 +0100)]
Make multi-atom TPI reproducible

Test particle insertion of molecules of more than one atom called
a rotate function with multiple random calls in the arguments. This
lead to non-reproducible results, at least when switching compiler,
since the language does not define the argument evaluation order.
Note that this issue did not affect physical correctness.

Change-Id: I9ab07566878f381f11284d813d9077fa90e68866

6 years agoAdd checks for non-null log file pointer in AWH
Viveca Lindahl [Mon, 5 Mar 2018 18:31:20 +0000 (19:31 +0100)]
Add checks for non-null log file pointer in AWH

Mdp-option 'awh1-equilibrate-histogram=yes' and certain run setups could
lead to a segmentation fault due to fplog being null.

Fixes #2436

Change-Id: I0110325a8624c9d434af5eeeccace29814d40f2d

6 years agoWork around gcc bug with group kernel tables
Berk Hess [Wed, 28 Feb 2018 13:09:33 +0000 (14:09 +0100)]
Work around gcc bug with group kernel tables

The LJ-only interaction tables for the group kernels were incorrectly
copied with the combination of gcc-6, AVX and -O3.
Since this bug replaced -1/(6 r^6), 1/(12 r^-12) by 1/r,-1/(6 r^6)
for odd table indices, this could not cause silent errors.

Fixes #2424

Change-Id: I021d4f2fe81bd635e6f02686118d661af8c444a6

6 years agoStop using custom FindOpenCL.cmake, per TODO
Aleksei Iupinov [Tue, 27 Feb 2018 16:55:31 +0000 (17:55 +0100)]
Stop using custom FindOpenCL.cmake, per TODO

It was originally taken from cmake 3.1.0 and modified to produce
all-uppercase variable names (with OPENCL_ instead of OpenCL_),
so the surrounding cmake code is now changed to expect exact-case names.

Another (undocumented) modification was that it took into account
CUDA_HOME env.var. when searching for OpenCL, while standard cmake
only looks at seemingly less useful CUDA_PATH. This useful trick is
preserved by temporarily appending $ENV{CUDA_HOME} to CMAKE_PREFIX_PATH.

Change-Id: I5ca60f88e657b064fb6f98b268c2c48e10f00986

6 years agoCorrect the nbnxn_gpu_compile_kernels() docs
Aleksei Iupinov [Thu, 1 Mar 2018 10:31:30 +0000 (11:31 +0100)]
Correct the nbnxn_gpu_compile_kernels() docs

Change-Id: Ieb9d3fd8a55754f6fe04d66b49c1cead1cd4b7c8

6 years agoLeave nullptr opt in t_filenm
Berk Hess [Fri, 23 Feb 2018 13:01:15 +0000 (14:01 +0100)]
Leave nullptr opt in t_filenm

File options that use the default extension of the file type by
setting opt=nullptr in t_filenm are no longer updated by
parse_common_args. Instead the (default) option name is looked up
based on the file type in the utilty functions.
This is preparation for converting t_filenm to C++.

Change-Id: I907c1e88f91ab2e524a72c03c27fd67ad641bc02

6 years agoAdd to the contributor section
Szilárd Páll [Fri, 2 Mar 2018 16:58:41 +0000 (17:58 +0100)]
Add to the contributor section

Change-Id: I1642f1ca247cf0e11781af4848b74e3d0ebd5082

6 years agoFix cppcheck warning
Berk Hess [Fri, 2 Mar 2018 22:45:29 +0000 (23:45 +0100)]
Fix cppcheck warning

Change-Id: Ib188b6da439d071a615158c4889b1a0f6edbda08

6 years agoMake TPI use double precision exp
Aleksei Iupinov [Thu, 1 Mar 2018 13:14:40 +0000 (14:14 +0100)]
Make TPI use double precision exp

This makes borderline results reproducible with different
compilers (e.g. with MSVC).

Change-Id: I7b7c50c4f857b4fe2966f49a6ef685eab6598ff6

6 years agoFix AWH bias-sharing with parallel simulation
Berk Hess [Thu, 1 Mar 2018 20:58:32 +0000 (21:58 +0100)]
Fix AWH bias-sharing with parallel simulation

Sharing the AWH bias over multiple simulations only worked when
each simulation was running on a single MPI rank. Now parallel
simulations also work.

Fixes #2433.

Change-Id: I71f9069a31b033151c772aac84c9912d91b213a1

6 years agoDetect AMD SMT topology
Berk Hess [Fri, 23 Feb 2018 14:22:50 +0000 (15:22 +0100)]
Detect AMD SMT topology

On AMD Zen the cpuinfo code detected hyperthreading but put all
threads on different cores in the topology. Now the correct
topology is detected using extended APIC.
Also disabled topology detection for non-AMD, non-x2APIC x86.

Fixes #2388

Change-Id: I194f3e09e669c20d1d62355a36be062e6cce264e

6 years agoFix mdrun multisim with separate PME ranks
Berk Hess [Thu, 1 Mar 2018 08:30:55 +0000 (09:30 +0100)]
Fix mdrun multisim with separate PME ranks

When running multiple simulations using separate PME ranks,
mdrun would call MPI_Barrier with MPI_COMM_NULL on some ranks.
Note: no new release note needed, since this fixes a fix.

Refs #2403
Fixes #2431
Fixes #2432

Change-Id: I7fe96a15b5030dea3e093d12850f89f00ccc9f48

6 years agoMoved and removed constraint code
Mark Abraham [Wed, 21 Feb 2018 11:42:27 +0000 (12:42 +0100)]
Moved and removed constraint code

No functionality changes here.

Removed code that was formerly called by the now-removed
combination of Andersen T coupling and constraints.

Removed crattle declaration from header, and moved its definition to
before the point of use, as normal for functions with file static
linkage.

Moved constr_r_max and support functions to constraintrange.cpp,
because conceptually the functionality is independent of which
algorithm implements the constraints. The current implementation only
works with LINCS, but that's because SHAKE and DD can't be used
together.

Refs #2423

Change-Id: I9e4fa1a4bb57118ca17c55f312103439b38190e3

6 years agoReorganized constraint code
Mark Abraham [Fri, 16 Feb 2018 17:12:54 +0000 (18:12 +0100)]
Reorganized constraint code

Renamed constraints files after just their algorithm, not the original
programming language, which matches the test file that they
have. Separated header files for each algorithm with matching
names. Removed extern C. Minimized header dependencies. Removed
excessive use of struct keyword.

Removed some header declarations of functions declared static.

Refs #2423

Change-Id: If60ab052ae73ad981fa031c2db6b3e206b380f4c

6 years agoMerge branch 'release-2018'
Aleksei Iupinov [Tue, 27 Feb 2018 13:08:17 +0000 (14:08 +0100)]
Merge branch 'release-2018'

Conflict: multisim barrier handling in src/programs/mdrun/runner.cpp

Amended the test introduced in I16a3705a0d59a to exclude the implicit
solvent output which was disabled in Ib241555ff3d8e60.

Change-Id: Idf382c9c7ba92439097fcc9008cb9cc813daaab7

6 years agoFix GPU utils test
Mark Abraham [Fri, 23 Feb 2018 14:15:46 +0000 (15:15 +0100)]
Fix GPU utils test

We should only attempt device-side work when we have compatible GPUs.

Fixes #2405 for CUDA

Change-Id: Idc28c7e89a5f08ee1d19943e3663385f2b23ff44

6 years agoChange TNG file opening
Paul Bauer [Fri, 23 Feb 2018 14:33:33 +0000 (15:33 +0100)]
Change TNG file opening

Change to TNG file opening to return a pointer the same way as open_trx
does. This is needed in a follow-up change so that no memory is lost
there.

Also made sure it is possible to open TNG files if no input file is
specified, or if the input file is not of TNG type.

Change-Id: I47cf1625815e640b399ed5a0ed5bbc9a3ead6e1b

6 years agoPermit define .mdp field to assign values
Mark Abraham [Fri, 23 Feb 2018 10:45:56 +0000 (11:45 +0100)]
Permit define .mdp field to assign values

It is intended that the "define" .mdp field can set preprocessor
variables to values, but this got broken in some clean up. Added a
test to cover it.

Fixes #2392

Change-Id: I16a3705a0d59a912a8eb7bfad0b472f12d2dc377

6 years agoAdvice users on infinite output of TPI
Aleksei Iupinov [Mon, 19 Feb 2018 15:20:54 +0000 (16:20 +0100)]
Advice users on infinite output of TPI

Fixes #2416

Change-Id: I6202154bc2a24377d036e5c115f2c90b1c678dda

6 years agoOrganize for recording 2016-era release notes and add them
Mark Abraham [Tue, 9 Jan 2018 13:41:38 +0000 (14:41 +0100)]
Organize for recording 2016-era release notes and add them

This hierarchical organization will make it easy for us to present to
users that there were two maintained release series at the time of
writing, while making available links to the releases notes of
unmaintained series, and having a straightforward path for migrating
the 2016 folder to the older folder and updating the appropriate
links.

In master branch, we will have stub .rst files in
docs/release-notes/major/ that we can fill out as functionality
changes, and movev to docs/release-notes/2019/major when we
make the release-2019 branch.

Changes to release notes in release branches will merge naturally.

Later, we can make sure that tarballs can have a useful plain-text
version built into them via sphinx also.

Change-Id: Ie35f90a616cb89727f5a9600389fdf228ecd03cb

6 years agoFix md integrator with Nose-Hoover coupling
Berk Hess [Wed, 21 Feb 2018 22:02:32 +0000 (23:02 +0100)]
Fix md integrator with Nose-Hoover coupling

When applying NH T-coupling at an MD step and no PR P-coupling,
the md integrator could apply pressure scaling with an uninitialized
or outdated PR scaling matrix.

Fixes #2418

Change-Id: I835db72776e7782ac044807961bb899e4f8c6c7b

6 years agoSimplify mdrun tMPI thread spawning
Berk Hess [Thu, 22 Feb 2018 12:40:45 +0000 (13:40 +0100)]
Simplify mdrun tMPI thread spawning

During spawning of the tMPI threads in mdrunner, the mdrunner object
and filename pointer were copied twice. Now they are only copied once
and a const object/pointer is passed around.

Also made thread-MPI take a const argument to enable this and to
ensure correctness, as thread-MPI makes a copy of the argument pointer
for every thread which could cause problems without const.

Added an explicit MPI_Barrier after spawning, with documentation,
in preparation of removing the implicit barrier in MPI_Comm_split
in reinitialize_commrec_for_this_thread().

Change-Id: I31af8a8ff72aec28366c4aa20b357ed96bf95087

6 years agoEnhanced docs of pimpl pointer helper
Mark Abraham [Wed, 21 Feb 2018 09:24:17 +0000 (10:24 +0100)]
Enhanced docs of pimpl pointer helper

There are constraints on where the destructor can be defined, and
doing it wrongly can provoke confusing compiler errors.

Change-Id: I241d8713d5e9a74f17698397ef871784db9a7292

6 years agoSwitch pre-submit CUDA 8.0 test to 9.0
Szilárd Páll [Wed, 21 Feb 2018 00:12:59 +0000 (01:12 +0100)]
Switch pre-submit CUDA 8.0 test to 9.0

Noted in TODO to add a CUDA 9.1 + gcc 6 config.

Change-Id: I1e9e1a0bcd99237167335f475d65791f6059dbb3

6 years agoRemove unused OpenCL debug buffer
Aleksei Iupinov [Tue, 20 Feb 2018 12:50:06 +0000 (13:50 +0100)]
Remove unused OpenCL debug buffer

Change-Id: I8f5f8a7f1b099f7cf7b058213dedb4d35e35c50c

6 years agoAvoid aborting mdrun when GPU sanity check detects errors
Szilárd Páll [Fri, 16 Feb 2018 18:48:46 +0000 (19:48 +0100)]
Avoid aborting mdrun when GPU sanity check detects errors

A release assertion was added which assumed that the GPU
compatibility/sanity checks return with a clean CUDA API state.
Consequently, any run that encountered a non-success return value from
the CUDA API would abort the run instead of continuing the run without
using the GPU in question.
This change adds code to handle and issue a note on the error
encountered as well as ensures that the CUDA API error state cleared
at the return of the GPU detection.

Fixes #2415

Change-Id: I5d7ed59ef8e4052a75b51c9a526b8dcb465ff611

6 years agoRemove cycle suppression
Mark Abraham [Wed, 14 Feb 2018 13:26:13 +0000 (14:26 +0100)]
Remove cycle suppression

The dependency was recorded the wrong way around. t_state needs to
have a GPU-aware allocator, so needs to depend on GPU utility
functionality.

Change-Id: I4f67962a564cb6abdd83ba081e08a35fe27af6c3

6 years agoDisallowed change of ensemble for checkpoint restart
Mark Abraham [Fri, 26 Jan 2018 16:22:04 +0000 (17:22 +0100)]
Disallowed change of ensemble for checkpoint restart

Change-Id: I63a8330043fddffc9cfc98203f60d71497e6c2f7

6 years agoReplace *_free_buffered calls by freeDeviceBuffer
Aleksei Iupinov [Tue, 13 Feb 2018 16:49:40 +0000 (17:49 +0100)]
Replace *_free_buffered calls by freeDeviceBuffer

Change-Id: Iaabd4b6655615294943254a29a65507af7567ade

6 years agoMerge branch release-2016 into release-2018
Mark Abraham [Fri, 16 Feb 2018 17:09:01 +0000 (18:09 +0100)]
Merge branch release-2016 into release-2018

Change-Id: If1c8c37bbfc44ae383999b828d1dfea4cf67d1ea

6 years agoBumped patch version for next release
Mark Abraham [Fri, 16 Feb 2018 15:06:21 +0000 (16:06 +0100)]
Bumped patch version for next release

Change-Id: I174548b1be5261aea861ec29d550ee323ce3702e

6 years agoCorrect multisim MPI barrier
Berk Hess [Wed, 7 Feb 2018 10:03:46 +0000 (11:03 +0100)]
Correct multisim MPI barrier

An MPI barrier used with multisim was called on incorrect ranks
and a barrier was missing.

Fixes #2403

Change-Id: I06a66167afc8dca9cdd4ca9b4f9a806984a6ec7a

6 years agoMerge branch release-2018 into master
Mark Abraham [Fri, 16 Feb 2018 12:25:41 +0000 (13:25 +0100)]
Merge branch release-2018 into master

Trivial conflict in checkpoint.cpp from fixing whether a return value
was ignored.

Change-Id: Ie2006eeee1118b32d1a46e47191db45b454a4ecd

6 years agoFix PME for large systems with Fermi GPUs
Aleksei Iupinov [Thu, 15 Feb 2018 12:27:48 +0000 (13:27 +0100)]
Fix PME for large systems with Fermi GPUs

PME spread/gather CUDA kernel scheduling did not account for
compute capability limitations. Realistically this has only
caused it to fail on CC 2.x with input systems larger than
2^18 ~= 262k atoms. This is now fixed for all CUDA architectures.

Fixes #2409

Change-Id: I59295b5d53a341d08a221aebb52e1db9f1e80107

6 years agoVersion 2016.5
Mark Abraham [Fri, 16 Feb 2018 07:41:28 +0000 (08:41 +0100)]
Version 2016.5

Change-Id: I7dd31f2deea884f3075555547c4f3691bd4adae3

6 years agoUse struct for checkpoint header contents
Mark Abraham [Thu, 25 Jan 2018 20:37:06 +0000 (21:37 +0100)]
Use struct for checkpoint header contents

Also cleaned up some memory handling for strings in the header.

Change-Id: I3837844afdf863de263dbc8d2e88071ca50e23fb

6 years agoUpdate FFTW build to 3.3.7
Aleksei Iupinov [Tue, 19 Dec 2017 17:42:09 +0000 (18:42 +0100)]
Update FFTW build to 3.3.7

Refs #2358

Change-Id: Ifc4f1b289836c37d2f5edbfabfe26592d761b0ee

6 years agoAdd freeDeviceBuffer GPU utility function
Aleksei Iupinov [Mon, 12 Feb 2018 09:16:15 +0000 (10:16 +0100)]
Add freeDeviceBuffer GPU utility function

This allows to make the GPU pairlist deletion code look same
for CUDA and OpenCL. More cleanup TODOs are left.

Change-Id: I4f7775ae2bda65b69696f7aacdb1d3fea9c62ac5

6 years agoAdd the missing comma in the quote
Aleksei Iupinov [Thu, 15 Feb 2018 14:19:33 +0000 (15:19 +0100)]
Add the missing comma in the quote

This was printed as:
GROMACS reminds you: "It's just B I O L O G Y, can't you see?Joe Jackson" ((null))

Change-Id: I69e86ecda8930fffeeab3a54f2f015339fd9b345

6 years agoRemove read_checkpoint_state
Mark Abraham [Thu, 25 Jan 2018 20:58:43 +0000 (21:58 +0100)]
Remove read_checkpoint_state

Left over after its caller was removed in 8850750d352d

Change-Id: Iee119c38443e113263515e2e82351e5b2ee6546f

6 years agoRemove support for tpx version before 58/gmx4.0
Berk Hess [Wed, 14 Feb 2018 09:17:59 +0000 (10:17 +0100)]
Remove support for tpx version before 58/gmx4.0

Change-Id: I2e5d7f23e9a6825c30a6687099a27e73857a59cd

6 years agoUse std::vector for checkpoint outputfiles
Mark Abraham [Thu, 25 Jan 2018 10:56:41 +0000 (11:56 +0100)]
Use std::vector for checkpoint outputfiles

Change-Id: Ic547bc12dccd4c1f539a1d08a53326c39e035948

6 years agoMerge branch release-2016 into release-2018
Mark Abraham [Wed, 14 Feb 2018 12:54:33 +0000 (13:54 +0100)]
Merge branch release-2016 into release-2018

This patch has already been incorporated into release-2018

Change-Id: I088c0d44b5620b3eb575e8a1d0a05adeefaee2cc

6 years agoFix range bug in add_selection_groups in tngio.cpp
Berk Hess [Tue, 13 Feb 2018 10:40:28 +0000 (11:40 +0100)]
Fix range bug in add_selection_groups in tngio.cpp

If there were more molecule blocks than types in the topology,
atoms from the later blocks could be missing in selections written
to tng.

Change-Id: I8bf840b2f019ca9b3c2ccefcf48da866bf8ec559

6 years agoReplace the remaining EXPECT_DEATH with EXPECT_DEATH_IF_SUPPORTED
Aleksei Iupinov [Wed, 14 Feb 2018 11:20:06 +0000 (12:20 +0100)]
Replace the remaining EXPECT_DEATH with EXPECT_DEATH_IF_SUPPORTED

Change-Id: Ibce3d4f240bf3552893762b74206d8e54575d18d

6 years agoAdd DeviceBuffer as a typedef for cl_mem/device ponter
Aleksei Iupinov [Thu, 8 Feb 2018 18:03:19 +0000 (19:03 +0100)]
Add DeviceBuffer as a typedef for cl_mem/device ponter

It is applied to unify the pairlist structure.

Change-Id: I81f78dca2a356ffc7b7638047d29ea29e20c689e

6 years agoFix bug in checkpoint error checking
Mark Abraham [Thu, 25 Jan 2018 08:34:45 +0000 (09:34 +0100)]
Fix bug in checkpoint error checking

Change-Id: I91a185913356a42949596d8f4ca34ec2394c24a5

6 years agoRemove barriers preventing texture reference races
Szilárd Páll [Mon, 12 Feb 2018 19:51:21 +0000 (20:51 +0100)]
Remove barriers preventing texture reference races

These barriers only prevent races on the texture references which can't
happen anymore.

Change-Id: I31ba03f2045643e56ce3272f91a6a0c85a83e88e

6 years agoFix grompp net charge check
Berk Hess [Tue, 13 Feb 2018 11:55:35 +0000 (12:55 +0100)]
Fix grompp net charge check

The grompp check for the net charge would ignore molecule blocks
at the end when molecule types are used in multiple, non consecutive
molecule blocks.

Fixes #2407

Change-Id: I4e7c6c609da99025174f180f9d4037ac9f9fd7fc

6 years agoFix grompp net charge check
Berk Hess [Tue, 13 Feb 2018 11:55:35 +0000 (12:55 +0100)]
Fix grompp net charge check

The grompp check for the net charge would ignore molecule blocks
at the end when molecule types are used in multiple, non consecutive
molecule blocks.

Fixes #2407

Change-Id: I4e7c6c609da99025174f180f9d4037ac9f9fd7fc

6 years agoPrepare release notes for 2018.1
Mark Abraham [Tue, 13 Feb 2018 07:11:35 +0000 (08:11 +0100)]
Prepare release notes for 2018.1

Change-Id: I342130c590bff57df1369d488fb98491e936f78f