corrected dynamic load balancing when sharing GPUs
[alexxy/gromacs.git] / include / domdec.h
index 19a3a78e44baa17c9d0da7f4101e17526f3660f0..e94139b3a6b0b8523b0164e3d35726668e189387 100644 (file)
@@ -148,6 +148,16 @@ void change_dd_dlb_cutoff_limit(t_commrec *cr);
  * possible after subsequently setting a shorter cut-off with change_dd_cutoff.
  */
 
+GMX_LIBMD_EXPORT
+void dd_setup_dlb_resource_sharing(t_commrec *cr,
+                                   const gmx_hw_info_t *hwinfo,
+                                   const gmx_hw_opt_t *hw_opt);
+/* When domains (PP MPI ranks) share a GPU, the individual GPU wait times
+ * are meaningless, as it depends on the order in which tasks on the same
+ * GPU finish. Therefore there wait times need to be averaged over the ranks
+ * sharing the same GPU. This function sets up the communication for that.
+ */
+
 GMX_LIBMD_EXPORT
 void setup_dd_grid(FILE *fplog, gmx_domdec_t *dd);
 
@@ -159,7 +169,7 @@ void dd_collect_state(gmx_domdec_t *dd,
                       t_state *state_local, t_state *state);
 
 enum {
-    ddCyclStep, ddCyclPPduringPME, ddCyclF, ddCyclPME, ddCyclNr
+    ddCyclStep, ddCyclPPduringPME, ddCyclF, ddCyclWaitGPU, ddCyclPME, ddCyclNr
 };
 
 GMX_LIBMD_EXPORT