ENH: gatherScatter: switch off comms if not parRun

This commit is contained in:
mattijs
2014-03-25 14:43:05 +00:00
parent 56cf651058
commit 5e83fc67a7

View File

@ -52,7 +52,7 @@ void Pstream::gather
const label comm
)
{
if (UPstream::nProcs(comm) > 1)
if (UPstream::parRun() && UPstream::nProcs(comm) > 1)
{
// Get my communication order
const commsStruct& myComm = comms[UPstream::myProcNo(comm)];
@ -151,7 +151,7 @@ void Pstream::scatter
const label comm
)
{
if (UPstream::nProcs(comm) > 1)
if (UPstream::parRun() && UPstream::nProcs(comm) > 1)
{
// Get my communication order
const commsStruct& myComm = comms[UPstream::myProcNo(comm)];