/* Not used yet: int threadid, nthreads; */
/* The nodeid in the PP/PME, PP or PME group */
int nodeid;
- MPI_Comm mpi_comm_mysim;
- MPI_Comm mpi_comm_mygroup;
+
+ /* MPI communicators within a single simulation
+ * Note: other parts of the code may further subset these communicators.
+ */
+ MPI_Comm mpi_comm_mysim; /* communicator including all ranks of
+ a single simulation */
+ MPI_Comm mpi_comm_mygroup; /* subset of mpi_comm_mysim including only
+ the ranks in the same group (PP or PME) */
- /* MPI ranks within a physical node for hardware access */
- int nrank_intranode; /* nr of ranks on this physical node */
- int rank_intranode; /* our rank on this physical node */
- int nrank_pp_intranode; /* as nrank_intranode, for particle-particle only */
- int rank_pp_intranode; /* as rank_intranode, for particle-particle only */
+ /* MPI ranks and a communicator within a physical node for hardware access */
+ MPI_Comm mpi_comm_physicalnode; /* communicator for all ranks of the physical node
+ * NOTE: this communicator should only be used during initialization and finalization, as it can contain ranks from PP, PME and multiple simulations with multisim
+ */
+ int nrank_intranode; /* nr of ranks on this physical node */
+ int rank_intranode; /* our rank on this physical node */
+ int nrank_pp_intranode; /* as nrank_intranode, for particle-particle only */
+ int rank_pp_intranode; /* as rank_intranode, for particle-particle only */
gmx_nodecomm_t nc;