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

Also control importing of petsc4py with the use of OPENMDAO_REQUIRE_MPI #1445

Merged
merged 5 commits into from
Jun 8, 2020

Conversation

hschilling
Copy link
Member

Summary

The environment variable OPENMDAO_REQUIRE_MPI affected the importing of mpi4y but not petsc4py. This PR fixes that.

This issue came up because if the user's MPI install was corrupt, it was impossible to even run serial code. This gives the user to force serial mode and not import even petsc4py.

This fix actually does not completely solve the problem. Since OpenMDAO uses pyoptsparse, and since pyoptsparse also uses mpi4py, the user still will have issues. So a PR was submitted to the pyoptsparse repo, with the blessing of that team, to have a similar environment variable PYOPTSPARSE_REQUIRE_MPI to give explicit control over running in parallel or serial.

Related Issues

Backwards incompatibilities

None

New Dependencies

None

@swryan swryan merged commit 961ead4 into OpenMDAO:master Jun 8, 2020
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

Successfully merging this pull request may close these issues.

All imports of mpi4py should be skipped if OPENMDAO_REQUIRE_MPI environment variable is 0
5 participants