Expose DD distribution of free energy history
authorPascal Merz <pascal.merz@me.com>
Tue, 17 Nov 2020 01:13:37 +0000 (18:13 -0700)
committerPascal Merz <pascal.merz@me.com>
Fri, 21 May 2021 22:07:54 +0000 (16:07 -0600)
To implement expanded ensemble, modular simulator needs to be able
to distribute the free energy history without initiating a full
t_state object. This exposes the required function to make it
available to the expanded ensemble modular simulator element.

Refs #3417, #3419

src/gromacs/domdec/distribute.cpp
src/gromacs/domdec/distribute.h

index 8e1f05c9d64cbd33348cfd0e0622aa99a90726bb..f0e8a9e04a47a80de5826e6598c2c0b239063687 100644 (file)
@@ -163,7 +163,7 @@ static void distributeVec(gmx_domdec_t*                  dd,
     }
 }
 
-static void dd_distribute_dfhist(gmx_domdec_t* dd, df_history_t* dfhist)
+void dd_distribute_dfhist(gmx_domdec_t* dd, df_history_t* dfhist)
 {
     if (dfhist == nullptr)
     {
index 7012f5bd600020e9543ea75b37864809c45e2b3d..8b865fd0a35c5317960c8f237848811cf5dca920 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019,2020,2021, 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.
@@ -44,6 +44,7 @@
 
 #include "gromacs/utility/basedefinitions.h"
 
+struct df_history_t;
 struct gmx_ddbox_t;
 struct gmx_domdec_t;
 struct gmx_mtop_t;
@@ -63,4 +64,13 @@ void distributeState(const gmx::MDLogger& mdlog,
                      const gmx_ddbox_t&   ddbox,
                      t_state*             state_local);
 
+/*! \brief Distribute the dfhist struct from the master rank to all DD ranks
+ *
+ * Used by the modular simulator checkpointing
+ *
+ * \param dd  Domain decomposition information
+ * \param dfhist  Free energy history struct
+ */
+void dd_distribute_dfhist(gmx_domdec_t* dd, df_history_t* dfhist);
+
 #endif