alexxy/gromacs.git
4 years agoMultiple pulses for GPU Halo Exchange
Alan Gray [Fri, 6 Dec 2019 13:19:43 +0000 (05:19 -0800)]
Multiple pulses for GPU Halo Exchange

Removes restriction on single pulse.

Implements #3106

Change-Id: I5d68258de831d04c14d6c352fc52e51852fccd80

4 years agoIntroduce readXvgData to read xvg data into std::vector
Christian Blau [Fri, 7 Feb 2020 13:47:50 +0000 (14:47 +0100)]
Introduce readXvgData to read xvg data into std::vector

This allows for modernization of table functions, demonstrated
here with read_tables, as well as potentially any other function
that needs to read in xvg data. The legacy read_xvg is now
implemented in terms of readXvgData. There is already a test for
table functions and this change now adds tests for reading in
xvg data.

Change-Id: Iac0b13d7db15f04a8b0b464df9fa136ff4b2a213

4 years agoClean up trivial function and duplicating macroses from NBNXM
Artem Zhmurov [Tue, 4 Feb 2020 10:04:34 +0000 (11:04 +0100)]
Clean up trivial function and duplicating macroses from NBNXM

The getOclPruneKernelJ4Concurrency(..) that used to implement
the concurrency parameter switching depending on vendor is now
a trivial return the same value as defined by macros. Hence,
this patch removes the function and code now uses the macro directly.

Change-Id: I61d4b0a91e9b3256633860165ab0b7f4a34f9687

4 years agoFix the nightly failure
Artem Zhmurov [Tue, 11 Feb 2020 09:43:14 +0000 (10:43 +0100)]
Fix the nightly failure

Change-Id: I06a75ba83590d2c6cdf94354e1b8c814db493ef0

4 years agoTemporary disable RVec->float3 conversion test to fix the post-submit
Artem Zhmurov [Thu, 6 Feb 2020 12:53:52 +0000 (13:53 +0100)]
Temporary disable RVec->float3 conversion test to fix the post-submit

This fixes the post-submit matrix by disabling the faulty test. Will
be retracted once the proper soultion is found.

Refs. #3372.

Change-Id: I28031bc4793ce283c42539f4029cfe6bc2651156

4 years agoUse RVec instead of float for x, v and f device buffers
Artem Zhmurov [Mon, 20 Jan 2020 17:32:46 +0000 (18:32 +0100)]
Use RVec instead of float for x, v and f device buffers

Using RVec instead of float for coordinates data-types allows to
remove multiplications by DIM when the adresses, offsets and sizes
are computed. Since the native device types are not used in CPU
part of the code, the type casting remains.

Refs #3312 and #2936

Change-Id: Iaea914a474195f214ca860f7345f6878b9a04813

4 years agoRemove mu_tot from compute_globals()
Szilárd Páll [Fri, 31 Jan 2020 15:40:36 +0000 (16:40 +0100)]
Remove mu_tot from compute_globals()

The total dipole reduction happens in do_force() and the alternative
code-path reduction in compute_globals() was only needed for log
reporting which was removed some time ago.

Change-Id: I49a2608e8c1a47959a5f0f571e38e511367c94b2

4 years agoMove DeviceInfo into GPU traits
Artem Zhmurov [Wed, 29 Jan 2020 14:45:59 +0000 (15:45 +0100)]
Move DeviceInfo into GPU traits

The DeviceInfo is needed upon construction of DeviceContext. To
prepare for opaque DeviceContext type, it is moved to GPU traits
and renamed according to the common naming scheme.

Refs. #3311, needed for #3315.

Change-Id: I2a9f1d932f142d645df75901521a734d208de509

4 years agoMake OpenCL DeviceVendor into enum class and move to GPU traits
Artem Zhmurov [Wed, 29 Jan 2020 13:31:43 +0000 (14:31 +0100)]
Make OpenCL DeviceVendor into enum class and move to GPU traits

The device context in OpenCL requires the information on vendor when
constructed. To prepare for opaque DeviceContext, the vendor
enum was moved into OpenCL traits.

Refs. #3311, needed for #3315.

Change-Id: Iec22ff17543b6a99407048de6e0cd82bb7218fb0

4 years agoMove non-bonded initialization out of the forcerec
Artem Zhmurov [Tue, 4 Feb 2020 10:51:45 +0000 (11:51 +0100)]
Move non-bonded initialization out of the forcerec

Forcerec should not be responsible for initializing modules.

Change-Id: I666075fe03441c815b191f1eb3809e294c62d541

4 years agoTest PaddedVector to ArrayRef conversion
Pascal Merz [Tue, 4 Feb 2020 14:49:54 +0000 (09:49 -0500)]
Test PaddedVector to ArrayRef conversion

This adds a few tests to the PaddedVector tests, making sure that
the various ways to create unpadded ArrayRefs are yielding equivalent
views.

This also fix a small bug in the copy assignment test.

Change-Id: If4317e81a1723739ac3b16fc255987d9f7193489

4 years agoFix typo in and remove a couple of duplicates from cool quotes
Artem Zhmurov [Wed, 5 Feb 2020 10:31:13 +0000 (11:31 +0100)]
Fix typo in and remove a couple of duplicates from cool quotes

Older versions are also affected.

Fixes #3367.

Change-Id: If975f67490bfc2ddb6b5e17e00f63434a5013799

4 years agoUse more MDLogger in preprocessing
Paul Bauer [Thu, 27 Jun 2019 10:17:46 +0000 (12:17 +0200)]
Use more MDLogger in preprocessing

Refs #2999, #3005

Change-Id: I2ec9f5d9d98d7b1add0cc3e9339e7a93b6e1c9a6

4 years agoMinor improvements to vcm.cpp
Pascal Merz [Fri, 24 Jan 2020 20:16:35 +0000 (20:16 +0000)]
Minor improvements to vcm.cpp

This cleans up some minor details in vcm.cpp:

* Removed unnecessary include
* Specified OMP data sharing attributes explicitly
* Replaced entire functions being enclosed in if clauses by
  returning immediately if the condition is not fulfilled to
  improve readability. Blocks were kept to avoid touching lines
  unnecessarily.

Change-Id: I29ac6e11a16d7b081c9b00bd85559d5381ae9119

4 years agoMerge VV implementations of ComputeGlobalsElement
Pascal Merz [Tue, 21 Jan 2020 15:01:53 +0000 (16:01 +0100)]
Merge VV implementations of ComputeGlobalsElement

Until now, ComputeGlobalsElement had effectively two separate
(templated) implementations for velocity verlet, to be called
at full timestep and after the position update.
As we gradually move towards a design in which the
ComputeGlobalsElement is agnostic to the data it reduces, this
separation does not make sense anymore. As a first step, the
two implementations are therefore merged.

Change-Id: If0b549a3d87fea50e895b70c55632e1f58582067

4 years agoEnable GPU update for supported cases of FEP
Artem Zhmurov [Thu, 19 Dec 2019 15:50:05 +0000 (16:50 +0100)]
Enable GPU update for supported cases of FEP

Only mass and constraints perturbation is not supported by the
GPU constraints, hence FEP can be enabled for the rest of the cases.

Change-Id: I0ec487823ec4aeda5b09ba66a504c5358e778c8e

4 years agoCouple cool quotes
Artem Zhmurov [Sat, 1 Feb 2020 16:55:25 +0000 (17:55 +0100)]
Couple cool quotes

Change-Id: I222b494d3205ba82101b9e19eafa6380a5f60a11

4 years agoMerge "Merge branch origin/release-2020 into master"
Artem Zhmurov [Sat, 1 Feb 2020 01:16:58 +0000 (02:16 +0100)]
Merge "Merge branch origin/release-2020 into master"

4 years agoUse MDLogger in grompp
Paul Bauer [Wed, 26 Jun 2019 15:17:01 +0000 (17:17 +0200)]
Use MDLogger in grompp

Start using MDLogger in main grompp routine.

Refs #2999, #3005

Change-Id: Ic88e9a2ec271a4bf9502da5a268f532d422a1f1b

4 years agoEliminate the legacyFlags manipulation in do_force()
Szilárd Páll [Thu, 23 Jan 2020 17:04:24 +0000 (18:04 +0100)]
Eliminate the legacyFlags manipulation in do_force()

The override is redundant as it is implemented in the stepWorkload
initialization.

Change-Id: Idde50848c867cb558d4308522bc3e341d9054e82

4 years agoModular simulator: Allow for nullptr in element list helper
Pascal Merz [Tue, 28 Jan 2020 21:00:43 +0000 (14:00 -0700)]
Modular simulator: Allow for nullptr in element list helper

This moves the responsibility for avoiding nullptr in the element
call and ownership lists from the algorithm building to the storage
helper convenience functions. This will simplify the builders by
reducing the number of conditions that need to be checked.

Change-Id: Ic8428837291f4208c9380bc15092fd6b5a5fda6d

4 years agoStart using MDLogger in gmxpreprocess
Paul Bauer [Thu, 21 Feb 2019 09:50:32 +0000 (10:50 +0100)]
Start using MDLogger in gmxpreprocess

Changed logging of one set of routines to use the logger interface
instead of calling fprintf to stderr.

Refs #2005, #2999

Change-Id: Ibbecab0af6a0fa1c62c754f8826b8ff84fa4886e

4 years agoDocumentation fix for local atom set data
Christian Blau [Thu, 30 Jan 2020 09:39:44 +0000 (10:39 +0100)]
Documentation fix for local atom set data

Documentation for the collective index was wrong and is fixed now.

Change-Id: I3d780fe25eab3356892f1ceab4c110c6f40ca7c9

4 years agoStatePropagatorData: Make const box getters const functions
Pascal Merz [Thu, 30 Jan 2020 22:49:10 +0000 (15:49 -0700)]
StatePropagatorData: Make const box getters const functions

This allows to have a const pointer to StatePropagatorData if only
const views are needed, and should have been that way from the
start.

Change-Id: I240a711c3193f9e94844a99fa500a0cd63e6bd8d

4 years agoRemove BufferOpsUseGpu enum
Szilárd Páll [Thu, 23 Jan 2020 17:30:00 +0000 (18:30 +0100)]
Remove BufferOpsUseGpu enum

Its limited role has been fully replaced by the equivalent workload
flags and the verbosity its used requires is not warranted for the
current use-cases.

Change-Id: I67ad1e9eca16e095ea9da8173e07d8f7683a862c

4 years agoMake t_inputrec const in ComputeGlobalsElement
Pascal Merz [Wed, 22 Jan 2020 16:14:25 +0000 (17:14 +0100)]
Make t_inputrec const in ComputeGlobalsElement

Change-Id: Iff3d217fb735185e5a4e7e62239daccc62207144

4 years agoCleaning booleans in NBNXM in OpenCL build
Artem Zhmurov [Thu, 30 Jan 2020 12:56:17 +0000 (13:56 +0100)]
Cleaning booleans in NBNXM in OpenCL build

Patch 93f2f30017595e419d25c5dd6fa6a8b320a1858f changed some of the
booleans types from cl_bool to bool, but not changed how these
variables were used in some places. This caused the compiler to be
confused with the data types, trying to convert bool to int or
to cl_bool.

Change-Id: Ib8017bbdac804f3946e65698df5882c669250044

4 years agoReorganize GPU stuff initialization in PME-only ranks
Artem Zhmurov [Thu, 12 Dec 2019 14:29:44 +0000 (15:29 +0100)]
Reorganize GPU stuff initialization in PME-only ranks

The state propagator data GPU, PME coordinate receiver and PME
force sender initialization in PME-only rank was not unified,
which lead to extra conditionals and extra calls to getter
functions. This patch unifies the GPU initialization of PME
only rank, thus simplifying the logic around it.

Change-Id: I8e6e39f0948fb1293c72d6b7ae958ab061f732df

4 years agoMore SIMD preparations in the FE calculations
Magnus Lundborg [Thu, 7 Nov 2019 15:47:06 +0000 (16:47 +0100)]
More SIMD preparations in the FE calculations

Prepare the launch of the FE kernel using SIMD. So far the kernel
is not modified to actually use SIMD.

Change-Id: Iaad24fc37549b5deaa892655be1d2a7317f65955

4 years agoAdd replacement for symbol table
Paul Bauer [Thu, 21 Mar 2019 13:27:39 +0000 (14:27 +0100)]
Add replacement for symbol table

Refs #2833, #2916

Change-Id: Ibd771444933ef4b01f5a3eca9db3efbbbff2926f

4 years agoSmall improvement in OpenCL error handling
Szilárd Páll [Wed, 15 Jan 2020 14:04:51 +0000 (15:04 +0100)]
Small improvement in OpenCL error handling

- replace plain asserts with GMX_ASSERT
- improve error message prints by decorating with OpenCL error strings

Refs #3300

Change-Id: Ibac66ee0de35c572c0051d8c394a488051b23a7e

4 years agoSplit and move the checkDeviceBuffer(...) function from PME
Artem Zhmurov [Tue, 28 Jan 2020 17:50:15 +0000 (18:50 +0100)]
Split and move the checkDeviceBuffer(...) function from PME

Resolving a TODO.

Also fixed the formatting in neighboring comment.

Refs. #3311.

Change-Id: I1687981cc80e2388714cbbb3113f37e34582e31c

4 years agoRemove the rest of the device coordinates management from PME
Artem Zhmurov [Tue, 28 Jan 2020 16:56:44 +0000 (17:56 +0100)]
Remove the rest of the device coordinates management from PME

Although it may be convinient to keep an local copy of the
address device coordinates buffer, the management of this buffer
is not the responsibility of the PME module. This patch remove
some of the remains of this management.

Change-Id: I160adfb0319c0bf6e532061aca05ef9cc9aa8a4f

4 years agoRename UpdateConstraintsCuda to UpdateConstraintsGpu
Artem Zhmurov [Wed, 22 Jan 2020 16:50:59 +0000 (17:50 +0100)]
Rename UpdateConstraintsCuda to UpdateConstraintsGpu

This is to folow general naming conventions across the code.

Refs #3114.

Change-Id: Iec3678e1d4152d6442818fcd81020e021927757c

4 years agoMerge branch origin/release-2020 into master
Paul Bauer [Tue, 28 Jan 2020 10:11:22 +0000 (11:11 +0100)]
Merge branch origin/release-2020 into master

Resolved Conflicts:
admin/copyright.py
cmake/gmxCPackUtilities.cmake
cmake/gmxManageFFTLibraries.cmake
cmake/gmxManageMPI.cmake
cmake/gmxTestMPI_IN_PLACE.cmake
docs/dev-manual/jenkins.rst
src/gromacs/domdec/domdec.cpp
src/gromacs/ewald/pme_load_balancing.cpp
src/gromacs/gmxlib/network.cpp
src/gromacs/gmxlib/network.h
src/gromacs/gmxpreprocess/readir.cpp
src/gromacs/pulling/pullutil.cpp
src/gromacs/taskassignment/decidegpuusage.cpp
src/gromacs/topology/mtop_util.cpp
src/gromacs/topology/mtop_util.h

Change-Id: Ie41c4a18cc79368eba613a093cda9c8782eead2c

4 years agoUpdate some nbnxm kernel constants to constexpr
Mark Abraham [Fri, 17 Jan 2020 14:43:38 +0000 (15:43 +0100)]
Update some nbnxm kernel constants to constexpr

Then OpenCL kernels now use preprocessor constants of the same names
and values, which are set up on the JIT compilation line.  This
eliminates a header file used for compatibility.

Added support also for the ocl_nbnxm_kernels testing target.

Change-Id: Ibf8f7864dd08b14aeecad095cdbe25b1fbacc765

4 years agoRemove element-size member fields
Mark Abraham [Mon, 27 Jan 2020 06:54:05 +0000 (07:54 +0100)]
Remove element-size member fields

These are compile-time constants, and there is no need to store them
in variables.

Change-Id: Ib94fbc479b031c4d4034355123a8ff0cf333c74f

4 years agoMake NbnxnGpu class with constructor
Mark Abraham [Sun, 26 Jan 2020 15:33:45 +0000 (16:33 +0100)]
Make NbnxnGpu class with constructor

This is needed for future reform of the NB GPU code. Also converted
the "staging" struct to have initializers (used to make the default
constructor) because it is held by value and would otherwise have
default constructor that leaves fields uninitialized.

Also replaced cl_bool with normal bool, as there was no advantage for
the former.

Change-Id: I1b63f0a8145dbd911062d1039f129074b0abdc3e

4 years agoAdd cool quotes
Paul Bauer [Fri, 24 Jan 2020 12:36:22 +0000 (13:36 +0100)]
Add cool quotes

Change-Id: I6debedecbefcf4828fc070874460394188a3012a

4 years agoAdd target for offline PME OpenCL compilation
Szilárd Páll [Thu, 22 Aug 2019 00:11:41 +0000 (02:11 +0200)]
Add target for offline PME OpenCL compilation

Also fix clang-tidy warnings in the PME OpenCL kernels; tested with
clang-tidy 8.0 and 9.0.
Target will be triggered in all clang-tidy + OpenCL builds.

Moved the invocation of the targets in jenkins before the
tests where it makes more sense.

Change-Id: I31d7dd4883e20d0564ab2f18a6de7e0d17e8024a

4 years agoRemoved SC RPower 48 from FEP kernel
Magnus Lundborg [Thu, 7 Nov 2019 13:47:38 +0000 (14:47 +0100)]
Removed SC RPower 48 from FEP kernel

With RPower 48 deprecated the FEP kernel has been simplified
quite a lot.

Fixes #3253.

Change-Id: Ic18d9f938679b2a7499fbcc31bfc9d28e89fdb98

4 years agoFix deadlock in PP-PME balancing startup delay
Szilárd Páll [Wed, 22 Jan 2020 16:07:01 +0000 (17:07 +0100)]
Fix deadlock in PP-PME balancing startup delay

The condition whether load balancing should start included a per-rank
computed fixed time-delay. Therefore different ranks could evaluate this
condition differently resulting in a deadlock.
This change fixes the deadlock by broadcasting the result of the time
delay check.

Fixes #3335

Change-Id: I39ebc7e99483a6837bdbd79e312148384c1966b3

4 years agoUse utf-8 for python file reading
Paul Bauer [Tue, 14 Jan 2020 07:01:30 +0000 (08:01 +0100)]
Use utf-8 for python file reading

Avoids crashing on non-ascii characters

Also needed in release-2020 due to https://gitlab.com/gromacs/gromacs/pipelines/111716110

Change-Id: Ie489110bbe37619d36f8feb739e04ef60cccff16

4 years agoMinor cosmetic improvements in AWH
Magnus Lundborg [Thu, 23 Jan 2020 15:47:28 +0000 (16:47 +0100)]
Minor cosmetic improvements in AWH

Remove duplicated inputrec outputs.
Clarify that user input data should be in kT.

Change-Id: I51b733f0a1969b8e5232766beb10a6f1a7c6a57a

4 years agoFix DD rank count prime check
Berk Hess [Wed, 22 Jan 2020 21:26:51 +0000 (22:26 +0100)]
Fix DD rank count prime check

The domain decomposition would refuse to run with large prime factors
in the MPI rank count even when the grid was specified by the user.

Fixes #3336

Change-Id: I92f20ce18f314db68890650e76741b0ee70c05df

4 years agoFix a couple of commas in cool quotes
Artem Zhmurov [Thu, 23 Jan 2020 09:58:53 +0000 (10:58 +0100)]
Fix a couple of commas in cool quotes

A couple of commas between the quotes and their authors went missing.
Due to a random nature of cool quotes, I am not sure if this have
any consequences.

Change-Id: Ifb79557efc3fd3d8d75dd0a6566cccc7e5a43ea4

4 years agoFix PME checks in GPU update assignment decision
Gaurav Garg [Fri, 10 Jan 2020 17:29:17 +0000 (22:59 +0530)]
Fix PME checks in GPU update assignment decision

The decideWhetherToUseGpuForUpdate() function performed a check on
whether PME is on GPU, but neglected to check if PME is actually
active. Therefore, cases without PME (e.g. reaction field) were
unintentionally being prevented from running update on GPU. This change
adds a check whether pmeRunMode != PmeRunMode::None

Change-Id: Ic49f99b2e2afddabd7e2c8e68ab3d6d9325dc07a

4 years agoMinor cleanup in constraint and shellfc code
Berk Hess [Wed, 22 Jan 2020 20:56:23 +0000 (21:56 +0100)]
Minor cleanup in constraint and shellfc code

Replaced include by forward declarations and simplified empty
ArrayRefs as function arguments.

Change-Id: I759f3f72bc0b4453caf059ae4723ef734a7c2ead

4 years agoFix illegal memory access in PME communication
Berk Hess [Wed, 22 Jan 2020 10:53:24 +0000 (11:53 +0100)]
Fix illegal memory access in PME communication

Depending on the compiler, mdrun could exit with an illegal
memory access error when a PME rank communicates 0 atoms with
another PME rank.

Change-Id: Ic1a08903f53c3d0b655ed5475ad99024979b461e

4 years agoClarify COMM/posres grompp note
Berk Hess [Tue, 21 Jan 2020 21:05:31 +0000 (22:05 +0100)]
Clarify COMM/posres grompp note

In the common case of equilibrating a macro-molecule using position
restraints, grompp will issue a note about COMM removal when using
default mdp settings. Added a sentence that says that it is likely
not an issue in this common case.

Change-Id: Ide8b75664c4da3789c6661d8d69f855f9abea4e0

4 years agoFix documentation error with doxygen >1.8.16
Paul Bauer [Mon, 20 Jan 2020 14:48:19 +0000 (15:48 +0100)]
Fix documentation error with doxygen >1.8.16

Fixes #3280

Change-Id: Ia41e080ea5ee4bc393d1e0240fc56958d81f6c68

4 years agoRename SettleCuda to SettleGpu
Artem Zhmurov [Thu, 9 Jan 2020 16:51:19 +0000 (17:51 +0100)]
Rename SettleCuda to SettleGpu

This is to folow general naming conventions across the code.

Refs #2886, #2888.

Change-Id: I273cf8c1cabcf59d1cb7fd7f0028c3c1cd8619c8

4 years agoUse ArrayRef(WithPadding) in constraint code
Berk Hess [Fri, 17 Jan 2020 09:59:18 +0000 (10:59 +0100)]
Use ArrayRef(WithPadding) in constraint code

This change is only refactoring, except for adding padding to two
buffers used for flexible constraints. This avoid potential illegal
memory access one element beyond the buffer with certain SIMD
implementations. Note the this memory was not used nor modified.

Change-Id: I385b3007a27888d15741e737ccfcf3e3a4369d1e

4 years agoRename LincsCuda into LincsGpu
Artem Zhmurov [Thu, 9 Jan 2020 16:42:47 +0000 (17:42 +0100)]
Rename LincsCuda into LincsGpu

This is to folow general naming conventions across the code.

Refs #2885, #2888.

Change-Id: Ifa7e3febeff1d958155ed02daa97d26e828e8381

4 years agoRename LeapFrogCuda to LeapFrogGpu
Artem Zhmurov [Thu, 9 Jan 2020 16:26:49 +0000 (17:26 +0100)]
Rename LeapFrogCuda to LeapFrogGpu

This is to folow general naming conventions across the code.

Refs #2887, #2888.

Change-Id: Ia090c0479f1960fe34d1144e3bd173015d157e62

4 years agoUse std::vector in shellfc
Berk Hess [Wed, 15 Jan 2020 16:35:15 +0000 (17:35 +0100)]
Use std::vector in shellfc

Replaced all C memory management in shellfc by std::vector and
one now. Also used more ArrayRef.
All allocated memory is now freed by done_shellfc().

Change-Id: Ic533d7b20ba7486f76148476b35986a3caec4b36

4 years agoTemplate X buffer ops on setFillerCoords
Szilárd Páll [Tue, 17 Dec 2019 02:06:55 +0000 (03:06 +0100)]
Template X buffer ops on setFillerCoords

Also fix a typo and remove an outdated TODO.

Change-Id: I4d35a889fa71b0096e825b95a02860ab6420c4ad

4 years agoActually fix Gitlab doc build
Paul Bauer [Fri, 17 Jan 2020 11:54:26 +0000 (12:54 +0100)]
Actually fix Gitlab doc build

Was still failing after 658765317fd94df5d534c039462be03ab3839067 got
merged.

Actually fixes #3278

Change-Id: I747fe5c677864d1f50ab97d0eda38c68a6085b45

4 years agoRegularize nbnxm module doxygen
Mark Abraham [Wed, 15 Jan 2020 17:30:23 +0000 (18:30 +0100)]
Regularize nbnxm module doxygen

This module will be easier to work with if all the files are
documented and all the comments precede the things that they comment.

Had to add several \internal flags to various files to ensure
things that should be internal are that way.

Change-Id: Ia08a936c23276cbea97c2e8ff47db403d3fd9185

4 years agoFix bad link in developer docs
Paul Bauer [Thu, 16 Jan 2020 17:50:25 +0000 (18:50 +0100)]
Fix bad link in developer docs

Also made sure that error gets caught by the Gitlab CI runner.

Fixes #3278

Change-Id: I36b73a4322c69242eef3dcefa6684ef973b1bd01

4 years agoAdd check for shells and GPU update
Berk Hess [Thu, 16 Jan 2020 14:13:41 +0000 (15:13 +0100)]
Add check for shells and GPU update

Fixes #3303

Change-Id: I84a9d005fdff142e332e449bd7b2cce314617adb

4 years agoCorrect fixed redmine issue id from 3297 to 3296
Berk Hess [Thu, 16 Jan 2020 14:23:35 +0000 (15:23 +0100)]
Correct fixed redmine issue id from 3297 to 3296

Recent commit 36a65816 said it fixed issue 3297, but this should
have been issue 3296.

Refs #3296

Change-Id: I85a95e818d3cda816211dc2aa8ddb32e9e0c69d4

4 years agoMake nbnxm headers more self-contained
Mark Abraham [Tue, 14 Jan 2020 15:53:26 +0000 (16:53 +0100)]
Make nbnxm headers more self-contained

Resolves existing TODO, removing a dependency of the CPU kernels
on config.h

Eliminates an unnecessary function, and the inlining of a function
that is only called every NS step.

Renamed gmx_nbnxn_*_t to gmx_nbnxm_gpu_t because there was no
advantage to the previous scheme. Each GPU build configuration only
ever uses one type, so there is no problem having different
declarations in different build configurations. The compiler would
complain if there was. The renaming of the former collection of types
in gpu_types.h created a dependency on config.h which should be
avoided.

Something about the renaming of gmx_nbnxm_cuda_t broke the way Doxygen
understood nbnxm_cuda_types.h. I thought that declaring a Doxygen
header for atomdata.h had fixed it, somehow, but it didn't, so there
is a suppression for the suspected false positive. Also fixed the
Doxygen in atomdata.h

Change-Id: I18c573ad87cbab9ae4f38aa49541f0821dc1c145

4 years agoFix PME run mode without PME
Szilárd Páll [Fri, 10 Jan 2020 15:37:32 +0000 (16:37 +0100)]
Fix PME run mode without PME

pmeRunMode was incorrectly set to CPU when the PME task is not
assigned to a GPU in a non-PME run.
This change make sure that non-PME runs pmeRunMode is correctly set to
None. It also moves this setup code to a function in the taskassignment
module.

Change-Id: I2c2c609e56d3cb6eef5cfccf2f0489545cedf6ef

4 years agoFix nightly build failure on Gitlab
Paul Bauer [Thu, 16 Jan 2020 08:17:14 +0000 (09:17 +0100)]
Fix nightly build failure on Gitlab

Found an unused variable warning when building without thread or real
MPI.

Change-Id: I6badc5c32e9eeb07cfafacd3ff9219dd612be847

4 years agoUpdate nonstd::optional
Paul Bauer [Sat, 11 Jan 2020 16:57:18 +0000 (17:57 +0100)]
Update nonstd::optional

Updated to commit 096ce6d7e45ef184de2c8ddcae45da4a9d539da5 to avoid a
bug (see https://github.com/martinmoene/optional-lite/issues/51)

Change-Id: I0df46b21fabcb7841600e5a6b32b2329742d12d5

4 years agoAllow access to optional outside libgromacs
Paul Bauer [Fri, 10 May 2019 12:03:42 +0000 (14:03 +0200)]
Allow access to optional outside libgromacs

When using gmx::compat::option in files also included
outside of the libgromacs tree (e.g. anything topology related),
compilation would abort because the include path could not be resolved
for nonstd::optional.hpp in e.g. legacymodules.cpp or view.cpp.

Adds the information needed to the CMakefiles to always find the correct
include path.

Also modifies CUDA nvcc compilation to have the header available for
those CUDA compiled files that need it.

Should be revisited when resolving #3290

Change-Id: If335ecdfa1bd2ba56cae7ee26c07d9a7faa5a651

4 years agocmake: install pbc.h for GMX_INSTALL_LEGACY_API
Christoph Junghans [Tue, 14 Jan 2020 00:06:03 +0000 (17:06 -0700)]
cmake: install pbc.h for GMX_INSTALL_LEGACY_API

This was introduced in 97c751f1945702316b6342f4054da20dd5239872.

Change-Id: I1ecb0c10d0df9285bed7bef112d4cd439b262ce6

4 years agoFix multisim with parallel simulation
Berk Hess [Tue, 14 Jan 2020 13:51:38 +0000 (14:51 +0100)]
Fix multisim with parallel simulation

mdrun -multisim with more than one rank per simulation would stop
with a fatal error due to using a partially initialized
gmx_multisim_t in GpuTaskAssignmentsBuilder::build().

Fixes #3297

Change-Id: Idfe24110908dc8cad29cd9a0eac7233fca4102f9

4 years agoUse utf-8 for python file reading
Paul Bauer [Tue, 14 Jan 2020 07:01:30 +0000 (08:01 +0100)]
Use utf-8 for python file reading

Avoids crashing on non-ascii characters

Change-Id: Ie489110bbe37619d36f8feb739e04ef60cccff16

4 years agoAvoid unnecessary exclusion generation in DD
Berk Hess [Wed, 11 Dec 2019 13:24:00 +0000 (14:24 +0100)]
Avoid unnecessary exclusion generation in DD

With only self exclusions, the DD partitioning would generate a list
of all empty exclusion lists for all i-atoms. Now no lists are
generated. An assertion is added in the pairlist generation code
to ensure we either have 0 or the right number of exclusions lists.

Change-Id: I4b0556cbf3ed3a6fea7bdd0e03e194410bcfb88a

4 years agoReport if update is running on the GPU or on the CPU
Artem Zhmurov [Fri, 10 Jan 2020 16:37:34 +0000 (17:37 +0100)]
Report if update is running on the GPU or on the CPU

This adds a line which states where update is offloaded next
to the rest of the GPU usage information.

Fixes #3292.

Change-Id: Ie6b076c4309c7695ab9b46037ced92e95dea1558

4 years agoRevert "Exclude build-system files from CPack"
Paul Bauer [Fri, 10 Jan 2020 16:52:53 +0000 (17:52 +0100)]
Revert "Exclude build-system files from CPack"

This reverts commit 617d7fb728eee44331d8f8f98fa644bc5921fcb3.

Caused #3291

This commit fixes #3291

Change-Id: Ib75dd9274c1822192d5ffd0ce458ab35a3406f11

4 years agogmxManageMPI.cmake: convert MPI FLAGS to lists
Christoph Junghans [Fri, 10 Jan 2020 00:37:09 +0000 (17:37 -0700)]
gmxManageMPI.cmake: convert MPI FLAGS to lists

Convert MPI FLAGS to lists as otherwise space will get quoted in
CFLAGS in gmxCFlags.cmake.

Change-Id: Ieee4b68d254261f079d954443322faf040e8b6e9

4 years agoImprove mdrun performance user guide
Szilárd Páll [Fri, 10 Jan 2020 13:22:07 +0000 (14:22 +0100)]
Improve mdrun performance user guide

- Extended GPU update related section;
- Tweaked the bonded GPU offload related section to reflect the current
  state of the code.

Change-Id: I89ed39750d449df8b273f36ee6530df29ff31b7e

4 years agoFix compiler warnings on windows
Paul Bauer [Thu, 9 Jan 2020 16:41:48 +0000 (17:41 +0100)]
Fix compiler warnings on windows

Came up during other builds, but didn't make any sense.

Change-Id: Ie57f4ce30d35dbb1db927b91902045fbbcffe8f0

4 years agoChange signature of the setPbc(...) method in update-constraints
Artem Zhmurov [Tue, 19 Nov 2019 15:48:35 +0000 (16:48 +0100)]
Change signature of the setPbc(...) method in update-constraints

The PBC description is stored in update-constrain module in the
PBCAiuc format, which only requires type of the PBC and the box
matrix for setup. Hence, constructing the t_pbc structure is
additional unnessesary step in the PBC reinitialization.

Change-Id: I9dff337fa18f22d9164168de37ba8fb8630ba713

4 years agoMake PBC type enumeration into PbcType enum class
Artem Zhmurov [Wed, 20 Nov 2019 15:18:56 +0000 (16:18 +0100)]
Make PBC type enumeration into PbcType enum class

The type of periodic boundary conditions is defined by untyped
enumeration and passed around as an integer, which is not type
safe. This change makes the enum class that defines the type of
the PBC and can be safely passed as a function argument.

Change-Id: Ia1f709a90472a95ad76af92c41df570ba7c28255

4 years agoUse enum for gmxapi.testsupport fixture options.
M. Eric Irrgang [Fri, 13 Dec 2019 17:24:58 +0000 (20:24 +0300)]
Use enum for gmxapi.testsupport fixture options.

Change-Id: If369d2a10c30d1e39ffe1a8f1b69303b8a071b5b

4 years agoClean up ewald module internals
Mark Abraham [Sun, 5 Jan 2020 21:16:52 +0000 (22:16 +0100)]
Clean up ewald module internals

This prepares for future refactoring by starting to break up the
cross dependence on many internal headers.

Note that useDecomposition was set (and then used) with the opposite
logic, which was a benign problem that is now fixed.

Change-Id: Ibb7f0ceb82d644374bfd396b38b9611cb8d7fd62

4 years agoFurther consolidate gmxapi.testsupport.
M. Eric Irrgang [Fri, 6 Dec 2019 11:16:41 +0000 (14:16 +0300)]
Further consolidate gmxapi.testsupport.

Migrate most of the remaining pytest fixtures from conftest.py
files to the gmxapi.testsupport pytest plugin.

Change-Id: If5fae2bafcbe96fefe6b3cd2e86ef3af2ec61786

4 years agoUpdate gmxapi Python package version and versioning support module.
M. Eric Irrgang [Thu, 12 Dec 2019 13:16:36 +0000 (16:16 +0300)]
Update gmxapi Python package version and versioning support module.

Module modernization moves in the direction of consolidated and
normalized metadata handling by reducing the exposure of non-standard
attributes. Future changes can further unify version metadata by
migrating to PEP 517/518 package configuration.

Change-Id: I288e846cc0e77d9053c79a06256afed9bb579d7f

4 years agoFix memory address bug in GPU PME coordinate address send fn
Alan Gray [Wed, 8 Jan 2020 16:37:17 +0000 (08:37 -0800)]
Fix memory address bug in GPU PME coordinate address send fn

Fixes bug introduced in 8f80571986c5ba98e4070ab390d372e81078cc3a,
which changed a pointer from rvec to float type, but didn't change the
corresponding array index used to get the pointer to send: an extra
multiplication by DIM is required.

Change-Id: Ia16e9988cb154895807a3c9f9588b1ffe59b3dcc

4 years agoSplit lines with many copyright years
Mark Abraham [Thu, 9 Jan 2020 08:17:07 +0000 (09:17 +0100)]
Split lines with many copyright years

The new split_copyright_years.sh script can be run every few years to
keep the line length short enough for readability, and to avoid
clang-format wanting to change the lines such that the copyright
checker no longer recognizes a valid copyright statement.

Numerous files have now been bumped for 2020 because the copyright
line has been changed. That's technically valid.

In recent merge commits, several files were changed to use year ranges
like 2012-2020. Those have been reverted to the old style, which is
thought to be more valid.

Fixes #3282

Change-Id: I9c4e4677bf22a8d48ab1b3245de257c4bbaccf9f

4 years agoMerge release-2019 into release-2020
Roland Schulz [Tue, 7 Jan 2020 21:43:32 +0000 (13:43 -0800)]
Merge release-2019 into release-2020

Change-Id: I34a795ad1fdc805d056401932f8c543ed77cfae7

4 years agoWorkaround for ICC 19u5 and 20initial
Roland Schulz [Tue, 7 Jan 2020 01:51:48 +0000 (17:51 -0800)]
Workaround for ICC 19u5 and 20initial

Change-Id: I34f4215f2112579b1a92c87aca28b270b4aca09e

4 years agoAdd support for ICC NextGen with MKL
Roland Schulz [Tue, 7 Jan 2020 04:55:49 +0000 (20:55 -0800)]
Add support for ICC NextGen with MKL

Change-Id: I2ac3d994736f2261955db65c7c039b7c33cdbaa7

4 years agoRemove stray "to do".
M. Eric Irrgang [Mon, 6 Jan 2020 10:47:11 +0000 (13:47 +0300)]
Remove stray "to do".

The context of the comment has changed over several commits. If it is
still relevant, its meaning is unclear. If there is a question that still
needs to be resolved, it can be re-posed in the issue tracking system
when someone has a chance to clarify and frame the discussion.

Change-Id: Ifb65ae4942a1225aa23189c95aaa4c73c3b7c88c

4 years agoMerge branch origin/release-2020 into master
Paul Bauer [Tue, 7 Jan 2020 13:09:57 +0000 (14:09 +0100)]
Merge branch origin/release-2020 into master

Final merge needed for release-2020 into master

Change-Id: I93a44684f002997dfa8590c865103b436f3e3e93

4 years agoWrite TPR body as opaque XDR data in big-endian format
Erik Lindahl [Sun, 29 Dec 2019 13:43:35 +0000 (14:43 +0100)]
Write TPR body as opaque XDR data in big-endian format

This implements support for opaque data in our serializers,
as well as a few missing XDR support opaque routines,
including support for data objects larger than 2GB.

By using this for the new serialization of the TPR body
we avoid the unintended 4x growth of the file size, and
avoid introducing extra endian swapping or padding.

We also adjust the endian so the InMemorySerializer
swaps to big endian (i.e., swap if host is little endian)
such that the body of the TPR file is compatible with
the header that is already written as big-endian by
the XDR routines.

Fixes #3276.

Change-Id: I99011dffe190155e671bd656127c2a33459923e2

4 years agoMerge commit d30f2cb6 from release-2020 into master
Paul Bauer [Tue, 7 Jan 2020 10:01:22 +0000 (11:01 +0100)]
Merge commit d30f2cb6 from release-2020 into master

Merging the release-2020 branch in stages to allow update to TPR format
to be cherry-picked in.

Change-Id: I36c0861d0cb6f17a3f4ff739fa868867844f2944

4 years agoRemove transitional links for online gmxapi Python package reference.
M. Eric Irrgang [Fri, 8 Nov 2019 20:07:49 +0000 (23:07 +0300)]
Remove transitional links for online gmxapi Python package reference.

Provide link to current GROMACS gmxapi documentation,
built by GitLab Runner.

Fixes #2985

Change-Id: I1e56828aba4cc2568bbc9e6617863ca10197058d

4 years agoAdd Flake8 linting to gmxapi tests.
M. Eric Irrgang [Thu, 4 Apr 2019 14:38:38 +0000 (17:38 +0300)]
Add Flake8 linting to gmxapi tests.

Add the flake8 package to requirements-test.txt and a run_flake8
docker entry point. This change does not require Python source
checking, but facilitates it.

Refs #1786

Change-Id: I6a6c2d6012e4424d13d8ceed0ea3696077042f6f

4 years agoUse `todo` Sphinx directive more.
M. Eric Irrgang [Thu, 26 Dec 2019 15:45:59 +0000 (18:45 +0300)]
Use `todo` Sphinx directive more.

Start making "to do"s more actionable. Use the Sphinx `todo` directive
to allow special processing. For comment blocks that imply planned
activity, convert comment to `todo` directive for more easily discovered
and tracked doctree elements.

"To do" items should have a clear call to action and some follow through,
such as being prohibited in release branches or at least referring to
tracked issues, but that is beyond the scope of this change.
This change only seeks to make the mass of "to do"s more discoverable.

Change-Id: I8cbc06a5a1d78791bc6e9b0a2530632ad09a9380

4 years agoPrepare for 2020.1
Paul Bauer [Fri, 27 Dec 2019 13:48:34 +0000 (14:48 +0100)]
Prepare for 2020.1

Reset DOI strings

Change-Id: I5898dfdacde0c851c1a870a983094a2e56c3ab2b

4 years agoGROMACS 2020 release
Paul Bauer [Fri, 27 Dec 2019 13:01:33 +0000 (14:01 +0100)]
GROMACS 2020 release

Updated regressiontest hash
Set doi strings
Set correct release date

Change-Id: I5d34e1176e5a0ecc6b38a15d830d228127a69d9d

4 years agoRevert "GROMACS 2020 release"
Paul Bauer [Wed, 1 Jan 2020 15:39:30 +0000 (16:39 +0100)]
Revert "GROMACS 2020 release"

This reverts commit 78c3280ad9c1802db4f6a7e02978207921add05f.

Reason for revert: wrong release date

Change-Id: Ia0d4112349ea4bdca9edda2a30e8933cacc2ad19

4 years agoGROMACS 2020 release
Paul Bauer [Fri, 27 Dec 2019 13:01:33 +0000 (14:01 +0100)]
GROMACS 2020 release

Updated regressiontest hash
Set doi strings

Change-Id: Id053624d5e276aea62a5d07ebf995cf01b54f1ab

4 years agoAdd link to paper explaining GROMOS twin-range issues.
Erik Lindahl [Tue, 31 Dec 2019 11:00:43 +0000 (12:00 +0100)]
Add link to paper explaining GROMOS twin-range issues.

Change-Id: I81e89817ce9441bb3d25bc43b00b4cc995590c3a

4 years agoAvoid 386 O3 codegen bug even more
Mark Abraham [Tue, 31 Dec 2019 13:56:42 +0000 (13:56 +0000)]
Avoid 386 O3 codegen bug even more

Refs #3205

Change-Id: I78f3cc03da36e129a842507f9cdd3d170beb8c08