ENH: correct the selfComm procNo relative to world communicator

STYLE: qualify worldComm as UPstream instead Pstream

STYLE: PPCG::gSumMagProd() as static function
This commit is contained in:
Mark Olesen
2023-04-20 12:54:49 +02:00
parent a7c4c184b8
commit ce282dfbbf
8 changed files with 40 additions and 35 deletions

View File

@ -89,7 +89,7 @@ int main(int argc, char *argv[])
Info<< nl
<< "parallel:" << UPstream::parRun()
<< "nProcs = " << UPstream::nProcs()
<< " nProcs = " << UPstream::nProcs()
<< " with " << UPstream::nComms() << " predefined comm(s)."
<< " proc:" << UPstream::myProcNo() << nl;
@ -103,11 +103,14 @@ int main(int argc, char *argv[])
{
Info<< nl;
//- Process IDs within a given communicator
Info<< "procIDs: "
<< flatOutput(UPstream::procID(UPstream::commWorld())) << endl;
rankInfo(UPstream::commWorld());
// Process IDs within a given communicator
for (label comm = 0; comm < UPstream::nComms(); ++comm)
{
Info<< "comm=" << comm
<< " procIDs: " << flatOutput(UPstream::procID(comm)) << endl;
rankInfo(comm);
Pout<< nl;
}
Pout<< endl;
}