#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2010,2012,2013,2014,2015, by the GROMACS development team, led by
+# Copyright (c) 2010,2012,2013,2014,2015,2018, 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.
if (BUILD_TESTING)
add_subdirectory(tests)
endif()
+
+gmx_install_headers(simulationsignal.h)
static volatile sig_atomic_t usr_condition = 0;
+void gmx_reset_stop_condition()
+{
+ stop_condition = gmx_stop_cond_none;
+ // last_signal_name and usr_condition are left untouched by reset.
+}
+
static void signal_handler(int n)
{
switch (n)
/* set the stop condition upon receiving a remote one */
void gmx_set_stop_condition(gmx_stop_cond_t recvd_stop_cond);
+/*!
+ * \brief Reinitializes the global stop condition.
+ *
+ * Resets any stop condition currently stored in global library state as read or
+ * written with gmx_get_stop_condition() and gmx_set_stop_condition(). Does not
+ * affect the result of gmx_got_usr_signal() gmx_get_signal_name() for
+ * previously terminated simulations.
+ *
+ * The reset is necessary between simulation segments performed in the same
+ * process and should be called only while simulation is idle, such as after
+ * a gmx::Mdrunner has finished its work and simulation results have been processed.
+ */
+void gmx_reset_stop_condition();
+
/* get the signal name that lead to the current stop condition. */
const char *gmx_get_signal_name();
* To help us fund GROMACS development, we humbly ask that you cite
* the research papers on the package. Check out http://www.gromacs.org.
*/
-/*! \libinternal \file
+/*! \file
*
* \brief This file declares functions for inter-rank signalling by mdrun
*
template <typename T>
class ArrayRef;
-/*! \internal
+/*!
* \brief POD-style object used by mdrun ranks to set and
* receive signals within and between simulations.
*
//! Convenience typedef for the group of signals used.
typedef std::array<SimulationSignal, eglsNR> SimulationSignals;
-/*! \internal
+/*!
* \brief Object used by mdrun ranks to signal to each other at this step.
*
* This object has responsibility to read signal values from \c gs,