Exclude processors outside of comm from gatherScatter without failure

This commit is contained in:
Hrvoje Jasak 2016-09-20 22:12:22 +01:00
parent 7261ad5177
commit 3ecf7074fe
2 changed files with 28 additions and 0 deletions

View file

@ -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

View file

@ -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))