Skip to content

Commit

Permalink
Merge branch 'origin/release-2020' into merge-release-2020-into-master
Browse files Browse the repository at this point in the history
Resolved Conflicts:
	admin/gitlab-ci/archive.gitlab-ci.yml
	admin/gitlab-ci/global.gitlab-ci.yml
	admin/gitlab-ci/gromacs.gitlab-ci.yml
	admin/gitlab-ci/lint.gitlab-ci.yml
	admin/gitlab-ci/python-gmxapi.gitlab-ci.yml
	admin/gitlab-ci/rules.gitlab-ci.yml
	admin/gitlab-ci/sample_restraint-regression.gitlab-ci.yml
	cmake/gmxVersionInfo.cmake
	src/gromacs/fileio/checkpoint.cpp
	src/gromacs/hardware/printhardware.cpp
	src/gromacs/mdlib/md_support.cpp
	src/gromacs/mdlib/trajectory_writing.cpp
	src/gromacs/mdrun/runner.cpp
	src/gromacs/modularsimulator/domdechelper.cpp
	src/gromacs/modularsimulator/domdechelper.h
	src/gromacs/modularsimulator/freeenergyperturbationelement.cpp
	src/gromacs/modularsimulator/freeenergyperturbationelement.h
	src/gromacs/modularsimulator/modularsimulator.cpp
	src/gromacs/tools/trjcat.cpp
	src/gromacs/topology/topology.h
	src/gromacs/utility/fatalerror.cpp
	src/gromacs/utility/futil.cpp
	src/gromacs/utility/init.cpp
	src/programs/mdrun/tests/CMakeLists.txt
	tests/CMakeLists.txt

Change-Id: Icd5d9c78ff2cfb0598c3cb55b057487ca098a1f0
  • Loading branch information
acmnpv committed Oct 7, 2020
2 parents b6b389b + e3caeee commit 694edca
Show file tree
Hide file tree
Showing 28 changed files with 422 additions and 132 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ check_cxx_source_compiles("int main(){ return __builtin_clz(1);}" HAVE_BUILTIN
check_cxx_source_compiles("int main(){ return __builtin_clzll(1);}" HAVE_BUILTIN_CLZLL)
if(MSVC)
check_cxx_source_compiles("#include <intrin.h>\n int main(){unsigned long r;unsigned long i=1;_BitScanReverse(&r,i);return r;}" HAVE_BITSCANREVERSE)
check_cxx_source_compiles("#include <intrin.h>\n int main(){unsigned long r;unsigned __int64 i=1;_BitScanReverse(&r,i);return r;}" HAVE_BITSCANREVERSE64)
check_cxx_source_compiles("#include <intrin.h>\n int main(){unsigned long r;unsigned __int64 i=1;_BitScanReverse64(&r,i);return r;}" HAVE_BITSCANREVERSE64)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "XL")
check_cxx_source_compiles("int main(){ return __cntlz4(1);}" HAVE_CNTLZ4)
check_cxx_source_compiles("int main(){ return __cntlz8(1);}" HAVE_CNTLZ8)
Expand Down
3 changes: 2 additions & 1 deletion admin/gitlab-ci/global.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
variables:
KUBERNETES_CPU_LIMIT: 8
KUBERNETES_CPU_REQUEST: 4
KUBERNETES_MEMORY_REQUEST: 8Gi
KUBERNETES_MEMORY_REQUEST: 4Gi
KUBERNETES_MEMORY_LIMIT: 8Gi
KUBERNETES_EXTENDED_RESOURCE_NAME: ""
KUBERNETES_EXTENDED_RESOURCE_LIMIT: 0
CACHE_FALLBACK_KEY: "$CI_JOB_NAME-$CI_JOB_STAGE-master"
Expand Down
4 changes: 2 additions & 2 deletions admin/gitlab-ci/rules.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@
.rules-element:if-post-merge-acceptance-or-mr-then-always: &if-post-merge-acceptance-or-mr-then-always
if: '$CI_PIPELINE_SOURCE == "merge_request_event" ||
($CI_PIPELINE_SOURCE == "push" &&
($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_REF_NAME == "release-*"))'
$CI_COMMIT_REF_NAME == "master")'
when: always

# Include job only for post submit push
.rules-element:if-post-merge-acceptance-then-always: &if-post-merge-acceptance-then-always
if: '$CI_PIPELINE_SOURCE == "push" &&
($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_REF_NAME == "release-*")'
$CI_COMMIT_REF_NAME == "master"'
when: always

# When composing a rule set, note that the first matching rule is applied.
Expand Down
4 changes: 2 additions & 2 deletions cmake/gmxTestImageMagick.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# This file is part of the GROMACS molecular simulation package.
#
# Copyright (c) 2018,2019, by the GROMACS development team, led by
# Copyright (c) 2018,2019,2020, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
Expand Down Expand Up @@ -66,7 +66,7 @@ function(GMX_TEST_IMAGEMAGICK VARIABLE)
else()
set(type_ "STATUS")
endif()
MESSAGE(${type_} "Could not convert sample image, ImageMagick convert can not be used. A possible way to fix it can be found here: https://alexvanderbist.com/posts/2018/fixing-imagick-error-unauthorized")
MESSAGE(${type_} "Could not convert sample image, ImageMagick convert can not be used. A possible way to fix it can be found here: https://alexvanderbist.com/2018/fixing-imagick-error-unauthorized")
set(value_ OFF)
endif()
FILE(REMOVE_RECURSE ${TEMPDIR})
Expand Down
1 change: 1 addition & 0 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ if (SPHINX_FOUND)
release-notes/2020/2020.2.rst
release-notes/2020/2020.3.rst
release-notes/2020/2020.4.rst
release-notes/2020/2020.5.rst
release-notes/2020/major/highlights.rst
release-notes/2020/major/features.rst
release-notes/2020/major/performance.rst
Expand Down
1 change: 0 additions & 1 deletion docs/doxygen/suppressions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ src/gromacs/tables/cubicsplinetable.h: warning: includes "simd.h" unnecessarily
src/gromacs/tables/quadraticsplinetable.h: warning: includes "simd.h" unnecessarily

# These are specific to Folding@Home, and easiest to suppress here
*: warning: includes non-local file as "corewrap.h"
src/gmxpre.h: warning: includes non-local file as "swindirect.h"

# New external API (see https://gitlab.com/gromacs/gromacs/-/issues/2586) has some unresolved
Expand Down
110 changes: 108 additions & 2 deletions docs/release-notes/2020/2020.4.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GROMACS 2020.4 release notes
----------------------------

This version was released on TODO, 2020. These release notes
This version was released on October 6th, 2020. These release notes
document the changes that have taken place in GROMACS since the
previous 2020.3 version, to fix known issues. It also incorporates all
fixes made in version 2019.6 and earlier, which you can find described
Expand All @@ -16,24 +16,130 @@ in the :ref:`release-notes`.
Fixes where mdrun could behave incorrectly
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Bug fix for the GPU version of LINCS in multiple domain case
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

Increase in the maximum number of coupled constraints in the
domain did not trigger memory re-allocation, which is now fixed.
This can happen, e.g. when big molecule enters the domain, previously
occupied by smaller molecules. The bug does not affect the single
domain case.

Fix index handling of N-body virtual sites with domain decomposition
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

Incorrect indexing would be used to handle N-body virtual sites in
the domain decomposition code. This would usually lead to crashes
due to illegal or incorrect memory usage.

:issue:`3635`

Fix assertion failure with LJ-PME and dispersion correction
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

With vdw-type=PME and dispersion correction, mdrun would exit with
an assertion failure during PME tuning.

:issue:`3677`

Bug fix for FEP calculations with modular simulator and domain decomposition
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
When using the modular simulator, domain decomposition and free energy
calculations with perturbed masses, the simulation would always be
performed using the masses at lambda=0 instead of the actual lambda value.


Added workaround for RDRAND not always returning random numbers on Ryzen
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
On AMD Ryzen 3000 series CPUs, the hardware random number generator (RDRAND)
can behave incorrectly, always returning -1 (0xFFFFFFFF). When this hardware bug
is detected at runtime, |Gromacs| will switch to its software-based pseudo-random
number generator instead.

While many motherboard vendors have been distributing firmware updates that
contain microcode fixes and most motherboards are sold with these factory-installed,
there can still be some systems affected that didn't receive the updates.

In case you ran simulations on one of these systems, in theory all random
number seeding could be affected (see below for algorithms), since it would
mean the same seed is used. Even this should be fine for virtually all individual
simulations since the generated numbers are still random. The most likely case that would
be seriously affected is if you use identical starting conformations and start many
simulations with different random seeds generated automatically (instead of
manually selecting your seeds) - then the Ryzen hardware bug could mean all
your simulations actually get the same generated initial velocities, or the same stochastic
changes, etc. depending which algorithms you are using.

