BUG: avoid blocking on redistributePar (continuation of #2027)

- adjust sync condition (continuation of 201f117f5f)
This commit is contained in:
Mark Olesen
2021-03-23 09:59:38 +01:00
parent 221c3c0200
commit 5ba31cd5de

View File

@ -542,7 +542,7 @@ Foam::fileOperation::lookupAndCacheProcessorsPath
<< " detected:" << procDirs << endl;
}
if (Pstream::parRun())
if (Pstream::parRun() && (!distributed() || syncPar))
{
reduce(procDirsStatus, bitOrOp<unsigned>()); // worldComm
@ -612,11 +612,9 @@ Foam::fileOperation::lookupAndCacheProcessorsPath
}
}
}
else
else if (!Pstream::parRun())
{
// Serial
// If (as a side effect) we found the number of decompositions
// use it
// Serial: use the number of decompositions (if found)
if (nProcs)
{
const_cast<fileOperation&>(*this).setNProcs(nProcs);