git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@7368 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -159,11 +159,12 @@ void Comm::set_proc_grid()
|
|||||||
MPI_Bcast(other_procgrid,3,MPI_INT,0,world);
|
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);
|
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) {
|
if (gridflag == ONELEVEL) {
|
||||||
pmap->onelevel_grid(nprocs,user_procgrid,procgrid,
|
pmap->onelevel_grid(nprocs,user_procgrid,procgrid,
|
||||||
@ -182,6 +183,7 @@ void Comm::set_proc_grid()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// error check on procgrid
|
// error check on procgrid
|
||||||
|
// should not be necessary due to ProcMap
|
||||||
|
|
||||||
if (procgrid[0]*procgrid[1]*procgrid[2] != nprocs)
|
if (procgrid[0]*procgrid[1]*procgrid[2] != nprocs)
|
||||||
error->all(FLERR,"Bad grid of processors");
|
error->all(FLERR,"Bad grid of processors");
|
||||||
|
|||||||
@ -174,18 +174,14 @@ void ProcMap::numa_grid(int nprocs, int *user_procgrid, int *procgrid,
|
|||||||
procs_per_node = name_map.begin()->second;
|
procs_per_node = name_map.begin()->second;
|
||||||
procs_per_numa = procs_per_node / numa_nodes;
|
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
|
if (nprocs % procs_per_numa || // total procs not a multiple of 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
|
|
||||||
user_procgrid[0] > 1 || // user specified grid > 1 in any dim
|
user_procgrid[0] > 1 || // user specified grid > 1 in any dim
|
||||||
user_procgrid[1] > 1 ||
|
user_procgrid[1] > 1 ||
|
||||||
user_procgrid[2] > 1)
|
user_procgrid[2] > 1)
|
||||||
error->all(FLERR,"Could not create numa 3d grid of processors");
|
error->all(FLERR,"Could not create numa 3d grid of processors");
|
||||||
|
|
||||||
|
|
||||||
// user settings for the factorization per numa node
|
// user settings for the factorization per numa node
|
||||||
// currently not user settable
|
// currently not user settable
|
||||||
// if user specifies 1 for a proc grid dimension,
|
// if user specifies 1 for a proc grid dimension,
|
||||||
|
|||||||
Reference in New Issue
Block a user