This addresses #399. If one has pymdi and mpi4py packages in the environment, then merely import qcengine adds a bunch of potentially interfering mpi envvars. The culprit in particular is from 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 behind execute(). 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.
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