MolSSI / QCEngine

Quantum chemistry program executor and IO standardizer (QCSchema).
https://molssi.github.io/QCEngine/
BSD 3-Clause "New" or "Revised" License
162 stars 78 forks source link

defer MPI in MDI #420

Closed loriab closed 11 months ago

loriab commented 11 months ago

Description

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.

Changelog description

Status

codecov[bot] commented 11 months ago

Codecov Report

Merging #420 (f7bf8c1) into master (034fd1a) will decrease coverage by 18.24%. The diff coverage is 50.00%.

Additional details and impacted files
loriab commented 11 months ago

aha, the mpi4py is already gone in #401, so that fixes #399 nicely.

loriab commented 11 months ago

rendered unnecessary by #401