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

Importing qcengine breaks OpenMPI programs #399

Closed
awvwgk opened this issue Mar 1, 2023 · 2 comments
Closed

Importing qcengine breaks OpenMPI programs #399

awvwgk opened this issue Mar 1, 2023 · 2 comments

Comments

@awvwgk
Copy link
Contributor

awvwgk commented Mar 1, 2023

Describe the bug

Importing qcng modifies the environment and can break running all OpenMPI programs.

To Reproduce

import subprocess
subprocess.run("printenv > previous.txt", shell=True)
import qcengine as qcng
subprocess.run("printenv > later.txt", shell=True)
--- previous.txt        2023-03-01 11:21:03.382801986 +0000
+++ later.txt   2023-03-01 11:21:12.898774636 +0000
@@ -2,0 +3 @@
+OMPI_MCA_pmix=^s1,s2,cray,isolated
@@ -5,0 +7 @@
+OMPI_MCA_ess=singleton
@@ -7,0 +10 @@
+PMIX_RANK=0
@@ -14,0 +18,4 @@
+PMIX_NAMESPACE=1256783873
 ...

Expected behavior

Modify environment transparently in the qcng provided util.execute wrapper, with possibility to turn off if unwanted.

Additional context

python                    3.10.9          he550d4f_0_cpython    conda-forge
python_abi                3.10                    3_cp310    conda-forge
qcengine                  0.26.0             pyhd8ed1ab_0    conda-forge
qcelemental               0.25.1             pyhd8ed1ab_1    conda-forge
@loriab loriab mentioned this issue Aug 8, 2023
2 tasks
@loriab
Copy link
Collaborator

loriab commented Aug 8, 2023

Yes, I see it. Easy to avoid, but a completely robust solution is harder since MDI is in a class by itself.

@loriab
Copy link
Collaborator

loriab commented Aug 8, 2023

In the meantime, mpi4py has been removed by #401, so solved permanently w/o #420 bandaid.

@loriab loriab closed this as completed Aug 8, 2023
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

2 participants