alexxy/gromacs.git
8 years agoMerge branch release-5-1
Mark Abraham [Fri, 19 Feb 2016 09:18:47 +0000 (10:18 +0100)]
Merge branch release-5-1

Change-Id: I8935d1351656d6b0888e923c8316fce5d5c27cde

8 years agoMake both ftp and http links for source download
Mark Abraham [Wed, 10 Feb 2016 08:03:52 +0000 (09:03 +0100)]
Make both ftp and http links for source download

Apparently some people aren't allowed to use ftp.

Change-Id: Ia9270a2692ca3e95569f1de938f1ba0a8fab1a5f

8 years agoFix excessive list splitting
Berk Hess [Thu, 18 Feb 2016 07:52:32 +0000 (08:52 +0100)]
Fix excessive list splitting

Due to a possible integer overflow, the pair list splitting code could
end up over-splitting pair lists and causing large performance
degradation. Due to the larger processor count, runs using AMD GPUs,
using 100k+ simulation systems are more prone to suffer from the issue.

Fixes #1904

Change-Id: I29139ec80aa75c78fa93de0858f7c60cdae88d5b

8 years agoFix compiler warnings with ICC
John Eblen [Thu, 18 Feb 2016 22:44:49 +0000 (14:44 -0800)]
Fix compiler warnings with ICC

Fixes two compiler remarks:

remark #111: statement is unreachable (nbnxn_search.cpp)

remark #181: argument of type "int" is incompatible with format
             "%3u", expecting argument of type "unsigned int"
             (atoms.cpp and espio.cpp)

Change-Id: Id118e9061c8634e06e5be99600810e74e17e23a6

8 years agoFix copyright
John Eblen [Thu, 18 Feb 2016 21:23:30 +0000 (13:23 -0800)]
Fix copyright

Fix COPYING to say that GROMACS is also covered under later versions
of LGPL.

Change-Id: I96e9608509d0b11d03813a094f82ec857ae13861

8 years agoSmall update to reference manual
Carsten Kutzner [Wed, 17 Feb 2016 16:43:39 +0000 (17:43 +0100)]
Small update to reference manual

This line was so long that the last word was not even on the page.
Added a space so that proper text wrapping is now possible.

Change-Id: I074174a500039b47ef93896fa742f24d6f65baac

8 years agoUpdated reference manual text about PME tuning
Mark Abraham [Fri, 12 Feb 2016 14:12:21 +0000 (15:12 +0100)]
Updated reference manual text about PME tuning

Also removed some junk that has long been commented out.

Change-Id: I0d1d962bd1d41fb35131c64b2c5d77edf36c8791

8 years agoreintroduce supercl interaction mask constant
Szilárd Páll [Mon, 15 Feb 2016 21:28:25 +0000 (22:28 +0100)]
reintroduce supercl interaction mask constant

5822b64 removed the constant and placed the long expression directly
into the conditional. This made the code slightly less readable,
so this change restores the constant, but at function scope.

Additionally, the change is adopted in OpenCL kernels too to keep the
GPU kernels in sync.

Change-Id: I405b5ff73019b750e5304ff925f12edefc051573

8 years agochange macros to constants in GPU code
Szilárd Páll [Thu, 4 Feb 2016 16:31:04 +0000 (17:31 +0100)]
change macros to constants in GPU code

Following the CPU-side changes, further changes and de-capitalization
was done.
Assertion for CUDA warp size to match the cluster split was also added.

Change-Id: Ib4d6c2f1f5680ccaeb7b4065d10ac8ffced334fb

8 years agoRenamed nbnxn static const ints
Berk Hess [Wed, 17 Feb 2016 09:46:35 +0000 (10:46 +0100)]
Renamed nbnxn static const ints

Renamed all static const integers in the nbnxn code from Hungarian
to CamelCase.
Also replaced two functions in nbnxn_atomdata.c by a template.

Change-Id: Ie465c6252767f3042054452d2b85759a14f7d7e9

8 years agoSame fix for XeonPhi (double precision)
Alexey Shvetsov [Tue, 16 Feb 2016 18:57:59 +0000 (21:57 +0300)]
Same fix for XeonPhi (double precision)

Breakege was caused by I646b8b37f14e498f1a9a3a6e0d7a45761951ee0e

Change-Id: I7ed633fc1a02e4fff08a52f8ab509a0392de60fa
Signed-off-by: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
8 years agoMerge branch release-5-0 into release-5-1
Mark Abraham [Tue, 16 Feb 2016 15:17:46 +0000 (16:17 +0100)]
Merge branch release-5-0 into release-5-1

Change-Id: I4268a1ced2a874dc2844decf6c2853590230ad30

8 years agoChanged norm(...) > 0 condition to norm2(...) > 0 in init_ekindata()
Carsten Kutzner [Tue, 16 Feb 2016 12:32:19 +0000 (13:32 +0100)]
Changed norm(...) > 0 condition to norm2(...) > 0 in init_ekindata()

Fixes issue #1856 on K computer

Change-Id: Ib4f301f17124077bb6cc2aa6b955d01ccdcaec1b

8 years agoReplaced pull-print-com1,2 mdp option with pull-print-com.
Viveca Lindahl [Wed, 10 Feb 2016 16:38:11 +0000 (17:38 +0100)]
Replaced pull-print-com1,2 mdp option with pull-print-com.

Changes were made to the pull output order and naming.

Change-Id: Ic1a5ef460c0979b8ea72a11e96adf51b4bf3f6de

8 years agoImproved/enlarged Fig. 4.9 in manual for better readability
Carsten Kutzner [Tue, 16 Feb 2016 13:06:40 +0000 (14:06 +0100)]
Improved/enlarged Fig. 4.9 in manual for better readability

