Alan Gray [Wed, 12 Jun 2019 15:03:27 +0000 (08:03 -0700)]
Bug fix and simplification for CUDA X Buffer Ops
Fixes bug when there are more than two grids (ie they don't naively
map to local/nonlocal), by using a separate GPU memory space for
cxy_na and cxy_ind data for each grid (it previously only had one
local and one nonlocal space with overwriting). Also simpifies by now
only calling init fn once per NS step to set up data for all grids
(previously called for both local and nonlocal).
Change-Id: Ia2b97d22324aa97dca34b05da2eca2e2090372af
Berk Hess [Mon, 24 Jun 2019 09:50:35 +0000 (11:50 +0200)]
Fix MPI deadlock in affinity setting
Commit
96d28d6b introduced the possiblity for deadlocks when
the affinity masks changed over time.
Fixes #2989
Change-Id: I454b38deb9ff11c90cdf4a19aaa80e79e8898df5
Berk Hess [Wed, 19 Jun 2019 10:44:51 +0000 (12:44 +0200)]
Template free-energy kernel on differing coul/vdw soft-core
The power function used for the soft-core potential is expensive.
When using the same lambda and alpha parameters for Coulomb and VdW,
we can skip one power core, giving a 10% performance improvement.
Change-Id: I8733838c6c32ef2b6fee5a6fb97657679f9bd3b3
M. Eric Irrgang [Sat, 29 Jun 2019 06:08:43 +0000 (09:08 +0300)]
gmxapi Python package documentation infrastructure.
* Begin a documentation tree in python_packaging/documentation.
* Create a docker image for quick rebuild and review of Sphinx docs.
Refs #2698
Change-Id: Ib05e0309e60bfdadf52dadc7af0942c25c89f1e4
Szilárd Páll [Thu, 27 Jun 2019 15:26:50 +0000 (17:26 +0200)]
Create dedicated subcounter for nonbonded FEP
Now all nonbonded work has their own separate subcoutners which allows
measuring the performance of each task separately.
Refs #2997
Change-Id: I601445364592923d08087a858da4629b0b58ae76
Kevin Boyd [Sat, 12 Jan 2019 14:47:54 +0000 (09:47 -0500)]
Remove group scheme checks from runner
refs #1852
Change-Id: I906ffc7c063694fbbd17128ee0d1e62259040306
Magnus Lundborg [Tue, 18 Jun 2019 12:22:10 +0000 (14:22 +0200)]
Cleaning up the GPU bonded kernel
Improved variable names
Removed unnecessary includes
Refs #2988
Change-Id: Ife5f50e68f27994203305e376f2781a076052b64
Szilárd Páll [Mon, 13 Nov 2017 22:54:21 +0000 (23:54 +0100)]
Separate CPU NB kernel and buffer clearing subcounters
This is aimed to allow comparing the performance of the pair-interaction
kernels separately from the force buffer clearing.
Change-Id: Ifb2b4b3e5a43ac2ee547da651f9432a22fe58421
Christian Blau [Wed, 19 Jun 2019 11:35:18 +0000 (13:35 +0200)]
Add copy and move operations to density similarity
Enable copying and moving for DensitySimilarityMeasure.
Change-Id: Ie4250f67ae42b5cea227b7c17b0a932b04a42a63
Magnus Lundborg [Thu, 23 May 2019 14:39:50 +0000 (16:39 +0200)]
Fused GPU bonded kernels
To reduce the GPU kernel launch times the
GPU bonded kernels have been fused to a single kernel.
Refs #2818
Change-Id: I2299e1857df5db469739e3aefbc0f771968a6bd5
Christian Blau [Fri, 31 May 2019 06:30:39 +0000 (08:30 +0200)]
Add class to look up density fitting amplitudes
Adds a look-up for the weight used for spreading atoms on a grid and
calculate forces on them.
refs #2282
Change-Id: Iadd26f04265aa85ad30a827c92f2c5d5fc48ef85
Szilárd Páll [Thu, 27 Jun 2019 12:35:53 +0000 (14:35 +0200)]
Remove already resolved post-submit matrix TODO
Change-Id: I4b4f8c81376ac36c141e27fd6a3301f550968d1a
Kevin Boyd [Thu, 27 Jun 2019 01:57:48 +0000 (21:57 -0400)]
Use random water removal in gmx solvate
Given a number of solvent molecules to remove, gmx solvate
previously used a striding selection. This patch addresses a
TODO to use random selection
Change-Id: Icb065d61349a55b816337fa49470050eac194aa9
M. Eric Irrgang [Mon, 24 Jun 2019 10:11:15 +0000 (13:11 +0300)]
Add helpful note about gmxpai docker notebook server.
Per Joe's comment on https://gerrit.gromacs.org/c/gromacs/+/11502, it
was not clear where the notebook files live or how they may / may not
change. An extra snippet in the README.md may be helpful.
Change-Id: Ifd7b68ebf58fb3f2c3bed50f3267980358ffc047
Berk Hess [Wed, 26 Jun 2019 15:44:21 +0000 (17:44 +0200)]
Remove tabulation from free-energy kernel
The recent group scheme removal cleanup forgot to remove the cubic
spline tabulated Coulomb and VdW interaction. This is done now.
Also removed the switches in the inner loops, as now there are only
two types of Coulomb and LJ interaction functional forms left.
Change-Id: Ia4aa8917077a3e48c7f1f055f171698a4fede8d0
Szilárd Páll [Thu, 20 Jun 2019 17:18:23 +0000 (19:18 +0200)]
Only use AVX512 in own-FFTW if GROMACS also uses it
Building the own FFTW with AVX512 enabled for all AVX-flavors means that
an AVX2 build can end up loosing a significant amount of performance due
to clock throttle if the FFTW auto-tuner inadvertently picks and AVX512
kernel. This is not unlikely as measurements at startup are very noisy
and often lead to inconsistent kernel choice (observed in practice).
Change-Id: I857326a13a7c4dd1a6f5ab44360211301b05d3ac
Pascal Merz [Wed, 12 Jun 2019 17:22:12 +0000 (11:22 -0600)]
Make global topology constant in trajectory writing
Added a few trivial const qualifiers to make the global topology
const in the call to do_md_trajectory_writing(...).
Change-Id: Id9a501a37bafb4ac25ef6157429d6fb5cb1ff098
M. Eric Irrgang [Wed, 12 Jun 2019 10:47:28 +0000 (13:47 +0300)]
Add a docker layer with a jupyter notebook server.
Provide a docker image based on the gmxapi/ci-mpich image that runs a
Jupyter notebook server for easier browsing of the gmxapi Python package
artifacts.
Change-Id: I245bccb0522bd7c1e4e7467e10e2e91f09976f25
Paul Bauer [Wed, 5 Jun 2019 13:18:34 +0000 (15:18 +0200)]
Use ISerializer for TPR file IO
Change all the function calls in do_tpx and friends to use the
ISerializer instead of the previous t_fileio pointer.
This is intended to prepare for the change where the datastructures
get populated from a byte buffer instead of reading them from disk one
by one.
Refs #2971
Change-Id: I9c2d51c4af0cad5a14da7026d58ecbe053e8efb7
Christian Blau [Fri, 31 May 2019 06:25:03 +0000 (08:25 +0200)]
Add coordinate scaling class and extend TranslateAndScale
- Make TranslateAndScale copyable and movable.
- Make coordinate transformation application const on the
TranslateAndScale object itself
- Add a function that returns the scale operation only without translation.
- Add a coordinate scaling class that also allows to inverse the scaling, ignoring zero input.
refs #2282
Change-Id: I73f9bd892f1f81692e05ac6b2fece2e7be9e8e69
Christian Blau [Fri, 31 May 2019 06:19:52 +0000 (08:19 +0200)]
Allow non-uniform Gaussians
For three-dimensional Gaussian spreading, as well as density guided force
evaluation, allow spreading with different widths along x, y, and z-direction.
This required to account for the common, slightly non-uniform grid
spacing in input densities.
Added some simplifactions for the vector operations based on newly
implemented functions in for BasicVector in a previous patch.
refs #2282
Change-Id: I730897fe672d2444a04ea68fea83e2273b359b27
Berk Hess [Wed, 19 Jun 2019 07:46:19 +0000 (09:46 +0200)]
Remove unnecessary #if GMX_MPI in pme code
Change-Id: I1c645c84b229258527d4c40edb055a706189c2bf
Berk Hess [Wed, 19 Jun 2019 09:33:05 +0000 (11:33 +0200)]
Template free-energy kernel on soft-core
Templated the free-energy kernel on the presence of soft-core
and the soft-core r-power.
Not doing the soft-core math when not using soft-core doubles
the speed of the free-energy kernel.
Templating for the soft-core power gives 15% performance improvement
with soft-core power 6.
Double precision r variables are only needed with r-power 48.
Change-Id: I5a37307b2a83304a40343a0708afce46f4bdcf75
Christian Blau [Wed, 19 Jun 2019 13:00:12 +0000 (15:00 +0200)]
Add BasicVector scaling, max, min and toIvec
Allows element-wise multiplication, maximum, minimum evaluation
as well as conversion to IVec.
Change-Id: I49ba61aff72b197dbe3a67a9516ae0924d28c786
Berk Hess [Wed, 15 May 2019 11:04:44 +0000 (13:04 +0200)]
Refactor PME atom handling
Converted pme_atomcomm_t to PmeAtomComm class.
The PME atom count on CPU without separate PME ranks is now set by
gmx_pme_reinit_atoms(), as for PME on GPU.
Made all coordinates in PME const and use arrayref where possible.
Change-Id: Iaeb59f8cee910e4c52f2f59016af85662b2109fb
Paul Bauer [Tue, 11 Jun 2019 09:20:28 +0000 (11:20 +0200)]
Split tpr header reading reading from tpr body
Split the low level functions for TPR file header and file body reading
into fully separate parts to allow reading the main part of the file
without having to read the header again.
Also gave the header datastructure a new name in line with naming
conventions and default initialized all fields.
Refs #2971
Change-Id: I110fb80cf19d9d2e59df1576e50c64806f532e00
Berk Hess [Wed, 19 Jun 2019 08:29:55 +0000 (10:29 +0200)]
Removed unused code paths in the NB FE kernel
Code paths that were only used with the group scheme were removed.
Change-Id: I27175abfad5da9948f0626af90d16e7801eaf19d
M. Eric Irrgang [Tue, 2 Apr 2019 16:41:50 +0000 (19:41 +0300)]
Updates to gmxapi docker entry points.
* Read GMXRC in gmxapi docker test environment. Allows `gmx` binary to
be easily discovered by Python wrappers. Supports expected behavior
for gmxapi/ci-... docker containers and ensures that GROMACS
components available during image build are available when running.
* Allow more granular testing. Rename and reorganize entry points for
the docker test containers.
Ref: #2756
Change-Id: I5e781fae4709e4ccb718a8295c3fbe68dd59de44
Paul Bauer [Wed, 12 Jun 2019 09:39:33 +0000 (11:39 +0200)]
Fix gmx dump
The program would fail because the filename for writing the output mdp
file was passed as valid empty string that could not be opened as an
output file.
Now only passes the string when it is not empty.
Added test and fixed possible floating point exception found by the
test.
Change-Id: I8b18fbc0dfc5642399935f32fb0b1999fad44c98
Mark Abraham [Mon, 20 May 2019 08:28:28 +0000 (10:28 +0200)]
Move code handling mdrun -gpu_id to taskassignment module
Also made the error message report all incompatible GPU IDs, not just
the first, and do so by throwing an exception.
Change-Id: I4e1f26a59903077b5ab6cc671486fb059cb78964
Berk Hess [Tue, 18 Jun 2019 08:28:19 +0000 (10:28 +0200)]
Make forcerec const in dispatchNonbondedKernel()
Changed forcrecin Nbnxm::dispatchNonbondedKernel() from a pointer
to a const reference. The GPU emulation kernel now writes the shift
forces to nbnxn_atomdata_t.
Change-Id: I170165529ba447db9b5d1824eea10675ae1bef7d
Christian Blau [Fri, 3 May 2019 10:21:32 +0000 (12:21 +0200)]
Mrc format header to lattice coordinate transform
Extracts a coordinate transformation into lattice coordinates from the mrc density
header, as well as the three dimensional grid extents.
refs #2282
Change-Id: I8c01a370e3010add29b8810e2f3320b9ab428c02
Christian Blau [Wed, 17 Apr 2019 11:43:52 +0000 (13:43 +0200)]
Density similarity measure and gradient
Adding a class that allows evaluating the similarity of three dimensional
densities and their gradient given a comparison method, along with a
concrete implementation of the inner-product as a comparison method.
refs #2282
Change-Id: Id73f237e123bed14241227b84cbf83970a09ff49
Paul Bauer [Mon, 10 Jun 2019 07:54:06 +0000 (09:54 +0200)]
Extend ISerializer functionality
Add datatypes to ISerializer that are needed to read TPR files but were
missing.
Refs #2971
Change-Id: I5d5e7f1f91c533a079cb287b018fa1d579c4f3f9
Artem Zhmurov [Mon, 18 Mar 2019 18:03:59 +0000 (19:03 +0100)]
Combine CUDA Leap-Frog, LINCS and SETTLE. I.
This is the first step in combining constraints and integrator
into "UpdateAndConstraints" module. The initial merge does not
imply any performance optimisation or code clean-up. Hence, this
patch keeps all the temporary infrastructure that was built
around SETTLE, LINCS and Leap-Frog to allow them to function as
a separate units. In the following commits, this infrastructure
will be removed and these three implementations will be more closely
integrated. To enable, set GMX_UPDATE_CONSTRAIN_GPU environment
variable. Note, that environment variables GMX_LINCS_GPU,
GMX_SETTLE_GPU and GMX_INTEGRATE_GPU will no longer work.
Refs #2816, #2888
Change-Id: I8730aad0ecaa0230686fe89d1157b0da2f01f7bc
M. Eric Irrgang [Wed, 12 Jun 2019 10:40:07 +0000 (13:40 +0300)]
Reduce docker image size for gmxapi CI.
Use ``--no-cache-dir`` option to ``pip install``.
Change-Id: I4c1794cc020096c3cee377ff2d79c6c599542bc1
Artem Zhmurov [Thu, 16 May 2019 08:06:06 +0000 (10:06 +0200)]
Bug fix: Constraints tests are not instantiated with CUDA
If the tests initialization macros is called with ValuesIn
function, the container provided should be filled. In the
current version, it is filled in the test SetUp function,
after the macros is processed. As a result, the empty
container is used in instantiation and no test are run.
Only CUDA-enabled builds are affected.
Change-Id: Ia2f38c9908d4b7d4277d282c01781b278eeeead0
Berk Hess [Fri, 7 Jun 2019 07:37:25 +0000 (09:37 +0200)]
Simplify GPU nbnxm x conversion
The GPU nbnxm x conversion change
42b343b9 lead to data being transferred
multiple times and introduced several ugly hacks. This change simplifies
the code and transfers each coordinate only once.
Change-Id: I430496251ae40ee4c604e3920b789b3ae2b297dd
Berk Hess [Mon, 17 Jun 2019 07:54:26 +0000 (09:54 +0200)]
Remove unused nbnxm include files
Change-Id: I04ca522139dfa7f1b809a2db9dd494ed9f0f0b23
Mark Abraham [Wed, 12 Jun 2019 15:39:08 +0000 (17:39 +0200)]
Fix pygments detection for sphinx for docs build
Got broken in
29616660 but somehow wasn't a problem in the docs build
on the dedicated slave for that.
Refs #2615
Change-Id: I407383bd0342decae56e4c60202ffbf190e8bb1b
Mark Abraham [Tue, 21 May 2019 20:59:26 +0000 (22:59 +0200)]
Use RAII approaches for hardware information detection
Eliminated gmx_hardware_info_free. The lifetime of the hardware info
should be from the first time it is needed until the end of the
process, and in particular its ownership should not be related to the
lifetime of any threads implementing mdrun.
The implementation of gmx_detect_hardware now uses a simple mutex and
file static smart pointer to hold the data, lazily create it, and leave
it to process cleanup to call the destructor to free resources. Helper
functions no longer refer to the static smart pointer directly.
Internal data structures of gmx_hw_info_t are now held by smart pointer rather
than needing manual memory cleanup.
Extended not_null to be able to be created from smart pointers, and
tested the new behaviours.
Reduced the header dependencies of detecthardware.cpp, now that it
doesn't do all the string handling of printhardware.cpp
Change-Id: I9d5cd838dc6e214163cf2e3104e0f7aaa356fcf8
Mark Abraham [Sun, 26 May 2019 22:00:46 +0000 (00:00 +0200)]
Clean up multisim, communication, and REMD code
Moved multisim declarations and code to one place.
Moved mpi_in_place_buf_t to its own files in a low-level module, and
made sure we tested a build that needed it. Removed duplicate tng
option declaration while I was there.
Moved a check for REMD to its code, removed another that was redundant
with that for multisim requiring more than one simulation.
Added some t_commrec and gmx_multisim_t cleanup code, but not all
of it can work before some more cleanup takes place.
Change-Id: Ie591f50a2162dce2e83552102f8633c8d49553a7
Erik Lindahl [Sun, 9 Jun 2019 11:51:36 +0000 (13:51 +0200)]
More quotes
Having to prepare slides for a Gromacs workshop is
a great motivation for procrastination in the form
of adding more quotes :-)
Change-Id: Ieed151881f5eecdc552726f8d95541a2ab9b5eb7
Szilárd Páll [Mon, 29 Apr 2019 10:02:32 +0000 (12:02 +0200)]
Template x buffer ops call on whether GPU is used
This allows the code to get optimized to avoid the overhead of merged
CPU and GPU codepaths.
Change-Id: If98c5eff327f5f9ecb81f278ca27b6d139bc19ab
Pascal Merz [Mon, 27 May 2019 04:42:47 +0000 (22:42 -0600)]
Clean up renamed simulator.h file
This change is a follow-up to I9bc31588, in which the Integrator class
was renamed to Simulator, and integrator.{h,cpp} was accordingly
renamed to simulator.{h,cpp}. The former change did, however, miss
the include guard, a typedef, and two mentions of "integrator" in
comments. The current change addresses this.
Change-Id: I14d55eeb35c18f198d4123a7132fbee2366713df
Pascal Merz [Sat, 25 May 2019 06:02:52 +0000 (00:02 -0600)]
Remove dependence of mdoutf_write_to_trajectory_files on global top
mdoutf_write_to_trajectory_files is currently taking the full global
topology object as input, but uses only the number of atoms. Removing
this dependency simplifies some refactoring further down the road,
as the new state element can use this function without needing
access to the global topology.
Change-Id: I3ad39050bfd5d7bb0792f3b158bad0817907e029
Pascal Merz [Sat, 25 May 2019 05:44:47 +0000 (23:44 -0600)]
Rename Integrator class
This renames the `Integrator` class to `Simulator`, which does not
actually represent integrators, but rather types of simulations
(some of which contain an integrator, but not all!).
Refs #2943
Leaves the TODO to rename the corresponding mdp-option, but no
consensus on the new name has been reached yet.
Change-Id: I9bc3158856cd68dfc2ca5f3da793cd1ecbc2ffaf
Artem Zhmurov [Wed, 24 Apr 2019 11:27:42 +0000 (13:27 +0200)]
Clarify which of the main energy terms are printed.
This is an attempt to clarify which of the main
energy terms are printed and which are not printed
from the EnergyOutput.
Change-Id: I8628026817c691add39d0332ddab5e372a2c3e96
Artem Zhmurov [Tue, 16 Apr 2019 14:40:35 +0000 (16:40 +0200)]
Clarify the EnergyOutput III
Making the EnergyOutput into the proper class. The t_mdebin structure
contents was made into the private fields of the object, prepare()
method was transformed into constructor. Legacy printing helper
functions merged into class methods.
Change-Id: Ia97650f8e74c6c08ee9735ba5e973c051b14784c
Artem Zhmurov [Wed, 3 Apr 2019 14:45:16 +0000 (16:45 +0200)]
Clarify the EnergyOutput II
The function that prints energy (and other thermodynamic values)
is now split into three: one that prints current values, one that
prinst averages at the end of the simulation run and one that prints
annealing temperatures. This way it is much clearer what is done at
each call and how many steps can be passed without calling one function
or another.
Change-Id: Ifc481fe3a5243917d0a290f1e3bec616b6ca6073
Mark Abraham [Thu, 23 May 2019 18:07:27 +0000 (20:07 +0200)]
Reorder code before thread-MPI spawns threads
gmx_check_thread_affinity_set was called before thread-MPI threads
were spawned, because originally that was necessary. But the intended
functionality is to provide feedback to users about whether thread
affinity was set by the OpenMP library or something else. Nothing else
uses the thread_affinity value in the meantime. So, it only needs to
be called just before OpenMP is initialized. The reordering makes
clear that some reduction code within this function only needs to run
with real MPI.
check_and_update_hw_opt_1 does modify hw_opt, but none of the relevant
variables were accessed in the preceding code, so the reordering is
safe. It now takes a boolean rather than a handle to t_commrec, which
decreases the code coupling and will shortly be useful. A check for
mdrun -ntmpi -npme has been moved into this routine.
check_and_update_hw_opt_2 only related to the group scheme and can
be removed.
The fatal error for group-scheme .tpr files can safely be moved
later, alongside other code specific to the Verlet scheme.
Reruns can safely clear the velocity vector later.
The log file makes a request to cite GROMACS papers, which is now
implemented in a simple function elsewhere.
Change-Id: I1e5990656c391da81aec215f86b94efc752002d4
Szilárd Páll [Thu, 23 May 2019 17:30:26 +0000 (19:30 +0200)]
Fix mulitple link refs in dev-manual
Change-Id: I4e9c68d392c911fad227667b1d3f29bb54d024f1
Mark Abraham [Wed, 15 May 2019 10:21:30 +0000 (12:21 +0200)]
Teach ArrayRefWithPadding to make a const flavour
Sometimes code that has a non-const view of padded memory needs to be
able to have a const view of that memory, e.g. to pass to a routine
that does not need to be able to modify. Now there is a member
function to do that. Note that the private data means that it is not
easy to construct the const view from the non-const view, because they
are different instantiations of the same template, so formally are
different types. However there is now a convenience overloaded
constructor so that passing a non-const view to a function that takes
a const view will work.
Also fixed the swap member, which fortunately was unused.
Change-Id: I52095fe3b5d5dd24b86698da2a065c0fd1f3fb0b
Mark Abraham [Fri, 10 May 2019 09:17:52 +0000 (11:17 +0200)]
Rewrite starting behavior
Several necessary checks were deferred until the time the checkpoint
was read, which made this feature hard to implement and
understand. Having moved the code, if it will not be possible to
append, we can tell the user immediately.
Fixed a bug where mdrun -append would start from the .tpr
configuration when the checkpoint file was missing.
Opening the logfile in the non-appending cases is now
closely associated with the logic for how the restart
works.
Refs #2804, #2375
Change-Id: I83a846958619e72ddc9a5e9bae49a9b71221ad24
Mark Abraham [Fri, 10 May 2019 09:17:52 +0000 (11:17 +0200)]
Introduce tri-state enums for restarts
Both the user choice for appending and the decision about how to
implement a restart are good to express as a three-way enumeration of
mutually-exclusive possibilities, rather than booleans.
Checkpoint restarts also need to consider whether KE quantities
need to be recomputed, which is now stored in t_ekinstate alongside
the data from which it was computed.
Together, these eliminate the ContinuationOptions struct.
Several booleans in implementation objects were renamed to be
consistent with the StartingBehavior enumeration values, so that the
code is easier to understand.
Moved the call to handleRestart out of updateFromCommandLine now that
it no longer needed to be there.
Used namespaces for handlerestart.cpp
Refs #2804, #2375
Change-Id: I1128b94e947c6ef355a1b137b8978faa227ab1a0
Alan Gray [Tue, 30 Apr 2019 10:18:03 +0000 (03:18 -0700)]
Pin X buffer with DD and use proper abstraction in buffer ops
This patch fixes an issue that the coordinate buffer was not being
pinned with DD, and replaces a raw cudaMemcpy call in the buffer ops
routine with proper abstraction through the copyToDeviceBuffer API.
Follow up to Gerrit change 9169
Implements part of #2934
Change-Id: I64aec66157ceb5eb04bcfd7cfe24b6ea5c18e4ae
Jinke Fan [Tue, 21 May 2019 03:33:17 +0000 (11:33 +0800)]
Add support for Hygon Dhyana processor
This change adds hardware detection and related task assignment
heuristics support for the Hygon Dhyana CPUs.
Chengdu Haiguang IC Design Co., Ltd (Hygon) is a Joint Venture
between AMD and Haiguang Information Technology Co.,Ltd., aims
at providing high performance x86 processor for China server
market. Its first generation processor codename is Dhyana, which
originates from AMD technology and shares most of the architecture
with AMD's family 17h, but with different CPU Vendor ID ("HygonGenuine")
/Family series number (Family 18h).
More details can be found on:
http://lkml.kernel.org/r/
5ce86123a7b9dad925ac583d88d2f921040e859b.
1538583282.git.puwen@hygon.cn
Change-Id: Ic91b032e69dfc13abad3fbfe6ab5e4f0e57fc7c0
Alan Gray [Thu, 9 May 2019 11:14:25 +0000 (04:14 -0700)]
Code quality improvements for CUDA position buffer ops
* improved variable naming
* use of reallocateDeviceBuffer
Follow up to Gerrit change 9169
Implements part of #2934
Change-Id: Ie948f624ae6f7e2df7a2b6c6c734d08d862096e5
Mark Abraham [Thu, 9 May 2019 21:05:55 +0000 (23:05 +0200)]
Move functionality to mdrunutility
This lower-level module needs to acquire more content from mdrun as we
evolve a more levelised design. This change premptively resolves
several cycles that would be introduced by consolidating restarting
handling into mdrunutility/handlerestart.cpp.
Moved multi-sim related bools to its header, rather than commrec.h.
Several functions did not need to be inlined, as they were only
used during set up and tear down.
Made a few routines in even lower-level modules be passed the
boolean parameter computed from cr and ms, rather than being
passed it themselves.
Change-Id: I4a1721eaf7cbe08155110782a6680785091504db
Szilárd Páll [Mon, 11 Feb 2019 17:07:09 +0000 (18:07 +0100)]
Improve X buffer ops kernel
- Added restrict qualifiers
- Simplified code and converted to vector load/store operations.
Change-Id: I76e4b954b4ef045f299a8496b4975497720f4b89
Erik Lindahl [Sat, 11 May 2019 11:33:16 +0000 (13:33 +0200)]
Added more quotes
Lazy Friday evening entertainment.
Change-Id: If26bd56b178510224b4c24b63124fcd413e6ee42
M. Eric Irrgang [Thu, 16 May 2019 14:11:31 +0000 (17:11 +0300)]
Fix typos regarding GMX_PHYSICAL_VALIDATION CMake variable.
Variable was misspelled in CMake messages.
Change-Id: I5cddd249a8d4ee6c32fc89ba01143f068c319af3
Pascal Merz [Thu, 16 Aug 2018 00:29:38 +0000 (18:29 -0600)]
Use Python 3
This updates the Python scripts shipped with GROMACS to use Python 3.5+.
Most changes done are either due to `__cmp__` not being available in py3
(replaced by `functools.total_ordering`), py2-iterators being replaced by
py3-iterators, or print statements being replaced by functions.
Additionaly, some changes in the Cmake files were made to select the
different Python version.
All python scripts having an explicit `#!/usr/bin/env python2` as a first
line were checked and updated. Larger changes were only needed for the
documentation scripts, other scripts did not require any changes. Scripts
not explicitly using shebangs were also checked, but no changes were
needed. The following scripts were not touched:
- all scripts under tests/physicalvalidation/ (already py3 compatible)
- all scripts under python_packaging/
- scripts/make_gromos_rtp.py - this file is not valid py2.7
Refs #2615
Change-Id: I2edbe213bc6401563934ce56f5fd6a39886d3095
Berk Hess [Tue, 14 May 2019 09:21:32 +0000 (11:21 +0200)]
Make all do_force_lowlevel() input const
Change-Id: I6db7dda98c169aed5f253ab48f1ac62bf64a2ea9
Mark Abraham [Thu, 9 May 2019 20:17:14 +0000 (22:17 +0200)]
Update infrastructure needed for restart rewrite
These changes are things that might be generally useful, and are
planned for use in refactoring of handleRestart.
Change-Id: Ic1ac5c2cb7e778808cdc40afbee59d26a6f52792
Artem Zhmurov [Tue, 2 Apr 2019 14:12:47 +0000 (16:12 +0200)]
Clarify the EnergyOutput I
The EnergyOutput::printStepToEnergyFile(...) method is responsible
for printing the current and average thermodynamic quantities as
well as anealing temperatures. The swich between what is printed
is done by passing enum argument to the function. Different
values of this argument lead to diferent, almost non-overlapping
code paths. Hence, it is natural to split the function. The
follow-up patch will make these into separate methods of the
EnergyOutput class, thus eliminating enum argument and making it
more clear what and how often is done.
Change-Id: Ifde9098cdddf85bc663f2943b2ee8778bc72a3ac
Paul Bauer [Thu, 9 May 2019 12:50:23 +0000 (14:50 +0200)]
Fix math formatting in reference manual
Change-Id: I87e4d4103e45562ce5395add18dcca8625a64b62
Artem Zhmurov [Thu, 7 Mar 2019 11:09:37 +0000 (12:09 +0100)]
CUDA version of Leap-Frog integrator with basic tests
Part of the GPU-only loop. Curent version is as a stand-alone module,
with its own coordinate, velocities and forces data management.
To activate, set environment variable GMX_INTEGRATE_GPU.
Limitations:
-- Only basic Leap-Frog is implemented.
-- No temperature control.
-- No pressure control.
Refs #2816, #2887
Change-Id: I439d7f5fd4f69a17ca7aaa412e242ce5e3aa5dbd
Alan Gray [Thu, 24 Jan 2019 15:31:21 +0000 (07:31 -0800)]
Position buffer ops in CUDA
On all but search steps the buffer ops transform can now be done on a
CUDA GPU. If PME runs on the same GPU the already uploaded coordinates
will be used as input.
Activate with GMX_USE_GPU_BUFFER_OPS env variable.
Note:
- waits for X copy on the PME stream to finish, need to implement sync
point between PME and NB streams (in follow-up).
Implements part of #2817
Change-Id: Ib87dabd74a02727898681249691ac9786b8ac65c
Paul Bauer [Tue, 12 Mar 2019 11:06:48 +0000 (12:06 +0100)]
Remove more manual memory management
Changed another virtual site preprocessing type to std::container and
added some documentation for types.
Refs #2833
Change-Id: I24e84bdb18e46f2cff710a1ca2cb0e1d4b80e633
M. Eric Irrgang [Tue, 2 Apr 2019 15:57:39 +0000 (18:57 +0300)]
More Python testing infrastructure for gmxapi.
* Add and improve test fixtures.
* Generate MD input files for tests.
Refs: #2756
Refs: #2896
Change-Id: I15ac8e44844cbf699cfe362e2fa443d07a355b3d
M. Eric Irrgang [Wed, 8 May 2019 12:23:50 +0000 (15:23 +0300)]
Add gmxapi._logging submodule.
To rearrange import statements and module initialization code,
a private _logging module is introduced to initialize the
Python logging module and to provide gmxapi.logger.
Change-Id: Ifc13db35df300d10500d4ced80fc84684bea2c0c
M. Eric Irrgang [Tue, 2 Apr 2019 11:23:45 +0000 (14:23 +0300)]
Update I/O handling in gmxapi.commandline.
Change-Id: Ic0506ac3df91b7a5e234242fb6dfdd0ce4796027
M. Eric Irrgang [Tue, 7 May 2019 20:32:02 +0000 (23:32 +0300)]
Expand gmxapi.operation tools to support the data flow constraints.
Achieves functional requirements 1, 2, and 3 as described
in the documentation submitted under #2893.
Updates some acceptance tests duplicated in a companion change.
Fixes: #2894
Change-Id: I26b1413c83e3ad176f2fd70f93e8b8e1033667ae
M. Eric Irrgang [Wed, 8 May 2019 12:30:58 +0000 (15:30 +0300)]
Fix formatting and typos.
Resolve some typos from earlier rebase.
Rearrange imports, dunders, and white space for better PEP8 compliance.
Change-Id: I14319b7882e17937f92951339a5caf9bc454cf4d
M. Eric Irrgang [Wed, 10 Apr 2019 14:32:00 +0000 (17:32 +0300)]
Support basic command line wrapper in gmxapi
Introduces gmxapi.commandline module and updates gmxapi.operation
to support gmxapi.commandline.cli() operation.
Ref: #2894
Change-Id: I9f6c113f21d3a1ce97184a1e48b8bd4856c5c924
Mark Abraham [Tue, 7 May 2019 13:20:14 +0000 (15:20 +0200)]
Provide hook for forks of GROMACS to describe themselves
This will help everybody understand which version of GROMACS is being
used because a description ends up in the log file.
Change-Id: I2ddd4def5b2a3768174a6b0ccc284cbc118906a1
Mark Abraham [Tue, 7 May 2019 08:08:55 +0000 (10:08 +0200)]
Provide better help for using libc++
This is now the actual cmake option required
Refs #2842
Change-Id: I1ab4676b0e01d65ba8df736b78eeb3c676cdc4ea
Artem Zhmurov [Fri, 3 May 2019 16:31:31 +0000 (18:31 +0200)]
Fixing minor memory issues in MDLib
1. Changed to PaddedVector in SETTLE test
2. Added GPU memory deallocation in CUDA versions of
LINCS and SETTLE.
Change-Id: I3dc8207f8e84f52bfde3f99b144cc44f91f65ee5
Mark Abraham [Thu, 2 May 2019 15:39:52 +0000 (17:39 +0200)]
Improve how mdrun -noappend names output files
Fixes a bug that could lead to names like md.part0001.part0002.log
Change-Id: Ic8f16f7f77e98e1506d7eec2dfc336e808c2d00c
Berk Hess [Tue, 16 Apr 2019 08:54:54 +0000 (10:54 +0200)]
Remove PME exclusion correction
Now the group scheme has been removed, ewald_LRcorrection() no longer
needs to correct for exclusions, which simplifies the code.
Also restructured the conditionals for the PME calls in
do_force_lowlevel().
Change-Id: I518f7929460e7209780b967bd612e4b83c14831d
Mark Abraham [Tue, 30 Apr 2019 15:14:35 +0000 (17:14 +0200)]
More tests for how mdrun -cpi restarts handle files
These tests clarify the behaviour of mdrun -cpi -noappend. It should
append ".partNNNN" to output files, but it is currently possible to
produce output files named like md.part0001.part0002.log
Added some unit tests around the string-handling behaviour that needs
fixing and left TODO comments to show what issues need fixing.
Reduced use of the deprecated mdrun -nsteps option
Refs #2804, #2829
Change-Id: I7e370b835d6fd3512fcaac575d0ff627b33c6e47
Paul Bauer [Thu, 30 Aug 2018 13:28:27 +0000 (15:28 +0200)]
Add outputadapters (2/3)
Add outputadapters based on IOutputAdapter that can be used to set the
box information in the t_trxframe, and toggle the settings for including
forces and velocities into the t_trxframe.
Change-Id: I13c637ab5e6f7e008a971798a5573f8ee1314667
Paul Bauer [Tue, 2 Apr 2019 10:36:58 +0000 (12:36 +0200)]
Replace t_grps with std::vector
Refs #2833
Change-Id: Ia1f156fec4c6c24f4c29a792e384668d835416f0
Berk Hess [Wed, 17 Apr 2019 16:50:38 +0000 (18:50 +0200)]
Convert manage_threading_t and gmx_enerdata_t to C++
Change-Id: I75fd6e0b8f217461f328690d168f61d5b45239cf
Paul Bauer [Thu, 30 Aug 2018 13:23:49 +0000 (15:23 +0200)]
Add outputadapters (1/3)
Add outputadapters based on IOutputAdapter that can be used to set the
number of atoms written to disk and control the addition of the t_atoms
information to the processed t_trxframe.
Change-Id: I0084a1566024f0a56f72eab031f927d342f42b30
M. Eric Irrgang [Fri, 29 Mar 2019 12:23:39 +0000 (15:23 +0300)]
Infrastructure updates for dependent changes.
* Introduce gmxapi.exceptions.ProtocolError.
* Add some pytest configuration and helpers.
* Update some comments.
Refs: #2893
Change-Id: I71030c3b552d568df7263115430631208812b9dc
Artem Zhmurov [Mon, 29 Apr 2019 13:33:34 +0000 (15:33 +0200)]
Use test with parameters for EnergyOutput
Some of the energy terms are printed out only if the specific
combination of thermostat/barostat/integrator is enabled. The
output also considerably different if it is from a rerun. This
commit changes the tests so that several possible combinations
of input parameters are tested.
This commit also fixes a possible bug when having more
acceleration groups than temperature coupling groups would
lead to under-allocation of temporary variable tmp_v.
Change-Id: Icc08e49a428b14ffd62d251662eb96184564b2c4
Paul Bauer [Tue, 9 Oct 2018 12:52:46 +0000 (14:52 +0200)]
Add builder for TrajectoryFileWriter
Adds builder method and storage for requirements on how to build an
object with its outputadapter methods.
Change-Id: I1b52e0cbb0bc39d8d1a78087a0526dcee8f8c289
Berk Hess [Tue, 30 Apr 2019 07:07:24 +0000 (09:07 +0200)]
Change nbnxm FEP pointer to unique_ptr
This fixes an incorrect delete issue in free energy runs.
Change-Id: Ib247c6eaa98807fe3abe2fcefd09d8509d6b8598
Mark Abraham [Tue, 30 Apr 2019 15:03:53 +0000 (17:03 +0200)]
Enhance path search functions
Extracted common implementation functions based on compat::string_view
and simplified the uses of them. Some temporary strings are no longer
created. Added, updated, and corrected Doxygen. Removed comments about
dot and dot-dot special directories, as the code does not do anything
about them. Moved some naming in the direction of C++17
std::filesystem::path.
Added new tests to cover the changes. Used namespaces better in the
test file. Used reference data for the tests.
Eliminated getParentPathAndBasename as redundant.
Change-Id: I11a1a25a257da753ca83f5bdd09d06b11c76cec5
Artem Zhmurov [Wed, 27 Feb 2019 15:38:42 +0000 (16:38 +0100)]
CUDA version of SETTLE algorithm with basic tests
CUDA-based GPU implementation of SETTLE. This is a part of
all-GPU loop. Can work isolated from other parts of the code
since coordinates are copied to (from) device before (after)
SETTLE kernel call. The velocity update as well as virial
evaluations can be enabled.
To enable, set GMX_SETTLE_GPU environment variable.
Limitations:
1. Does not work when domain decomposition is enabled.
2. Projection of the derivative is not implemented.
3. Not fully integrated/unified with the CPU version.
TODOs:
1. Multi-GPU case.
2. Better virial reduction. This is a more general feature,
not only related to constraints.
5. More cleanup in constr.cpp needed.
6. Better unit tests.
Refs #2816, #2886
Change-Id: I218e1bf1f86a2351e189e3c27f950f45c06135a4
Mark Abraham [Wed, 17 Apr 2019 06:35:11 +0000 (08:35 +0200)]
Test the output of "gmx mdrun help"
As we migrate mdrun to use the gmx::Options framework, several chunks
of text and many option descriptions will move to their respective
modules. However users would prefer the output of "gmx mdrun help" to
only change in ways that we as developers expect.
This will also provide a stable path towards e.g. implementing gmx
minimize, gmx tpi, gmx rerun, etc. and having the help text relevant
only to that runner. It may also be useful if in future we structure
mdrun modules to write their help via e.g. "gmx help mdrun pulling".
Change-Id: Iccd07f797004d8ff24eb56ca528a3fe9148b6749
Berk Hess [Thu, 28 Feb 2019 12:40:27 +0000 (13:40 +0100)]
Add con/destructor for t_forcetable
This avoids the need for sfree calls in C++ objects that use this.
Change-Id: I21d6867a9e3c84929ecf472e65ee97b3cf7c4846
Berk Hess [Wed, 27 Feb 2019 08:58:37 +0000 (09:58 +0100)]
Convert DispersionCorrection to a class
This change is only refactoring.
Change-Id: Ic6d90a26b485ab1546706bf8f419d7a297c7c7b5
Artem Zhmurov [Mon, 29 Apr 2019 15:42:48 +0000 (17:42 +0200)]
Fix for the CUDA version of LINCS
This fixes a couple of Jenkins Post-submit failures:
1. Clang warnings in the CUDA portion of code.
2. New CUDA LINCS failure on the host with CUDA, but without
capable GPU.
Also done is minor renaming and typo correction.
Change-Id: I4f1d89d4bf5a6f3f0083186cb67787cdf6536bb9
Artem Zhmurov [Wed, 20 Feb 2019 14:30:29 +0000 (15:30 +0100)]
CUDA version of LINCS constraints.
Implementation of the LINCS constraints for NVIDIA GPUs.
Currently works isolated from the other parts of the code:
coordinates and velocities are copied to and from GPU on
every integration timestep. Part of the GPU-only loop.
Loosely based on change 9162 by Alan Gray. To enable,
set the environmental variable GMX_LINCS_GPU.
Limitations:
1. Works only if the constraints can be split in short
uncoupled groups (currently < 256, designed for H-bonds
constraints).
2. Does not change the matrix inversion order for costraints
triangles.
3. Does not support free energy computations.
4. Assumes no communications between domains (i.e. assumes that
there is no constraints connecting atoms from two different
domains).
5. Number of thread per blocks should be a power of 2 for
reduction of virial to work.
TODOs:
1. Move more data from the global memory to local.
2. Change .at() to []
3. Add sorting by the number of coupled constraints to decrease
warp divergencies.
4. numAtoms should be changeable (for multi-GPU case).
Refs #2816, #2885
Change-Id: I3c975cf898053b7467bcd30459e60ce2c8852be6
Christian Blau [Wed, 17 Apr 2019 13:50:35 +0000 (15:50 +0200)]
mrc density map reading/writing
Add a class that combines header and mrc data handling for float values
to enable reading and writing of mrc files.
refs #2282
Change-Id: Idd84ab2628a52a2fcafb6121ad66f62e88235c74
Christian Blau [Tue, 23 Apr 2019 13:03:52 +0000 (15:03 +0200)]
Three dimensional coordiante transformation.
Introduce class that transforms three dimensional coordiantes via scaling and translation.
Change-Id: Ic433400cf42c33d7eadd4a17020d0486542b8542
Paul Bauer [Tue, 9 Oct 2018 12:35:12 +0000 (14:35 +0200)]
Add C++ coordinate file writing method.
TrajectoryFileWriter also allows the chaining of modules derived from
IOutputAdapter together to perform actions that modify the meta
information contained in a t_trxframe before writing the information to
disk.
IOutputAdapter can be used to communicate what requirements a specific
file writing method has on the meta information contained in t_trxframe,
with modules being able to proclaim those and TrajectoryFileWriter checking
them against the requested file types before accepting the addition of a
module to the processing chain.
The TrajectoryFileWriter object needs a builder method to construct itself that will
be added in a child change.
Change-Id: I1c29701b4ce788918cb6b3a47ca9277898a7bff4