ejjordan [Wed, 28 Apr 2021 14:16:59 +0000 (16:16 +0200)]
Remove mdatoms from expanded
Also removed most of the included in expanded.cpp, all of which
were unused.
Gilles Gouaillardet [Mon, 3 May 2021 17:13:56 +0000 (17:13 +0000)]
densityfitting: add missing include file
Artem Zhmurov [Mon, 3 May 2021 13:20:26 +0000 (16:20 +0300)]
Berk Hess [Mon, 3 May 2021 14:29:11 +0000 (14:29 +0000)]
Clean up DD bonded interaction assignment
Mark Abraham [Thu, 29 Apr 2021 09:04:33 +0000 (11:04 +0200)]
Replace bool with enum class in DomdecOptions
The logic is simpler if we just use DDBondedChecking directly in
DomdecOptions. The enum values have changed so that they match those
for the bool type. Added a test and an assertion to confirm that this
works as expected, ie the default for mdrun -ddcheck is unchanged
Joe Jordan [Mon, 3 May 2021 13:04:50 +0000 (13:04 +0000)]
ArrayRef in pme
Mark Abraham [Tue, 27 Apr 2021 14:23:25 +0000 (16:23 +0200)]
Remove redundant store
gcc 9 complains about the useless store
Mark Abraham [Fri, 30 Apr 2021 06:21:02 +0000 (08:21 +0200)]
Temporarily lift requirement to detect GPUs in CI
ejjordan [Tue, 27 Apr 2021 14:45:56 +0000 (16:45 +0200)]
Remove leftover function declaration from nbnxm atomdata
MR !1483 neglected to remove the declaration of function
nbnxn_atomdata_init. This MR rectifies that. Also removed
and unneeded include.
Joe Jordan [Tue, 27 Apr 2021 12:33:43 +0000 (12:33 +0000)]
Apply clang-tidy11 to mdrun
Joe Jordan [Tue, 27 Apr 2021 08:40:11 +0000 (08:40 +0000)]
Unify constructor of nbnxn_atomdata_t
Joe Jordan [Tue, 27 Apr 2021 06:23:06 +0000 (06:23 +0000)]
Constructor for t_mde_delta_h_coll
ejjordan [Thu, 22 Apr 2021 12:22:07 +0000 (14:22 +0200)]
Increase const correctness of t_mdatoms use in md.cpp
Previously two instances of t_mdatoms were made in do_md, once const
and one not. This replaces all instances where the non-const was not
used but could be with const usage. Also, non-const usage is now done
by calling MDAtoms->mdatoms() to indicate non-const usage more clearly.
Joe Jordan [Mon, 26 Apr 2021 15:33:40 +0000 (15:33 +0000)]
Remove inputrec from initialize_lambdas signature
ejjordan [Mon, 26 Apr 2021 12:56:15 +0000 (14:56 +0200)]
Apply clang-tidy11 to correlationfunctions
ejjordan [Mon, 26 Apr 2021 12:39:44 +0000 (14:39 +0200)]
Apply clang-tidy11 to simd
ejjordan [Mon, 26 Apr 2021 12:36:49 +0000 (14:36 +0200)]
Apply clang-tidy11 to random
ejjordan [Mon, 26 Apr 2021 12:53:07 +0000 (14:53 +0200)]
Apply clang-tidy11 to commandline
Paul Bauer [Fri, 23 Apr 2021 13:05:39 +0000 (15:05 +0200)]
Fix MSVC build
The enum class must have collided with some internal type in MSVC, so we
rename it.
Artem Zhmurov [Mon, 26 Apr 2021 07:24:27 +0000 (07:24 +0000)]
Clang-11 fixes for applied forces
Berk Hess [Fri, 23 Apr 2021 15:53:43 +0000 (15:53 +0000)]
Specialize jacobi() for 3 dimensions
Artem Zhmurov [Fri, 23 Apr 2021 11:36:31 +0000 (11:36 +0000)]
Make SETTLE setup code platform-agnostic
Artem Zhmurov [Fri, 23 Apr 2021 10:13:49 +0000 (10:13 +0000)]
Apply clang-11 fixes for fileio
Andrey Alekseenko [Thu, 22 Apr 2021 16:44:08 +0000 (18:44 +0200)]
Fix beningn GCC 10.2 Wstringop-truncation warnings
- `get_pdb_atomnumber`
GCC was worried that we're copying up to 4 bytes to a buffer of
length 4, not leaving the space for terminating \0. The source string
is guaranteed to have length 3 + terminator, so not a problem.
Changed to strcpy, since it should be safe here.
While at it, renamed a variable, gave a name to a magic constant,
added a static_assert to ensure safety.
- `read_vsite_database`
GCC was complaining that we're copying 4094 bytes from a string of
length 4094, possibly truncating the terminating \0. The string was
guaranteed to have a terminator in its first 4093 bytes (fgets2 will
put it no later than STRLEN-2, and we also skip the first character).
But to make GCC happy, I see no harm in adding 1 more byte to strncpy.
Another warning from GCC is an actual error, fixed in MR !1487.
Artem Zhmurov [Fri, 23 Apr 2021 09:05:24 +0000 (09:05 +0000)]
Clang-11 fixes for PME and FFT
Pascal Merz [Fri, 23 Apr 2021 07:09:54 +0000 (07:09 +0000)]
Prepare virial calculation for legacy md-vv pressure coupling
Artem Zhmurov [Thu, 22 Apr 2021 16:21:28 +0000 (16:21 +0000)]
Make LINCS setup code platform-agnostic
Mark Abraham [Thu, 22 Apr 2021 09:32:27 +0000 (11:32 +0200)]
Improve UpdateGroups testing infra
Made and used a class fixture, used scopes to clarify lifetimes,
updated naming to follow general style, separated tests of the effect
of temperature upon radius calculations.
Paul Bauer [Thu, 22 Apr 2021 14:39:21 +0000 (14:39 +0000)]
Fixes from clang-tidy-11 for signal handling
Joe Jordan [Thu, 22 Apr 2021 13:19:47 +0000 (13:19 +0000)]
Vectors in history_t
Paul Bauer [Thu, 22 Apr 2021 12:56:31 +0000 (12:56 +0000)]
Fix MSVC build
Szilárd Páll [Thu, 22 Apr 2021 11:21:19 +0000 (13:21 +0200)]
Fix doxygen of the SYCL atomicFetchAdd
Mark Abraham [Thu, 22 Apr 2021 05:35:38 +0000 (07:35 +0200)]
More renaming for UpdateGroups
In preparation for introducing a class for managing the use and data for
UpdateGroups, other things need to change so we'll have clarity.
Refs #4004
ejjordan [Wed, 21 Apr 2021 16:46:11 +0000 (18:46 +0200)]
Finish removing t_mdatoms from update module
Remove t_atoms from finish_update and only pass needed params.
Also cleaned up the includes and forward declares a bit.
Szilárd Páll [Wed, 21 Apr 2021 15:55:30 +0000 (15:55 +0000)]
Remove isnormal() check around the atomic increment
Joe Jordan [Wed, 21 Apr 2021 15:32:22 +0000 (15:32 +0000)]
Mostly remove t_mdatoms from update signatures
Joe Jordan [Wed, 21 Apr 2021 14:07:45 +0000 (14:07 +0000)]
clang-tidy-11 fixes for gmxpreprocess
Pascal Merz [Sat, 28 Nov 2020 19:13:39 +0000 (12:13 -0700)]
Introduce TimeStep and Offset strong types
When building integration algorithms in modular simulator, the time
step (for propagations) and the scheduling offset (for algorithms called
periodically) are the most frequently used type of arguments. They are
also currently the only arguments which are passed by simple types
(int and double, respectively).
The current change introduces strong types, increasing both safety and
readability. Note that these strong types can easily be adapted to
inheriting from a general base class if one is introduced (refs #4005).
Szilárd Páll [Wed, 21 Apr 2021 10:57:02 +0000 (10:57 +0000)]
Fix nbnxm hipSYCL kernels 64-wide exec on AMD
Mark Abraham [Wed, 21 Apr 2021 08:37:01 +0000 (10:37 +0200)]
Fix doxygen for MessageStringCollector
Refs #4004
Mark Abraham [Wed, 21 Apr 2021 08:39:32 +0000 (10:39 +0200)]
Let LoggerTestHelper write cleaner tests
Now we can write tests that the logger produces no output, e.g. no
warnings occur when a happy path is able to run.
Refs #4004
ejjordan [Tue, 20 Apr 2021 13:24:18 +0000 (15:24 +0200)]
Use index instead of pointer in t_mde_delta_h_coll
Several members of t_mde_delta_h_coll were just pointers into a
master array of t_mde_delta_h that are held by t_mde_delta_h_coll.
This change makes it so only an int instead of a pointer is stored.
After this it should be much easier to make t_mde_delta_h_coll
default constructible, which is planned for a followup.
Also removed 2 unused members.
A renaming of the members can also be left for a followup, once
the whole t_mde_delta_h_coll struct is modernized.
Mark Abraham [Wed, 21 Apr 2021 05:44:07 +0000 (07:44 +0200)]
Remove uses of std::bind
clang-tidy-11 correctly warns against these unnecessarily complex
constructs.
Refs #3897
Mark Abraham [Wed, 21 Apr 2021 08:02:09 +0000 (10:02 +0200)]
Use consistent naming for update groups
Prepares to introduce an UpdateGroups class that contains the groupings
Refs #4004
Joe Jordan [Wed, 21 Apr 2021 00:36:10 +0000 (00:36 +0000)]
Rename some enum names in ModuleMultiThread
Joe Jordan [Tue, 20 Apr 2021 13:44:44 +0000 (13:44 +0000)]
clang-tidy-11 fixes for topology, gpu_utils, and selection
Paul Bauer [Tue, 20 Apr 2021 11:20:27 +0000 (13:20 +0200)]
Fix clang-format
Was missing from previous commit.
Paul Bauer [Tue, 20 Apr 2021 07:53:33 +0000 (09:53 +0200)]
Fix possible UB in ArrayRef construction
The code could cause possible UB when construction ArrayRefs from
nullptrs.
Added nullptr check to only construct empty ArrayRef in that case.
Joe Jordan [Tue, 20 Apr 2021 09:58:52 +0000 (09:58 +0000)]
Use enum class for gmx_omp_nthreads
Joe Jordan [Tue, 20 Apr 2021 09:18:07 +0000 (09:18 +0000)]
clang-tidy-11 fixes for utils
ejjordan [Mon, 19 Apr 2021 18:54:55 +0000 (20:54 +0200)]
clang-tidy-11 fixes mdrun tests
Split off from !1433
ejjordan [Mon, 19 Apr 2021 18:09:25 +0000 (20:09 +0200)]
clang-tidy-11 fixes for listed_forces
ejjordan [Mon, 19 Apr 2021 18:29:05 +0000 (20:29 +0200)]
Apply clang-tidy11 to gmxana files with no dependencies
Splitt off from !1433. These are only the gmxana files that do not
depend on other clang-tidy11 changes. The files gmx_analyze.cpp,
gmx_nmr.cpp, gmx_bar.cpp, gmx_wheel.cpp and gmx_energy.cpp all have
dependencies, mostly on enum modernization. They can be a subsequent
MR.
ejjordan [Mon, 19 Apr 2021 18:40:10 +0000 (20:40 +0200)]
clang-tidy-11 fixes for options
Split off from !1433
ejjordan [Mon, 19 Apr 2021 18:36:55 +0000 (20:36 +0200)]
clang-tidy-11 fixes for hardware
Split off from !1433
ejjordan [Mon, 19 Apr 2021 18:17:38 +0000 (20:17 +0200)]
clang-tidy-11 fixes for analysisdata
Artem Zhmurov [Mon, 19 Apr 2021 13:53:58 +0000 (16:53 +0300)]
Make .rtp/.tdb bond types into enum class
Artem Zhmurov [Mon, 19 Apr 2021 14:49:11 +0000 (17:49 +0300)]
Make Compartment, Channel, ChannelHistory and Domaint into enum classes
Artem Zhmurov [Mon, 19 Apr 2021 18:49:05 +0000 (18:49 +0000)]
Make XDR type into enum class
Alan Gray [Mon, 19 Apr 2021 15:55:42 +0000 (08:55 -0700)]
Add Gaurav to list of contributors
Paul Bauer [Mon, 19 Apr 2021 08:18:00 +0000 (08:18 +0000)]
Set matching number of ranks for OpenCL GPU tests
Philip Loche [Thu, 15 Apr 2021 11:23:46 +0000 (13:23 +0200)]
Removed a duplicated quote
Mark Abraham [Sat, 17 Apr 2021 08:47:58 +0000 (08:47 +0000)]
Rename files to follow style
Paul Bauer [Thu, 15 Apr 2021 16:19:12 +0000 (18:19 +0200)]
Fix AWH input reading
Tests happened at the wrong time before all AWH and FEP parameters had
been initialized, leading to aborts due to failing checks.
Also fix initialization of dim parameters.
Fixes #4027
Gaurav Garg [Wed, 14 Apr 2021 05:50:07 +0000 (11:20 +0530)]
Remove thread-MPI limitation for GPU direct PME-PP communication
Allows use of direct-GPU communication for PP-PME communication when
running with "real" MPI, including on multiple compute nodes,
through new CUDA-aware MPI communication code paths.
Implements part of #2891
Refs: #2915 #3960
Pascal Merz [Fri, 16 Apr 2021 09:30:02 +0000 (09:30 +0000)]
Introduce position and velocity scaling propagators
Andrey Alekseenko [Wed, 14 Apr 2021 17:03:23 +0000 (17:03 +0000)]
Use host buffer instead of host accessors in SYCL LeapFrog
Joe Jordan [Wed, 14 Apr 2021 16:16:27 +0000 (16:16 +0000)]
Pass forcerec arguments instead of forcerec to gmx_nb_free_energy_kernel
Paul Bauer [Wed, 14 Apr 2021 13:52:51 +0000 (13:52 +0000)]
Modernize wallcycle counting
Andrey Alekseenko [Wed, 14 Apr 2021 10:02:43 +0000 (13:02 +0300)]
Fix misc-misplaced-const clang-tidy warning
The problem was introduced in
aa66efd3179a671aace62b827c54aadc3d89c1ee
(MR !1374).
As MPI_Comm is typedef'd as a pointer to a structure, declaring it const
would be of little use: the pointer itself would be const, not the data
it is pointing to.
Pascal Merz [Tue, 6 Oct 2020 03:02:17 +0000 (21:02 -0600)]
Implement Nose-Hoover thermostat for leap-frog modular simulator
This implements the Nose-Hoover temperature coupling algorithm for the
leap-frog version of modular simulator. Velocity verlet could in theory
use this coupling algorithm as well, but the legacy version uses the
Trotter-decomposed version instead, which will be introduced to modular
simulator in a follow-up commit. To ensure equivalence of the legacy and
the modular code paths, Nose-Hoover will not be enabled for md-vv in
modular simulator until the Trotter scheme is merged.
The implementation added in this change is straightforward, as it extends
the existing general velocity-scaling temperature coupling object by
another algorithm. It is marginally more complex than the existing
algorithms (Berendsen and v-scale) due to the need of checkpointing the
extended ensemble degree of freedom for exact continuation.
Refs #3423
Andrey Alekseenko [Wed, 14 Apr 2021 07:14:21 +0000 (07:14 +0000)]
Add GMX_GPU_SYCL_NO_SYNCHRONIZE environment variable
Berk Hess [Tue, 13 Apr 2021 11:31:01 +0000 (11:31 +0000)]
Implement dynamic pair search for EM
Kevin Boyd [Mon, 12 Apr 2021 18:02:11 +0000 (11:02 -0700)]
Replace static trajectoryanalysismoduledata methods with instance methods
This paves the way for multiple concurrent frames analyzing
selections in parallel, via individual analysismoduledata objects
Gaurav Garg [Thu, 25 Mar 2021 08:19:37 +0000 (13:49 +0530)]
Remove thread-MPI limitation for GPU PP Halo exchange
Allows use of direct-GPU communication for PP halo exchange when
running with "real" MPI, including on multiple compute nodes,
through new CUDA-aware MPI communication code paths.
Implements part of #2891
Refs: #2915 #3960
Joe Jordan [Tue, 13 Apr 2021 09:43:44 +0000 (09:43 +0000)]
Use array for term and foreign_term in gmx_enerdata_t
Kevin Boyd [Tue, 13 Apr 2021 08:26:05 +0000 (08:26 +0000)]
Add basic position restraints test
Pascal Merz [Mon, 12 Apr 2021 16:47:42 +0000 (10:47 -0600)]
Fix check source
2e8da9f2ad7536ed0da612a977c6bfe0f89bc071 added a function argument
without updating the doxygen. This adds the missing argument description.
Joe Jordan [Mon, 12 Apr 2021 18:18:53 +0000 (18:18 +0000)]
Pass cFREEZE and cTC to update after DD partitioning
Mark Abraham [Mon, 12 Apr 2021 17:00:34 +0000 (17:00 +0000)]
Improve docs and naming for MdModulesNotifiers
Pascal Merz [Mon, 12 Apr 2021 15:39:51 +0000 (15:39 +0000)]
Remove explicit dependency of EnergyData on thermostat / barostats
Sebastian Kehl [Mon, 12 Apr 2021 15:10:18 +0000 (15:10 +0000)]
Add unit test for the nonbonded fep kernel.
Szilárd Páll [Mon, 12 Apr 2021 09:52:20 +0000 (11:52 +0200)]
Workaround for compilation with hipSYCL 0.9.1
Joe Jordan [Mon, 12 Apr 2021 13:36:26 +0000 (13:36 +0000)]
Expose init_interaction_const and move to correct header/source
Mark Abraham [Mon, 12 Apr 2021 05:52:35 +0000 (07:52 +0200)]
Relax default tolerance on pressure comparisons
Fixes #3975
Joe Jordan [Mon, 12 Apr 2021 10:24:29 +0000 (10:24 +0000)]
Replace defines with constexpr in ishift
ejjordan [Fri, 9 Apr 2021 08:57:01 +0000 (10:57 +0200)]
Constructor for gmx_ekindata_t
Moved init_ekin_data from tgroup header/source to group and made
it the constructor for gmx_ekindata_t. Also made gmx_ekindata_t a
class since the number of threads is only needed by constructor
and destructor and can thus be private. Further refactoring of
members of gmx_ekindata_t would eliminate the need for the nthreads
data member entirely. Other members we not made private to avoid a
ripple of changes adding "()" to numerous lines in several files.
Kevin Boyd [Mon, 12 Apr 2021 08:52:57 +0000 (08:52 +0000)]
Prepare SelectionCollection for parallel analysis
Joe Jordan [Mon, 12 Apr 2021 08:24:45 +0000 (08:24 +0000)]
Add a fourth coordinate to virial tests
Pascal Merz [Fri, 2 Apr 2021 19:35:01 +0000 (13:35 -0600)]
Allow thermostat to scale velocities before and after step
Velocity scaling thermostats are currently only able to scale
velocities before the respective propagator step. This change allows
to also scale velocities at the end of the step. This functionality
is needed by the Nose-Hoover thermostat.
This requires an additional template parameter in the `updateVelocities`
function, and an additional callback in the
`PropagatorThermostatConnection` struct to allow temperature coupling
algorithms to get a view to the end velocity scaling.
This also sorts the forward declarations in modularsimulatorinterfaces.h
alphabetically to simplify follow-up changes.
Refs #3423
Artem Zhmurov [Sun, 11 Apr 2021 17:36:11 +0000 (20:36 +0300)]
Add a note on early return in device buffer operations
Functions that (re)allocate, clear and copy to or from
device buffer have an early return in case of zero operation
size. This is a safety mechnism that allows calling these
functions even if the buffers are not intialized, if the
size of the respective buffer is set to zero. A note is
added to the devicebuffer.h that explains why these early
returns are needed.
Artem Zhmurov [Sun, 11 Apr 2021 17:30:41 +0000 (20:30 +0300)]
Clean some headers in NBNXM GPU
1. Remove declarations of non-existing functins.
2. Remove declarations of internal helper functions,
move some of the helper functions up in the
respective sources so that their declaration can
be removed from the headers.
3. Remove unnecessary includes.
Refs #2608
Pascal Merz [Thu, 8 Apr 2021 21:58:15 +0000 (15:58 -0600)]
Propagate from current rather than previous position
The current implementation was using the previous position as a starting
point of position propagation. This is conceptually wrong: We want to
propagate starting from the current position.
This had no influence currently, as none of the algorithms present has
multiple position propagations per step. Moving forward, this does however
pose the risk of bugs.
Andrey Alekseenko [Fri, 9 Apr 2021 10:46:02 +0000 (13:46 +0300)]
Add GpuEventSynchronizer::isMarked to SYCL verion
This function is needed to work around #3988 when implementing GPU
update (#3932).
Christoph Junghans [Fri, 9 Apr 2021 15:44:17 +0000 (09:44 -0600)]
template: fix build
Andrey Alekseenko [Fri, 9 Apr 2021 10:54:46 +0000 (13:54 +0300)]
Move ScalingMatrix to common GPU update code.
Also, add a constructor to initialize it from an old-style matrix.
Currently, this struct is used only in CUDA, but would be used in SYCL
soon.
Refs #3932.
Artem Zhmurov [Fri, 2 Apr 2021 12:31:27 +0000 (15:31 +0300)]
Add early returns in clearDeviceBuffer(...) in OpenCL and CUDA
Clearing of empty buffer can cause the OpenCL/CUDA API failure.
Early return when requested size to clear is zero allows to
avoid this failure not calling the API for empty buffers.
This also makes the definition of the clearDeviceBuffer(...) in
OpenCL, CUDA similar to its definition in SYCL, where the early
return is already present.
Fixes #4002.
Joe Jordan [Sun, 11 Apr 2021 00:48:56 +0000 (00:48 +0000)]
Pass ref_t to initialize_lambdas
Dmitry Morozov [Wed, 7 Apr 2021 14:18:12 +0000 (17:18 +0300)]
Fix several errors when compiling with MSVC
ejjordan [Tue, 6 Apr 2021 09:21:22 +0000 (11:21 +0200)]
Minor forcerec cleanup
* gmx_bool -> bool
* rename a variable
* rvec -> RVec
* more array and vector
* now has default destructor