A list of affected algorithms can be found below:

#. Seeding in `gmx grompp` is affected if no user supplied seed is used (e.g. if ``-1``
is used to ask |Gromacs| to generate a seed). This can affect Langevin/Stochastic dynamics,
v-rescale thermostat, anything Monte-Carlo related and the generation of random velocities.
#. Decision when to exchange replicas during replica exchange simulations.
#. Simulations using the random components from ``AWH``.
#. Some analysis and preparation tools might be affected, e.g. free volume calculation,
ion placement, WHAM, normal mode analysis and PME error estimates.

.. AKA https://xkcd.com/221/
Diagnosing: to aid detecting the error, run ``gmx mdrun -debug 1`` with |Gromacs| 2020.4 or later,
which will produce a debug log, typically called ``gmx.debug``. This file will contain
the following message if the processor the program ran on is affected:

- Hardware random number generator (RDRAND) returned -1 (0xFFFFFFFF) twice in
a row. This may be due to a known bug in AMD Ryzen microcode.
Will use pseudo-random number generator (PRNG) rather than hardware device.

Earlier releases will fail SeedTest.makeRandomSeed test from unit tests suite on the affected systems.
To check, run ``make check`` in your build folder. You can also find a sample testing code at the link below.

For more information on the issue, please check
`this website <https://arstechnica.com/gadgets/2019/10/how-a-months-old-amd-microcode-bug-destroyed-my-weekend/>`_.

Fixes for ``gmx`` tools
^^^^^^^^^^^^^^^^^^^^^^^

Fix default output with gmx trjcat -demux
"""""""""""""""""""""""""""""""""""""""""

Files would not be written when using default file name output.

:issue:`3653`

Fixes that affect portability
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

CUDA 11.0 supported
^^^^^^^^^^^^^^^^^^^
"""""""""""""""""""

A build with CUDA 11.0 now configures and passes tests.
Building with CUDA 11.0 means that hardware with CC 3.0 is no longer supported,
while CC 8.0 can now be used.

:issue:`3632`

Fix building with MSVC
""""""""""""""""""""""

The build would fail due to a missing header.

:issue:`3669`

Only check for RDTSCP on x86 platforms
""""""""""""""""""""""""""""""""""""""


Miscellaneous
^^^^^^^^^^^^^

Fix crash of grompp when the whole system is frozen
"""""""""""""""""""""""""""""""""""""""""""""""""""

When the whole system would be frozen, grompp would crash with
a segmentation fault.

:issue:`3683`

Fixes the unexpected change in molecule indexing in output after simulation
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

Expand Down
26 changes: 26 additions & 0 deletions docs/release-notes/2020/2020.5.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
GROMACS 2020.5 release notes
----------------------------

This version was released on TODO, 2020. These release notes
document the changes that have taken place in GROMACS since the
previous 2020.4 version, to fix known issues. It also incorporates all
fixes made in version 2019.6 and earlier, which you can find described
in the :ref:`release-notes`.

.. Note to developers!
Please use """"""" to underline the individual entries for fixed issues in the subfolders,
otherwise the formatting on the webpage is messed up.
Also, please use the syntax :issue:`number` to reference issues on redmine, without the
a space between the colon and number!
Fixes where mdrun could behave incorrectly
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Fixes for ``gmx`` tools
^^^^^^^^^^^^^^^^^^^^^^^

Fixes that affect portability
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Miscellaneous
^^^^^^^^^^^^^
1 change: 1 addition & 0 deletions docs/release-notes/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Patch releases
.. toctree::
:maxdepth: 1

2020/2020.5
2020/2020.4
2020/2020.3
2020/2020.2
Expand Down
12 changes: 11 additions & 1 deletion src/external/thread_mpi/include/thread_mpi/wait.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,17 @@

#if TMPI_WAIT_FOR_NO_ONE

#if !(defined( _WIN32 ) || defined( _WIN64 ) )
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#if GMX_FAHCORE
// This lets F@H throttle CPU usage
#define TMPI_YIELD_WAIT_DATA
#define TMPI_YIELD_WAIT_DATA_INIT(data)
#define TMPI_YIELD_WAIT(data) fcYieldWait()

#elif !(defined( _WIN32 ) || defined( _WIN64 ) )
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
Expand Down
20 changes: 16 additions & 4 deletions src/gromacs/fileio/checkpoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@
#include "gromacs/utility/sysinfo.h"
#include "gromacs/utility/txtdump.h"

#if GMX_FAHCORE
# include "corewrap.h"
#endif

#define CPT_MAGIC1 171817
#define CPT_MAGIC2 171819

Expand Down Expand Up @@ -2349,6 +2345,22 @@ void write_checkpoint_data(t_fileio* fp,
}

do_cpt_footer(gmx_fio_getxdr(fp), headerContents.file_version);
#if GMX_FAHCORE
/* Always FAH checkpoint immediately after a Gromacs checkpoint.
*
* Note that it is critical that we save a FAH checkpoint directly
* after writing a Gromacs checkpoint. If the program dies, either
* by the machine powering off suddenly or the process being,
* killed, FAH can recover files that have only appended data by
* truncating them to the last recorded length. The Gromacs
* checkpoint does not just append data, it is fully rewritten each
* time so a crash between moving the new Gromacs checkpoint file in
* to place and writing a FAH checkpoint is not recoverable. Thus
* the time between these operations must be kept as short a
* possible.
*/
fcCheckpoint();
#endif
}

static void check_int(FILE* fplog, const char* type, int p, int f, gmx_bool* mm)
Expand Down
7 changes: 4 additions & 3 deletions src/gromacs/gmxpreprocess/readir.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3362,11 +3362,12 @@ static void checkAndUpdateVcmFreezeGroupConsistency(SimulationGroups* groups,
if (numFrozenDims == DIM)
{
/* Do not remove COM motion for this fully frozen atom */
if (groups->groups[SimulationAtomGroupType::MassCenterVelocityRemoval].empty())
if (groups->groupNumbers[SimulationAtomGroupType::MassCenterVelocityRemoval].empty())
{
groups->groups[SimulationAtomGroupType::MassCenterVelocityRemoval].resize(numAtoms, 0);
groups->groupNumbers[SimulationAtomGroupType::MassCenterVelocityRemoval].resize(
numAtoms, 0);
}
groups->groups[SimulationAtomGroupType::MassCenterVelocityRemoval][a] = vcmRestGroup;
groups->groupNumbers[SimulationAtomGroupType::MassCenterVelocityRemoval][a] = vcmRestGroup;
numFullyFrozenVcmAtoms++;
}
else if (numFrozenDims > 0)
Expand Down
11 changes: 8 additions & 3 deletions src/gromacs/hardware/printhardware.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2012,2013,2014,2015,2016 by the GROMACS development team.
* Copyright (c) 2012,2013,2014,2015,2016, The GROMACS development team.
* Copyright (c) 2017,2018,2019,2020, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
Expand Down Expand Up @@ -60,6 +60,8 @@
#include "gromacs/utility/stringutil.h"
#include "gromacs/utility/sysinfo.h"

#include "architecture.h"

//! Constant used to help minimize preprocessed code
static constexpr bool bGPUBinary = (GMX_GPU != 0);

Expand Down Expand Up @@ -387,6 +389,9 @@ void gmx_print_detected_hardware(FILE* fplog,
gmx::simdCheck(static_cast<gmx::SimdType>(hwinfo->simd_suggest_min), fplog, warnToStdErr);
}

/* For RDTSCP we only check on our local node and skip the MPI reduction */
check_use_of_rdtscp_on_this_cpu(mdlog, cpuInfo);
/* For RDTSCP we only check on our local node and skip the MPI reduction, only on x86 */
if (gmx::c_architecture == gmx::Architecture::X86)
{
check_use_of_rdtscp_on_this_cpu(mdlog, cpuInfo);
}
}
9 changes: 9 additions & 0 deletions src/gromacs/mdlib/mdoutf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,15 @@ void mdoutf_write_to_trajectory_files(FILE* fplog,
nullptr, nullptr);
}
}

#if GMX_FAHCORE
/* Write a FAH checkpoint after writing any other data. We may end up
checkpointing twice but it's fast so it's ok. */
if ((mdof_flags & ~MDOF_CPT))
{
fcCheckpoint();
}
#endif
}
}

Expand Down
Loading

0 comments on commit 694edca

Please sign in to comment.