1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-10 14:10:46 +01:00

MPI_THREAD_SINGLE hack for Fugaku, enabled by -DTOFU

This commit is contained in:
nmeyer-ur 2020-05-11 13:21:39 +02:00
parent b2fd8b993a
commit ffaaed679e

View File

@ -43,6 +43,10 @@ void CartesianCommunicator::Init(int *argc, char ***argv)
MPI_Initialized(&flag); // needed to coexist with other libs apparently
if ( !flag ) {
#if defined (TOFU) // hack for FUGAKU, credits go to Issaku Kanamori
nCommThreads=1;
MPI_Init(argc,argv);
#else
MPI_Init_thread(argc,argv,MPI_THREAD_MULTIPLE,&provided);
//If only 1 comms thread we require any threading mode other than SINGLE, but for multiple comms threads we need MULTIPLE
@ -53,6 +57,7 @@ void CartesianCommunicator::Init(int *argc, char ***argv)
if( (nCommThreads > 1) && (provided != MPI_THREAD_MULTIPLE) ) {
assert(0);
}
#endif
}
// Never clean up as done once.
@ -479,5 +484,3 @@ void CartesianCommunicator::AllToAll(void *in,void *out,uint64_t words,uint64_t
}
NAMESPACE_END(Grid);