diff --git a/src/comm.cpp b/src/comm.cpp index 774d00a23f..e6c74f1098 100644 --- a/src/comm.cpp +++ b/src/comm.cpp @@ -159,11 +159,12 @@ void Comm::set_proc_grid() MPI_Bcast(other_procgrid,3,MPI_INT,0,world); } - // create ProcMap class + // create ProcMap class to create 3d grid and map procs to it ProcMap *pmap = new ProcMap(lmp); - // create 3d grid of processors, produces procgrid + // create 3d grid of processors + // produces procgrid and coregrid (if relevant) if (gridflag == ONELEVEL) { pmap->onelevel_grid(nprocs,user_procgrid,procgrid, @@ -182,6 +183,7 @@ void Comm::set_proc_grid() } // error check on procgrid + // should not be necessary due to ProcMap if (procgrid[0]*procgrid[1]*procgrid[2] != nprocs) error->all(FLERR,"Bad grid of processors"); diff --git a/src/procmap.cpp b/src/procmap.cpp index b3d02e59d9..6c5e31f106 100644 --- a/src/procmap.cpp +++ b/src/procmap.cpp @@ -174,18 +174,14 @@ void ProcMap::numa_grid(int nprocs, int *user_procgrid, int *procgrid, procs_per_node = name_map.begin()->second; procs_per_numa = procs_per_node / numa_nodes; - // error return if any of these conditions met + // error if any of these conditions met - if (procs_per_numa < 4 || // less than 4 procs per numa node - procs_per_node % numa_nodes || // no-op since numa_nodes = 1 for now - nprocs % procs_per_numa || // total procs not a multiple of node - nprocs == procs_per_numa || // only 1 node used + if (nprocs % procs_per_numa || // total procs not a multiple of node user_procgrid[0] > 1 || // user specified grid > 1 in any dim user_procgrid[1] > 1 || user_procgrid[2] > 1) error->all(FLERR,"Could not create numa 3d grid of processors"); - // user settings for the factorization per numa node // currently not user settable // if user specifies 1 for a proc grid dimension,