alexxy/gromacs.git
5 years agoclang-tidy: override
Roland Schulz [Wed, 18 Jul 2018 09:52:51 +0000 (02:52 -0700)]
clang-tidy: override

Change-Id: I3767d2a1117b525d9284a32935a4e8bb3ab337af

5 years agoCheck q perturbation when PME on GPU is tested
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

5 years agoSeparate simulation database used in tests
Mark Abraham [Tue, 4 Sep 2018 13:16:06 +0000 (15:16 +0200)]
Separate simulation database used in tests

Change-Id: Id76b6cf1438b5b432ec51e98d2ce170bba01caa2

5 years agoSimplify Allocator
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

5 years agoHostAllocator: Remove unnecessary template
Roland Schulz [Thu, 6 Sep 2018 19:57:13 +0000 (12:57 -0700)]
HostAllocator: Remove unnecessary template

Change-Id: I097f8318222fedf749cf911f48fca2b11a0ac5c1

5 years agoRemove pin/unpin from HostAllocator
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

5 years agoChange CanBePinned to PinnedIfSupported
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

5 years agoRemove meta information from host allocator policy
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

5 years agoChanges to documentation build script
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

5 years agoAdjust loader path resolution on Mac OS X.
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

5 years agoBe quieter when failing to detect GPUs
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

5 years agoImprove stability of parallel documentation build
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

5 years agoFix error in documentation build
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

5 years agoAllow documentation to build in parallel
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

5 years agoReduce duplication in gpu_utils
Roland Schulz [Sun, 2 Sep 2018 06:49:51 +0000 (23:49 -0700)]
Reduce duplication in gpu_utils

Change-Id: I6307e56aa570bd3ff04926879f212aa7f9bf5967

5 years agoTurn DlbState into scoped enum
Roland Schulz [Sun, 2 Sep 2018 21:02:14 +0000 (14:02 -0700)]
Turn DlbState into scoped enum

Change-Id: I8f74705467533388a98f046f898bbe375a5e4797

5 years agoMore fixes from clang-tidy-7
Paul Bauer [Wed, 29 Aug 2018 09:42:34 +0000 (11:42 +0200)]
More fixes from clang-tidy-7

Change-Id: I0fac17f44b7cf5ab3e862fd60a103d749ceec82e

5 years agoConvert essential dynamics C-structs to C++ pt1.
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

5 years agoStore essential dynamics parameters as vectors instead of linked list.
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

5 years agoUpdate testing matrices for coverage and speed
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

5 years agoMerge branch release-2018
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

5 years agoAllow extensible MDModules and forceProviders.
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

5 years agoDocument clang-tidy libstdc++ incompatibility
Roland Schulz [Wed, 29 Aug 2018 08:30:19 +0000 (01:30 -0700)]
Document clang-tidy libstdc++ incompatibility

Fixes #2627

Change-Id: I424698e22d2c73716fe53ae750bc260e3872a91f

5 years agoRefactor wall potential calculation
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

5 years agoUse more const in hardwaretopology
Roland Schulz [Tue, 28 Aug 2018 21:04:24 +0000 (14:04 -0700)]
Use more const in hardwaretopology

Change-Id: I5b4240c246e3a87f3c85e506645d720960e09933

5 years agoFix clang-tidy build with libstdc++ >= 7
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

5 years agoMove clang-tidy build
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

5 years agoFix more clang-tidy issues
Mark Abraham [Tue, 28 Aug 2018 10:53:42 +0000 (12:53 +0200)]
Fix more clang-tidy issues

Change-Id: I64f138bc2034bbf1cfd734e49db8e88d07139ca9

5 years agoQuiet cmake about clFFT not found after first run
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

5 years agoUpdates to gmx cluster
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

5 years agoAdd hard limit for line length
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

5 years agoFix documentation build without imagemagick
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

5 years agoFix use of nullptr
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

5 years agoPrepare pme-gpu-types.h for OpenCL
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

5 years agoTransfer information from old how-to section
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

5 years agoEnable more clang-tidy checks for new code
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

5 years agoAdd basic operations for gmx::BasicVector<>
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>
5 years agoReplace gmx_hash_t by HashedMap
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

5 years agoMerge "Merge branch release-2018"
Berk Hess [Fri, 24 Aug 2018 15:44:02 +0000 (17:44 +0200)]
Merge "Merge branch release-2018"

5 years agoAdd size optimization to HashedMap
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

5 years agoAdd tests for HashedMap
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

5 years agoFix build without TNG
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

5 years agoMerge branch release-2018
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

5 years agochange some char to string in gmxpreprocess
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

5 years agoUpdate to prepare for 2018.4 point release
Paul Bauer [Tue, 21 Aug 2018 09:09:52 +0000 (11:09 +0200)]
Update to prepare for 2018.4 point release

Change-Id: Id2cd50926f53c6a5ee825dfd9a7dce32e31938d4

5 years agoVersion 2018.3
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

5 years agoFix trjconv when running without a structure file
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

5 years agoFix handling of counter resets
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

5 years agoFix missing interactions with GPU and DD
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

5 years agoFix pdb2gmx -chainsep
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

5 years agoPermit PME on GPUs only for dynamical integrators
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

5 years agoRequest flushing denorms to zero in OpenCL
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

5 years agoEnsure domains are large enough for atom motion
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

5 years agoFixed mdrun segv with QM/MM ONIOM scheme
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

5 years agoRe-implemented mdrun -rerun tests
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

5 years agoFix assertions for SD update
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

5 years agoAdd test for structural similarity measures rmsd and rho.
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

5 years agoRefactor calc_verlet_buffer_size()
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

5 years agoDisable single compilation unit with CUDA 9.0
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

5 years agoRemove compacting from DD redistribute
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

5 years agoFix Verlet buffer estimate with BD
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

5 years agoFix clang namespace comment warning
Berk Hess [Mon, 20 Aug 2018 09:26:57 +0000 (11:26 +0200)]
Fix clang namespace comment warning

Change-Id: Iff3b32562aed431f80c9a3b57a6aeb90f042ef9b

5 years agoFix assertion failure in CG
Berk Hess [Tue, 14 Aug 2018 08:31:24 +0000 (10:31 +0200)]
Fix assertion failure in CG

When the final step coincided with a coordinate output step,
conjugate gradient minimization would exit with an assertion failure
instead of writing confout.gro.

Fixes #2554

Change-Id: I53fffccb5310259132724b83ee452ef01f8ac9c8

5 years agoReally fix CG with multiple domains
Berk Hess [Tue, 14 Aug 2018 08:02:44 +0000 (10:02 +0200)]
Really fix CG with multiple domains

Commit 9232fa9a incorrectly claimed to fix CG with multiple domains.
The change fixes all issues due to the change of the global state
only being available on the master rank.

Note that there is still an issue with writing the final trajectory
frame.

Refs #2554

Change-Id: I1ed3363f722daad9e6aef00d9ded6647acc820f2

5 years agoMake gmx_ga2la_t a proper class
Berk Hess [Thu, 28 Jun 2018 12:22:59 +0000 (14:22 +0200)]
Make gmx_ga2la_t a proper class

Made interface conform as much as possible to std::unordered_map.
This change is only refactoring, apart from adding some assertions.

Note that HashedMap is also intended to replace gmx_hash_t,
after some of the optimizations used there are ported over.

Change-Id: I702296a5bd4988cc1f56fc92df28a7ba5e27c558

5 years agoRemove macros in utility/tests/arrayref
Roland Schulz [Fri, 10 Aug 2018 22:28:12 +0000 (15:28 -0700)]
Remove macros in utility/tests/arrayref

Gave warnings in GCC 8. And were ugly anyhow.

Change-Id: I63ed9c5f46baa5523349cdae4d46ed2253119ca2

5 years agoFix simd-test
Roland Schulz [Sun, 19 Aug 2018 00:56:15 +0000 (17:56 -0700)]
Fix simd-test

Having the data constants as expressions makes it more likely for the
compiler to reorder expressions and thus get results outside of
the tight ulp checks.

Also fix compiler error with GMX_OPENMP_MAX_THREADS=128.

Change-Id: Iacdcb8d4f6536e69bedd5b028d5150e73db0c764

5 years agoAdd check for pull group PBC to grompp
Berk Hess [Wed, 15 Aug 2018 14:45:15 +0000 (16:45 +0200)]
Add check for pull group PBC to grompp

Pull groups that use a reference atom for periodic boundary treatment
should have all their atoms well within half the box size of this
reference. When this is not the case, grompp will now issue a warning.

Refs #2397

Change-Id: Ida7004624a470981d9ce22a1ef921daebad83364

5 years agoreadability-implicit-bool-conversion 2/2
Roland Schulz [Wed, 15 Aug 2018 18:33:02 +0000 (11:33 -0700)]
readability-implicit-bool-conversion 2/2

automatic changes

Change-Id: I05a9c95a129dec179291e875be411b4a8e1d0522

5 years agoreadability-implicit-bool-conversion 1/2
Roland Schulz [Tue, 14 Aug 2018 04:21:09 +0000 (21:21 -0700)]
readability-implicit-bool-conversion 1/2

manual changes

Change-Id: Iad9d6d301b526f79c25e56e7dfdf42144319ed80

5 years agoclang-tidy modernize
Roland Schulz [Wed, 18 Jul 2018 08:21:45 +0000 (01:21 -0700)]
clang-tidy modernize

avoid-bind (no changes)
redundant-void-arg
use-bool-literals

For deprecated-headers the changes are made in the cpp files but the
check isn't enabled. It isn't possible to enable it only for source
files but not header files and some of our headers still need to
compile with a C compiler for the nonbonded kernels. Once those
are removed the check should be enabled.

Change-Id: I7316b9bbffaf8842fecc40327543397984f75f5c

5 years agoclang-tidy: google tests applicable
Roland Schulz [Thu, 2 Aug 2018 02:48:12 +0000 (19:48 -0700)]
clang-tidy: google tests applicable

Change-Id: I32e5dd6226348a162750d272c20c49e116bb94a4

5 years agoEnable clang tidy/warnings for tests
Roland Schulz [Wed, 18 Jul 2018 01:39:01 +0000 (18:39 -0700)]
Enable clang tidy/warnings for tests

Also move check configuration into .clang-tidy file to allow
running clang-tidy seperately from the build to apply automatic
fixes.

Also relaxes some scalar tests. Commit b9057925955f changed contants
and relaxed SIMD tests without also relaxing scalar tests.

Change-Id: Ia895e219502b665db7ca0effaa03af3d3d380256

5 years agoMake pull pbc atom use LocalAtomSet
Berk Hess [Thu, 26 Apr 2018 14:35:20 +0000 (16:35 +0200)]
Make pull pbc atom use LocalAtomSet

Now the pull code only depends on the domain decomposition
through the local atom set and access to a communicator.

Change-Id: I8fad79ce4bd35bd7403e0f6515c66f8c2d253c69

5 years agoImprove GPU detection sanity check error message
Szilárd Páll [Mon, 13 Aug 2018 14:36:38 +0000 (16:36 +0200)]
Improve GPU detection sanity check error message

When the unexpected condition is triggered some extra info on what type
of error has been left behind after a successful detection of a
compatible GPU is now printed to aid with identifying issues.

Refs #2415

Change-Id: I85e0da4c339df8184aa2dec49440ce2d0e83e8bf

5 years agoUpdated links in user guide
Paul Bauer [Tue, 14 Aug 2018 12:49:16 +0000 (14:49 +0200)]
Updated links in user guide

Made sure links in the terminology section of the user guide point
directly to the html reference manual instead of to the pdf version.
Added small part for MD section in terminology woth link to reference
manual.

Refs #2359

Change-Id: Ie21d177c722fcc4b548d8c2d2fa228bff9bce2c8

5 years agoFix int/bool bugs
Roland Schulz [Tue, 14 Aug 2018 04:20:51 +0000 (21:20 -0700)]
Fix int/bool bugs

Change-Id: Id981c28d02ee22ad9a99f22a939887572d78e4b5

5 years agoAdd chainsep and merge tests for pdb2gmx
Joe Jordan [Mon, 16 Jul 2018 16:15:54 +0000 (18:15 +0200)]
Add chainsep and merge tests for pdb2gmx

The chainsep and merge functionality is tested here using only
one ff and water model since these should not affect
how chains are processed. The new pdb file is just
fragment1 with chains and TER records added.

Change-Id: I41a215b53e3a4bace7738c838f426047e6937d57

5 years agoFix enforced rotation energy output
Mark Abraham [Tue, 17 Jul 2018 22:49:51 +0000 (00:49 +0200)]
Fix enforced rotation energy output

Its own per-group energy output files were always OK, but normal edr
and log writing didn't work unless pull groups were also active.

Change-Id: I66d3eb1e14b72766c385a69fd35a750b2338343f

