-
Notifications
You must be signed in to change notification settings - Fork 35
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
Rework initialisation #459
Comments
Can't we just force |
Exactly. Until that line completes, you're "importing" |
Note that one way out of this is to move all the MPI/petsc initialisation into We should then expose it in the API and document when one needs to do things by hand. |
Closing as effectively a duplicate of firedrakeproject/firedrake#3820 |
Recent issues on HPC systems to do with forking show how fragile our "automatic" initialisation is. There's a subtle interplay between MPI init and enabling the fork server for compilation, along with when the forked child is allowed to "import" anything.
The issues are:
To address this we use Andreas Kloeckner's prefork.py to fork (before MPI_Init) a "fork server".
Plausibly the "prefork-everywhere" branch of PyOP2 addresses these problems. However, it's pretty fragile.
Problems are:
initialize MPI automagically. Therefore, we need to make sure we've set up the fork server before either of these are imported.
Given that we don't have a top-level "init" method the user has to call after importing firedrake, we're in a bit of a bind. Suggestions?
The text was updated successfully, but these errors were encountered: