Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could MPI comm world feature remove need for PStream patch #6

Open
edwardsmith999 opened this issue Mar 15, 2023 · 0 comments
Open

Comments

@edwardsmith999
Copy link
Member

In the help for icoFOAM (and others) there is the option:
-world <name> Name of the local world for parallel communication

As discussed, this allows one processor parallel cases and avoids assuming MPI_COMM_WORLD, see e.g.

https://develop.openfoam.com/Development/openfoam/-/merge_requests/398/diffs?commit_id=89f2cda3abe9010d3994802080950a64af92a5ba

                if (Pstream::nProcs() == 1)
                {
                    WarningInFunction
                        << "Running parallel on single processor. This only"
                        << " makes sense for multi-world simulation" << endl;
                    dictNProcs = 1;
                }

however, this also means the parallel single case will not write to processor0, see e.g.

    case_ = globalCase_/("processor" + Foam::name(Pstream::myProcNo()));
    if (Pstream::nProcs() > 1)
    {
        case_ = globalCase_/("processor" + Foam::name(Pstream::myProcNo()));
    }
    else
    {
        case_ = globalCase_;
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant