Merge branch release-2021
authorMark Abraham <mark.j.abraham@gmail.com>
Fri, 23 Oct 2020 12:27:23 +0000 (14:27 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Fri, 23 Oct 2020 13:36:18 +0000 (15:36 +0200)
22 files changed:
api/gmxapi/CMakeLists.txt
api/nblib/CMakeLists.txt
cmake/gmxManageNvccConfig.cmake
cmake/gmxManageSharedLibraries.cmake
cmake/gmxManageSimd.cmake
docs/release-notes/2020/2020.5.rst
python_packaging/src/CMakeLists.txt
python_packaging/src/setup.py
src/gromacs/domdec/gpuhaloexchange_impl.cu
src/gromacs/gmxpreprocess/hackblock.cpp
src/gromacs/mdlib/gpuforcereduction.h
src/gromacs/mdlib/gpuforcereduction_impl.cpp
src/gromacs/mdlib/gpuforcereduction_impl.cu
src/gromacs/mdlib/gpuforcereduction_impl.cuh
src/gromacs/mdlib/shake.cpp
src/gromacs/mdrun/runner.cpp
src/gromacs/modularsimulator/trajectoryelement.cpp
src/gromacs/modularsimulator/trajectoryelement.h
src/gromacs/random/seed.cpp
src/gromacs/timing/wallcycle.cpp
src/gromacs/timing/wallcycle.h
src/gromacs/utility/binaryinformation.cpp

index a72b7f89965dbfb075115cbcad0e7fae147998be..81823a89c1c6ebd13e345af0ee8b0b17d581777c 100644 (file)
@@ -50,7 +50,7 @@
 # be tagged. Official GROMACS releases should be mappable to a distinct gmxapi
 # release string. For roadmap details, see https://gitlab.com/gromacs/gromacs/-/issues/2585
 set(GMXAPI_MAJOR 0)
-set(GMXAPI_MINOR 1)
+set(GMXAPI_MINOR 2)
 set(GMXAPI_PATCH 0)
 set(GMXAPI_RELEASE ${GMXAPI_MAJOR}.${GMXAPI_MINOR}.${GMXAPI_PATCH})
 
index 1848392c95556ab34c1cd2e46ec4a10fff20101b..e2054314c18945028cc968915ff3337bb276f5f0 100644 (file)
@@ -75,7 +75,12 @@ set(IGNORED_CLANG_ALL_WARNINGS
 string(REPLACE " " ";" IGNORED_CLANG_ALL_WARNINGS "${IGNORED_CLANG_ALL_WARNINGS}")
 
 set(TESTUTILS_DIR ${PROJECT_SOURCE_DIR}/src/testutils)
-include(${PROJECT_SOURCE_DIR}/src/testutils/TestMacros.cmake)
+if (BUILD_TESTING)
+    if(NOT GMX_DEVELOPER_BUILD)
+        set(UNITTEST_TARGET_OPTIONS EXCLUDE_FROM_ALL)
+    endif()
+    include(${TESTUTILS_DIR}/TestMacros.cmake)
+endif()
 
 # this allows all nblib tests to be run with "make check-nblib"
 add_custom_target(check-nblib
index 59109cd23b15f17feba7a00a96ef02cc46036707..e0ce2f34815bd28313b0614be805e48c1535e5e0 100644 (file)
@@ -149,6 +149,19 @@ if (GMX_CUDA_TARGET_COMPUTE)
     set_property(CACHE GMX_CUDA_TARGET_COMPUTE PROPERTY TYPE STRING)
 endif()
 
+# FindCUDA.cmake is unaware of the mechanism used by cmake to embed
+# the compiler flag for the required C++ standard in the generated
+# build files, so we have to pass it ourselves
+if (CUDA_VERSION VERSION_LESS 10.2)
+    # CUDA doesn't formally support C++17 until version 10.2, so for
+    # now host-side code that compiles with CUDA is restricted to
+    # C++14. This needs to be expressed formally for older CUDA
+    # version.
+    list(APPEND GMX_CUDA_NVCC_FLAGS "${CMAKE_CXX14_STANDARD_COMPILE_OPTION}")
+else()
+    list(APPEND GMX_CUDA_NVCC_FLAGS "${CMAKE_CXX17_STANDARD_COMPILE_OPTION}")
+endif()
+
 # assemble the CUDA flags
 list(APPEND GMX_CUDA_NVCC_FLAGS "${GMX_CUDA_NVCC_GENCODE_FLAGS}")
 list(APPEND GMX_CUDA_NVCC_FLAGS "-use_fast_math")
@@ -161,13 +174,12 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
     # where nullptr would be preferable. GROMACS can't fix these, so
     # must suppress them.
     GMX_TEST_CXXFLAG(CXXFLAGS_NO_ZERO_AS_NULL_POINTER_CONSTANT "-Wno-zero-as-null-pointer-constant" NVCC_CLANG_SUPPRESSIONS_CXXFLAGS)
-    if (CUDA_VERSION VERSION_LESS 11.0)
-        # CUDA header crt/math_functions.h before CUDA 11.0 used
-        # throw() specifications that are deprecated in more recent
-        # C++ versions. GROMACS can't fix these, so must suppress
-        # them.
-        GMX_TEST_CXXFLAG(CXXFLAGS_NO_DEPRECATED_DYNAMIC_EXCEPTION_SPEC "-Wno-deprecated-dynamic-exception-spec" NVCC_CLANG_SUPPRESSIONS_CXXFLAGS)
-    endif()
+
+    # CUDA header crt/math_functions.h in at least CUDA 10.x and 11.1
+    # used throw() specifications that are deprecated in more recent
+    # C++ versions. GROMACS can't fix these, so must suppress them.
+    GMX_TEST_CXXFLAG(CXXFLAGS_NO_DEPRECATED_DYNAMIC_EXCEPTION_SPEC "-Wno-deprecated-dynamic-exception-spec" NVCC_CLANG_SUPPRESSIONS_CXXFLAGS)
+
     # Add these flags to those used for the host compiler. The
     # "-Xcompiler" prefix directs nvcc to only use them for host
     # compilation, which is all that is needed in this case.
index 6f17fe8ab1762ffe2edb0423edd297807cba8e30..9c150828a88fabf52d03fff2d7475ac0ccb1fb00 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2012,2013,2014,2015,2018, by the GROMACS development team, led by
+# Copyright (c) 2012,2013,2014,2015,2018,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.
@@ -59,10 +59,6 @@ if (GMX_PREFER_STATIC_LIBS)
     endif()
     set(SHARED_LIBS_DEFAULT OFF)
 endif()
-set(GMX_PREFER_STATIC_LIBS_DEFAULT OFF)
-if (WIN32 AND NOT BUILD_SHARED_LIBS)
-    set(GMX_PREFER_STATIC_LIBS_DEFAULT ON)
-endif()
 if (NOT GMX_BUILD_SHARED_EXE)
     set(GMX_PREFER_STATIC_LIBS_DEFAULT ON)
     set(SHARED_LIBS_DEFAULT OFF)
@@ -70,6 +66,12 @@ endif()
 
 # Declare the user-visible options
 option(BUILD_SHARED_LIBS "Enable shared libraries (can be problematic e.g. with MPI, or on some HPC systems)" ${SHARED_LIBS_DEFAULT})
+
+set(GMX_PREFER_STATIC_LIBS_DEFAULT OFF)
+if (WIN32 OR NOT BUILD_SHARED_LIBS)
+    set(GMX_PREFER_STATIC_LIBS_DEFAULT ON)
+endif()
+
 if(BUILD_SHARED_LIBS AND GMX_BUILD_MDRUN_ONLY)
     message(WARNING "Both BUILD_SHARED_LIBS and GMX_BUILD_MDRUN_ONLY are set. Generally, an mdrun-only build should prefer to use static libraries, which is the default if you make a fresh build tree. You may be re-using an old build tree, and so may wish to set BUILD_SHARED_LIBS=off yourself.")
 endif()
@@ -112,7 +114,8 @@ function(gmx_manage_prefer_static_libs_flags build_type)
     # Change the real CMake variables for the given build type in each
     # language, in the parent scope.
     foreach(language C CXX)
-        string(REPLACE /MD /MT CMAKE_${language}_FLAGS${punctuation}${build_type} ${CMAKE_${language}_FLAGS${punctuation}${build_type}} PARENT_SCOPE)
+        string(REPLACE /MD /MT CMAKE_${language}_FLAGS${punctuation}${build_type} ${CMAKE_${language}_FLAGS${punctuation}${build_type}})
+       set(CMAKE_${language}_FLAGS${punctuation}${build_type} ${CMAKE_${language}_FLAGS${punctuation}${build_type}} PARENT_SCOPE)
     endforeach()
 endfunction()
 
@@ -144,6 +147,7 @@ IF( WIN32)
   IF( CMAKE_C_COMPILER_ID MATCHES "Intel" )
     if(BUILD_SHARED_LIBS) #not sure why incremental building with shared libs doesn't work
         STRING(REPLACE "/INCREMENTAL:YES" "" CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS})
+        set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} PARENT_SCOPE)
     endif()
   ENDIF()
 ENDIF()