- Made the whole figure somewhat larger
- Made the axis text larger
- Added/updated the units:
  - kJ mole-1 -> kJ mol-1
  - added degree unit
- Changed plot type from .eps to .pdf

Change-Id: Ibc77c661ed89d9c814d3e2da8490f8b472c4c828

8 years agoMake GROMACS compile again on XeonPhi
Alexey Shvetsov [Mon, 15 Feb 2016 11:51:03 +0000 (14:51 +0300)]
Make GROMACS compile again on XeonPhi

Breakege was caused by I646b8b37f14e498f1a9a3a6e0d7a45761951ee0e

Change-Id: Ia73fbd80cf1366cfa7eb6599cc3943f39e195179
Signed-off-by: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
8 years agoAllow GMX_NB_MIN_CI=0 to be passed
Szilárd Páll [Mon, 15 Feb 2016 16:21:47 +0000 (17:21 +0100)]
Allow GMX_NB_MIN_CI=0 to be passed

The 0 value disables pair list splitting in nbnxn_make_pairlist() which
isn't very useful if can't be passed through the env. var.

Change-Id: I67f31b007b9704cc718b804a0e52e041b5cae1ec

8 years agoRe-generated eps for figure 4.8
Mark Abraham [Sun, 14 Feb 2016 17:42:44 +0000 (18:42 +0100)]
Re-generated eps for figure 4.8

A user noticed that it was hard to distinguish between i and j in
subst-im, which turns out to be from an inappropriate bounding box in
the eps version of it. Regenerated all three eps components of Figure
4.8, which gives a satisfactory final appearance.

Change-Id: I9b9b6787a4da2bcdcf343e3b7cb94a43f11b623b

8 years agoExtended SIMD, implementation for AVX-512F/ER
Erik Lindahl [Mon, 6 Jul 2015 23:39:41 +0000 (01:39 +0200)]
Extended SIMD, implementation for AVX-512F/ER

Tested with icc-16 and gcc-5.2. With gcc there are some
warnings about index and destination registers not being distinct
(which must be an internal compiler error since we do not assign
them) and some routines we had to work around. Both compilers
passes all unit tests in single and double with the Intel
SDE emulator.

Change-Id: I08c357a007279c17938570d1b9ade03608d5d0be

8 years agoFix led zepplin quote
Matthew Harrigan [Fri, 12 Feb 2016 01:18:13 +0000 (17:18 -0800)]
Fix led zepplin quote

Change-Id: I235f75021ad7aee8a4aab7b81189ae5eeee36743

8 years agoRe-enable LJ-PME + Lorentz-Berthelot on GPUs
Szilárd Páll [Thu, 11 Feb 2016 22:52:07 +0000 (23:52 +0100)]
Re-enable LJ-PME + Lorentz-Berthelot on GPUs

We do have GPU kernels which were enabled in 5.1.0, but got disabled
with some refactoring before 5.1.1.

Change-Id: I6752ec9fe561f5c4c0cd14f59c73f4d42f7ff948

8 years agoAdd SIMD version of pbc_dx_aiuc
Berk Hess [Wed, 3 Feb 2016 12:24:02 +0000 (13:24 +0100)]
Add SIMD version of pbc_dx_aiuc

Also support PBC struct with no PBC in set_pbc_simd and NULL box
pointer to set_pbc.

Change-Id: I4dc0829c2160a2e14720e5d69027385d919c149d

8 years agoRe-remove *_stochd_state function declarations
Mark Abraham [Wed, 10 Feb 2016 12:11:13 +0000 (13:11 +0100)]
Re-remove *_stochd_state function declarations

These were removed in 67ed55c616d, but re-emerged in a rebase leading
to bb4b3d7.

Change-Id: I32b38af60fc5185355cc3256969eb300aad7e9d7

8 years agoImproved update_coords handling of xprime
Mark Abraham [Wed, 6 Jan 2016 18:47:09 +0000 (19:47 +0100)]
Improved update_coords handling of xprime

state->nalloc can be increased only during DD re-partitioning, so we
only need to check for that when doing a re-partition, rather than
every time we need xprime for an update (at every step).

Change-Id: Ib8cda0fe94e73154aa702be6cd222a561dd93b50

8 years agoScalar functions mimicking the SIMD interface
Erik Lindahl [Thu, 4 Feb 2016 11:09:16 +0000 (12:09 +0100)]
Scalar functions mimicking the SIMD interface

Although some of these functions might appear useless,
providing scalar-valued versions for all functions provided
by the SIMD implementations makes it possible to template
functions with SIMD/non-SIMD parameters.

Change-Id: I646b8b37f14e498f1a9a3a6e0d7a45761951ee0e

8 years agoFix issues to update cppcheck support to 1.72
Mark Abraham [Tue, 9 Feb 2016 12:51:59 +0000 (13:51 +0100)]
Fix issues to update cppcheck support to 1.72

Bumped requirement for cppcheck in releng.

Changed the output template to make it easier to find cppcheck's
name for the error when a suppression needs to be added.

Bugs found in gmx_lapack (checked by comparing with Fortran version).

Simplified some checkpoint-reading code, since reading always does the
allocation.

Removed some unused OpenCL debug code.

Removed some suppressions no longer needed.

Change-Id: I882ea877bd489ca253b5a7f06becb7e43bb6a3d0

8 years agoReplaced nbnxn search+grid simd macros
Berk Hess [Wed, 27 Jan 2016 13:16:04 +0000 (14:16 +0100)]
Replaced nbnxn search+grid simd macros

