Kevin Boyd [Sun, 16 Sep 2018 18:42:29 +0000 (14:42 -0400)]
Added basic tests for gmx msd
Change-Id: I35d765d9a68d4723bf0a968d07453a268ed4e78a
Berk Hess [Sat, 15 Sep 2018 21:02:13 +0000 (23:02 +0200)]
Change pointers to InteractionList to references
Change-Id: Ia2431137e7326a4fa68083b0e50a82455b426c86
Pascal Merz [Mon, 17 Sep 2018 04:40:41 +0000 (22:40 -0600)]
Fix typo in DD load balancing printing
Removed superfluous string format specifier (%s).
Change-Id: I42dcb3e5a8fa64f80cf480f4838a9f7fa70e03cd
Berk Hess [Tue, 21 Aug 2018 19:34:41 +0000 (21:34 +0200)]
Refactoring in DD redistribute
Split computeMoveFlag() of from calc_cg_move().
Group limit arguments into a struct.
Change move from a pointer to an arrayref.
Change-Id: Iab7f7ae3168fcb8a77ad08d3632a2dc23007d322
Joe Jordan [Fri, 14 Sep 2018 15:35:19 +0000 (17:35 +0200)]
Move variables around in pdb2gmx
This narrows the scope of variables in pdb2gmx and
changes a few names. This is only code movement.
Change-Id: I2f923df42124f430348601fce839b0914ca41674
Roland Schulz [Sat, 15 Sep 2018 05:25:42 +0000 (22:25 -0700)]
Replace slave with agent
See releng change for details.
Also removes the word in one non Jenkins related file where
it didn't add any value to a comment.
Change-Id: Ic299f2fce0ffcd5412611c464b5f88db41d31a9c
Berk Hess [Tue, 14 Aug 2018 10:16:43 +0000 (12:16 +0200)]
Refactor getAtomGroupDistribution()
Change-Id: Id97802c061d179d9303d05b6da97131151be027a
Paul Bauer [Wed, 23 May 2018 10:18:32 +0000 (12:18 +0200)]
Remove LaTeX file writing from gmx check
The function would now live in gmx report instead.
Change-Id: I09a03f1cab32f8a3e4e1bf5bc7426b9a7fd80170
M. Eric Irrgang [Fri, 14 Sep 2018 10:43:03 +0000 (13:43 +0300)]
Rearrange mdrun/runner.h
Swap the public and private sections of Mdrunner. Improves readability
and reduces noise / conflicts for other changes under review. This
commit is only reorganization.
Refs #2605
Change-Id: Ibb9a24a588afd90c7199f77e80aa2a3f2d2e7339
Berk Hess [Thu, 13 Sep 2018 09:08:24 +0000 (11:08 +0200)]
Change gmx_moltype_t.ilist to InteractionLists
Also changed the mtop_util ilist loops to return a pointer
to InteractionLists.
Change-Id: I449176dcb2b7b73225c78308cf64da70cc88051b
Paul Bauer [Thu, 17 May 2018 18:04:57 +0000 (20:04 +0200)]
Introduce gmx report-methods
The writing of system information from gmx check has been
moved to a new module gmx report-methods that does the only
this part, writing the basic system information to the
the terminal, as well as a LaTeX formatted or unformatted
output file.
Change-Id: Id34c8ca67e606a88da70fe9558b2811a716dcc47
Roland Schulz [Sat, 14 Jul 2018 05:57:53 +0000 (22:57 -0700)]
Warn for type mismatch for gmx printf like functions 3/3
Add attributes for gcc (and compatible) and msvc.
And fix remaining issues.
Related #2570
Change-Id: I9b46559c2554404b309aa8710eb34ffa128d8cae
Roland Schulz [Wed, 12 Sep 2018 19:58:23 +0000 (12:58 -0700)]
Remove sparc64_hpc_ace nonbonded kernels
Unclear whether they work after C++ change. No plans
to test them.
Change-Id: I5fe296ec34c51d0e9d0500eef3c6c7d5cd1b4a76
Berk Hess [Wed, 12 Sep 2018 23:29:27 +0000 (01:29 +0200)]
Add C++ version of t_ilist
gmx_moltype_t in gmx_mtop_t now uses a C++ version of t_ilist called
InteractionList. The interface of IteractionList and t_ilist match
such that templated code can work with either. Thus we do not need
to change all code that uses t_idef now as well.
Change-Id: I90b829dae874f38d52ec0ceb538342313b2f8dd9
Roland Schulz [Wed, 12 Sep 2018 18:40:50 +0000 (11:40 -0700)]
Remove useless comments
Change-Id: I6df536841e9307491db8d3e9a529803724375d89
Mark Abraham [Wed, 12 Sep 2018 13:46:38 +0000 (15:46 +0200)]
Eliminate main.h
This generic file had generic content and will create cyclic
dependencies if not broken up into logical units.
Moved replica exchange code to be alongside the multisim code that it
needs. Moved multi-sim communication routines to be where other
low-level and multi-sim communication routines are found. Added simple
Doxygen, while leaving a suppression and TODO for the main
replica-exchange routines documentation, which is not in scope for
this change. Converted a define to a constexpr and made the include
guards match GROMACS style.
Change-Id: I123231d56bfa9a699ddbd32fec0b055cf14d93e3
Roland Schulz [Fri, 13 Jul 2018 04:18:58 +0000 (21:18 -0700)]
Warn for type mismatch for gmx printf like functions 2/3
Most manual fixes. Inclduing those with missing/extra
arguments.
Related #2570
Change-Id: I2046d323dad6420e61f47918b12aa538f4a6d4a0
Roland Schulz [Wed, 12 Sep 2018 15:12:46 +0000 (08:12 -0700)]
Add SSE2 + double config
Change-Id: I751b4c4755d01ffd7aad08144dc2e5e3a1b96280
Berk Hess [Tue, 11 Sep 2018 14:18:00 +0000 (16:18 +0200)]
Convert vsite structs to C++
Change-Id: I164e78e981404df535d1115d5eaab399382924ae
M. Eric Irrgang [Tue, 11 Sep 2018 10:01:50 +0000 (13:01 +0300)]
Simplify add_suffix_to_output_names()
Use gmx::Path::concatenateBeforeExtension instead of C string
manipulation.
Change-Id: I3203bf43aa19d9eae93dcf58eb314591864c590f
Roland Schulz [Sun, 9 Sep 2018 01:57:37 +0000 (18:57 -0700)]
Remove cpluscplus ifdefs
Also remove c/c++ bool check given that it isn't needed
anymore.
Change-Id: I8b1c34a5fe3130c1a2754eed81815fa36020bd89
Roland Schulz [Wed, 12 Sep 2018 09:34:10 +0000 (02:34 -0700)]
Fix clang-tidy warnings for OCL
Change-Id: I2f794a2209f355c0b3ee67623360724d96982458
Berk Hess [Tue, 11 Sep 2018 12:39:26 +0000 (14:39 +0200)]
Convert DD gmx_reverse_top_t to C++
Note: thread_work_t will be converted to C++ in a child change.
Change-Id: I629016caebc7c6a0149471647a7fc9110ba01e27
Roland Schulz [Tue, 11 Sep 2018 20:05:32 +0000 (13:05 -0700)]
Fix SSE4.1 after change to C++
Change-Id: I1450c97c5594df37e38cb2e6586db2f23e1fcae8
Mark Abraham [Tue, 11 Sep 2018 08:55:58 +0000 (10:55 +0200)]
Replace C-style library file handling with RAII approaches
Avoids and fixes leaks of filename strings and file pointers, in
normal and exceptional cases. Also cleans up some possible mismatched
file open and close routines.
Introduced a new header to declare the new smart FILE-pointer type.
Minor fixes to doxygen.
Change-Id: Ia7fcf5c93f2b91a6540cdd3d0e710a787960af98
Mark Abraham [Tue, 4 Sep 2018 22:56:15 +0000 (00:56 +0200)]
Improve DD logging
Many info and warning-level messages are updated to use the existing
logging and/or text wrapping infrastructure, following the policy of
level messages are used. Messages about DLB decisions was downgraded
to information level, because users are not expected to react to them
and they are not critical.
Extended some of the infrastructure to suit the needed use cases.
Fixes #2636
Change-Id: I6d39dc41d23fe3e0ed8ee51d326c8d2264112b1f
Roland Schulz [Sat, 8 Sep 2018 21:15:03 +0000 (14:15 -0700)]
Compile nonbonded kernels as C++
Remove extern "C"
Change-Id: Id6843c53bca8246ce8d7229198e8307e0c6bdeca
David van der Spoel [Mon, 10 Sep 2018 16:51:33 +0000 (18:51 +0200)]
Added option to gmx nmeig to print ZPE.
The Zero-point energy is a fundamental property of compounds
that can be computed simply from the vibrational frequencies.
Since we have all that information available in gmx nmeig we
might as well compute and print it.
Added some comments about units for doxygen output.
Added warning for unphysical frequencies.
Change-Id: I8914898f56bfe39a2b8f0fb3ad9df9e22eaa61bf
Mark Abraham [Tue, 26 Jun 2018 19:04:03 +0000 (21:04 +0200)]
Replace readConformation with TopologyInformation
Removed that function and renamed its source file to reflect the only
remaining contents.
Refs #1862
Change-Id: I6616ab8930a90d33ac4a836f97c30f6bea40e29c
Pascal Merz [Thu, 6 Sep 2018 00:16:03 +0000 (18:16 -0600)]
Added trivial const qualifiers
Const qualifiers were added to function arguments. No changes were
made inside function bodies, except for adding const qualifiers to
convenience references within functions. These changes help the
development of a MD state object, as they reflect more clearly where
write access to data is _really_ needed.
Refs #2616
Change-Id: I779b4dfed2fbd0ad129e226c9b535ed97a8bb01f
Pascal Merz [Thu, 6 Sep 2018 00:12:42 +0000 (18:12 -0600)]
Initialize total_vir and pres in init_md
There's no reason these should be treated differently than other
matrices like force_vir and shake_vir.
Change-Id: Ie0bbef63c9a2a67683f500217ba7c9a72b253452
M. Eric Irrgang [Fri, 7 Sep 2018 11:11:50 +0000 (14:11 +0300)]
Remove const from pointers in t_filenm.
The const char pointer members of t_filenm were themselves const,
restricting the ability of t_filenm objects to be assigned or passed
by value. If the pointer members should not be updated, the variable
holding the t_filenm object can be marked const, so this change removes
the const-ness of the pointer members.
Change-Id: I1c405b390c5399604cf66ca5818fdac630ffde8e
Roland Schulz [Sat, 8 Sep 2018 16:57:12 +0000 (09:57 -0700)]
Replace rounding using int(x+0.5) with roundToInt
Enable clang-tidy misc-incorrect-roundings
Change-Id: If448e37ad86c01a38e7a4951f3cb42a3b4cd1f12
Roland Schulz [Wed, 8 Aug 2018 23:18:32 +0000 (16:18 -0700)]
Add roundToInt
- Leaves the rounding of halfway cases implementation defined.
Reason: It simplifies implementation and has no impact for
anything where the input can have at least 1ulp error.
- Uses rint(f) because it is optimized in all commonly used
compilers avoiding the use of intrinsics.
Change-Id: Id01c2a37d3e1c5000858e78332fa72beb5b3b58d
Fixes: #2562
Mark Abraham [Thu, 21 Jun 2018 07:50:47 +0000 (09:50 +0200)]
Change TopologyInformation implementation
This changes TopologyInformation so that we will be able to use it
also in the legacy tools, providing a better migration path for them,
as well as making progress to removing t_topology and a lot of calls
to legacy file-reading functions.
It can now lazily build and cache atom and expanded topology data
structures, re-using the gmx_localtop_t type (intended for use by the
DD code for domain-local topologies). The atoms data structure can
also be explicitly copied out, so that tools who need to modify it can
do so without necessarily incurring a performance penalty. All these
are convenient for tools to use.
The atom coordinate arrays are now maintained as std::vector, which
might want a getter overload to make rvec * for the legacy tools.
Added tests that the reading behaviour for various kinds of inputs is
as expected. Converted lysozyme.gro to pdb, added a 'B' chain ID,
generated a .top (which needed an HG for CYS) so updated pdb and gro
accordingly. Some sasa test refdata needed fixing for that minor
change.
Provided a convenience overload of gmx_rmpbc_init that takes
TopologyInformation as input, as this will frequently be used by
tools.
Extended getTopologyConf to also return velocities, which will
be needed by some tools.
Adapted the trajectoryanalysis modules to use the new approach, which
is well covered by tests.
Refs #1862
Change-Id: I2f43e62bc2d97f5e654f15c6e474b9b71d7106ec
Paul Bauer [Fri, 7 Sep 2018 10:01:44 +0000 (12:01 +0200)]
Remove macro for group type in topology
Change-Id: Iabb199c321af21061f0e94c0bac20c352957e3a6
Mark Abraham [Thu, 6 Sep 2018 22:53:27 +0000 (00:53 +0200)]
Fix grompp memory leaks
Change-Id: I845565e6beca036ea15db21c03ad69bcda553acc
Mark Abraham [Thu, 23 Aug 2018 09:23:51 +0000 (11:23 +0200)]
Minor fixes to GPU build system
CUDA_FOUND is set by the find module, and should not be managed by us.
If CUDA hasn't been found, FindNVML can't be creative about finding
NVML, but if the user has set things up in other ways, NVML can still
be found.
We need all three of the outputs of the detection, so all three should
contribute to whether we run the detection code.
Change-Id: I3c528f5d4eacd4556c292d262b2b73ec7e32ada4
Roland Schulz [Wed, 18 Jul 2018 09:52:51 +0000 (02:52 -0700)]
clang-tidy: override
Change-Id: I3767d2a1117b525d9284a32935a4e8bb3ab337af
Magnus Lundborg [Tue, 4 Sep 2018 09:59:55 +0000 (11:59 +0200)]
Check q perturbation when PME on GPU is tested
If charges are not perturbued allow running PME on the GPU in
FE simulations.
Refs #2054.
Change-Id: Ibc610cb63afaadf4aa97608b8e03b6906fe2d026
Mark Abraham [Tue, 4 Sep 2018 13:16:06 +0000 (15:16 +0200)]
Separate simulation database used in tests
Change-Id: Id76b6cf1438b5b432ec51e98d2ce170bba01caa2
Roland Schulz [Sun, 19 Aug 2018 23:20:34 +0000 (16:20 -0700)]
Simplify Allocator
Remove all unneeded functions. Most of them weren't needed
with C++11 which requires all usage of allocators to go
through the allocator_traits which provide the default
implementation.
Change-Id: I37fb298c575fa5b09e5a6a1fdf4e7ff390eaec7a
Roland Schulz [Thu, 6 Sep 2018 19:57:13 +0000 (12:57 -0700)]
HostAllocator: Remove unnecessary template
Change-Id: I097f8318222fedf749cf911f48fca2b11a0ac5c1
Roland Schulz [Thu, 16 Aug 2018 01:40:20 +0000 (18:40 -0700)]
Remove pin/unpin from HostAllocator
Simplifies HostAllocator a lot and there doesn't seem to
be a good usage of those functions. Also allows to
call unpin without first checking whether the memory
was pinned.
Also fix comparison operator for HostAllocator and
make it properly work with move-only types.
Change-Id: I3be397a26c10ef68334c3753666802e46129a0ec
Roland Schulz [Thu, 6 Sep 2018 00:32:15 +0000 (17:32 -0700)]
Change CanBePinned to PinnedIfSupported
Allow setting the policy independent of support. Allows testing
without support.
Change-Id: I8aff34757868e705cea579d21f78a50b08f2c2ed
Roland Schulz [Tue, 14 Aug 2018 22:23:06 +0000 (15:23 -0700)]
Remove meta information from host allocator policy
Also prevent HostAllocator to be copied/propagated.
A HostVector shouldn't be copied without the calling code
having a choice on the pinning policy.
This commit prevents copy construction. Move construction and
copy and move assignment is still allowed.
For move/swap nothing is changed.
For copy assignment the pinning policy of the destination
container is used.
Fixes #2612
Change-Id: I15034e4db2434ea46eda84e70e3f8e6072660d20
Paul Bauer [Mon, 3 Sep 2018 14:24:26 +0000 (16:24 +0200)]
Changes to documentation build script
Moved around some of the builds in documentation.py so they are actually
in the correct order, and made sphinx-input a combined target of both
the input files for the pdf manual and the webpage image files.
Commented on using individual builds in the script instead of simply
using the webpage target and building everything at once.
Refs #2629
Change-Id: I15f556db6dfff12b48b52e8b461f179486a4ea28
M. Eric Irrgang [Mon, 3 Sep 2018 14:14:01 +0000 (17:14 +0300)]
Adjust loader path resolution on Mac OS X.
For macOS builds, use @loader_path instead of @executable_path for
libgromacs install_name. For internal GROMACS usage, this change should
have no observable effect.
For binaries linking to libgromacs, using @executable_path in the shared
library install_name allows a path to be resolved relative to the
executable, which works for binaries at a particular level of the
installation directory, but not for executables outside of GROMACS.
Switching to @loader_path means the path is relative to the binary with
the load command, which for GROMACS code is the same as
@executable_path, but for a libgmxapi library installed with GROMACS,
using @loader_path allows a binary linking against libgmxapi to
transitively load libgromacs relative to the libgmxapi installation
location in the GROMACS tree.
Change-Id: Ife76c59b138da58a92a0d00599c394c61fe612f9
Mark Abraham [Tue, 4 Sep 2018 20:12:43 +0000 (22:12 +0200)]
Be quieter when failing to detect GPUs
A normal mdrun user should not be informed on the
terminal that no GPUs could be detected. That information
is in the log file.
Fixes #2635
Change-Id: Idd254411c211c0fdef11d685ca1be2071aa6e281
Paul Bauer [Wed, 5 Sep 2018 12:13:43 +0000 (14:13 +0200)]
Improve stability of parallel documentation build
More changes to the way the doxygen environment is set up when preparing
the build and fixing one bug that made the documentation build sometimes
unstable due to a race between the creation of the doxygen xml files and
the user documentation depending on it.
Change-Id: I26f6281da5fac4b28d98be4baa7b9ac221c3d40d
Paul Bauer [Mon, 3 Sep 2018 14:03:28 +0000 (16:03 +0200)]
Fix error in documentation build
9eef115867840e8558773e721d258e3d21c26a8f broke the dependencies
for the documentation build, leading to the input targets to be build
every time. This is fixed here by properly setting up the targets.
Change-Id: I9228c125f7f5bd7e4d31ce71e3b25798f89a4048
Paul Bauer [Fri, 31 Aug 2018 12:53:52 +0000 (14:53 +0200)]
Allow documentation to build in parallel
Resolved some CMake dependency issues that prevented the documentation
build to run in parallel.
Also changed the admin documentation build script to use parallel
builds.
Change-Id: Ieda390886bdebf50771d9efd91328b27e81150c1
Roland Schulz [Sun, 2 Sep 2018 06:49:51 +0000 (23:49 -0700)]
Reduce duplication in gpu_utils
Change-Id: I6307e56aa570bd3ff04926879f212aa7f9bf5967
Roland Schulz [Sun, 2 Sep 2018 21:02:14 +0000 (14:02 -0700)]
Turn DlbState into scoped enum
Change-Id: I8f74705467533388a98f046f898bbe375a5e4797
Paul Bauer [Wed, 29 Aug 2018 09:42:34 +0000 (11:42 +0200)]
More fixes from clang-tidy-7
Change-Id: I0fac17f44b7cf5ab3e862fd60a103d749ceec82e
Christian Blau [Wed, 22 Aug 2018 12:02:42 +0000 (14:02 +0200)]
Convert essential dynamics C-structs to C++ pt1.
Convert enums to EssentailDyanmicsTYpe and EssentialDynamicsStructure.
Convert t_eigvec and t_edvecs and t_edflood to documented C++ structs.
Part of #2590
Change-Id: I90d41708453eea38bbbc69177627999e8eabfe09
Christian Blau [Thu, 30 Aug 2018 08:32:38 +0000 (10:32 +0200)]
Store essential dynamics parameters as vectors instead of linked list.
Multiple sets of essential dynamics input parameters were stored as a
user implementation of a C-style forward linked list. We now use a
std::vector instead.
This simplifies parameter reading and makes it easier for read_edi to
return a vector of read parameters, which is now used.
Part of #2590
Change-Id: I2ad0705558deb8da7bd3fac35602364eadc4fc8d
Mark Abraham [Wed, 29 Aug 2018 07:49:24 +0000 (09:49 +0200)]
Update testing matrices for coverage and speed
Moved slow aspect of pre-submit matrix to nightly (icc with release
mode and SIMD support).
Removed slow gcc-7 config adjusting similar builds to achieve its
former objectives.
Removed outdated TODOs, noted new ones
Added hwloc test specifier, and todo for hwloc 2
Added tng test logic, and a specfier for each non-default case. Fixed
missing return values for no-tng case, and clarified the docs.
Change-Id: I340b9a64dc4e4958f260657d3d82480be62ef979
Mark Abraham [Wed, 29 Aug 2018 14:34:10 +0000 (16:34 +0200)]
Merge branch release-2018
Trivial clash in post-submit matrix, where a TODO resolved in 2018
release collided with a new TODO in master branch.
Change-Id: I07366ecb232c7341c8cf17674be3112f44fc9cdd
M. Eric Irrgang [Fri, 24 Aug 2018 13:49:40 +0000 (16:49 +0300)]
Allow extensible MDModules and forceProviders.
supports gmxapi milestone 6, described at #2585.
MDModules::Impl gets a std::vector for (shared) ownership of objects
providing the IMDModule interface. An add() method is added to the
MDModules public member functions, but the binding protocols are
separated into separate issues to allow minimal changes and varying
dependencies on other pending changes.
Relates to #1972, #2229, #2492, #2574, #2590.
Refs #2623
Change-Id: Ibb16d1453003213a49622810ed8bad4ed4b06e2d
Roland Schulz [Wed, 29 Aug 2018 08:30:19 +0000 (01:30 -0700)]
Document clang-tidy libstdc++ incompatibility
Fixes #2627
Change-Id: I424698e22d2c73716fe53ae750bc260e3872a91f
Berk Hess [Mon, 2 Oct 2017 19:41:09 +0000 (21:41 +0200)]
Refactor wall potential calculation
Changed the wall potential calculation to use ForceWithVirial instead
of the coord x forces sum plus a virial correction. This change removes
the last virial buffer from t_forcerec.
Also refactored do_walls().
Change-Id: I23e56b6e08c57bd03363646f1f968bf0e251faa2
Roland Schulz [Tue, 28 Aug 2018 21:04:24 +0000 (14:04 -0700)]
Use more const in hardwaretopology
Change-Id: I5b4240c246e3a87f3c85e506645d720960e09933
Roland Schulz [Tue, 28 Aug 2018 02:23:09 +0000 (19:23 -0700)]
Fix clang-tidy build with libstdc++ >= 7
Fixes #2627
Change-Id: I236ab812f98c4921b21b03c6825707595d0385c3
Mark Abraham [Mon, 27 Aug 2018 21:12:36 +0000 (23:12 +0200)]
Move clang-tidy build
This has seemed too slow when combined with the ASAN build.
Change-Id: I45ea5856ca05edbb6107b62f219e8afd3cdbda3f
Mark Abraham [Tue, 28 Aug 2018 10:53:42 +0000 (12:53 +0200)]
Fix more clang-tidy issues
Change-Id: I64f138bc2034bbf1cfd734e49db8e88d07139ca9
Szilárd Páll [Tue, 28 Aug 2018 13:06:19 +0000 (15:06 +0200)]
Quiet cmake about clFFT not found after first run
Change-Id: Ief373c63045354982c7b9b505aa99842c3e5ea51
boristim [Fri, 24 Aug 2018 17:23:45 +0000 (20:23 +0300)]
Updates to gmx cluster
As proposed by Boris Timofeev on redmine, this adds to ability
of writing CRYST information to output pdb files, as well as
writing index files for generated clusters.
Fixes #2597
Change-Id: I991889d4116f096a58a22d5482420f0ddc6d0ef9
Roland Schulz [Fri, 24 Aug 2018 04:20:08 +0000 (21:20 -0700)]
Add hard limit for line length
Extremely long lines are a pain in diff-views (gerrit, github, ...),
and a problem for readability. The specific number doesn't matter,
as long as it reasonable. Most of us are just ignoring 80 so that
is useless as guideline.
Change-Id: I5dbced451b56bc307beea2aec7599b8764f978cd
Paul Bauer [Tue, 28 Aug 2018 08:09:18 +0000 (10:09 +0200)]
Fix documentation build without imagemagick
During a recent merge commit the CMakefile for generating the
documentation without the full reference manual got broken due to a
double definition of the user-guide/index file. This commit fixes this.
Change-Id: Ib4e8a9e991695ebe28937745591290e3d336aaaf
Mark Abraham [Mon, 27 Aug 2018 10:11:29 +0000 (12:11 +0200)]
Fix use of nullptr
clang-tidy is supposed to check this, but probably didn't because this
source file was changed around the same time.
Change-Id: I8e30024ea59779a75a757160b1367a66b3a670cf
Aleksei Iupinov [Wed, 16 May 2018 12:39:36 +0000 (14:39 +0200)]
Prepare pme-gpu-types.h for OpenCL
DeviceBuffer fields are hidden from the future OpenCL
device compilation with a macro. Struct fields are reordered
to satisfy the OpenCL device/host compatibility constraints.
Change-Id: I438c8121487c119cc5abfc04535a2c515fa2d399
Paul Bauer [Wed, 17 Jan 2018 15:10:39 +0000 (16:10 +0100)]
Transfer information from old how-to section
Transfer information from the old how-to section to the new website and
perform some updates/deletions where needed.
Refs #2359
Change-Id: I474f4161003f07f92ba23d8183ac058fec4dc17b
Roland Schulz [Fri, 3 Aug 2018 01:19:40 +0000 (18:19 -0700)]
Enable more clang-tidy checks for new code
Some of the clang-tidy checks would require too many code
changes when enabled globally. To get the benefits from
the checks without changing all legacy code add a second
configuration. Which configuration is used is selected by
directory: Any new module should use the new configuration.
Additionally it is recommended to use the new configuration
on a per file or change basis (clang-tidy-diff.py) manually.
This change contains the proposed configuration for new code and
and enables it for three folders which contain new code.
Checks enabled relative to base configuration:
clang-analyzer-security.insecureAPI.strcpy
readability-inconsistent-declaration-parameter-name
readability-function-size
cppcoreguidelines-owning-memory
cppcoreguidelines-no-malloc
cppcoreguidelines-pro-type-member-init
cppcoreguidelines-pro-type-union-access
The reasons that the remaining checks are still disabled (don't
know a good place to document because json doesn't allow comments):
misc-incorrect-roundings: #2562
readability-else-after-return: I don't think it is something we want to follow
cppcoreguidelines-pro-type-*cast: While it is best to not do those cast there
are valid reasons for them. And because they are already easy to spot,
mandating a NOLINT for those is probably not helpful.
cppcoreguidelines-special-member-functions: conflicts with Wunused-member
cppcoreguidelines-pro-type-vararg: #2570
cppcoreguidelines-pro-bounds-constant-array-index: While I think it would be
nice to have a compile mode with bound checking enabled. It is so ugly
to have to write at(v, n) instead of v[n].
cppcoreguidelines-pro-bounds-array-to-pointer-decay: This would be particular
nice to have But it makes it very hard to write warning free code with
legacy APIs which uses e.g. rvec. Those have to be modernized first.
cppcoreguidelines-pro-bounds-pointer-arithmetic: This would also be very nice.
But it requires that depending APIs use ArrayRef rather than pointers
for non-owning array passing.
Change-Id: I891a576d2c185ef6587224a1a19324f1a8967237
Alexey Shvetsov [Wed, 22 Aug 2018 17:04:09 +0000 (20:04 +0300)]
Add basic operations for gmx::BasicVector<>
1. Overload +,-,+=,-= operations for BasicVector
2. Add class methods for dot,cross products, scale, unitv, length,
sqlength functions (norm, norm2)
3. Add out of class functions for same operations as class methods
4. Add .toRVec, .toDVec methods
5. Provide forwarding templates in vec.h to get correct norm, norm2
implementation when both headers are included and function is applied
to older vector style.
Change-Id: I9d0f4490ae51d12842e0f22e9b24b46754fb4f79
Signed-off-by: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
Berk Hess [Fri, 10 Aug 2018 13:25:08 +0000 (15:25 +0200)]
Replace gmx_hash_t by HashedMap
This change is only refactoring.
The only (minor) functional change is that the initial size of the
hash table is set to >=1.5*#keys instead of 2.0*#keys.
Change-Id: I4512318dce5b76d99e7f5846ee0f158fb56b510f
Berk Hess [Fri, 24 Aug 2018 15:44:02 +0000 (17:44 +0200)]
Merge "Merge branch release-2018"
Berk Hess [Fri, 10 Aug 2018 11:16:27 +0000 (13:16 +0200)]
Add size optimization to HashedMap
The table size in HashedMap is now optimized when calling clear()
using the old number of keys. Also the number of keys is now set
to a power of 2, so we can use bit masking instead of modulo.
The bit masking allows for negative keys, which is also tested.
This is preparation for replacing gmx_hash_t with HashedMap,
but also improves performance for gmx_ga2la_t.
Change-Id: I90c5a602cb7e213eb6d2e8259a0effc4fd7c4e14
Berk Hess [Tue, 21 Aug 2018 15:11:56 +0000 (17:11 +0200)]
Add tests for HashedMap
Also moved HashedMap into gmx namespace and replaced the debug
assertions by debug exceptions.
Change-Id: Ie1d5984ee1db9b288e8664d17a86ab265652c637
Mark Abraham [Fri, 24 Aug 2018 08:58:25 +0000 (10:58 +0200)]
Fix build without TNG
Also resolve the TODO about testing for this case.
Change-Id: I7e4b65f82a83c84234a01220954931e8ecd28c9e
Mark Abraham [Thu, 23 Aug 2018 21:40:50 +0000 (23:40 +0200)]
Merge branch release-2018
Clashes in set_pull_init signature.
Issues with new pull checks from LocalAtomSet refactoring.
Transfered change to PME-on-GPU availability to new
location.
Ignored changes to pre-submit, because no longer appropriate.
Adopted changes to gmx solvate into master. The new test
coverage finds a memory leak that is fixed in this patch with
a refactoring of sort_molecule and add_solv.
Needed to include domdec/collect.h now used in master because
a function call from it was introduced in release-2018.
Change-Id: I5f7fcdf52a6093b455bd6e31c264696d88ced2ac
Joe Jordan [Sun, 5 Aug 2018 17:55:36 +0000 (19:55 +0200)]
change some char to string in gmxpreprocess
Related to #2566 and #2570. As part of the refactoring of
pdb2gmx one thing that becomes clear is that a lot of variables
could have better defined scope and readability could be
improved if some char's are converted to string's. This can
ripple through the code base of gmxpreprocess. I have followed
some of those ripples here and will continue to follow in
later changes.
Change-Id: I0d12704ef27c06a4f64f8d1e8638760c8c7019ae
Paul Bauer [Tue, 21 Aug 2018 09:09:52 +0000 (11:09 +0200)]
Update to prepare for 2018.4 point release
Change-Id: Id2cd50926f53c6a5ee825dfd9a7dce32e31938d4
Paul Bauer [Tue, 21 Aug 2018 09:05:47 +0000 (11:05 +0200)]
Version 2018.3
Added some release notes for issues that were missing them.
Change-Id: I5480e5421387081fb7b6fc26885d983e6b4046b9
Paul Bauer [Wed, 22 Aug 2018 09:58:58 +0000 (11:58 +0200)]
Fix trjconv when running without a structure file
When running trjconv without a reference structure file,
the topology information would be left uninitialized and
cause subsequent crashes during the deallocation.
Added tests to cover this behaviour.
Fixes #2619
Change-Id: I501c560ee0f8afca00bc78fd6f81b6841b5a5b57
Mark Abraham [Fri, 27 Apr 2018 16:35:34 +0000 (18:35 +0200)]
Fix handling of counter resets
There is no reason for or need to change max_hours, ir->nsteps or
step_rel when doing a counter reset.
This makes clear that the behaviour for the combination
mdrun -maxh t -resetstep n
matches the documentation of -maxh.
Updated the API for walltime_acccounting and its usage, because
elapsed time is an insufficiently clear context. Changed the names of
the start and stop functions so that no callers can silently rely on
semantics that have changed.
Avoided variables such as elapsed_time and max_hours, which were
insufficiently precisely worded.
Refs #1781
Change-Id: I16c96985f43a7b4ac75b94f378da3d05914d6986
Berk Hess [Fri, 10 Aug 2018 07:03:41 +0000 (09:03 +0200)]
Fix missing interactions with GPU and DD
Non-local LJ and Coulomb interactions would not be computed on a rank
after the non-local GPU pair-list was empty at some point in time;
either at the start of the run or during a run.
The issue is that the pair-list was initialized conditionally on
the size of the list in the device side data instead of the host side
data.
Although this could have led to silent errors for small step numbers,
most systems will likely crash for production runs.
Fixes #2502
Change-Id: Iae1c5b70624b652d625520cadb647f862f296d5b
Joe Jordan [Tue, 7 Aug 2018 13:13:18 +0000 (15:13 +0200)]
Fix pdb2gmx -chainsep
Fixes #2577
This patch makes readConfAndAtoms public and has pdb2gmx call it
directly. Previously pdb2gmx called readConfAndTopology, which
then called readConfAndAtoms and then tpx_make_chain_identifiers,
the latter of which is suspected of being broken, as documented
in the TODO added here.
Change-Id: I1b47e1743f6accf77ae67d232eb2c815edcff970
Mark Abraham [Tue, 21 Aug 2018 17:04:34 +0000 (19:04 +0200)]
Permit PME on GPUs only for dynamical integrators
We did not intend to support anything else (and at least energy
minimization does not work, because copying of HostVector does not
work properly).
Fixes #2578
Change-Id: I260e578b718614e868ea264a1f487b903704f94f
Szilárd Páll [Mon, 30 Jul 2018 16:18:37 +0000 (18:18 +0200)]
Request flushing denorms to zero in OpenCL
This change adds by default the -cl-denorms-are-zero to the flags used
for kernel compilation. This is done to:
- avoid a large performance penalty on AMD Vega with ROCm (which by
default handles denorms on GFX9 or later).
- make the defaults uniform across CUDA and OpenCL.
Fixes #2593
Change-Id: I9e6183c4367b5960e0e21f1dd342d7695acfbc44
Berk Hess [Thu, 16 Aug 2018 11:51:18 +0000 (13:51 +0200)]
Ensure domains are large enough for atom motion
The introduction of the dual pair list has led to larger nstlist
values, which leads to larger atom displacements between domain
decomposition steps. This has made it much more likely that
"atom moved to far" errors appeared at DD and PME redistribution.
Now minimum DD cell size setting correctly takes into account atom
displacement (when there is a reference temperature).
Note that this can significantly increase the minimum DD cell size
for solvent systems and slighlty for systems with large molecules.
Fixes #2614
Change-Id: Ie41131e9eed3ef828928516a6b8ebfb9b5ba2bdb
Berk Hess [Tue, 21 Aug 2018 08:07:22 +0000 (10:07 +0200)]
Fixed mdrun segv with QM/MM ONIOM scheme
Fixes #2617
Change-Id: I097d392ea53aeff589042df5074866e07a0ce5c5
Mark Abraham [Thu, 29 Mar 2018 06:59:40 +0000 (08:59 +0200)]
Re-implemented mdrun -rerun tests
Used the new infrastructure to let the rerun test check that the
energies and trajectories (including forces) produced by a rerun
actually match those produced by a normal mdrun. Such a test running
in parallel would have prevented #1868, and will help checking that
any changed or new integrator functionality does the job that it
should do.
Updated some infrastructure to not care whether it gets passed
a C or C++ string.
Removed small pieces of infrastructure originally intended for use by
this patch but which are no longer required.
Refs #1868, #2112
Change-Id: Ifcb211aba62ccb79ebaec21a3088c9e60a618c86
Mark Abraham [Tue, 7 Aug 2018 12:58:51 +0000 (14:58 +0200)]
Fix assertions for SD update
Some of the assertion logic in the refactoring of
5ae5bf42159cf was
wrong, but we apparently have no tests of the SD integrator before
now.
Refs #1793
Change-Id: I8acb6c5a9b6128aab7967fa8a1d32247f6365586
Christian Blau [Mon, 20 Aug 2018 09:07:26 +0000 (11:07 +0200)]
Add test for structural similarity measures rmsd and rho.
Tests rmsd and size-independent rho-factor calculation routines.
Change-Id: I1c74cb4e3185e38aafc5cb04352af2789b40eca9
Berk Hess [Thu, 16 Aug 2018 11:45:23 +0000 (13:45 +0200)]
Refactor calc_verlet_buffer_size()
Split of parts, which will be reused, from calc_verlet_buffer_size().
This change is only code motion.
Refs #2614
Change-Id: I9cf68a2661ee10eb991240d2768c077df9f9c0c5
Szilárd Páll [Thu, 19 Jul 2018 13:53:43 +0000 (15:53 +0200)]
Disable single compilation unit with CUDA 9.0
CUDA 9.0 does not support CC 2.x, hence even with the default list of
targeted arch, multiple compilation units an be enabled.
Fixes #2561
Change-Id: I741081da39539f211fad32bda5c1f1dccc4378f9
Berk Hess [Fri, 17 Aug 2018 14:01:38 +0000 (16:01 +0200)]
Remove compacting from DD redistribute
Since a long time the bCompact argument to dd_redistribute_cg() has
always been false. Now this option and the code for it is removed.
Change-Id: Iec87acd3f968475443e4d6de1fa87df536206230
Berk Hess [Thu, 16 Aug 2018 11:19:55 +0000 (13:19 +0200)]
Fix Verlet buffer estimate with BD
With BD and bd_fric>0, the masses used for estimating the pairlist
buffer based on estimated motion of constrained atoms and virtual
sites were, incorrectly, the actual masses instead of 1.
Fixes #2613
Change-Id: I5378c5f5566ccda28554b5a6c7d7c403228aa794
Berk Hess [Mon, 20 Aug 2018 09:26:57 +0000 (11:26 +0200)]
Fix clang namespace comment warning
Change-Id: Iff3b32562aed431f80c9a3b57a6aeb90f042ef9b