5 years agoFix SIMD anyTrue bug, and add better unit test
Erik Lindahl [Mon, 13 Aug 2018 12:48:26 +0000 (14:48 +0200)]
Fix SIMD anyTrue bug, and add better unit test

The double precision versions could occasionally
miss elements.

Fixes #2588.

Change-Id: Ie033a3af0e5de25205533868062716a83f33df3c

5 years agoRemove BasicVector.as_vec
Roland Schulz [Mon, 13 Aug 2018 00:53:59 +0000 (17:53 -0700)]
Remove BasicVector.as_vec

Change-Id: I84e24ff4fc098b116b874c7f137a6f195d827a48

5 years agoRemove code duplication in trajana/modules/trajectory
Roland Schulz [Mon, 13 Aug 2018 01:27:37 +0000 (18:27 -0700)]
Remove code duplication in trajana/modules/trajectory

Change-Id: If5f48695930c61bbed69932b6cab267fc8ac110c

5 years agoRemove cppcheck
Roland Schulz [Mon, 13 Aug 2018 00:13:16 +0000 (17:13 -0700)]
Remove cppcheck

cppcheck gives false positives with modern C++ constructs. It's
parser isn't very robust. Most of its tests are covered by at
least one of clang-tidy/clang/clang-analyzer/gcc/msvc/msvc-analazer
which all are significantly more robost making the ratio of
false positives to real issues identified not worth it. Additionally
updating cppcheck to the lastest version isn't possible because
it fails with syntax error in gtest.

Change-Id: I290468947c46eb5f4901b7cc30cdf96e487a50cf

5 years agoFix MSD
Roland Schulz [Mon, 13 Aug 2018 05:24:23 +0000 (22:24 -0700)]
Fix MSD

Fixes #2604

Change-Id: Ie0f1bb881d8ba1b5cc363c3645130123245c98a6

5 years ago3/3 of old-style casting
Roland Schulz [Fri, 6 Jul 2018 02:05:20 +0000 (19:05 -0700)]
3/3 of old-style casting

Also remove GMX_CXX11_COMPILATION and gmx_qsort

Change-Id: I3cfec7dfdb47da89d3849ff7e9cc15f0550194a9

5 years agoAdd _real user defined literal
Roland Schulz [Mon, 6 Aug 2018 06:34:40 +0000 (23:34 -0700)]
Add _real user defined literal

Change-Id: Ia656d894db2f663a3b8cfc1f6897f20d97759edc

5 years agoEnable clang-tidy for headers
Roland Schulz [Mon, 30 Jul 2018 22:46:57 +0000 (15:46 -0700)]
Enable clang-tidy for headers

Change-Id: Id5acfb264ac57c09cc1a7d8ab512eb7c6bfc40f1

5 years agoAvoid using global variables in programs
Roland Schulz [Fri, 12 Jan 2018 08:46:35 +0000 (00:46 -0800)]
Avoid using global variables in programs

Using global variables defined in libgromacs and
used from outside causes issues if only lazy
binding is available.

Change-Id: Id1e960d7c638476d3f7ace339a327040f516f6fc

5 years agoAdded physical validation document to the dev manual.
Kevin Boyd [Thu, 9 Aug 2018 00:33:14 +0000 (20:33 -0400)]
Added physical validation document to the dev manual.

physical_validation.rst had been written but not added to the
document generation

Unwrapped a few lines that were causing warnings

Change-Id: I99ade0d25ae3897f01a6ac57d4369c2a4e36f61b

5 years agoRemove Debug Helpers from Essential Dynamics code.
Christian Blau [Thu, 9 Aug 2018 08:40:51 +0000 (10:40 +0200)]
Remove Debug Helpers from Essential Dynamics code.

dump_edi_positions, dump_edi_eigenvecs, and dump_edi rely on the data
layout of the essential dynamics code and leave a large foot-print of
changes when refactoring the code.

All information dumped is reasonably accessible with a modern debugger,
also on

Part of #2590

Change-Id: Icbd60a3347014df365aa17d47bcbbb18c2566a83

5 years agoLocal atom sets in rotational pulling.
Christian Blau [Mon, 6 Aug 2018 21:00:32 +0000 (23:00 +0200)]
Local atom sets in rotational pulling.

Uncouples domain decomposition from rotational pulling by the use of
local atom set.

Change-Id: Ide8de70033a4e8d8f4e8c7eb66a554e0d3316654