index a946ea6460e3d6878f8bd8f379cbbf07253152ad..8dfd07db559dd6c1d98e10b0738bd87b9ab8c77f 100644 (file)
@@ -289,7 +289,7 @@ elseif(GMX_SIMD_ACTIVE STREQUAL "IBM_VSX")
 
     # IBM_VSX and gcc > 9 do not work together, so we need to prevent people from
     # choosing a combination that might fail. Issue #3380.
-    if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "9")
+    if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10)
         message(FATAL_ERROR "IBM_VSX does not work together with gcc > 9. Disable SIMD support (slower), or use an older version of the GNU compiler")
     endif()
 
index fc041b988c1c1540f4d854104d77b22277c6c1a8..e0a021f48a56d8404df647efa0f630525cdffb37 100644 (file)
@@ -22,5 +22,12 @@ Fixes for ``gmx`` tools
 Fixes that affect portability
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
+Fix building on OSX
+"""""""""""""""""""
+
+The code wouldn't compile due to a missing include.
+
+:issue:`3730`
+
 Miscellaneous
 ^^^^^^^^^^^^^
index a0e04c002d5ee1eb06a4094a08254355768bcd1a..b93d8cd37b0db80829174b2abd4b1ec152b545d5 100644 (file)
@@ -52,7 +52,10 @@ set(CMAKE_OSX_ARCHITECTURES x86_64 CACHE STRING
     "OS X should build Python package for 64-bit architecture"
     FORCE)
 
-project(gmxapi VERSION 0.1.0)
+# Note that this is the gmxapi._gmxapi Python bindings package version,
+# not the C++ API version. It is not essential that it match the pure Python
+# package version, but is likely to do so.
+project(gmxapi VERSION 0.2.0)
 
 # Check if Python package is being built directly or via add_subdirectory
 set(GMXAPI_MASTER_PROJECT OFF)
@@ -73,7 +76,8 @@ if(POLICY CMP0074) #3.12
 endif()
 
 if(GMXAPI_MASTER_PROJECT)
-    find_package(gmxapi 0.0.8 REQUIRED
+    # TODO: Retain compatibility with libgmxapi 0.1 and back down the requirement.
+    find_package(gmxapi 0.2.0 REQUIRED
                  HINTS "$ENV{GROMACS_DIR}"
                  )
 endif()
@@ -147,6 +151,7 @@ set_target_properties(_gmxapi PROPERTIES
                       LIBRARY_OUTPUT_DIRECTORY ${GMXAPI_PYTHON_STAGING_DIR}/gmxapi)
 
 if(GMXAPI_MASTER_PROJECT)
+    # TODO: This requirement is probably overly restrictive.
     find_package(GROMACS 2021 REQUIRED
                  HINTS "$ENV{GROMACS_DIR}"
                  )
index 60002a49aa7b87eefe3541bde9594a4f71c914b8..ff010604193ddac5b9e75d6f3e0dd1840e047bbf 100644 (file)
@@ -154,7 +154,7 @@ cmake_args = [cmake_platform_hints, cmake_gmxapi_hint]
 setup(
     name='gmxapi',
 
-    # TODO: single-source version information (currently repeated in gmxapi/version.py)
+    # TODO: single-source version information (currently repeated in gmxapi/version.py and CMakeLists.txt)
     version='0.2.0b1',
     python_requires='>=3.6',
     install_requires=['networkx>=2.0',
index d519445f74d48d0dd2fbea7b1f623e3b7c8c5371..9efebf69046f39b924781df34245549857c83cd1 100644 (file)
@@ -132,6 +132,8 @@ __global__ void unpackRecvBufKernel(float3* __restrict__ data,
 
 void GpuHaloExchange::Impl::reinitHalo(float3* d_coordinatesBuffer, float3* d_forcesBuffer)
 {
+    wallcycle_start(wcycle_, ewcDOMDEC);
+    wallcycle_sub_start(wcycle_, ewcsDD_GPU);
 
     d_x_ = d_coordinatesBuffer;
     d_f_ = d_forcesBuffer;
@@ -209,6 +211,9 @@ void GpuHaloExchange::Impl::reinitHalo(float3* d_coordinatesBuffer, float3* d_fo
                  MPI_BYTE, sendRankF_, 0, mpi_comm_mysim_, MPI_STATUS_IGNORE);
 #endif
 
+    wallcycle_sub_stop(wcycle_, ewcsDD_GPU);
+    wallcycle_stop(wcycle_, ewcDOMDEC);
+
     return;
 }
 
@@ -216,13 +221,13 @@ void GpuHaloExchange::Impl::communicateHaloCoordinates(const matrix          box
                                                        GpuEventSynchronizer* coordinatesReadyOnDeviceEvent)
 {
 
+    wallcycle_start(wcycle_, ewcLAUNCH_GPU);
     if (pulse_ == 0)
     {
         // ensure stream waits until coordinate data is available on device
         coordinatesReadyOnDeviceEvent->enqueueWaitEvent(nonLocalStream_);
     }
 
-    wallcycle_start(wcycle_, ewcLAUNCH_GPU);
     wallcycle_sub_start(wcycle_, ewcsLAUNCH_GPU_MOVEX);
 
     // launch kernel to pack send buffer
index bc00ea2c46f1396e4e569fd68738ff2632991791..2459141ae6e9744a00c7369cd8429236ae179b79 100644 (file)
@@ -53,6 +53,7 @@
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/gmxassert.h"
 #include "gromacs/utility/smalloc.h"
+#include "gromacs/utility/stringcompare.h"
 
 /* these MUST correspond to the enum in hackblock.h */
 const char* btsNames[ebtsNR] = { "bonds", "angles", "dihedrals", "impropers", "exclusions", "cmap" };
@@ -136,7 +137,7 @@ static int rbonded_find_atoms_in_list(const BondedInteraction&               b,
              * Since we only have the unparsed string here we can only detect
              * EXACT matches (including identical whitespace).
              */
-            if (b.s != it->s)
+            if (b.s == it->s)
             {
                 gmx_warning("Duplicate line found in or between hackblock and rtp entries");
             }
index 71a5f712a9782eda385766b1ecd7942c7f5261bc..8aad5efaf35fe4eb82764767e2272afc6305af4e 100644 (file)
@@ -45,6 +45,7 @@
 
 #include "gromacs/gpu_utils/devicebuffer_datatype.h"
 #include "gromacs/math/vectypes.h"
+#include "gromacs/timing/wallcycle.h"
 #include "gromacs/utility/arrayref.h"
 #include "gromacs/utility/classhelpers.h"
 #include "gromacs/utility/fixedcapacityvector.h"
@@ -73,8 +74,11 @@ public:
      *
      * \param [in] deviceContext GPU device context
      * \param [in] deviceStream  Stream to use for reduction
+     * \param [in] wcycle        Wall-clock cycle counter
      */
-    GpuForceReduction(const DeviceContext& deviceContext, const DeviceStream& deviceStream);
+    GpuForceReduction(const DeviceContext& deviceContext,
+                      const DeviceStream&  deviceStream,
+                      gmx_wallcycle*       wcycle);
     ~GpuForceReduction();
 
     /*! \brief Register a nbnxm-format force to be reduced
index ff32deef965ed9f30177a52902020af424fc9399..69876c7d15711ad318c4c193cfd09d25e66639c1 100644 (file)
@@ -57,7 +57,8 @@ class GpuForceReduction::Impl
 };
 
 GpuForceReduction::GpuForceReduction(const DeviceContext& /* deviceContext */,
-                                     const DeviceStream& /* deviceStream */) :
+                                     const DeviceStream& /* deviceStream */,
+                                     gmx_wallcycle* /*wcycle*/) :
     impl_(nullptr)
 {
     GMX_ASSERT(false, "A CPU stub has been called instead of the correct implementation.");
index 29c18daf33fcd119f6ded3f0f99f36581ae64b2e..afe7b03058f87fa9c8dbaca31250080b822e26e0 100644 (file)
@@ -105,9 +105,12 @@ static __global__ void reduceKernel(const float3* __restrict__ gm_nbnxmForce,
     return;
 }
 
-GpuForceReduction::Impl::Impl(const DeviceContext& deviceContext, const DeviceStream& deviceStream) :
+GpuForceReduction::Impl::Impl(const DeviceContext& deviceContext,
+                              const DeviceStream&  deviceStream,
+                              gmx_wallcycle*       wcycle) :
     deviceContext_(deviceContext),
-    deviceStream_(deviceStream){};
+    deviceStream_(deviceStream),
+    wcycle_(wcycle){};
 
 void GpuForceReduction::Impl::reinit(float3*               baseForcePtr,
                                      const int             numAtoms,
@@ -123,10 +126,13 @@ void GpuForceReduction::Impl::reinit(float3*               baseForcePtr,
     accumulate_       = accumulate;
     completionMarker_ = completionMarker;
     cellInfo_.cell    = cell.data();
+
+    wallcycle_start_nocount(wcycle_, ewcLAUNCH_GPU);
     reallocateDeviceBuffer(&cellInfo_.d_cell, numAtoms_, &cellInfo_.cellSize,
                            &cellInfo_.cellSizeAlloc, deviceContext_);
     copyToDeviceBuffer(&cellInfo_.d_cell, &(cellInfo_.cell[atomStart]), 0, numAtoms_, deviceStream_,
                        GpuApiCallBehavior::Async, nullptr);
+    wallcycle_stop(wcycle_, ewcLAUNCH_GPU);
 
     dependencyList_.clear();
 };
@@ -150,6 +156,8 @@ void GpuForceReduction::Impl::addDependency(GpuEventSynchronizer* const dependen
 
 void GpuForceReduction::Impl::execute()
 {
+    wallcycle_start_nocount(wcycle_, ewcLAUNCH_GPU);
+    wallcycle_sub_start(wcycle_, ewcsLAUNCH_GPU_NB_F_BUF_OPS);
 
     if (numAtoms_ == 0)
     {
@@ -191,12 +199,17 @@ void GpuForceReduction::Impl::execute()
     {
         completionMarker_->markEvent(deviceStream_);
     }
+
+    wallcycle_sub_stop(wcycle_, ewcsLAUNCH_GPU_NB_F_BUF_OPS);
+    wallcycle_stop(wcycle_, ewcLAUNCH_GPU);
 }
 
 GpuForceReduction::Impl::~Impl(){};
 
-GpuForceReduction::GpuForceReduction(const DeviceContext& deviceContext, const DeviceStream& deviceStream) :
-    impl_(new Impl(deviceContext, deviceStream))
+GpuForceReduction::GpuForceReduction(const DeviceContext& deviceContext,
+                                     const DeviceStream&  deviceStream,
+                                     gmx_wallcycle*       wcycle) :
+    impl_(new Impl(deviceContext, deviceStream, wcycle))
 {
 }
 
index 536e3fd33b11139760681e9e98912473cb10cb4a..8434a04c712f20ee6181bbc3a8e75ea9e4c053c7 100644 (file)
@@ -73,8 +73,9 @@ public:
      *
      * \param [in] deviceStream  Stream to use for reduction
      * \param [in] deviceContext GPU device context
+     * \param [in] wcycle        The wallclock counter
      */
-    Impl(const DeviceContext& deviceContext, const DeviceStream& deviceStream);
+    Impl(const DeviceContext& deviceContext, const DeviceStream& deviceStreami, gmx_wallcycle* wcycle);
     ~Impl();
 
     /*! \brief Register a nbnxm-format force to be reduced
@@ -137,6 +138,8 @@ private:
     DeviceBuffer<RVec> rvecForceToAdd_ = nullptr;
     //! event to be marked when redcution launch has been completed
     GpuEventSynchronizer* completionMarker_ = nullptr;
+    //! The wallclock counter
+    gmx_wallcycle* wcycle_ = nullptr;
 };
 
 } // namespace gmx
index 30c965214bd1e2a244f493f7c9006440587e2a3e..ee5dee5f4f82ea38d7e3e045ba3582c2d1bb270e 100644 (file)
@@ -48,6 +48,7 @@
 #include "shake.h"
 
 #include <cmath>
+#include <cstdlib>
 
 #include <algorithm>
 
index 9c60986fa382906011474ac80df20468189795db..4e27012f621aa242889bfc95532f482da32bc511 100644 (file)
@@ -1693,10 +1693,10 @@ int Mdrunner::mdrunner()
         {
             fr->gpuForceReduction[gmx::AtomLocality::Local] = std::make_unique<gmx::GpuForceReduction>(
                     deviceStreamManager->context(),
-                    deviceStreamManager->stream(gmx::DeviceStreamType::NonBondedLocal));
+                    deviceStreamManager->stream(gmx::DeviceStreamType::NonBondedLocal), wcycle);
             fr->gpuForceReduction[gmx::AtomLocality::NonLocal] = std::make_unique<gmx::GpuForceReduction>(
                     deviceStreamManager->context(),
-                    deviceStreamManager->stream(gmx::DeviceStreamType::NonBondedNonLocal));
+                    deviceStreamManager->stream(gmx::DeviceStreamType::NonBondedNonLocal), wcycle);
         }
 
         std::unique_ptr<gmx::StatePropagatorDataGpu> stateGpu;
index bf00357f377b09dfd24e7c14d9a6ab3cbf7cfd3b..5a4b55cbabf164a515d282bca1642c5c52cb8272 100644 (file)
@@ -65,6 +65,7 @@ TrajectoryElement::TrajectoryElement(std::vector<ITrajectoryWriterClient*> write
                                      const bool                            simulationsShareState) :
     writeEnergyStep_(-1),
     writeStateStep_(-1),
+    writeLogStep_(-1),
     outf_(init_mdoutf(fplog,
                       nfile,
                       fnm,
@@ -122,7 +123,7 @@ void TrajectoryElement::scheduleTask(Step step, Time time, const RegisterRunFunc
 {
     const bool writeEnergyThisStep = writeEnergyStep_ == step;
     const bool writeStateThisStep  = writeStateStep_ == step;
-    const bool writeLogThisStep    = logWritingStep_ == step;
+    const bool writeLogThisStep    = writeLogStep_ == step;
     if (writeEnergyThisStep || writeStateThisStep || writeLogThisStep)
     {
         registerRunFunction([this, step, time, writeStateThisStep, writeEnergyThisStep, writeLogThisStep]() {
@@ -161,7 +162,7 @@ void TrajectoryElement::write(Step step, Time time, bool writeState, bool writeE
 
 std::optional<SignallerCallback> TrajectoryElement::registerLoggingCallback()
 {
-    return [this](Step step, Time /*unused*/) { logWritingStep_ = step; };
+    return [this](Step step, Time /*unused*/) { writeLogStep_ = step; };
 }
 
 std::optional<SignallerCallback> TrajectoryElement::registerTrajectorySignallerCallback(TrajectoryEvent event)
index a0b3d05e603d639ca96c7f160eace680781e2d04..5b3d60001948fda0823b66bcf714070214f003a0 100644 (file)
@@ -148,7 +148,7 @@ private:
     //! The next state writing step
     Step writeStateStep_;
     //! The next communicated log writing step
-    Step logWritingStep_;
+    Step writeLogStep_;
 
     //! The output object
     gmx_mdoutf* outf_;
index b1fc061fd11810a38ae102a359125d712db67f67..79f67c9cfc2edbf572ba5daf4dcff6e4f20dbbd7 100644 (file)
@@ -91,14 +91,12 @@ static uint64_t makeRandomSeedInternal(GeneratorType& gen)
             std::numeric_limits<typename GeneratorType::result_type>::digits;
 
     uint64_t result = static_cast<uint64_t>(gen());
-    // This conditional is needed so that compiler understands that what follows is a dead branch
-    // and not complains about shift larger than number of bits in the result.
-    if (resultBits < numBitsInRandomNumber)
+    // This is needed so that compiler understands that what follows is a dead branch
+    // and not complains about shift count larger than number of bits in the result.
+    constexpr std::size_t shiftCount = (resultBits < numBitsInRandomNumber) ? numBitsInRandomNumber : 0;
+    for (std::size_t bits = numBitsInRandomNumber; bits < resultBits; bits += numBitsInRandomNumber)
     {
-        for (std::size_t bits = numBitsInRandomNumber; bits < resultBits; bits += numBitsInRandomNumber)
-        {
-            result = (result << numBitsInRandomNumber) | static_cast<uint64_t>(gen());
-        }
+        result = (result << shiftCount) | static_cast<uint64_t>(gen());
     }
     return result;
 }
index 45714a1da2cca611d7ea0709687ed15dae5aff0b..e69df666c1d9f40c340856b8774fbd5b07c3a852 100644 (file)
@@ -155,6 +155,7 @@ static const char* wcsn[ewcsNR] = {
     "DD make top.",
     "DD make constr.",
     "DD top. other",
+    "DD GPU ops.",
     "NS grid local",
     "NS grid non-loc.",
     "NS search local",
index 83be456671553574acb6d265310769794f342278..0bc53f0fe69f9db152776eaf2230b9c4b36001ea 100644 (file)
@@ -107,6 +107,7 @@ enum
     ewcsDD_MAKETOP,
     ewcsDD_MAKECONSTR,
     ewcsDD_TOPOTHER,
+    ewcsDD_GPU,
     ewcsNBS_GRID_LOCAL,
     ewcsNBS_GRID_NONLOCAL,
     ewcsNBS_SEARCH_LOCAL,
index a719972ae62d64afcb830f6228dcf839a70048cf..7127a5b4d500b01d2fdfd0de52de2fcfa3c2e541 100644 (file)
@@ -165,9 +165,9 @@ void printCopyright(gmx::TextWriter* writer)
     writer->writeLine(formatCentered(78, "GROMACS is written by:"));
     for (int i = 0; i < NCONTRIBUTORS;)
     {
-        for (int j = 0; j < 4 && i < NCONTRIBUTORS; ++j, ++i)
+        for (int j = 0; j < 3 && i < NCONTRIBUTORS; ++j, ++i)
         {
-            const int            width = 18;
+            const int            width = 26;
             std::array<char, 30> buf;
             const int            offset = centeringOffset(width, strlen(Contributors[i]));
             GMX_RELEASE_ASSERT(static_cast<int>(strlen(Contributors[i])) + offset < gmx::ssize(buf),