Replaced macros in the nbnxn search and grid code by templates,
functions and static const int.
Moved macros and constants only used in search+grid from
nbnxn_consts.h to nbnxn_internal.h.
Converted all switch macros in nbnxn_internal.h to 0/1.

Change-Id: Iec6fcc7c4aca5c2a0276781048f851dfb709fdc5

8 years agoMerge "Merge branch release-5-1"
Gerrit Code Review [Tue, 9 Feb 2016 15:06:55 +0000 (16:06 +0100)]
Merge "Merge branch release-5-1"

8 years agoHandle uniformly GMX_OCL_NOGENCACHE
Szilárd Páll [Tue, 2 Feb 2016 18:18:43 +0000 (19:18 +0100)]
Handle uniformly GMX_OCL_NOGENCACHE

Caching is always turned off, but the code did not reflect this
everywhere.

Change-Id: I2db52b581dddf7269b6c71808760d3a8edd92969

8 years agoMerge branch release-5-0 into release-5-1
Mark Abraham [Mon, 8 Feb 2016 07:41:24 +0000 (08:41 +0100)]
Merge branch release-5-0 into release-5-1

Change-Id: I7795992dcc576dbe9b8cb42db0e95981c2a2e255

8 years agoFix incorrect cmap parsing
Berk Hess [Fri, 5 Feb 2016 09:28:37 +0000 (10:28 +0100)]
Fix incorrect cmap parsing

The cmap parsing in grompp expected exactly one space between
atomtypes and would silently corrupt the cmap parameters when more
than one space was present.

Also added cmap comparison to gmx check.

Fixes #1898.

Change-Id: If5911ce78bdec2a15dbcda7c2437dd6cae86c0ae

8 years agoMerge branch release-5-1
Mark Abraham [Sat, 6 Feb 2016 01:54:15 +0000 (01:54 +0000)]
Merge branch release-5-1

Moved new test/readinp.cpp file to fileio where readinp.cpp is
now located. Left skeleton test infrastructure in place but
deactivated until needed again.

Change-Id: I9261aba261314170634322018b4315d2ebe35601

8 years agoUse cudaLaunchKernel with CUDA 7.0 and later
Szilard Pall [Fri, 20 Nov 2015 17:09:33 +0000 (18:09 +0100)]
Use cudaLaunchKernel with CUDA 7.0 and later

CUDA 7.0 introduced the cudaLaunchKernel API call similar to the
CUDA driver API and avoids the chevron notation. This has the benefit
of a slight reduction in runtime API overhead (up to 2%) partly
because two runtime API calls that precede the kernel launch are skipped
(cudaSetupArgument and cudaConfigureCall).

For future dev-testing the GMX_DISABLE_CUDALAUNCH env. var. can be used to
force the chevron-notation kernel launch.

Change-Id: Id057fb01489814b99ae290de9e4ddd9f530a04be

8 years agoFix incorrect cmap parsing
Berk Hess [Fri, 5 Feb 2016 09:28:37 +0000 (10:28 +0100)]
Fix incorrect cmap parsing

The cmap parsing in grompp expected exactly one space between
atomtypes and would silently corrupt the cmap parameters when more
than one space was present.
Also added cmap comparison to gmx check.

Fixes #1898.

Change-Id: If5911ce78bdec2a15dbcda7c2437dd6cae86c0ae

8 years agoReplaced literals in nbnxn lists by ints
Berk Hess [Fri, 22 Jan 2016 10:51:26 +0000 (11:51 +0100)]
Replaced literals in nbnxn lists by ints

Several literals used for array sizes in nbnxn_pairlist.h and
nbnxn_search.cpp have been replaced by static const int.
The GPU code should assert that these values match the warp size.
Removed the incorrectly used macro NBNXN_PBB_SIMD4.
Removed unused parameter na_c from icell_set_x and in_range functions.
TODOS:
* De-capitalize ints converted from macros in CUDA code.
* Consider replacing macros by ints in OpenCL code.

Change-Id: I467e7ac32c45b4208bfeeef6d5c031e32873f4ce

8 years agoBumped patch number to prepare for future 5.1.3 release
Mark Abraham [Mon, 25 Jan 2016 06:42:56 +0000 (07:42 +0100)]
Bumped patch number to prepare for future 5.1.3 release

Change-Id: I5bca94dc9fe07bfbde62fb224c4b093a208ce928

8 years agoVersion 5.1.2
Mark Abraham [Mon, 25 Jan 2016 06:42:12 +0000 (07:42 +0100)]
Version 5.1.2

Bumped minor soversion and regressiontest hash

Change-Id: I96c9b43b862046106540afac52e1f72bf58525c0

8 years agoFix mdrun removing Verlet buffer with EM
Berk Hess [Mon, 1 Feb 2016 12:40:51 +0000 (13:40 +0100)]
Fix mdrun removing Verlet buffer with EM

With energy minimization, grompp by default adds a Verlet buffer
of 5% to rlist, but mdrun erroneously removed this.
Added checks to prevent future misuse of calc_verlet_buffer_size.

Fixes #1896.

Change-Id: I4d16d48857494ebc6240842ed04571562de771b6

8 years agoFix grompp not warning when .mdp values have wrong types
Mark Abraham [Wed, 27 Jan 2016 14:14:19 +0000 (15:14 +0100)]
Fix grompp not warning when .mdp values have wrong types

With old code, e.g. init_lambda_state = 0.35 was silently
interpreted as 0.

Added some comments and TODOs.

Added unit tests for some simple parts of the the functionality that
needed to be fixed. Extended the interface of warninp_t to permit
sound testing.

Fixes #1893

Change-Id: I425798daa8ed3a391cde49ba4a2d3d352d682f8f

8 years agoFix SETTLE error handling
Berk Hess [Tue, 2 Feb 2016 14:01:05 +0000 (15:01 +0100)]
Fix SETTLE error handling

With OpenMP threading only SETTLE errors detected by the last OpenMP
thread were processed.
Also made SETTLE errors fatal, there is no use of generating warnings
and continuing a simulation after a SETTLE error. This only causes
confusion for users, since the run will usually terminate with
a confusing error message instead.

Change-Id: Ieb76d9bb0d74087c544124b0c548be4c5698b16c

8 years agoMerge release-5-0 into release-5-1
Mark Abraham [Wed, 3 Feb 2016 12:06:25 +0000 (13:06 +0100)]
Merge release-5-0 into release-5-1

Change-Id: I12e0bd25b9b114d0977401e8032078d7cfdd78cf

8 years agoFix dEkin/dl handling with multiple ranks
Mark Abraham [Thu, 14 Jan 2016 18:54:07 +0000 (19:54 +0100)]
Fix dEkin/dl handling with multiple ranks

With non-vv integrators, enerd->dekindl was computed at
nstglobalcomm-1 step, but not accumulated across ranks unless bGStat
also happened to be true. Then at the next (ie nstglobalcomm) step,
bGStat and bEkinhOld were true, so calc_ke_part copied the values into
enerd->ekindl_old. These were then not accumulated, so sum_ekin
averaged the accumulated enerd->ekind with the non-accumulated
enerd->ekind_old to store in enerd->dvdl_lin[efptMASS]. So, it seems
likely that mass-perturbed free-energy calculations with multiple
ranks have been broken with (at least) non-vv integrators for a long
time (perhaps since 031a8b58f).

Fixes #1873

Change-Id: I262e3cfc97a50e1a343563134c7ba89539bba59a

8 years agoAdded pull potential flat-bottom-high
Viveca Lindahl [Tue, 19 Jan 2016 14:52:57 +0000 (15:52 +0100)]
Added pull potential flat-bottom-high

Added the new pull coordinate type flat-bottom-high which is a flat
potential above the reference value and harmonic below.

Change-Id: Ic09f597d2112806aa99270cd0717b47387b3cdd7

8 years agoMerge "Merge branch release-5-1"
Gerrit Code Review [Mon, 1 Feb 2016 13:35:16 +0000 (14:35 +0100)]
Merge "Merge branch release-5-1"

8 years agoHandle pdbinfo in AtomsBuilder
Teemu Murtola [Sat, 23 Jan 2016 06:10:45 +0000 (08:10 +0200)]
Handle pdbinfo in AtomsBuilder

This makes gmx solvate and gmx insert-molecules work when both -f and -o
are .pdb files (previously, the pdbinfo got out-of-sync when the atoms
were added/removed).

Centralize the defaults for pdbinfo to atoms.cpp.

Fixes #1887.

Change-Id: Ia7e7d991cc35e701729904b8319c53283479d0b1

8 years agoAdded documentation for pme grid indexing
Berk Hess [Fri, 29 Jan 2016 17:14:23 +0000 (18:14 +0100)]
Added documentation for pme grid indexing

The cryptic make_gridindex5_to_localindex did not have sufficient
documentation. Also make a cryptic corner case check more readable.

Change-Id: I3163720bce28ba365f94f338687ca5489c0e4ae6

8 years agoFix TPI ignoring PME mesh contributions.
Berk Hess [Fri, 29 Jan 2016 16:30:28 +0000 (17:30 +0100)]
Fix TPI ignoring PME mesh contributions.

The GMX_PME_CALC_POT flag was ignored in the PME code, effectively
zeroing the PME mesh contribution to test particle insertion energies.

Fixes #1895.

Change-Id: Ieda2b4496c374cc02b3ad22aa512d8b6eaa35189

8 years agoUpdate -ntomp_pme -npme check
Berk Hess [Tue, 5 Jan 2016 09:33:27 +0000 (10:33 +0100)]
Update -ntomp_pme -npme check

During the domain decomposition initialization update we forgot to
replace cr->npmenodes by npme in check_and_update_hw_opt_1.

Change-Id: If8d303a189957bb4e02f8f809b849c85abd12223

8 years agoAdd check for double perturbation
Berk Hess [Tue, 26 Jan 2016 09:19:41 +0000 (10:19 +0100)]
Add check for double perturbation

Added a check for changes atom charges and/or types through both
the topology and the couple-moltype option. The couple-moltype
option would override the topology settins for decoupled states.

Fixes #1892.

Change-Id: Ia3d4c0b175af0ad12b189c1b728aee25603afd4f

8 years agoFix LINCS triangle constraint thread issue
Berk Hess [Mon, 16 Nov 2015 22:50:08 +0000 (23:50 +0100)]
Fix LINCS triangle constraint thread issue

With triangle constraints, a OpenMP thread barrier could be missing
under certain conditions. A debug build produced an assertion failure.
This was unlikely to happen without DD, but quite likely with DD.
This bug will have had minimal effect on the results.

Fixes #1853

Change-Id: I6ad1a75ce89ef1e753a7567868a76c2fd891f729

8 years agoMerge branch release-5-1
Mark Abraham [Thu, 28 Jan 2016 22:51:41 +0000 (23:51 +0100)]
Merge branch release-5-1

Change-Id: I442e3600d7f9f49df2021d99b440b64e13a0fc9a

8 years agoFix use of __APPLE__ in OpenCL code
Mark Abraham [Thu, 28 Jan 2016 16:37:10 +0000 (17:37 +0100)]
Fix use of __APPLE__ in OpenCL code

This is often undefined, so we should use it with ifdef not if.

Change-Id: I08afe0de3ff426640d8050597a386a89e72401ae

8 years agoUpdate build scripts to releng changes
Teemu Murtola [Thu, 28 Jan 2016 11:40:40 +0000 (13:40 +0200)]
Update build scripts to releng changes

Remove use of obsolete methods, so that they can be removed from releng
once enough time has passed.

Change-Id: I83d00d183387ee6b0389f5e1c9d6a31247b9c044

8 years agoMerge "Merge branch release-5-1"
Gerrit Code Review [Thu, 28 Jan 2016 22:25:41 +0000 (23:25 +0100)]
Merge "Merge branch release-5-1"

8 years agoAdd OpenCL source file types to copyright checker
Mark Abraham [Wed, 27 Jan 2016 22:19:37 +0000 (23:19 +0100)]
Add OpenCL source file types to copyright checker

Also stopped the include sorter giving an error for template.cpp.

Change-Id: I9e995f6788ff3c7e9b0c3b24fa31750b6a2c6290

8 years agoUpdate pair-list buffer manual
Berk Hess [Fri, 22 Jan 2016 09:36:40 +0000 (10:36 +0100)]
Update pair-list buffer manual

Several corrections and updates to the manual section that explains
the pair-list buffer estimation:
* Clarified the role of i and j particles in the equations
* Added missing factors t and t^2 for several sigmas
* Added missing term in expansion in intermediate result
* Added text explaining the approximations made
* Rewrote the paragraph on how constrained particles are handled,
  which matched the code in 4.6, not 5.1 (or 5.0)
Note that the code and code documentation are correct and up to date.

Change-Id: Iaf707f1c5faeebd6b9b099753735a1c61b903f9c

8 years agoAvoid FP exception
Mark Abraham [Sat, 23 Jan 2016 19:32:58 +0000 (20:32 +0100)]
Avoid FP exception

clang 3.7 debug build throws an FP exception for ewtabhalfspace. Of
course, it is never used if ewtabscale is zero, but the old code is
improved by this.

Change-Id: I7bd9fe499ea2c565d2292533c2e78543b49cadcb

8 years agoOpenCL: use new defines (*_POW2_EXPONENT -> *_LOG2)
Vedran Miletić [Wed, 27 Jan 2016 18:45:41 +0000 (19:45 +0100)]
OpenCL: use new defines (*_POW2_EXPONENT -> *_LOG2)

This fixes 'error: use of undeclared identifier' introduced in
a86dee3d7d01ceb0b9a74d98010d17c47a7a8359.

Change-Id: Id61294897a35d5b7bde7b7d7469560b0a39836d7

8 years agoMerge branch release-5-1
Mark Abraham [Wed, 27 Jan 2016 12:24:24 +0000 (13:24 +0100)]
Merge branch release-5-1

Change-Id: Iefe28408022b6964e7b1cbab07032f5d110c5f6b

8 years agoRemove bNotLastFrame
Mark Abraham [Sat, 23 Jan 2016 19:11:34 +0000 (20:11 +0100)]
Remove bNotLastFrame

Reruns always set bLastStep, which could have had various unintended
effects. It did mean that they calculated energies and wrote log
output for each frame. That's fine (even if the user doesn't want
either of these, they're already paying for a full pair search each
frame just to get forces), but that behaviour is now explicit. Other
side effects of rerun setting the value of bLastFrame look benign.

Once that was clear, there was no value in bNotLastFrame, so replaced
it with the negated use of bLastStep for consistency.

Change-Id: Ie17ee70d8b17d4c99a2bf7c59f53338a61279421

8 years agoAdd suggestions for updating binutils
Mark Abraham [Mon, 25 Jan 2016 06:32:41 +0000 (07:32 +0100)]
Add suggestions for updating binutils

CentOS seems to ship with an old binutils, as well as compiler. Other
distros probably also do this. Install guide and cmake messages now
explicitly suggest updating such infrastructure.

Change-Id: Ieefd188e508d83d248a149d313190e7989e70557

8 years agoGPU code reorganization and tweaks
Szilárd Páll [Tue, 19 Jan 2016 22:29:45 +0000 (23:29 +0100)]
GPU code reorganization and tweaks

- Moved the warp size macro to the new arch utils header and converted
  it to static const;
- Changes some awkward macro names in CUDA and OpenCL;
- Change the inline modifier of a number of CUDA functions to
  __forceinline__ which means unconditional inlining.

Change-Id: I5b748a920927f9a51ada14e3d6e65b6b4d4dbd43

8 years agoFix default for GMX_USE_NVML
Mark Abraham [Tue, 26 Jan 2016 17:42:43 +0000 (18:42 +0100)]
Fix default for GMX_USE_NVML

NVML_FOUND is the result of the detection, which should
be the default for GMX_USE_NVML.

Refs #1835

Change-Id: I0fd640d4c431242e47e147bd5f33c9bdec176010

8 years agoMerge branch release-5-1
Mark Abraham [Sun, 24 Jan 2016 13:07:30 +0000 (14:07 +0100)]
Merge branch release-5-1

Several minor clashes in md.cpp from refactoring in master branch;
specifically the removal of CGLO_RERUN (adjacent to changes in
release-5-1), rename of bStateFromCP to startingFromCheckpoint, change
IR_NVT_TROTTER(ir) to inputrecNvtTrotter(ir), removal of bCompact.

Change-Id: I42740bb6c67684f81bc305703240df4d5977bdab

8 years agoFix duplicate LaTeX equation label
Mark Abraham [Sun, 24 Jan 2016 11:15:48 +0000 (12:15 +0100)]
Fix duplicate LaTeX equation label

Change-Id: Ib4e54923b2987d176c2299c0b4db58d13c7482fa

8 years agoFix exact continuation from non-energy steps
Berk Hess [Mon, 18 Jan 2016 15:22:25 +0000 (16:22 +0100)]
Fix exact continuation from non-energy steps

At continuation of a run, from e.g. checkpoint file, the energy of
the first step would be printed to log file. This caused different
code paths to be used, which prevents exact continuation of runs.
Now the print to log at the first step is skipped when starting from
a checkpoint file (unless step % nstlog == 0).

Fixes #1888.

Change-Id: I9edc1efa884d1995cf03d9f4c2a60c675849c354

8 years agoFix energy file continuation with md-vv
Berk Hess [Mon, 18 Jan 2016 14:37:56 +0000 (15:37 +0100)]
Fix energy file continuation with md-vv

When continuing a run from a checkpoint file, The Velocity Verlet
integrators would not account for the energy or step of the first
step and not write an energy frame if this happened to be an
nstenergy step.

Change-Id: I7f40d9fa57acd5bdeaac8230a4e31b27897ff69c

8 years agoUpdate references to HTML and online documentation
Mark Abraham [Wed, 20 Jan 2016 21:56:20 +0000 (22:56 +0100)]
Update references to HTML and online documentation

Fixes #1891

Change-Id: Ie2bce55ffa7ac64b2530d70694e60de2c22cb32f

8 years agoDocument limitations on 32-bit Linux
Teemu Murtola [Mon, 18 Jan 2016 16:30:54 +0000 (17:30 +0100)]
Document limitations on 32-bit Linux

Large file support does not currently work on 32-bit Linux,
so document this in the install guide.

Related to #1834

Change-Id: I8a3dcf1c2d2423eefc44d4ac1dc366c5f8753c31

8 years agoFix energy average with continuation
Berk Hess [Fri, 15 Jan 2016 09:47:19 +0000 (10:47 +0100)]
Fix energy average with continuation

When continuing a run from a checkpoint file, the energies at
the restart step would always be added to the sum for the averages
in the energy file, even when the restart step was not a multiple
of nstcalcenergy. Now energy file are binary identical without
and with restarts.

Refs #1888.

Change-Id: If6a92a5cb2554a6b79854ebc3ff9b437bf7fbe7f

8 years agoMerge remote-tracking branch 'origin/release-5-1' into master
Szilárd Páll [Wed, 20 Jan 2016 20:35:28 +0000 (21:35 +0100)]
Merge remote-tracking branch 'origin/release-5-1' into master

Change-Id: Ic6912d0b297688c0816cc670dd18352305d4b8ee

8 years agoCouple of new quotes
David van der Spoel [Wed, 20 Jan 2016 13:51:27 +0000 (14:51 +0100)]
Couple of new quotes

Change-Id: I6014fd25deca2e02ab206216fbf78ec54fc704ba

8 years agoMade g_tune_pme work with -cpi -deffnm combination
Carsten Kutzner [Thu, 3 Dec 2015 12:18:59 +0000 (13:18 +0100)]
Made g_tune_pme work with -cpi -deffnm combination

Using -deffnm with g_tune_pme would not work with checkpoint restarts
since the file names used for the benchmark output files (-bo...) could clash
with output file names expected by the checkpoint file when appending.
Fixed it by using the -deffnm option only at launch time,
but not for benchmarking.

Also added the -bo and -bx output files to the files that need to be
deleted after the benchmark test run, so that there is slightly less
clutter in the output directory after tuning.

Change-Id: Ibec8553be7ddf482a831308454e2db9e1fc1d8aa

8 years agoAdd missing initialization in nbnxn_pairlist_t
Ansgar Esztermann [Wed, 20 Jan 2016 11:08:01 +0000 (12:08 +0100)]
Add missing initialization in nbnxn_pairlist_t

In nbnxn_init_pairlist(), nbl->sci is left uninitialised. This can
pose a problem when it is later passed to nbnxn_realloc_void().
In the current code the pairlist is allocated with snew(), which
should properly initialize all entries, but this seems to
(mysteriously) cause trouble with a version of glibc2.12.

Refs #1890.

Change-Id: I5d483366fab8fd013ed15f6a82e3212d13ba2ded

8 years agoPermit customized testing of grompp and mdrun
Mark Abraham [Wed, 12 Mar 2014 14:55:15 +0000 (15:55 +0100)]
Permit customized testing of grompp and mdrun

Being able to pass custom command-line arguments is useful. Nothing
uses this right now, but I've twice wanted it while developing other
tests, so it would be good to have it always available.

Adapted calling code to e.g. not append("mdrun") if they're about to
use callMdrun(), which takes care of that. Doing so is not a problem,
but people will likely use these examples when developing new tests,
so they might as well illustrate the most convenient form to use.

Change-Id: If33bff2596fc828078491af56051202304c7e758

8 years agoAllowed NVML support to be toggled
Mark Abraham [Tue, 12 Jan 2016 14:47:37 +0000 (15:47 +0100)]
Allowed NVML support to be toggled

A new CMake advanced option GMX_USE_NVML takes its default value from
the result of the NVML detection, thus by default NVML support is on
only if the detection succeeds. It can be turned off or on at will,
but when set on, it will give a fatal error if the detection did not
succeed.

Split the NVML section of the install guide into its own paragraph.

Fixes #1835

Change-Id: Ic1bf025fcd807eb701d0b52afe35b11b2d75f402

8 years agoMerge branch release-5-0 into release-5-1
Mark Abraham [Tue, 12 Jan 2016 14:18:06 +0000 (15:18 +0100)]
Merge branch release-5-0 into release-5-1

Change-Id: I49ca6d8edc18c764eff368cd396873385f11ea9c

8 years agoMake GMX_MPI always defined to 0/1
Teemu Murtola [Mon, 11 Jan 2016 16:31:52 +0000 (18:31 +0200)]
Make GMX_MPI always defined to 0/1

Change-Id: Ia9f269ad0d05b0dec5d4fe64468d891ac1597ad4

8 years agoMove flags out of t_trxframe
Teemu Murtola [Fri, 8 Jan 2016 18:56:44 +0000 (20:56 +0200)]
Move flags out of t_trxframe

These are also internal state related to the trajectory reading code,
instead of providing information about a trajectory frame.  Now they are
stored in the trxstatus struct.  This makes t_trxframe only contain
information about the actual trajectory frame, and makes it (in
principle) possible to read different frames into different t_trxframe
instances.

Change-Id: I87cb542bdc78b82969a0b996b411e72c2ba03d80

8 years agoRemove historical times from t_trxframe
Teemu Murtola [Fri, 8 Jan 2016 18:47:00 +0000 (20:47 +0200)]
Remove historical times from t_trxframe

The fields t0 and tf were used for internal bookkeeping for trajectory
reading, so moved them there.  They do not provide useful information
about the current trajectory frame.  Similarly, gmx check will no longer
repeatedly compare the t0 values for each frame.  Values stored to tpf
and tppf were never read, so removed the fields.

Change-Id: I1554a3b64da84efba44f685cbf8eb6cffd9fac19

8 years agoSupport passing tarball MD5 for webpage build
Teemu Murtola [Wed, 6 Jan 2016 19:09:09 +0000 (21:09 +0200)]
Support passing tarball MD5 for webpage build

- Make it possible to pass the source tarball MD5 hash to the build
  script.
- Simplify the logic of when the regressiontests MD5 hash gets into the
  generated web pages: it now goes there exactly when the source MD5 is
  available.

Change-Id: Ib391d8403e4cee1101b8f0fe8a49f0ce8bb164f1

8 years agoRemove vmdplugin from t_trxframe
Teemu Murtola [Fri, 8 Jan 2016 16:05:05 +0000 (18:05 +0200)]
Remove vmdplugin from t_trxframe

This has nothing to do with a trajectory frame, but instead belongs to
the internal state of the trajectory reading code, so moved it there.

Rename the internal structure to gmx_vmdplugin_t to be more in line with
recent naming conventions.

Change-Id: I9db96f4eba0d1497203e625ce25a7d4e72760fc8

8 years agoConvert more config.h defines to 0/1
Teemu Murtola [Sun, 10 Jan 2016 07:43:06 +0000 (09:43 +0200)]
Convert more config.h defines to 0/1

Also, fix one incorrect use of GMX_GPU.

Change-Id: I2409dada6c05e00163de3783781a6e85acadbdda

8 years agoImproved update_coords
Mark Abraham [Thu, 7 Jan 2016 09:08:22 +0000 (10:08 +0100)]
Improved update_coords

BD init code was being checked for every integrator at every step, and
BD and SD init code was being run for every step of those integrators,
so moved that to update_temperature_constants (and called it from
init_update). The reference temperatures for coupling could change
under simulated annealing, so updated that code to call the new
routine.

Used gt as the temperature-coupling-group iteration variable, rather
than n (which is often used in the update code for a per-atom index).

Reduced the scope of some variables in init_stochd.

Added some const correctness for inputrec.

Change-Id: I8da3da018157c6834c2ca04abc65ba6b55a0fe98

8 years agoSupport trajectory analysis with any atom subset
Teemu Murtola [Sat, 28 Nov 2015 19:47:46 +0000 (21:47 +0200)]
Support trajectory analysis with any atom subset

Make tools written for the new C++ analysis framework support analyzing
trajectories that contain an arbitrary subset of atoms.

Part of #1861.

Change-Id: I4a658e953f6f4e3d2ec1151c9c4d405c2e888780

8 years agoSupport frames with atom subsets in selections
Teemu Murtola [Sat, 28 Nov 2015 04:55:52 +0000 (06:55 +0200)]
Support frames with atom subsets in selections

- Instead of just computing the highest atom index required for
  evaluating the selections, compute all the atom indices.
- Use these to check that the input frame actually contains the
  necessary atoms.
- Add basic tests for one positive and a few negative cases.

Part of #1861.

Change-Id: If4c2d031f638f56d81ca4c7844dffa242f863af8

8 years agoSupport arbitrary subset trajectories in poscalc.*
Teemu Murtola [Thu, 26 Nov 2015 19:52:50 +0000 (21:52 +0200)]
Support arbitrary subset trajectories in poscalc.*

- Make low-level selection code work with trajectories that contain an
  arbitrary subset of the topology atoms, instead of just the first N.
- Add an entry to t_trxframe to represent such trajectories.
- Add some basic tests.  Negative cases crash with an assert, so not
  tested (should get caught higher up).

This should cover all of selection evaluation, but various consistency
checks need to be adjusted as well (will be done in a child change).

Related to #1861.

Change-Id: I727c79a38e39fb9142976875ab3311e7b1172a55

8 years agoMake file names in fatal error messages more robust
Teemu Murtola [Fri, 8 Jan 2016 11:27:40 +0000 (13:27 +0200)]
Make file names in fatal error messages more robust

Hard-coding the use of CMAKE_SOURCE_DIR in trying to produce reasonable
relative paths in the messages did not work if CMake and/or the compiler
produced relative paths for __FILE__.

Replace this with a function that hardcodes some knowledge about the
Gromacs source tree layout to produce a relative path wrt. the source
tree root, and falls back to returning just the file name instead of the
full absolute path.

Change-Id: I8da98b4b0e4b694b1c67cbf7c567bbb4a7058b7a

8 years agoDo not warn about missing OpenMP with GMX_GPU=OFF
Teemu Murtola [Sun, 10 Jan 2016 07:30:20 +0000 (09:30 +0200)]
Do not warn about missing OpenMP with GMX_GPU=OFF

Recent change started warning about inefficient use of GPU acceleration
with GMX_OPENMP=OFF, even if GMX_GPU was explicitly turned off.  Fixed.

Change-Id: I5603573868c15e6722b6d8afbb877582d827e2ab

8 years agoMore config.h macros to 0/1
Teemu Murtola [Sat, 9 Jan 2016 05:37:00 +0000 (07:37 +0200)]
More config.h macros to 0/1

Also, remove a few unused ones.

Change-Id: I1ce3f3345173a5fdfe7aa772008a3206b2118f46

8 years agoConvert some config.h macros to use 0/1
Teemu Murtola [Sat, 9 Jan 2016 04:55:53 +0000 (06:55 +0200)]
Convert some config.h macros to use 0/1

Also, remove unused GMX_USE_OPENCL.

Change-Id: Ib8d0b35560cd3dc8648c46351697d738d7d99adb

8 years agosplit NBNXN CUDA kernels into four compilation units
Szilárd Páll [Mon, 31 Mar 2014 23:48:10 +0000 (01:48 +0200)]
split NBNXN CUDA kernels into four compilation units

The CUDA nonbonded kernels are no longer included into nbnxn_cuda.cu,
but are built in four different compilation units (w/wo energy, w/wo
pruning) when this is supported/possible; since we only support CUDA
>=v5.0, the condition is: that CC >=3.0 devices have to be targeted.

Note that with CC 2.x devices all current CUDA compilers including 7.0
generate incorrect kernel code (hence the criterion above).

Switching back to using single compilation unit happens automatically
whenever nvcc-flags are auto-generated (as {sm,compute}_20 is added
by default).
Switching manually can be done using the
GMX_CUDA_NB_SINGLE_COMPILATION_UNIT cmake option.

Fixes #1444

Change-Id: If4eeaa5b58a35c5cd59babd20ef1179c7f27782e

8 years agoFix PME load balancing skipping a setup
Berk Hess [Mon, 4 Jan 2016 14:06:46 +0000 (15:06 +0100)]
Fix PME load balancing skipping a setup

During stage 0 of the PME tuning we only time every second setup.
In stage 1 only a reduced range of setups is considered. If the tpr
setup (setup index 0) was not part of this reduced range, the first
setup in the range would never be timed. This could lead to choosing
a non-bonded cut-off that was longer than optimal.

Fixes #1880

Also fixed two conditionals (but this had no effect on the settings).

Change-Id: Id9f361d23e3294e41553b39ae8e8f37ceb80bbe5

8 years agoImprove tpr header version handling
Mark Abraham [Wed, 9 Sep 2015 19:09:14 +0000 (21:09 +0200)]
Improve tpr header version handling

We always read/write the version and generation from/to the .tpr
header, but only membed was using a value read from the .tpr I/O
routines. Since it doesn't need to do that, we can simplify things.

Change-Id: I066d80f17b761363a2fff5682d1340cf83a01667

8 years agoMerge branch release-5-1
Mark Abraham [Fri, 8 Jan 2016 01:35:59 +0000 (02:35 +0100)]
Merge branch release-5-1

Ported the change from enum_name returning UNDEFINED to "no name
defined" to the new implementation.

Change-Id: I39ded9be8a49d3ff7de7c5e7c9d05eefbd385727

8 years agoFix some mdrun header dependencies
Mark Abraham [Thu, 7 Jan 2016 17:21:59 +0000 (18:21 +0100)]
Fix some mdrun header dependencies

md_support.h, sim_util.h and update.h should not depend on each other
since any symbols they declare can be forward-declared by the others.

Updated some names for types - in particular, gmx_update_t is now a
struct, rather than an opaque pointer to a struct.

Also removed two orphaned function declarations used by the
now-removed SD2 integrator.

Change-Id: I84c0f8d7b90b5f68bbf940e5854834bb9d000c9f

8 years agoAvoid more C++ bindings for MPI
Mark Abraham [Thu, 7 Jan 2016 17:31:11 +0000 (18:31 +0100)]
Avoid more C++ bindings for MPI

This avoids picking up the C++ bindings from SGI's MPT.

Change-Id: Ie8d30a6d59f04a6b69ac9ccf29aa5db631a2b3cb

8 years agoDocument how potential-switch works
Mark Abraham [Tue, 5 Jan 2016 18:20:40 +0000 (19:20 +0100)]
Document how potential-switch works

Adjusted the notation in the force-switch section to make clear the
difference between the two.

Change-Id: Iadd62faefe94726fd33a0d429950e9525b23bf98

8 years agoStop using UNDEFINED as name of a symbol
Mark Abraham [Thu, 7 Jan 2016 10:51:15 +0000 (11:51 +0100)]
Stop using UNDEFINED as name of a symbol

Apparently SGI's MPT MPI library defines this symbol, breaking the
compilation. We don't need to use it anyway.

Change-Id: I2b795252937339de49a75ba497c6741ec8019a74

8 years agoRemove fields used only for SD2
Mark Abraham [Thu, 7 Jan 2016 09:02:46 +0000 (10:02 +0100)]
Remove fields used only for SD2

Change-Id: I998f579ccd1e4cbd8dccf2f49115b1eec1fe9c2b