5 years ago2/3 of old-style casting
Roland Schulz [Mon, 2 Jul 2018 18:29:58 +0000 (11:29 -0700)]
2/3 of old-style casting

Manual changes.

Change-Id: I5a9d1ab65498f70539dd1f28bb538781dd1021f8

5 years agoEnable ccache compiler wrapper when available.
M. Eric Irrgang [Mon, 30 Jul 2018 10:46:38 +0000 (13:46 +0300)]
Enable ccache compiler wrapper when available.

Let CMake use ccache compiler wrapper via `..._LAUNCHER`.

For gcc and compatible compilers, the cost of rebuilding can be greatly
reduced when switching back and forth between branches. If ccache is not
installed or is not given a known-compatible compiler to wrap, this
change has no effect.

Potential side effects should already be familiar to ccache users:

* In some cases, a cache configured to grow too large may lose its benefit.
* If the cache is corrupted, it may need to be removed to restore utility.

We are not using any of the more aggressive caching options, so there
should be no risk of false positives in compile cache hits.

Resolves #2592

Change-Id: Ia04d7388a3e8367d31cc5728dfc4b245ea7ef774

5 years agoEssential dynamics functions use const-ref for input t_edpar.
Christian Blau [Wed, 8 Aug 2018 12:31:48 +0000 (14:31 +0200)]
Essential dynamics functions use const-ref for input t_edpar.

Made function calls to t_edpar carrying input parameters use const &, so
that we can later use a const parameter storage class.

Added documentation and trivial modernisation to functions and moved
them into anonymous namespace.

Part of #2590

Change-Id: I1910f45c3695ce6b1c234f67bd3ecaa279541e26

5 years agoSplit essential dynamics eigenvector reading.
Christian Blau [Mon, 6 Aug 2018 06:46:12 +0000 (08:46 +0200)]
Split essential dynamics eigenvector reading.

Split off input parameter reading in all t_eigvec from working memory
allocation for buffers or simulation state variables. Preparation to
splitting t_eigvec and t_edflood data structures in constant input
data, temporary buffers, and data describing the simulation state.

Moved the initialReferencePosition and referenceSlope out of t_eigvec
into t_edflood, because it is only used in flooding and is meaningless
for all other data structures using t_eigvec.

Part of #2590

Change-Id: Id01aeca97489a02a6ed7c7ed2789fd11b978a115

5 years agoMake essential dynamics a C++ type.
Christian Blau [Mon, 6 Aug 2018 15:18:02 +0000 (17:18 +0200)]
Make essential dynamics a C++ type.

Confer also the reform of the rotational pull data, Ic03919f68c, for the
conversion strategy for gmx_edsam.

Part of #2590

Change-Id: Iece42512a8c5222d86ab8545ce2fc12aa1c6ffc7

5 years agoFix part of old-style casting
Roland Schulz [Mon, 2 Jul 2018 04:58:10 +0000 (21:58 -0700)]
Fix part of old-style casting

Part clang-tidy google-readability-casting is able to do.
Manual fixes in:
fileio/vmdio.cpp
gmxlib/nonbonded/nonbonded.cpp
selection/sm_same.cpp
gmxana/gmx_anadock.cpp
gmxana/gmx_cluster.cpp

Change-Id: Iad15ea205ac56b29f8ecaea6556fabedec975736

5 years agoRemove gmx custom fixed int (e.g. gmx_int64_t) types
Roland Schulz [Mon, 16 Jul 2018 16:35:11 +0000 (09:35 -0700)]
Remove gmx custom fixed int (e.g. gmx_int64_t) types

Change-Id: I20b6681f55c06e535524923351c9919ec4c7ffa3

5 years agoAdd some developer help to Developer Guide.
M. Eric Irrgang [Thu, 2 Aug 2018 11:55:38 +0000 (14:55 +0300)]
Add some developer help to Developer Guide.

Import helpful stuff from old web site.

Change-Id: I9ae4e872a8de014e9ddd3afed47067e9f7aac405

5 years agoRemove duplicate entry for Doxygen from dev manual
Paul Bauer [Mon, 6 Aug 2018 07:45:06 +0000 (09:45 +0200)]
Remove duplicate entry for Doxygen from dev manual

The page for doxygen was added twice to the developer manual, as it was
included both in the style guidelines and under development tools.
Removed the entry in the style section, as I think that the information
is better situated in the tools section.

Change-Id: Ie8f802b6981e7fdb53d04002e05563f092bc8047