29 cerr <<
"A 3D grid can not be created with less than one layer" <<
endl;
32 if(
nproc % nlayers != 0){
33 cerr <<
"Number of processes is not divisible by number of layers" <<
endl;
37 if(((
int)std::sqrt((
float)nlayers) * (
int)std::sqrt((
float)nlayers)) != nlayers){
39 cerr <<
"Number of layers is not a square number" <<
endl;
46 if(gridRows == 0 && gridCols == 0)
55 cerr <<
"This version of the Combinatorial BLAS only works on a square logical processor grid in a layer of the 3D grid" <<
endl;
60 assert((
nproc == (gridRows * gridCols * gridLayers)));
79 commGridLayer.reset(
new CommGrid(layerWorld, gridRows, gridCols));