Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This addresses #399. If one has
pymdi
andmpi4py
packages in the environment, then merelyimport qcengine
adds a bunch of potentially interfering mpi envvars. The culprit in particular isfrom mpi4py import MPI
.This PR solves #399 by deferring import of mpi4py until the
MDIServer
is created. But (1) I don't know if that interferes with MDI, hence the @taylor-a-barnes ping (though he's out of the office for a while). Also (2) since MDI isn't a harness like all other programs or procedures, its code is more exposed and can't really be hidden behindexecute()
. Thus, the problem is still present if MDI has ever been invoked, and qcengine can still interfere with other, potentially non-qcng-controlled processes. Probably there should at least be a toggle to turn off MDI MPI even if mpi4py is present.Changelog description
Status