Magnus Lundborg [Tue, 29 May 2018 15:19:12 +0000 (17:19 +0200)]
Write lambdas and box to TNG at correct intervals
Lambdas and box sizes are supposed to be written at the lowest common
denominator of the interval of all outputs to the TNG file(s). Before
this commit it was only written when other output was also written.
Fixes #2507
Change-Id: If9c7b063deccbc3a94b5c5df4b59e06ffdbeac56
Kevin Boyd [Fri, 25 May 2018 01:37:27 +0000 (21:37 -0400)]
Cosmetic fixes to mdp documentation
Mostly grammar/tense/linking
Added specific mentions of .trr and .xtc file extensions in output control
Properly formatted superscripts, removed unneccessary escape characters in units
Change-Id: Ia359ffae1c54075d2fcc36c7b7b81acef779f608
Aleksei Iupinov [Tue, 29 May 2018 10:39:59 +0000 (12:39 +0200)]
Merge pme.cu into pme-gpu-internal.cpp
All the code is moved as is, only the includes change.
Change-Id: I96590c411718b3bff912b08ac9ee09bd681a6b64
Aleksei Iupinov [Thu, 17 May 2018 15:12:16 +0000 (17:12 +0200)]
PME OpenCL 3D FFT transform is implemented, using clFFT
This is not yet used but already compiled.
Refs #2536
Change-Id: I49d47ce1ca2bfe75759e757259371289a18a584c
Aleksei Iupinov [Fri, 18 May 2018 10:34:32 +0000 (12:34 +0200)]
Move pme-timings.cu to pme-gpu-timings.cpp
This prepares PME GPU timer code to be compiled with OpenCL.
Change-Id: I90228a57f534844d2a41547937662fc37bfec8d5
Aleksei Iupinov [Wed, 23 May 2018 16:44:53 +0000 (18:44 +0200)]
Prefer linking to system clFFT rather than bundled one
Wrote a new find_package module that works in more modern
ways. Updated install guide.
Currently there is no support for checking the clFFT version, which is
unlikely to matter until they make the 2.14 release.
Fixes #2500
Change-Id: If43ee95d3066823f2c57a49a23fd6dd027dbcc94
Aleksei Iupinov [Thu, 17 May 2018 16:40:13 +0000 (18:40 +0200)]
Move the PmeGpuSpecific structure into pme-gpu-types-host-impl.h
This host structure contains trait-dependent types,
but should also be visible to OpenCL.
Change-Id: I068e537687b78488d66c927a355a115e4581885b
Aleksei Iupinov [Mon, 7 May 2018 15:33:25 +0000 (17:33 +0200)]
Added the bundled clFFT into OpenCL builds
Used an object library, since we have no need of a real library, to
have or to install, whether shared or static. Checked for the
availability of dynamic loading, and made it available portably to
libgromacs.
Clfft initialization class is added and used in mdrunner to
initialize/tear down clFFT library resources in a thread-safe
manner, and only on ranks that require such setup. Noted TODOs
for future work.
Noted a useful style for explicit listing of source files.
Refs #2500
Refs #2515
Refs #2535
Change-Id: I62d7d66f65e147bde17929ccc30abad36e2373c6
Aleksei Iupinov [Mon, 16 Apr 2018 15:54:07 +0000 (17:54 +0200)]
Add GpuEventSynchronizer class
This class encapsulates the host synchronisation on a single GPU
event (currently used for PME mixed mode).
In the future it can also be extended for inter-queue GPU sync.
Change-Id: I8ea0cb615c041d64ebb0580b5f54bdaa26a6aeea
Aleksei Iupinov [Thu, 17 May 2018 12:28:39 +0000 (14:28 +0200)]
Gather the PME GPU constants/macros in a single header
Those will be translated to defines by the OpenCL kernel compiler.
Refs #2453, #2528
Change-Id: I03062c908db6dad9bbc8c62accdc4707b03ff527
Aleksei Iupinov [Thu, 3 May 2018 14:20:50 +0000 (16:20 +0200)]
Make PME GPU structures use DeviceBuffer
A couple related function calls in PME are changed to match.
allocateDeviceBuffer() is now correctly called with the GPU
context handle instead of a stream handle (this was not causing
errors since context is only a stub in CUDA implementation).
pme-gpu-internal.cpp is now compiled with CUDA compiler
(to handle gputraits.cuh included through devicebuffer.h),
paving the way for using unified CUDA/OpenCL host code.
Change-Id: I3621bd93e4b2cc7c02161323f532ca62b48763ab
Roland Schulz [Mon, 21 May 2018 02:44:10 +0000 (19:44 -0700)]
Fix MSAN build-type and error
FLAGS setting was missing FORCE and wasn't working. Slightly
improve the flags. Fix one detected error. One error in TNG
remaining.
Change-Id: I4863d9c7315fdc6b714cbbf2294e58e3d6ce45ed
Szilárd Páll [Sat, 26 May 2018 13:03:16 +0000 (15:03 +0200)]
Switch to CUDA 9.2 + gcc 7
Latest gcc with CUDA combination is updated as the recent CUDA 9.2 now
supports gcc 7.
Also removed the outdated reasoning for the gcc-6 config on bs-mac.
Change-Id: I4935efd895502675dee1789904dba2d472bcc97a
Aleksei Iupinov [Thu, 26 Apr 2018 13:15:24 +0000 (15:15 +0200)]
Support persistent device context-derived data in PME tests
PME OpenCL will need to not recompile kernels for running each
unit test. With this in mind, a persistent PmeGpuProgram class
is tasked with GPU kernel setup, and passed around, using a typedef.
The purpose of the class is to hold the PME program data that should
only be set up once and live forever for the given device context.
PmeGpuProgramImpl structure is now tasked with managing
function pointers to the CUDA kernels' instances, and will later
be tasked with compiling OpenCL kernels.
Refs #2453, #2522
Change-Id: I85a01bfc92ec3a108825414b14e2be3731433c9a
Mark Abraham [Fri, 25 May 2018 01:07:41 +0000 (03:07 +0200)]
Clean up force.h and its use
Reduced use of transitive inclusion of headers, along with unnecessary
inclusion of force.h, and broke it up into its parts.
Change-Id: Ic75795e98e010bd2d36093cdce28d101343a5645
Mark Abraham [Tue, 22 May 2018 19:42:35 +0000 (21:42 +0200)]
Remove bDomDec from t_forcerec
Whether DD is in use should be conveyed in a consistent manner, which
for now is best done with cr.
Change-Id: I1e9e9763b5beee2ad1540c404f57c91597abc919
Berk Hess [Wed, 23 May 2018 15:27:09 +0000 (17:27 +0200)]
Fix grompp bug with blocks of same molecules
Merging consecutive molecule blocks with the same molecule types
caused a segv.
Fixes #2517
Change-Id: I14759527383f06cb0021368c9e6312aa00ccba41
Mark Abraham [Fri, 27 Apr 2018 16:58:48 +0000 (18:58 +0200)]
Move responsibility for bonded threading decomposition
This is an aspect of force calculation, not of the topology needed for
that force calculation.
Removed use of assert no longer needed now that the responsiblity has
been moved.
Also updated some use of struct keyword.
Refs #2492
Change-Id: If9d356dc9c4de49b84f23e9c432baa84a8335731
Mark Abraham [Thu, 24 May 2018 13:26:59 +0000 (15:26 +0200)]
Relocate GPU initialization for PME
We need to have set up the GPU we intend to use before we would want
to e.g. compile kernels for it. We will shortly want to do this
for OpenCL support for PME.
Change-Id: Iaf22ecba8fb3ad7583b57958742abb018d1e8a0d
Berk Hess [Thu, 24 May 2018 11:13:58 +0000 (13:13 +0200)]
Simplify idef_fe in calc_listed_lambda
Instead of (mis)using the bonded threading range indexing to index
only the perturbed interaction in calc_listed_lambda(), now idef_fe
only contains the perturbed interactions.
This allows to assert on consistency of the threading and the topology
in calc_one_bond()
Change-Id: I8eae27b626bf41ea3a3e75fa55295c12cde3b4f2
Mark Abraham [Wed, 23 May 2018 13:21:43 +0000 (15:21 +0200)]
Reform Ewald-module cmake handling
The globbing approach is convenient when all the files get the same
treatment, but sometimes inconvenient when you forget to run cmake
when adding or deleting files. Subtracting one glob from another makes
it rather hard to know what is going on, particularly with multiple
changes in flight.
Specifying the files makes it easier to see what is going on when
there are multiple different configurations that need different files,
as we are shortly likely to have as OpenCL support for PME is
integrated. This is similar to the approach now used in gpu_utils.
Change-Id: I11a62cab6fb87ed895615486a7071d420a62ea6e
Berk Hess [Tue, 22 May 2018 18:58:59 +0000 (20:58 +0200)]
Change nbs in nbv to std::unique
Change-Id: Ife3d5904553a8245aaf7e99e0912aa6d6c7ad03f
Berk Hess [Mon, 14 May 2018 13:55:36 +0000 (15:55 +0200)]
Convert gmx_domdec_master_t to C++
Renamed to AtomDistribution, now in its own files.
This change is only refactoring.
Change-Id: I0a71efc559c107b3dce0939bd65d21f2bfee0ae7
Mark Abraham [Wed, 16 May 2018 19:28:42 +0000 (21:28 +0200)]
Clean up PME testing
Resolves a TODO to simplify things by building hardware contexts that
are already aware of the code path they can test.
Also stops doing unecessary copying of TestHardwareContext objects.
Setting up the hardware contexts for PME testing duplicated the
knowledge that a CUDA build is required in order for testing PME on
GPUs to be relevant. So this patch separates the checking for whether
the build can support PME on a GPU from whether the user's input is
able to run on a GPU. Extracted a common function from related
code. Used less preprocessing. Noted an additional TODO to start using
the context these messages provide.
Change-Id: Ic2dda686168f69ab6ea845f841f774a84ddd9d0d
Roland Schulz [Thu, 17 May 2018 00:08:30 +0000 (17:08 -0700)]
Rename GMX_OCL_CLUSTER_SIZE to GMX_OCL_NB_CLUSTER_SIZE
Refs #2454
Change-Id: I077447845a92bfa70808b63529d924732b5bd76d
Berk Hess [Wed, 16 May 2018 11:41:27 +0000 (13:41 +0200)]
Split off collect.cpp from domdec.cpp
Change-Id: I6bb8ed282d4d8edd1d2ec22e52f5fb34013f2fb8
Berk Hess [Tue, 22 May 2018 12:31:12 +0000 (14:31 +0200)]
Convert nbnxn_search to C++
Also converted nbnxn_search_work to C++
Change-Id: Ic46bf26f8b6cf4d9afee48b715f0b80a4de55691
Kevin Boyd [Wed, 23 May 2018 00:39:26 +0000 (20:39 -0400)]
Removed "XXX non-matching atom names" Martini statement.
The current statement is that atom renaming in grompp is part of the
accepted workflow, and so the above error can be ignored. Not sure how
long ago this was the case, but I'm fairly certain it isn't now.
Change-Id: Ie4f00bf49d0108c36b5f47b59942b455bba8cd28
Berk Hess [Fri, 18 May 2018 05:52:32 +0000 (07:52 +0200)]
Change nbnxn grid reallocation
The nbnxn grid memory reallocation now happens right before access
and with the exact amount needed instead of overallocating.
Change-Id: Iacc7c4de736765709fe841dd9b1aef9d3d77f7c9
Berk Hess [Thu, 17 May 2018 22:07:44 +0000 (00:07 +0200)]
Use std::vector in nbnxn_search_t
Change-Id: Ia2babb4443e1330fb950e1ba62763f89f100418c
Berk Hess [Thu, 17 May 2018 20:55:40 +0000 (22:55 +0200)]
Use std::vector in nbnxn_grid_t
Change-Id: I0a5c04f9504243f1dfe462ca7374feffbbed8ee3
Kevin Boyd [Mon, 21 May 2018 01:25:28 +0000 (21:25 -0400)]
Cosmetic documentation changes
Fixed some broken links
Spelling errors/tense errors/grammar
Change-Id: Ie83e36a46cda2f686098e4e88f0acf13faf2e5cd
Kevin Boyd [Sat, 19 May 2018 20:09:02 +0000 (16:09 -0400)]
Minor fixes to mdrun performance documentation
In "Examples for mdrun on one node," third example description, the respective number
of thread-mpi ranks and OpenMP threads per rank were reversed.
In "Examples for mdrun on one node," 6th example. For 12 logical cores, the pinoffsets
should be 0 and 6, respectively (I think)
A few command line examples of running mdrun with more than 1 node used gmx rather
than gmx_mpi
Several spelling/grammar/tense error/linking issues addressed.
Change-Id: I014bc52d55cda1cbd05843cb8e960c2a2d7cbb47
Berk Hess [Thu, 17 May 2018 16:12:19 +0000 (18:12 +0200)]
Clean up in nbnxn_grid.cpp
Made variable names more descriptive and added more const.
Change-Id: I3092656511e4e2cf30059f334e6ede14d6d617be
Aleksei Iupinov [Mon, 19 Feb 2018 18:25:34 +0000 (19:25 +0100)]
prepareGpuKernelArguments() and launchGpuKernel() are added
Template functions are added for preparing/packing GPU kernel
arguments and launching GPU kernels. This allows to hide
CUDA/OpenCL boilerplate. launchGpuKernel() throws InternalError
on failure. GPU kernels scheduling details are unified into
a KernelLaunchConfig struct. The new functions are applied
in NB as well as PME (facilitating PME OpenCL porting).
Change-Id: I90205cf1cda93c377a342b7f1c46a8caf239ba65
Berk Hess [Mon, 7 May 2018 15:35:15 +0000 (17:35 +0200)]
Split off domdec distribution and cellsizes
Move domain decomposition distribution and cell size related functions
to separate files.
This change is only code motion, apart from changing some macros to
constexpr or inline functions and adding some const qualifiers.
Change-Id: Ib943944b090958921428f69ecaf9e53f7e2ab224
Berk Hess [Fri, 4 May 2018 12:29:55 +0000 (14:29 +0200)]
Split atom redistribution off from domdec.cpp
The atom redistribution functions have been moved from domdec.cpp
to redistribute.cpp. Commonly used functions are now in utility.cpp.
This change is only code motion.
Change-Id: I2808abeb28ad115ed916c9e1f80ec5f91d36349c
Berk Hess [Mon, 7 May 2018 15:00:46 +0000 (17:00 +0200)]
Remove commrec from set_ddbox()
Change-Id: I62642ae8ed9eb8b839e577d8be904204d27a8d0d
Roland Schulz [Thu, 29 Mar 2018 01:55:52 +0000 (18:55 -0700)]
Allow OCL CL_SIZE to be set to 4 for Intel
Add GMX_OCL_CLUSTER_SIZE which can be set to 4 for e.g. Intel.
The kernel should now work on any HW with at least
CL_SIZE*CL_SIZE/2 wide sub-groups (warp-sync execution).
This is 8(/32) for CL_SIZE 4(/8). Not tested for CL_SIZE other
than 4 or 8.
Fixes:
- make_fep_list_supersub was incorrect for CL_SIZE!=8.
- reduce_force_i_pow2 was incorrect for CL_SIZE<8 and 2 warps.
- i-atom preload, nbnxn_excl_t, warp-any init for CL_SIZE!=8.
- gpu_ref for CL_SIZE!=8.
Change-Id: I1114e408d28b9eb6306722c41fd6a6ccec52211b
Roland Schulz [Wed, 9 May 2018 01:53:03 +0000 (18:53 -0700)]
Use same OpenCL kernel for different Vendors
Removed the incomplete support for warpless execution.
Change-Id: I2dfde49a0855cd4493cfe03a47e9e118b3ab909f
Berk Hess [Mon, 7 May 2018 14:09:38 +0000 (16:09 +0200)]
Clean up PME domain count passing
The PME domain count was passed in two ints with node and major/minor
in the name, whereas it was actually the number of domains along x/y.
Now a struct is passed around and three useless arguments to
init_domain_decomposition have been removed.
Change-Id: I6ac92f2d0515e8dec78581b65714cd5b8c48bc51
Carsten Kutzner [Fri, 1 Dec 2017 11:00:32 +0000 (12:00 +0100)]
Introduce helper classes for force provider input and output
This patch introduces two structs, ForceProviderInput and ForceProviderOutput,
which are used for calling IForceProvider::calculateForces(). These structs
are meant to be short-lived containers only: they just bundle up pointers to
data needed by the force providers and then directly go out of scope again after
the call to calculateForces().
The advantage of assembling all input and output data for a force provider into
two containers is that the signature of the calculateForces() method does not
need to change (again) if someone comes up with a new force provider that needs
additional input or output.
As suggested by Mark and Teemu in https://gerrit.gromacs.org/#/c/6637/
Change-Id: Ib1a076293acd963c995477cb847a7a2d8708f4c3
Aleksei Iupinov [Thu, 3 May 2018 11:40:34 +0000 (13:40 +0200)]
Import clFFT library into the Gromacs source
Latest clFFT master branch commit
c59712e is selectively copied into
src/external/clFFT. Custom CMakeLists.txt is provided for building
a static library. This merely imports the code but does not yet link
it to Gromacs. Future commits will use this library to perform
3D FFT for PME with OpenCL.
Change-Id: I2d8427780a15c9a7656c5aa2615f06d5a69716bb
Paul Bauer [Mon, 30 Apr 2018 09:44:08 +0000 (11:44 +0200)]
Fix md -cpi -noappend
Apparently the noappend option for mpi has been broken when the
checkpoint file reading was refactored. This fixes the issue by properly
setting the simulation_part variable in the ir from the checkpoint file.
Fixes: #2494
Change-Id: Ic1cfe6c15d725edda4a54d8a93bd6b0734db7d3a
Aleksei Iupinov [Thu, 3 May 2018 13:53:38 +0000 (15:53 +0200)]
Add clearDeviceBufferAsync() for CUDA/OpenCL
Change-Id: I7702c44c1329a18ae6c622eb079b8b028de9dc6e
Mark Abraham [Fri, 4 May 2018 10:36:59 +0000 (12:36 +0200)]
Merge "Merge branch release-2018"
Mark Abraham [Thu, 3 May 2018 20:43:25 +0000 (22:43 +0200)]
More const correctness
Also made a bunch of functions have one parameter per line because
expected changes to names and types of parameters will rebase better
this way. Also some may find it easier to read and edit.
Also used a little more ArrayRef while I was there.
Change-Id: I33481e37206c28de178417b7efd9bacb272e9052
Mark Abraham [Thu, 3 May 2018 22:36:10 +0000 (00:36 +0200)]
Merge branch release-2018
Change-Id: Id7d4f6e99dc4ec396ed5d4018c885a495b6a677f
Berk Hess [Wed, 2 May 2018 14:36:01 +0000 (16:36 +0200)]
Enable SIMD version of update
A bug in setting mdatoms->havePartiallyFrozenAtoms caused the SIMD
version of the leap-frog update to always be deactivated.
Fixes #2497
Change-Id: I670549c95c983cac5033ea6bb71b77561e063223
Aleksei Iupinov [Wed, 2 May 2018 16:03:35 +0000 (18:03 +0200)]
Copy missing GPU NB host deallocations from OpenCL to CUDA
Change-Id: I57572566afd46caeacfff02b8708e46391093004
Aleksei Iupinov [Mon, 23 Apr 2018 09:59:54 +0000 (11:59 +0200)]
replace cu_copy_* calls with DeviceBuffer functions in PME
Change-Id: I1c8b10e81d588468f091175126affb05983df03b
Aleksei Iupinov [Wed, 2 May 2018 15:37:35 +0000 (17:37 +0200)]
Rename OpenCL host memory routines to match the CUDA ones
Change-Id: I59a72b2533e6fe88ba9602a11fea051aef0315c7
Roland Schulz [Sun, 29 Apr 2018 19:04:18 +0000 (12:04 -0700)]
Enable uncrustify for OpenCL
Change-Id: I25c98a952cf0a64a77973fba193e2c2b15070fba
Roland Schulz [Sat, 28 Apr 2018 04:52:23 +0000 (21:52 -0700)]
Support 4 sized cluster for GPU NBL search
Also fix #ifdef/#if misuse
Change-Id: I971a055e3d9391a8cc735c5b7ef10b3920f5b2b4
Aleksei Iupinov [Fri, 27 Apr 2018 10:38:37 +0000 (12:38 +0200)]
Make asize() a proper template function instead of a macro
It will not accept raw pointers anymore.
Change-Id: Iaa75b650a3af07c8ddf4b238d2cc3a9a5ddecaaa
Paul Bauer [Fri, 27 Apr 2018 13:45:05 +0000 (15:45 +0200)]
Fix file reading in gmx sans
Fixes #2493
Change-Id: Ia48008e476b1cf1a6d5e32a06103d16f92f18064
Aleksei Iupinov [Fri, 27 Apr 2018 10:28:42 +0000 (12:28 +0200)]
Rename the asize variable to numAlignmentAtoms
There is also a macro named asize().
Change-Id: I1dc41a014b188b3f6af9f734c31df772ecdb2840
Berk Hess [Wed, 25 Apr 2018 13:43:28 +0000 (15:43 +0200)]
Remove pull MPI code duplication
Merged the near indentical pull_reduce_real/double functions into
a single templated function.
Change-Id: If954feba133b2d882c39ee4ddcbcecb3a69c7e09
Paul Bauer [Thu, 26 Apr 2018 09:27:38 +0000 (11:27 +0200)]
Reorganize files for reference manual
The files needed to build the reference manual have been moved around
such as that each chapter has its own subdirectory.
At the same time, the image files have been moved to the respective
directories as well.
CMake has been adpated to use the new directory structure.
Change-Id: I819c2168a635d23b659258f360fe1c423d2689c3
Paul Bauer [Thu, 26 Apr 2018 08:53:52 +0000 (10:53 +0200)]
Split up analysis chapter in reference manual
Change-Id: I2dde1f8b47c729389b7a354de1033c8fb327e2db
Szilárd Páll [Mon, 23 Apr 2018 18:10:59 +0000 (20:10 +0200)]
Bump required CUDA version to 7.0
This simplifies cmake-time requirements as we can now require the same
CUDA version for all cases except MSVC. It also allows us to
unconditionally compile with the cudaLaunchKernel API and remove the
alternative chevron-notation at least in the nonbonded module.
Change-Id: I199f17151cb227fda9d76c1bf0d7fd73f1d31275
Aleksei Iupinov [Wed, 18 Apr 2018 11:32:56 +0000 (13:32 +0200)]
Separate PME GPU host-only and host/device data structures
This distinction will be necessary with OpenCL.
Change-Id: I042624233e31264acb64f0bbc28c4ff736e50ebd
Paul Bauer [Thu, 26 Apr 2018 08:34:09 +0000 (10:34 +0200)]
Split up special topics section in manual
Change-Id: I80cc67a076e7a42022028f05c2c7611c5c8c2768
Aleksei Iupinov [Mon, 23 Apr 2018 10:22:35 +0000 (12:22 +0200)]
Add copyFromDeviceBuffer() CUDA/OpenCL implementations
Change-Id: Ib74f0bc65e97d74e09bdac312a90135251f72b60
Mark Abraham [Sat, 21 Apr 2018 16:51:16 +0000 (18:51 +0200)]
Revert "Tweak PME run mode checks"
This reverts commit
49ca05c7a05209845609c62f122ab7313b19dd39.
Change-Id: I412172df6832eeb0d9c7e03cc0e7e26a7c10439e
Paul Bauer [Thu, 26 Apr 2018 08:20:11 +0000 (10:20 +0200)]
Split up topology section in manual
Change-Id: Ie7773d15aabe6fdedabacebe5203224028fc4219
Paul Bauer [Thu, 26 Apr 2018 07:53:01 +0000 (09:53 +0200)]
Split up algorithms manual page
Change-Id: I47c76d4aa6d6280237d76723604e5b9a1d024c6b
Paul Bauer [Wed, 25 Apr 2018 08:28:30 +0000 (10:28 +0200)]
Add page breaks in reference manual
Added manual page breaks between the different sections of the reference
manual in the LaTeX pdf build.
Change-Id: I6a9f1ae3608867ff683845dfdae16f6f1d795401
Paul Bauer [Tue, 24 Apr 2018 16:02:12 +0000 (18:02 +0200)]
Split up Interaction functions manual page
First set of patches that split up the individual sections
of the reference manual into smaller pieces.
Also adding comments in CMake which chapters files belong to.
Starting with Interaction function and force fields.
Change-Id: Ia0175f548ef91fe9f39457490cd4087ccbd75f02
Mark Abraham [Fri, 13 Apr 2018 11:39:31 +0000 (12:39 +0100)]
Refactor SD update
The former use of multiple boolean control variables made the logic
hard to follow. Without constraints, the two parts of the integrator
are fused, which is now expressed explicitly.
This means it is now clear that the second half of the sd update does
not compute anything from the foreces.
Removed some of the vestiges of the way we once had two SD
integrators.
Refs #2423, #1793
Change-Id: I39d4cd0b8568859220b3a592b138f3f4405f8991
Paul Bauer [Mon, 23 Apr 2018 15:48:58 +0000 (17:48 +0200)]
Change image conversion to only be build once
Change to CMake so that the image conversion needed for the web version
of the reference manual is only done once.
Also added some comments to specify the changes to USeLatex.cmake
and corrected the usuage of variable names in the cmake scripts.
Change-Id: I1caf09e899467e4de7451892536db967a35814fa
Berk Hess [Tue, 24 Apr 2018 14:02:09 +0000 (16:02 +0200)]
Fix indexing issue in the pull code
When determining if the COM of pull groups should be computed,
the indexing range of group[] for each pull coordinate is one element
too long. In most cases this element is 0, so in which case it only
lead to extra, useless compute when a cylinder group is used.
Note that for dihedral geometry the extra element is actually dim[0]
in pull coord, which is 0 or 1, which is harmless.
No release note, since this did not affect results, it could only
cause a minor performance loss with cylinder pulling.
Fixes #2486
Change-Id: Ie5785181fbe28d8db57e37c58553ae3835e657b7
Aleksei Iupinov [Fri, 16 Feb 2018 15:12:51 +0000 (16:12 +0100)]
Removed cu_realloc_buffered() in favor of reallocateDeviceBuffer()
Change-Id: I5f0d374f8e7e22505265f3cebc60fe29948ab6e9
Aleksei Iupinov [Tue, 13 Feb 2018 12:08:13 +0000 (13:08 +0100)]
DeviceBuffer headers are added
For now they contain templated versions of GPU memory (re-)allocation
and host-to-device copy routines. The DeviceBuffer declarations
and the freeDeviceBuffer() implementations are moved there as well.
Using those, the GPU pairlist allocation code is made look
mostly the same in CUDA and OpenCL. ocl_realloc_buffered() is
removed; cu_realloc_buffered() is to go next.
Change-Id: Ic724113d7d0ed6b4707d094010e11ccbcd5da3c5
Szilárd Páll [Thu, 19 Apr 2018 13:50:25 +0000 (15:50 +0200)]
Fix icc warning in post-submit
icc refuses to understand GMX_UNUSED_VALUE.
Change-Id: Ieca8ad781e6f3bb7908f346a14367dc86ae8b15f
Szilárd Páll [Fri, 13 Apr 2018 16:25:57 +0000 (18:25 +0200)]
Add post-submit with ARM HPC Toolchain
Using gcc-7 and armclang-18.2.
Change-Id: I0cd310786598b7c980af970849ba0de95b91d2ad
Szilárd Páll [Tue, 17 Apr 2018 17:51:59 +0000 (19:51 +0200)]
Tweak PME run mode checks
These should allow compile-time evaluation when mdrun is compiled with
GMX_GPU=OFF.
As the CPU-only build can now optimize out quite some code, this also
fixes a gcc 7 warning that an argument of pme_gpu_reduce_outputs()
may be used uninitialized.
Change-Id: I2397e0dc7e4e2f6587d01d94db27072938e85e7d
Paul Bauer [Thu, 26 Oct 2017 13:47:03 +0000 (15:47 +0200)]
Convert manual from LaTeX to Markup
Manual has been automatically converted from *.tex to *.rst using
pandoc (after passing through the conversion script and some manual
hacking of the tex input files).
New rst formatted manual replaces the old one, with the pdf version
now also being generated from the information in the rst files.
Additionally, the eps image files have been converted to pdf and svg file
types to make it easier to automatically include them in the created
manual.
Proper change tracking depends on change
I3986740ab42a4054c4d0f9f67923ebf7a51320d9
and
Ice29bde4d9aa2ec99b416c668c21bef13fdd9d3e
Change-Id: I6702dde7be9cdd4199db2e6a8470698203449e31
Paul Bauer [Tue, 21 Nov 2017 07:22:18 +0000 (08:22 +0100)]
Second change tracking commit
Another intermediate commit to ensure proper change tracking for the work on the reference manual
This commit changes the file names and paths.
It as well changes the image files to svg and pdf, to make the automatic
conversion work better for the child change.
Change-Id: Ice29bde4d9aa2ec99b416c668c21bef13fdd9d3e
Paul Bauer [Mon, 6 Nov 2017 15:03:46 +0000 (16:03 +0100)]
Intermediate commit to track changes to manual
This is just an intermediate commit to make sure git properly tracks the
changes to the files for the manual, and is not expected to compile
the manual at all.
This change does the conversion from tex to rst, while keeping the file
names.
The original LaTex inputs are included in a pandoc conversion friendly
format in the orignal-conversion-friendly subfolder, together with the
output from the automatic conversion.
Change-Id: I3986740ab42a4054c4d0f9f67923ebf7a51320d9
Szilárd Páll [Thu, 13 Jul 2017 15:48:14 +0000 (17:48 +0200)]
Minor fix for pre-submit matrix docs
Fixed comment to avoid confusion as CMake 3.8 did not introduce any new
CUDA feature that we actually do use (and can test).
Change-Id: I9d559a8bc606c14060fb6abbc93465d4d97e838a
Szilárd Páll [Wed, 18 Apr 2018 15:59:39 +0000 (17:59 +0200)]
Move the PME GPU clearing to the end of the step
This places the call to the end of the force-compute next to the nbnxn
output clearing also fixing the cycle counting that previously
incorrectly assigned the cost of launching the clearing to the wait for
gather cycle counter.
Change-Id: I63b27a91d88a54d701831edda592b5d6277e3fb9
Mark Abraham [Tue, 10 Apr 2018 11:37:48 +0000 (13:37 +0200)]
Introduce gmx_used_in_debug
Sometimes variables are only used to support assertions or other debug
code. This alternative annotation makes clear that the variable is
used as intended, so that if the value becomes truly unused then we
will be prompted to remove it by a warning from a suitable debug
build, thereby simplifying the code.
Deprecated GMX_UNUSED_VALUE following review discussion.
Change-Id: I39fe11d8062e599ef3e78b80320fe31fb2a503c0
Paul Bauer [Tue, 17 Apr 2018 15:48:54 +0000 (17:48 +0200)]
Remove obsolete variable prec gro file output
It seems like the help message for the -ndec option in trjconv has never
been updated to indicate that gro files can no longer be written with
flexible precision. This has been fixed now.
Change-Id: Ia514bf48f6a25f13911524211a703d49b3bc307a
Viveca Lindahl [Tue, 27 Mar 2018 10:37:33 +0000 (12:37 +0200)]
Disallow -skip values <= 0 for gmx trjconv.
Fixes #2467
Change-Id: Ic8b1892c454100bf4d5668b1c55b33ec6fbff4a2
Paul Bauer [Mon, 16 Apr 2018 14:16:23 +0000 (16:16 +0200)]
Fix legacy topology memory error
The change to port mtop to c++ has exposed a number of issues in the
legacy topology data structure, where pointers would be copied from a
temporary mtop object to the local topology, and subsequently
invalidated when mtop was correctly free'd.
This change is a bit of wooden mallet applied to the problem, by brute
forcing the assignment of the values that were previously copied by
pointer.
Fixes #2479
Change-Id: I7d702666fa48cb3840f914ee3bd28787d3caeec8
Mark Abraham [Fri, 13 Apr 2018 11:34:36 +0000 (12:34 +0100)]
Shift per-step control logic to do_md
There are multiple reasons why do_md can decide this is the last step,
so we should be consistent about it.
Refs #1793
Change-Id: I46f377630fa12be482ccb532c05d96cfe0537523
Mark Abraham [Fri, 2 Mar 2018 21:42:06 +0000 (22:42 +0100)]
Break apart update_constraints
There are four distinct kinds of work being done, and never was any
call to update_constraints doing all of them, so it's better to have a
group of functions, each of which do one thing, and the relevant ones
called. This also makes it simpler to express by returning fast that
when we don't have constraints, we do nothing.
Made the logic for whether this is a log or energy step match that of
the main MD loop. The old implementation may not have prepared for the
last step correctly when it was triggered by something other than the
nsteps inputrec value.
Removed a commment mentioning iteration, which is a feature
that was removed a while ago.
Removed some ancient debug dump output.
Refs #2423, #1793
Change-Id: I21c10826721ddc9a79a33b1dc75971a20d0855d9
Szilárd Páll [Mon, 9 Apr 2018 18:17:11 +0000 (20:17 +0200)]
Add post-submit test with hwloc off
This tests exercises the internal CPU topology detection code-path.
Change-Id: I2444b95c53b678ae88a66d95dbc93a55f7ed2725
Berk Hess [Wed, 7 Mar 2018 11:53:39 +0000 (12:53 +0100)]
Move natoms_mol out of gmx_molblock_t
natoms_mol is derived information, so moved to MolecluleBlockIndices.
Change-Id: I10080dc8fd43bac1f1976551d66218fcc1d2c53c
Mark Abraham [Tue, 29 Dec 2015 17:39:44 +0000 (18:39 +0100)]
Updated mdrun comparison infrastructure
The functionality for running grompp to produce a .tpr file useful for
comparing two mdrun calculations works better as free functions than a
base class. This patch is essentially a rewrite of the interface,
though the core functionality is roughly the same.
Used raw string literals for nicer looking embedded strings.
Refs #1868
Change-Id: I4b5137b34c3da286e344809b71afd985d9c7bfab
Szilárd Páll [Tue, 10 Apr 2018 13:28:11 +0000 (15:28 +0200)]
Use trivalue option for GMX_HWLOC
Don't run hwloc detection if GMX_HWLOC=OFF. Separated the value of the
variable set by the user from the specification of the default
behaviour and the selected behaviour.
Change-Id: I70dbe9e40857680dc3987eb8b6820c5ccac96b63
Mark Abraham [Fri, 13 Apr 2018 10:09:09 +0000 (11:09 +0100)]
Merge branch release-2018
Minor conflicts documenting gpuregiontimer_ocl.h, resolved
with a suitable mix from both branches.
Change-Id: I5bb417acaff941f18730f0417c5e46c8f4c2fc1e
Mark Abraham [Wed, 28 Feb 2018 18:08:14 +0000 (19:08 +0100)]
Clean up constraints code
Moved constraint code into gmx namespace.
Used more forward declarations in both the old and new headers.
Removed typedef from type declarations.
Removed gmx_ prefix from some names, since it is no longer required
and we may as well avoid verbiage.
Renamed some types more consistently with newer coding styles, and
called them class now where they will be one shortly.
Added some const correctness.
Apparently this inspires uncrustify to change positions of some
comments. Go figure.
Replaced all gmx_bool in constraints code with bool.
Maths functions from vec.h (which are not in the top-level namespace)
now need namespace qualifications.
Added and fixed various Doxygen, which is primitive in some cases
where the code was particularly cryptic.
Noted policy on multiple authors within Doxygen comments.
Refs #2423
Change-Id: I41bf3a4b9a4fbbcb3a3a7a27dc922d563abedbcb
Aleksei Iupinov [Thu, 12 Apr 2018 14:31:43 +0000 (16:31 +0200)]
Make in-source OpenCL kernel path a per-module parameter
Change-Id: I19cd66b441fec6ceba74eb648bea3409b6521917
Mark Abraham [Fri, 2 Mar 2018 21:08:23 +0000 (22:08 +0100)]
Remove use of where(), if DEBUG etc.
The where() debugging function causes run-time branches in
release-mode builds, and replaces functionality for which one should
use a debugger.
Other such preprocessing clutter should also go away. Since we don't
check whether any of it compiles or produces useful data, we may as
well delete it.
This coincidentally simplifies the call sigatures of some
functionality, too.
Retained some useful essentialdynamics debug code, which is now always
compiled, and written from setup code only at debug level 2.
Refs #2423
Fixes #2122
Change-Id: I2c60c162734f4c2ec1d56153853a36d28e6a66ff
Aleksei Iupinov [Thu, 12 Apr 2018 12:42:48 +0000 (14:42 +0200)]
Remove CUDA_FUNC macros from many functions in PME GPU
As pme-gpu*.cpp files are not compiled during CPU builds anymore,
PME GPU functions that are not exposed to mdrun/tests do not need
to be hidden.
Change-Id: Id39c0bb6e586b508f5bbe8c7501ffd560d3cf14c
Aleksei Iupinov [Tue, 27 Mar 2018 11:18:51 +0000 (13:18 +0200)]
Stop PME GPU code from compiling on non-CUDA builds
On non-CUDA builds: all entrypoints into PME GPU code are
marked as stubs; pme-gpu.cpp and pme-gpu-internal.cpp are
excluded from compiling. Several common functions (such as
check for GPU support at the end of PME initialization)
are moved to pme.cpp, to still work with non-GPU builds.
Change-Id: Iaa9ea7b3e42665c60b788e76510a810457a69f20
Mark Abraham [Mon, 26 Feb 2018 16:47:24 +0000 (17:47 +0100)]
Reorganize energy evaluation for EM
Used aggregate initialized structs to simplify future refactoring.
Refs #1793, #2423
Change-Id: Iedb8bf3b4cb2d7f238c4b674ce459564a3f76a20
Aleksei Iupinov [Tue, 27 Mar 2018 20:30:43 +0000 (22:30 +0200)]
Prevent OpenCL timing memory leak
Fixes #2470
Change-Id: I4917de697bee7df98da0037e9165e52e660f83a0