mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
Benchmark DWF works
This commit is contained in:
parent
6ebf9f15b7
commit
5e4bea8f20
@ -86,19 +86,23 @@ CartesianCommunicator::CartesianCommunicator(const std::vector<int> &processors,
|
|||||||
Lexicographic::IndexFromCoor(scoor,slex,processors);
|
Lexicographic::IndexFromCoor(scoor,slex,processors);
|
||||||
|
|
||||||
MPI_Comm comm_split;
|
MPI_Comm comm_split;
|
||||||
int ierr= MPI_Comm_split(communicator_world, rlex, slex,&comm_split);
|
if ( Nsubcomm > 1 ) {
|
||||||
assert(ierr==0);
|
int ierr= MPI_Comm_split(communicator_world, rlex, slex,&comm_split);
|
||||||
|
assert(ierr==0);
|
||||||
|
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Declare victory
|
||||||
|
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
std::cout << "Divided communicator "<< parent._Nprocessors<<" into "
|
||||||
|
<<Nsubcomm <<" communicators with " << Nsubrank << " ranks"<<std::endl;
|
||||||
|
} else {
|
||||||
|
comm_split = communicator_world;
|
||||||
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Set up from the new split communicator
|
// Set up from the new split communicator
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
InitFromMPICommunicator(processors,comm_split);
|
InitFromMPICommunicator(processors,comm_split);
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Declare victory
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
std::cout << "Divided communicator "<< parent._Nprocessors<<" into "
|
|
||||||
<<Nsubcomm <<" communicators with " << Nsubrank << " ranks"<<std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user