mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
Relaxed constraints on MPI thread mode when not using multiple comms threads
This commit is contained in:
parent
c96483e3bd
commit
e30a80a234
@ -44,7 +44,10 @@ void CartesianCommunicator::Init(int *argc, char ***argv)
|
|||||||
MPI_Initialized(&flag); // needed to coexist with other libs apparently
|
MPI_Initialized(&flag); // needed to coexist with other libs apparently
|
||||||
if ( !flag ) {
|
if ( !flag ) {
|
||||||
MPI_Init_thread(argc,argv,MPI_THREAD_MULTIPLE,&provided);
|
MPI_Init_thread(argc,argv,MPI_THREAD_MULTIPLE,&provided);
|
||||||
assert (provided == MPI_THREAD_MULTIPLE);
|
//If only 1 comms thread we require any threading mode other than SINGLE, but for multiple comms threads we need MULTIPLE
|
||||||
|
if( (nCommThreads == 1 && provided == MPI_THREAD_SINGLE) ||
|
||||||
|
(nCommThreads > 1 && provided != MPI_THREAD_MULTIPLE) )
|
||||||
|
assert(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
Grid_quiesce_nodes();
|
Grid_quiesce_nodes();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user