Skip to content

messageStream fails to create stream when using local communicator and the master is non-zero

Returning a stream via the masterStream function:

Foam::OSstream& Foam::messageStream::masterStream(const int communicator)

fails due to the redirection to

return this->stream()

where the communicator is lost/not used:

if (serialOnly && (UPstream::parRun() && !UPstream::master(/* MISSING COMMUNICATOR */)))
{
    return Snull;  // Non-serial, non-master: exit early
}
```