Paul Bauer [Tue, 24 Nov 2020 15:58:43 +0000 (16:58 +0100)]
Merge branch 'origin/release-2021' into merge-2021-into-master
Resolved Conflicts:
cmake/gmxVersionInfo.cmake
docs/release-notes/index.rst
src/gromacs/mdlib/CMakeLists.txt
src/gromacs/mdrun/md.cpp
Paul Bauer [Tue, 24 Nov 2020 13:38:39 +0000 (14:38 +0100)]
Merge branch 'origin/release-2020' into merge-2020-into-2021
Resolved Conflicts:
admin/containers/scripted_gmx_docker_builds.py
docs/conf.cmakein.py
docs/dev-manual/change-management.rst
docs/dev-manual/contribute.rst
docs/dev-manual/releng/index.rst
docs/dev-manual/tools.rst
docs/install-guide/index.rst
docs/reference-manual/preface.rst
docs/release-notes/index.rst
scripts/GMXRC.bash.cmakein
src/gromacs/gmxana/gmx_covar.cpp
src/gromacs/gmxana/gmx_do_dssp.cpp
src/gromacs/gmxana/gmx_h2order.cpp
src/gromacs/gmxana/nsfactor.cpp
src/gromacs/hardware/detecthardware.cpp
src/gromacs/mdlib/coupling.cpp
src/gromacs/mdrun/md.cpp
src/gromacs/mdtypes/state.h
src/gromacs/trajectoryanalysis/modules/pairdist.cpp
src/gromacs/utility/basedefinitions.h
Paul Bauer [Tue, 24 Nov 2020 10:22:47 +0000 (11:22 +0100)]
Fix gmx h2order -d option
The code to implement this was never added.
Fixes #3820
Erik Lindahl [Tue, 24 Nov 2020 08:23:37 +0000 (08:23 +0000)]
Make sure frexp() returns correct for argument 0.0
Previous functions in gromacs have never called frexp
with argument 0.0, but cbrt() needs this. This will not
have caused any bugs, but since it results in FP
exceptions in debug builds we want to have it fixed
so our unit tests work.
This change adds the correct behavior for all x86
SIMD instruction sets, and it has also been tested
on all of them in both single and double, with the
exception for MIC (which should be correct, but we
cannot test it).
The ARM SIMD flavors have not yet been fixed yet
since the ARM build fails due to an apparent nblib
error. Once that is fixed, I will add it in a separate
change and close the issue.
Refs #3773.
Artem Zhmurov [Tue, 24 Nov 2020 08:02:48 +0000 (08:02 +0000)]
Improve handling of CUDA API errors
Consolidate the construction of the printed error message in one
place and make sure that the CUDA API information on error is
printed when the error is detected.
Paul Bauer [Mon, 23 Nov 2020 20:51:28 +0000 (20:51 +0000)]
Fixes for Intel and container build fixes
Generalizes the TSAN build stage to a compiler build stage, and uses
it for containing the installation process for the free Intel tools
Fixed or worked around several bugs
Updated install guide section on tested platforms to describe
what we actually do
Refs #3459, #3620
Change-Id: I28e4b816923395edead9d425cec5d85581e22b5e
Magnus Lundborg [Mon, 23 Nov 2020 06:55:13 +0000 (07:55 +0100)]
Properly check if there are perturbed constraints or masses
Instead of just checking, when running updates on GPU, if
there are lambda states that involve constraints or masses
(e.g. if using fep-lambdas) check if any constraints or masses
are actually perturbed.
Artem Zhmurov [Tue, 17 Nov 2020 14:22:41 +0000 (17:22 +0300)]
Make corresponding device active before each TestDevice is created
When populating the list of GPU devices for tests, the DeviceContext and
DeviceStream objects are created for each TestDevice. In CUDA, the
active device has to be explicitly set by the API since the DeviceStream
is created for the active device. Otherwise, all the streams are created
for the first device. When these streams are later used for the devices
other than first, CUDA API returns an invalid argument error. The bug only
affects unit tests in CUDA builds for systems with more than one GPU.
Does not affect OpenCL/SYCL builds, because they use DeviceContext to
attach the device to the stream (queue).
Fixes #3781, #3782 and #3805.
M. Eric Irrgang [Thu, 29 Oct 2020 21:07:19 +0000 (22:07 +0100)]
Look for the various possible names of the gromacs package.
Refs #3777
Artem Zhmurov [Fri, 6 Nov 2020 07:14:13 +0000 (10:14 +0300)]
Separate VV first and second steps from MD loop
This combines code blocks that are only active for VV
integrators, and moves them into a separate source file.
Makes logic in the do_md(..) more clear and prepares for
the removal of VV from the legacy integrator.
Artem Zhmurov [Mon, 23 Nov 2020 13:52:57 +0000 (16:52 +0300)]
Remove coolquote that sounds offensive without context
Christoph Junghans [Sun, 22 Nov 2020 22:50:59 +0000 (22:50 +0000)]
cmake: add trxio.h to legacy api interface
Paul Bauer [Fri, 20 Nov 2020 15:20:49 +0000 (16:20 +0100)]
Fix missing copyright changes
Was overlooked during previous changes.
Refs #3288
M. Eric Irrgang [Fri, 20 Nov 2020 14:47:10 +0000 (14:47 +0000)]
Create CMake targets for each of the modules.
Establish a template for further work towards using
CMake to manage module dependencies through targets
and the include directories they provide.
There should be no significant behavioral differences.
Actual relocation of the headers is deferred.
Refs #3288
M. Eric Irrgang [Wed, 18 Nov 2020 16:58:03 +0000 (16:58 +0000)]
Replace gmxapi `erroroutput` with `stderr` and `stdout`
Artem Zhmurov [Tue, 17 Nov 2020 18:42:48 +0000 (18:42 +0000)]
Use lambdas to get the list of PBC names from the map of PBCs in constraints tests
Extracting the names directly from the map allows to avoid repeating
and matching the names when the list is created to when the parametrized
test is called.
M. Eric Irrgang [Tue, 17 Nov 2020 16:53:02 +0000 (16:53 +0000)]
Separate the testutils module.
Create `testutils` target and separate public/private headers.
Remove `src/` from global build tree include path.
Apply some tidying demanded by clang-tidy.
Ref #3288
Joe Jordan [Tue, 17 Nov 2020 13:53:46 +0000 (13:53 +0000)]
Remove some extraneous compiler flags from nblib
Closes #3798
M. Eric Irrgang [Mon, 16 Nov 2020 12:16:16 +0000 (15:16 +0300)]
gmxapi versioning updates.
Begin development for gmxapi 0.3
M. Eric Irrgang [Fri, 13 Nov 2020 11:37:55 +0000 (14:37 +0300)]
Be more explicit about build-tree-only dependencies.
Use the BUILD_INTERFACE CMake generator expression to improve
self-documentation and to prevent build-tree-only dependencies from
propagating to exported targets. When libgromacs is a STATIC target,
even private dependencies can affect the exported target through
transitive usage requirements (e.g. compiler/linker flags). However,
we currently only use the `common` and `legacy_modules` targets for
build time header paths.
Ref #3288
Gilles Gouaillardet [Fri, 13 Nov 2020 09:14:37 +0000 (09:14 +0000)]
Detect ARM SVE Vector length if possible
arm_sve: unless the SVE vector length is explicitly set via the
GMX_SIMD_ARM_SVE_LENGTH macro, detect the default vector length
and aborts if it cannot be found.
Thanks Olly Perks for the pointer.
M. Eric Irrgang [Fri, 13 Nov 2020 07:39:20 +0000 (07:39 +0000)]
Provide a catch-all target for library modules.
Prepare to remove `src/` from global build tree include path.
Existing module headers are accessible through the new `legacy_modules`
target.
Ref #3288
Paul Bauer [Thu, 12 Nov 2020 10:45:27 +0000 (11:45 +0100)]
Fix thread mpi linking for mdrun only build
The linking would fail because the library include directory was not
added properly.
Fixes #3807
M. Eric Irrgang [Thu, 12 Nov 2020 13:13:20 +0000 (13:13 +0000)]
Provide common library headers through new CMake target.
Prepare to remove `src/` from global build tree include path.
Create `src/include` and `common` target for library-level headers.
Ref #3288
Paul Bauer [Thu, 12 Nov 2020 08:56:08 +0000 (09:56 +0100)]
Restore correct dynamics linking behaviour
Recent changes to the way shared libraries are managed introduced a bug
in setting up static linking by default when building mdrun only.
Fixes #3806
Paul Bauer [Wed, 11 Nov 2020 14:36:20 +0000 (15:36 +0100)]
Fix gmx do_dssp CHARMM support
The tool would not work correctly due to issues with detecting some
oxygen molecules.
Fixes #3568
Szilárd Páll [Wed, 11 Nov 2020 14:28:14 +0000 (14:28 +0000)]
Fix gcc 9 "warning: ‘unused’ attribute ignored"
gcc 9 seems to not like the unused because it would never warn anyway
about members, but clang does require it.
Paul Bauer [Wed, 11 Nov 2020 13:56:29 +0000 (13:56 +0000)]
Fix segmentation fault in gmx pairdist
When using the pairdist tool with a coordinate in space as selection,
the tool would overwrite the selection group of the selection by default
to implement reference grouping. This would change the selection type of
the coordinate from INDEX_UNKNOWN to INDEX_ALL by default (or to any
other user supplied reference grouping). The change of the selection
type would then later cause a segmentation fault, as the underlying
machinery would try to access the non-existing atoms belonging to the
selection.
This changes the mechanism to no longer overwrite the selection group
type if the current one is INDEX_UNKNOWN.
Introduces test case with command line selection that would crash
without the fix.
Fixes #3762
Andrey Alekseenko [Wed, 11 Nov 2020 12:36:21 +0000 (12:36 +0000)]
Make eelType and evdwType scoped enums, + cleanup
- Make enums eelType and evdwType scoped, explicitly type relevant arguments.
- Remove code duplication between OpenCL and CUDA related to choosing the proper value of these enums.
- Remove declarations of two never defined functions from `src/gromacs/nbnxm/nbnxm.h`.
- Add names for ljcr (LJ comb. rules) enum values.
Paul Bauer [Wed, 11 Nov 2020 10:30:50 +0000 (10:30 +0000)]
Second GROMACS 2021 beta release
Feature freeze for 2021 branch.
Berk Hess [Wed, 11 Nov 2020 07:42:53 +0000 (08:42 +0100)]
Update gmx msd documentation
Removed comment on weighted fitting for determining the diffusion
coefficients. This weighting had been removed at some point, but
the documentation had not been updated.
Andrey Alekseenko [Tue, 10 Nov 2020 15:21:45 +0000 (16:21 +0100)]
Fix "GMX_CUDA|OCL_NB_EWALD_TWINCUT is disabling twin cut-off"
Paul Bauer [Tue, 10 Nov 2020 16:45:03 +0000 (17:45 +0100)]
Disable failing NB-LIB listed forces tests
Tests are not stable enough to be run in all configurations and need
some more digging into for a proper solution.
Refs #3795
kanduri [Tue, 10 Nov 2020 16:54:53 +0000 (16:54 +0000)]
NBLIB: Fix build warning from uninitialized array
Szilárd Páll [Tue, 10 Nov 2020 12:33:23 +0000 (12:33 +0000)]
GPU codepath cycle counting fixes
* eliminated double-counting in bonded module initialization
* moved the bonded kernel launch counting into the gpuBoned module
* avoid counting ~0 CPU update work on the GPU path by conditionally
starting the ewcUPDATE counter
* also added some minimal improvements to the wallcycle debugging
tooling which should facilitate finding invalid nesting and missing
stop calls.
Refs #3764
Mark Abraham [Mon, 9 Nov 2020 15:16:01 +0000 (16:16 +0100)]
Add move operations to GpuHaloExchange
This avoids needing to put the objects in a unique_ptr to put them in
a container. Also made a collection of them use std::array for
clarity.
Berk Hess [Mon, 9 Nov 2020 20:37:31 +0000 (21:37 +0100)]
Fix dHdl and foreign energy clearing at checkpointing
The code copying dH/dl and foreign lambda energies to the checkpoint
data structures copied the wrong way around leading to zero values
being written to energy file for steps in between the last energy
frame and the checkpoint.
Fixes #3763
Pascal Merz [Tue, 10 Nov 2020 03:01:39 +0000 (20:01 -0700)]
Fix MTTK constant energy bugs
Fixes #3796
This also fixes an unclear comment relating to the barostat
Nose-Hoover chain variables in t_state.
Andrey Alekseenko [Mon, 9 Nov 2020 17:57:21 +0000 (17:57 +0000)]
Add SYCL implementation of LeapFrogGpu
An implementation of LeapFrogGpu integrator using SYCL. Also, some additions to SYCL's DeviceBuffer.
Code pretty much follows CUDA version.
For float3, I had to use gmx::RVec instead of SYCL's built-in cl::sycl::float3, since latter is 16 bytes.
Joe Jordan [Mon, 9 Nov 2020 14:55:16 +0000 (14:55 +0000)]
Add backend for nblib listed forces API
This adds the back-end for the nblib API defined in
listed_forces/bondtypes.h and listed_forces/definitions.h.
Additionally, header and source are added for the private
implementations of these files. These are implementation details,
and are not visible to or interactable with by the user, so they
are not part of the public API. This backend is a ground up refactoring
of gromacs, copying the force and energy kernels but rewriting the disipatch.
There are tests that compare forces and energies to gromacs.
Each function in this commit has at least one test for correctness,
though in most cases there are many more since the functionality is
cumulative. All of this functionality has undergone extensive design
review and code review already, so it should not be necessary to go
through the whole change with a fine-tooth comb. Suggestions on how
implementations could be improved are welcome. However, they will
likely need to be addressed as follow-up issues unless they are
trivial to fix.
Paul Bauer [Mon, 9 Nov 2020 12:38:18 +0000 (12:38 +0000)]
Use images from GitLab docker repository
Docker is reducing the maximum number of pulls from their storage, and
we are already now hitting the limit with heavy CI activity.
Now uses images from GitLab Docker Repository instead.
Fixes #3788
Andrey Alekseenko [Mon, 9 Nov 2020 11:30:10 +0000 (11:30 +0000)]
Fix intemittent MdrunIOTests segfault
In Modular Simulator, we wish to have two copies of
ComputeGlobalsElement<ComputeGlobalsAlgorithm::VelocityVerlet>. To avoid
making two separate objects, a `static thread_local` singleton was
introduced. However, it caused issues when the ModularSimulator was
built repeatedly in the same process, due to stale pointer persisting in
a static variable.
This commit adds a key-value storage to
ModularSimulatorAlgorithmBuilderHelper, and makes ComputeGlobalsElement
use it instead of static variables. This ensures proper lifetime of
cached pointers and can be used by other Elements for similar goals.
Closes #3791
Artem Zhmurov [Mon, 9 Nov 2020 06:20:17 +0000 (09:20 +0300)]
Remove source file that is no longer in use
All CUDA data transfer calls now use the same wrappers, the
NBNXM-specific wrapers can be removed.
Szilárd Páll [Mon, 9 Nov 2020 10:33:38 +0000 (10:33 +0000)]
Fix cycle counting in StatePropagatorDataGpu
Double-counting resulted in broken/truncated performance acounting
table.
Fixes #3764
Berk Hess [Mon, 9 Nov 2020 10:10:29 +0000 (10:10 +0000)]
Move implementation to cpp file
Fixes issue with missing GMX_ASSERT as well.
Alan Gray [Mon, 9 Nov 2020 09:48:34 +0000 (09:48 +0000)]
Use dynamically allocated unique pointers for GPU halo tests
The tests were intermittently failing in the enqueuing of a remote
GPU's event to a local GPU's stream because the remote object
(allocated on the stack in the innermost loop) was already destroyed (due
to the asynchronicity of the operation). This change allows the objects
to persist, and is the same way we already do it in the main code.
Fixes intermittent failures appearing in !773 and eleswhere.
M. Eric Irrgang [Thu, 29 Oct 2020 20:48:06 +0000 (21:48 +0100)]
Help clients find dependencies of imported CMake targets.
Refs #3776
Andrey Alekseenko [Fri, 6 Nov 2020 12:19:56 +0000 (13:19 +0100)]
Suggest environment variable to limit visible SYCL devices
As with OpenCL, there is no portable way to do it, so we suggest the
currently working Intel option.
Artem Zhmurov [Fri, 6 Nov 2020 07:26:26 +0000 (10:26 +0300)]
Fix doxygen comments formattig in update.h
Andrey Alekseenko [Thu, 22 Oct 2020 14:33:58 +0000 (16:33 +0200)]
Slightly refactor AmdZen1 detection code
Paul Bauer [Thu, 5 Nov 2020 16:18:24 +0000 (16:18 +0000)]
Allow pdb2gmx to handle cyclic molecules
This has been a long outstanding issue with the code not being able to
do this.
Cyclic molecules are detected by checking if chain ends are within bonding
distance from each other. This does not detect cyclic molecules over PBC
boundaries.
Initial patch proposed by Boris Timofeev.
Resolves #3571
Change-Id: Ic25e46a12fef5fb46748dc0497f469b5834d4886
Paul Bauer [Thu, 5 Nov 2020 11:35:58 +0000 (12:35 +0100)]
Allow CUDA build tests to succeed without GPU
Added early return to haloexchange GPU pathway test to not try to run
the tests without a GPU (i.e. device list is empty).
Refs #3789
Paul Bauer [Thu, 5 Nov 2020 10:53:20 +0000 (11:53 +0100)]
Merge branch 'origin/release-2021' into merge-2021-into-master
Resolved Conflicts:
src/gromacs/gmxpreprocess/readir.cpp
admin/gitlab/archive.gitlab-ci-yml
Mark Abraham [Thu, 5 Nov 2020 09:10:34 +0000 (10:10 +0100)]
Stop showing wrong README on GitHub front page
Paul Bauer [Thu, 5 Nov 2020 10:27:15 +0000 (10:27 +0000)]
Limit parallelism in Github CI
Remove the -j option from CTest, avoiding issues with trying to run the
test binaries in parallel.
Set environment variable so that the build knows it is under CI, and
limits the number of thread-MPI and if needed OpenMP threads.
Activate regressiontest testing.
Berk Hess [Thu, 5 Nov 2020 09:57:25 +0000 (09:57 +0000)]
Disable MTS with SD integrator
The SD integrator requires different damping coefficients for
the different MTS forces and we currently don't have the different
MTS forces available separately in the integrator.
Fixes #3775
Magnus Lundborg [Tue, 3 Nov 2020 20:35:14 +0000 (21:35 +0100)]
Set pbcatom_input in order to pass later checks
pbcatom_input was not set. This meant that pbcatom checks in
set_pull_init() failed for large pull groups.
Fixes: #3786
Berk Hess [Wed, 4 Nov 2020 19:31:12 +0000 (20:31 +0100)]
Copy position restraint parameters with MTS
Fixes #3784
Mark Abraham [Thu, 5 Nov 2020 08:00:48 +0000 (08:00 +0000)]
Improve issues with CUDA interacting with std flags
GCC 7 needs a work-around just like older CUDA does.
Removed unnecessary use of C++17 features in compat/pointers.h as we
do in other parts of the code while CUDA compilation must be within
C++14.
Refs #3608
Fixes #3783, #3780
Alan Gray [Wed, 4 Nov 2020 18:56:03 +0000 (18:56 +0000)]
Allow GPU update without GPU DD
Mark Abraham [Wed, 4 Nov 2020 15:40:32 +0000 (16:40 +0100)]
Fix use of config.h in halo exchange tests
Mark Abraham [Wed, 4 Nov 2020 14:16:50 +0000 (14:16 +0000)]
Remove logging from hardware detection
This should be deferred to separate responsibilities, in particular
so that hardware detection can run before logging functionality
is available. Subsequent logging of the results restores the value
to the user from understanding what mdrun could see about their
hardware.
Refs #3650, #3768
Joe Jordan [Wed, 4 Nov 2020 13:28:54 +0000 (13:28 +0000)]
NBLIB listed forces API update
- added a listed forces calculator for the user-facing API
- expanded documentation
- reduced boilerplate
- addressed review comments
M. Eric Irrgang [Wed, 4 Nov 2020 08:03:33 +0000 (08:03 +0000)]
Establish `api/` as the home for installed headers.
Prepare to remove `src/` from global build tree include path.
* Create `api/legacy` for the new `legacy_api` target.
* Move gmxapi and nblib public header dependencies to `api/legacy`.
This change is orthogonal to the clarification of the public API.
The purpose is to normalize the way we manage installed headers.
gmxapi and nblib already provide their public interfaces through files
and CMake targets in `api/`. For the remaining installed libgromacs
headers, the `legacy_api` target provides a transitional home as the
modules are individually updated in terms of CMake machinery and as the
legacy API functionality is reexamined.
Refs #3288
Alan Gray [Tue, 3 Nov 2020 14:01:51 +0000 (14:01 +0000)]
Add more halo exchange unit test variations
Addition of several 1D and 2D variations with different pulse configs.
Follow up will extend to 3D.
Szilárd Páll [Tue, 3 Nov 2020 12:47:16 +0000 (12:47 +0000)]
Add missing wallcycle_stop
On the GPU update path the Update CPU counter was started and not
correctly stopped.
Refs #3764
Alan Gray [Tue, 3 Nov 2020 12:12:57 +0000 (12:12 +0000)]
Extend halo exchange unit test to GPU codepath
Test will additionally re-perform halo exchange on GPU codepath (for
CUDA thread-MPI builds).
Gilles Gouaillardet [Tue, 3 Nov 2020 11:23:27 +0000 (11:23 +0000)]
timing: try to directly retrieve gmx_cycles_calibrate() from the hardware
The timer period can be directly retrieved from the hardware on ARMv8
and recent x86_64 platforms.
Try this first, and fall back on the current guessestimate on older x86_64 platforms
Magnus Lundborg [Mon, 2 Nov 2020 15:53:15 +0000 (16:53 +0100)]
Remove TODO regarding AWH cover threshold along lambda axis.
The 1.0 factor should be OK for a FEP lambda axis. It should be OK
in theory and tests show it works.
Change-Id: Iafe39ab0663ec227e96e40f1b2073818610e93ae
Closes: #3634
Artem Zhmurov [Tue, 3 Nov 2020 07:43:32 +0000 (07:43 +0000)]
Make the message why GPU bondeds are not available more clear
Closes #3728
Paul Bauer [Fri, 30 Oct 2020 18:15:17 +0000 (19:15 +0100)]
Add Clang CUDA build to CI
Runs tests during post-merge acceptance, but compiled for all merge
requests.
ejjordan [Mon, 2 Nov 2020 11:05:11 +0000 (12:05 +0100)]
Update to nblib non-bonded backend
* added more documentation
* more consistent naming
* cleaner, more consistent interfaces
* add more checks
* expand test coverage
* fix bugs
Andrey Alekseenko [Thu, 29 Oct 2020 18:21:16 +0000 (19:21 +0100)]
Rework handling of PATH-like variables in GMXRC.bash/zsh
Old version was not robust to various kinds of trailing colons, as
experienced in, e.g., #3219.
To make it all safer, a single function, that removes the
old path and adds the new one to the beginning, is introduced.
Tested with:
- GNU bash 4.4.20
- GNU bash 5.0.17
- zsh 5.8
- dash 0.5.8
```
$ replace_in_path ":" "/new" "/old"
/new:
$ replace_in_path "" "/new" "/old"
/new
$ replace_in_path "/old" "/new" "/old"
/new
$ replace_in_path "/old:" "/new" "/old"
/new:
$ replace_in_path "/old:/other" "/new" "/old"
/new:/other
$ replace_in_path ":/other" "/new" "/old"
/new::/other
$ replace_in_path "/other:" "/new" "/old"
/new:/other:
$ replace_in_path "/other:/old" "/new" "/old"
/new:/other
```
Full test:
```
$ bash -c 'MANPATH=''; . scripts/GMXRC.bash; echo $MANPATH;'
/usr/local/gromacs/share/man
$ bash -c 'MANPATH=':'; . scripts/GMXRC.bash; echo $MANPATH;'
/usr/local/gromacs/share/man:
$ bash -c 'MANPATH='/abc'; . scripts/GMXRC.bash; echo $MANPATH;'
/usr/local/gromacs/share/man:/abc
$ bash -c 'MANPATH='/abc:'; . scripts/GMXRC.bash; echo $MANPATH;'
/usr/local/gromacs/share/man:/abc:
$ bash -c 'MANPATH=':'; . scripts/GMXRC.bash; . scripts/GMXRC.bash; . scripts/GMXRC.bash; echo $MANPATH;'
/usr/local/gromacs/share/man:
$ bash -c 'MANPATH=''; . scripts/GMXRC.bash; . scripts/GMXRC.bash; . scripts/GMXRC.bash; echo $MANPATH;'
/usr/local/gromacs/share/man
$ bash -c 'MANPATH='/abc'; . scripts/GMXRC.bash; . scripts/GMXRC.bash; . scripts/GMXRC.bash; echo $MANPATH;'
/usr/local/gromacs/share/man:/abc
$ bash -c 'MANPATH='/abc:'; . scripts/GMXRC.bash; . scripts/GMXRC.bash; . scripts/GMXRC.bash; echo $MANPATH;'
/usr/local/gromacs/share/man:/abc:
```
Closes #2628, #3219
M. Eric Irrgang [Thu, 29 Oct 2020 20:48:06 +0000 (21:48 +0100)]
Remove an unnecessary transitive dependency of imported CMake target.
Refs #3777
Paul Bauer [Fri, 30 Oct 2020 17:26:33 +0000 (17:26 +0000)]
Fix unused variable warnings
Paul Bauer [Fri, 30 Oct 2020 12:58:59 +0000 (13:58 +0100)]
Add missing fix for Clang CUDA
Was missing from the previous list of fixes (don't know how that
happened).
Paul Bauer [Fri, 30 Oct 2020 12:38:29 +0000 (12:38 +0000)]
Fix build issues with Clang CUDA
Fixed missing changes in CMake property name
Apply properties correctly for test library.
Fix wrongly attributed gpu_utils test file.
Joe Jordan [Fri, 30 Oct 2020 11:36:34 +0000 (11:36 +0000)]
Introduce nblib versioning
Andrey Alekseenko [Thu, 29 Oct 2020 18:21:16 +0000 (19:21 +0100)]
Rework handling of PATH-like variables in GMXRC.bash/zsh
Old version was not robust to various kinds of trailing colons, as
exerienced in, e.g., #3219.
To make it all safer, a single function, that removes the
old path and adds the new one to the beginning, is introduced.
Tested with:
- GNU bash 4.4.20
- GNU bash 5.0.17
- zsh 5.8
- dash 0.5.8
```
$ replace_in_path ":" "/new" "/old"
/new:
$ replace_in_path "" "/new" "/old"
/new
$ replace_in_path "/old" "/new" "/old"
/new
$ replace_in_path "/old:" "/new" "/old"
/new:
$ replace_in_path "/old:/other" "/new" "/old"
/new:/other
$ replace_in_path ":/other" "/new" "/old"
/new::/other
$ replace_in_path "/other:" "/new" "/old"
/new:/other:
$ replace_in_path "/other:/old" "/new" "/old"
/new:/other
```
Full test:
```
$ bash -c 'MANPATH=''; . scripts/GMXRC.bash; echo $MANPATH;'
/usr/local/gromacs/share/man
$ bash -c 'MANPATH=':'; . scripts/GMXRC.bash; echo $MANPATH;'
/usr/local/gromacs/share/man:
$ bash -c 'MANPATH='/abc'; . scripts/GMXRC.bash; echo $MANPATH;'
/usr/local/gromacs/share/man:/abc
$ bash -c 'MANPATH='/abc:'; . scripts/GMXRC.bash; echo $MANPATH;'
/usr/local/gromacs/share/man:/abc:
$ bash -c 'MANPATH=':'; . scripts/GMXRC.bash; . scripts/GMXRC.bash; . scripts/GMXRC.bash; echo $MANPATH;'
/usr/local/gromacs/share/man:
$ bash -c 'MANPATH=''; . scripts/GMXRC.bash; . scripts/GMXRC.bash; . scripts/GMXRC.bash; echo $MANPATH;'
/usr/local/gromacs/share/man
$ bash -c 'MANPATH='/abc'; . scripts/GMXRC.bash; . scripts/GMXRC.bash; . scripts/GMXRC.bash; echo $MANPATH;'
/usr/local/gromacs/share/man:/abc
$ bash -c 'MANPATH='/abc:'; . scripts/GMXRC.bash; . scripts/GMXRC.bash; . scripts/GMXRC.bash; echo $MANPATH;'
/usr/local/gromacs/share/man:/abc:
```
Closes #2628, #3219
Szilárd Páll [Tue, 27 Oct 2020 10:49:58 +0000 (11:49 +0100)]
Clang format
Szilárd Páll [Tue, 27 Oct 2020 10:49:24 +0000 (11:49 +0100)]
Add fvec doxygen
Szilárd Páll [Thu, 6 Feb 2020 23:40:12 +0000 (00:40 +0100)]
Fix AMD OpenCL float3 array optimization bug
Because float3 by OpenCL spec is 16-byte, when used as an array type
the allocation needs to optimized to avoid unnecessary register use.
The nbnxm kernels use a float3 i-force accumulator array in registers.
Starting with ROCm 2.3 the AMD OpenCL compiler regressed and lost
its ability to effectively optimize code that uses float3 register
arrays. The large amount of extra registers used limits the kernel
occupancy and significantly impacts performance.
Only the AMD platform is affected, other vendors' compilers are able to
do the necessary transformations to avoid the extra register use.
This change converts the float3 array to a float[3] saving 8*4 bytes
register space. This improves nonbonded kernel performance
on an AMD Vega GPU by 25% and 40% for the most common flavor of the
Ewald and RF force-only kernels, respectively.
Note that eliminating the rest of the non-array use of float3 has no
significant impact.
Paul Bauer [Thu, 29 Oct 2020 16:47:33 +0000 (17:47 +0100)]
Fix CUDA code issues
Remove unused template.
Fix variable initialization order and remove obsolete variable.
Fix missing newline.
Andrey Alekseenko [Thu, 29 Oct 2020 13:25:44 +0000 (13:25 +0000)]
Narrow-down Intel-specific #ifdef's
Some of the things hidden by `#ifdef __INTEL_COMPILER` does not seem to be relevant as of 2021.1-beta09/10 (ICC 2021.1 Beta
20200827).
Also, was getting a false-positive "warning: result of comparison of 0-bit unsigned value != 0 is always false" for line `if (grid_base[g_baseNR - 1] % 4 != 0)`. Replaced it with `static_assert`, because why not.
Paul Bauer [Thu, 29 Oct 2020 09:29:05 +0000 (10:29 +0100)]
Default initialize pull datastructures
Avoids warnings with gcc-9 about potential use of uninitialized
variables.
Fixes #3772
Andrey Alekseenko [Wed, 28 Oct 2020 12:34:20 +0000 (13:34 +0100)]
Make dispatchTemplatedFunction compatible with MSVC
MR !730 introduced a new function, dispatchTemplatedFunction, which
broke build with MSVC 19.27. Looks like a compiler problem, but the fix
is easy enough (and, arguably, makes the code a bit easier to read).
Berk Hess [Wed, 28 Oct 2020 10:47:49 +0000 (10:47 +0000)]
Correct AWH initial histogram size
The initial histogram size for AWH incorrectly contained
a Gaussian geometry factor and also treated higher dimensional
cases incorrectly. The formula has now been simplified and
described more accurately in the manual.
Fixes #3751
Gilles Gouaillardet [Thu, 22 Oct 2020 08:22:01 +0000 (17:22 +0900)]
options: add the eftCSV OptionFileType
Andrey Alekseenko [Mon, 19 Oct 2020 15:05:18 +0000 (17:05 +0200)]
Add dispatchTemplatedFunction
A helper function to select a templated function in runtime based on Enum value.
Paul Bauer [Tue, 27 Oct 2020 15:29:24 +0000 (16:29 +0100)]
Fix remaining clang tidy issues with OpenCL
Some code blocks still needed cleaning from clang-tidy.
Came up during manual run in preparation for CI job.
Paul Bauer [Tue, 27 Oct 2020 14:18:37 +0000 (15:18 +0100)]
Mix minor clang-tidy warning in double
One cast was using C-style, changed to C++ static_cast.
M. Eric Irrgang [Tue, 27 Oct 2020 14:31:45 +0000 (14:31 +0000)]
Use the correct CI script for sample_restraint jobs.
release-2021 should use the CI script that applies
the pytest `--threads` option.
Szilárd Páll [Tue, 27 Oct 2020 14:13:45 +0000 (14:13 +0000)]
Fix clang-tidy v10 warnigns in OpenCL kernels
Also made convert_sigma_epsilon_to_c6_c12() return a float2 with c6 and
c12 instead of returning results in pointers.
M. Eric Irrgang [Mon, 26 Oct 2020 16:50:12 +0000 (17:50 +0100)]
Normalize FindMPI hints.
Let gmxapi target use the MPI C component instead of CXX for consistency
with gmxManageMPI.cmake.
Refs #3671
Refs #3672
M. Eric Irrgang [Sat, 26 Sep 2020 14:21:00 +0000 (17:21 +0300)]
Clarify behavior of LegacyMdrunOptions.
Make notes about the lifetime management of LegacyMdrunOptions and its
members. Note effects on the way it must be used by gmxapi::ContextImpl.
Clarify how gmxapi::ContextImpl could be updated in the future if data
scope details of LegacyMdrunOptions evolve.
Relates to #3644, #3688, #3718
Berk Hess [Mon, 19 Oct 2020 07:53:59 +0000 (09:53 +0200)]
Refactor MTS preprocessing and checking
Separated the checking the MTS requirements on other parts of inputrec
from the setup of MTS. Replaced assertMtsRequirements() by the same
checking function. Added tests for all aspects of both the MTS setup
and requirements checking.
M. Eric Irrgang [Tue, 27 Oct 2020 08:53:46 +0000 (08:53 +0000)]
Update image names in job definitions.
Use explicit CMake versions, as appropriate.
Refs #3621
Artem Zhmurov [Tue, 27 Oct 2020 05:55:20 +0000 (08:55 +0300)]
Remove unused velocity scaling enum value
The velocities are never scaled by a full matrix, hence
the extra value in the enumeration is not needed. Having
extra possible value in the templated parameter may
hurt the compilation time.
Paul Bauer [Mon, 26 Oct 2020 06:14:07 +0000 (07:14 +0100)]
Don't deploy nightly webpages
Removed code used to deploy nightly master webpage from nightly builds.
M. Eric Irrgang [Mon, 26 Oct 2020 14:07:21 +0000 (15:07 +0100)]
Tell gmxapi to look for MPI, when appropriate.
The recommended CMake configuration for MPI-enabled GROMACS does not
provide MPI compiler wrappers for regular compiler variables. However,
the MPI toolchain details do not get conveyed transitively through the
libgromacs target. This should be easily resolved by checking whether
libgromacs is built with MPI library support and, if so, using the
CMake FindMPI module.
This may not be robust and should be revisited in the context of issue
#3672.
Meanwhile, this change should reduce errors for users following the
documentation updated under #3671.