diff --git a/src/foam/db/IOstreams/Pstreams/gatherScatter.C b/src/foam/db/IOstreams/Pstreams/gatherScatter.C index 24bab91a5..d232c0e02 100644 --- a/src/foam/db/IOstreams/Pstreams/gatherScatter.C +++ b/src/foam/db/IOstreams/Pstreams/gatherScatter.C @@ -50,6 +50,13 @@ void Pstream::gather const label comm ) { + // Return if not active in this comm + // HJ, 12/Sep/2016 + if (Pstream::myProcNo(comm) == -1) + { + return; + } + if (Pstream::nProcs(comm) > 1) { // Get my communication order @@ -149,6 +156,13 @@ void Pstream::scatter const label comm ) { + // Return if not active in this comm + // HJ, 12/Sep/2016 + if (Pstream::myProcNo(comm) == -1) + { + return; + } + if (Pstream::nProcs(comm) > 1) { // Get my communication order diff --git a/src/foam/db/IOstreams/Pstreams/gatherScatterList.C b/src/foam/db/IOstreams/Pstreams/gatherScatterList.C index a017ecb55..8f872e384 100644 --- a/src/foam/db/IOstreams/Pstreams/gatherScatterList.C +++ b/src/foam/db/IOstreams/Pstreams/gatherScatterList.C @@ -54,6 +54,13 @@ void Pstream::gatherList const label comm ) { + // Return if not active in this comm + // HJ, 12/Sep/2016 + if (Pstream::myProcNo(comm) == -1) + { + return; + } + if (Pstream::nProcs(comm) > 1) { if (Values.size() != Pstream::nProcs(comm)) @@ -218,6 +225,13 @@ void Pstream::scatterList const label comm ) { + // Return if not active in this comm + // HJ, 12/Sep/2016 + if (Pstream::myProcNo(comm) == -1) + { + return; + } + if (Pstream::nProcs(comm) > 1) { if (Values.size() != Pstream::nProcs(comm))