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

Interesting MPI issue / Import health #233

Open
fdmalone opened this issue May 30, 2023 · 0 comments
Open

Interesting MPI issue / Import health #233

fdmalone opened this issue May 30, 2023 · 0 comments
Assignees
Milestone

Comments

@fdmalone
Copy link
Collaborator

fdmalone commented May 30, 2023

In #230 I moved the from mpi4py import MPI imports to the MPIHandler class as importing MPI seems to call MPI_Initialize under the hood. This is problematic if subsequently one calls a subprocess which launches via mpirun / mpiexec (which is the case with the shciscf module.) Because mpi is already initialized mpirun does nothing and shciscf doesn't run. The hacky workaround was for me to delay the import MPI calls in mpi_handler, which were indirectly imported in the from_shci.py module.

There are two problems here, shci should probably live outside of the main repo (#229), and more broadly we should analyze imports as there is no real reason why mpi_handler imports should be making their way to from_shci which has no real dependency on our internal MPI calls (it's there indirectly through trial wavefunction or similar).

Just opening this as a reminder to myself, need to check if just using import mpi4py ... mpi4py.MPI is possible.

@fdmalone fdmalone self-assigned this May 30, 2023
@fdmalone fdmalone added this to the v1.0 milestone May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant