- Move sighandler.* to mdlib, since it is specific to mdrun.
- Move thread_affinity.* to mdrunutility, since it is only used from
runner.cpp. Convert existing comments to rudimentary Doxygen
documentation to avoid check-source and Doxygen warnings.
Change-Id: I83d431497480bcfa2b2edf8f347708a0c1832005
#include "gromacs/domdec/domdec_struct.h"
#include "gromacs/ewald/pme.h"
#include "gromacs/gmxlib/network.h"
-#include "gromacs/gmxlib/sighandler.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdlib/sighandler.h"
#include "gromacs/mdtypes/commrec.h"
#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/fileio/gmxfio.h"
#include "gromacs/fileio/xvgr.h"
#include "gromacs/gmxlib/network.h"
-#include "gromacs/gmxlib/sighandler.h"
#include "gromacs/imd/imdsocket.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/groupcoord.h"
#include "gromacs/mdlib/mdrun.h"
+#include "gromacs/mdlib/sighandler.h"
#include "gromacs/mdlib/sim_util.h"
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/mdtypes/md_enums.h"
#include "config.h"
+#include <csignal>
#include <cstdlib>
#include "gromacs/utility/fatalerror.h"
* To help us fund GROMACS development, we humbly ask that you cite
* the research papers on the package. Check out http://www.gromacs.org.
*/
-#ifndef GMX_GMXLIB_SIGHANDLER_H
-#define GMX_GMXLIB_SIGHANDLER_H
-
-#include <signal.h>
+#ifndef GMX_MDLIB_SIGHANDLER_H
+#define GMX_MDLIB_SIGHANDLER_H
#include "gromacs/utility/basedefinitions.h"
*/
#include "gmxpre.h"
-#include "thread_affinity.h"
+#include "threadaffinity.h"
#include "config.h"
* To help us fund GROMACS development, we humbly ask that you cite
* the research papers on the package. Check out http://www.gromacs.org.
*/
-#ifndef GMX_GMXLIB_THREAD_AFFINITY_H
-#define GMX_GMXLIB_THREAD_AFFINITY_H
+/*! \libinternal \file
+ * \brief
+ * Declares functions for managing mdrun thread affinity.
+ *
+ * \inlibraryapi
+ * \ingroup module_mdrunutility
+ */
+#ifndef GMX_MDRUNUTILITY_THREADAFFINITY_H
+#define GMX_MDRUNUTILITY_THREADAFFINITY_H
#include <cstdio>
struct t_commrec;
-/* Sets the thread affinity using the requested setting stored in hw_opt.
- * The hardware topologu is requested from hwinfo, when present.
+/*! \brief
+ * Sets the thread affinity using the requested setting stored in hw_opt.
+ *
+ * The hardware topology is requested from hwinfo, when present.
*/
void
gmx_set_thread_affinity(FILE *fplog,
const gmx_hw_opt_t *hw_opt,
const gmx_hw_info_t *hwinfo);
-/* Check the process affinity mask and if it is found to be non-zero,
+/*! \brief
+ * Checks the process affinity mask and if it is found to be non-zero,
* will honor it and disable mdrun internal affinity setting.
+ *
* This function should be called first before the OpenMP library gets
* initialized with the last argument FALSE (which will detect affinity
* set by external tools like taskset), and later, after the OpenMP
#include "gromacs/gmxlib/md_logging.h"
#include "gromacs/gmxlib/network.h"
#include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/gmxlib/sighandler.h"
#include "gromacs/imd/imd.h"
#include "gromacs/listed-forces/manage-threading.h"
#include "gromacs/math/utilities.h"
#include "gromacs/mdlib/nbnxn_gpu_data_mgmt.h"
#include "gromacs/mdlib/ns.h"
#include "gromacs/mdlib/shellfc.h"
+#include "gromacs/mdlib/sighandler.h"
#include "gromacs/mdlib/sim_util.h"
#include "gromacs/mdlib/tgroup.h"
#include "gromacs/mdlib/trajectory_writing.h"
#include "gromacs/gmxlib/main.h"
#include "gromacs/gmxlib/md_logging.h"
#include "gromacs/gmxlib/network.h"
-#include "gromacs/gmxlib/sighandler.h"
-#include "gromacs/gmxlib/thread_affinity.h"
#include "gromacs/gpu_utils/gpu_utils.h"
#include "gromacs/listed-forces/disre.h"
#include "gromacs/listed-forces/orires.h"
#include "gromacs/mdlib/minimize.h"
#include "gromacs/mdlib/nbnxn_search.h"
#include "gromacs/mdlib/qmmm.h"
+#include "gromacs/mdlib/sighandler.h"
#include "gromacs/mdlib/tpi.h"
+#include "gromacs/mdrunutility/threadaffinity.h"
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/state.h"