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

Expunge PYOP2_NO_FORK_AVAILABLE #684

Closed
connorjward opened this issue Nov 24, 2022 · 3 comments
Closed

Expunge PYOP2_NO_FORK_AVAILABLE #684

connorjward opened this issue Nov 24, 2022 · 3 comments
Assignees

Comments

@connorjward
Copy link
Collaborator

See discussion.

@wence-
Copy link
Member

wence- commented Nov 24, 2022

I'll just note in passing that although this hasn't shown up as an issue anywhere, at large scale, infiniband network stacks are typically still fragile in the presence of fork after network bringup.

This workaround in pyop2 was never really a full solution anyway, so removing it would be fine.

To solve this generally, one needs to arrange that fork calls are made in a process that is "clean". pytools has a solution for this which is to spawn a "forkserver" before anything else happens. That is, you fork before network stack bringup and use that process to do all of your subsequent process forking.

As noted in that discussion, there are many places where the firedrake software stack calls subprocess.Popen. To fix this, all of those would have to be audited and fixed to use the prefork approach (possibly by importing and monkey-patching subprocess).

@inducer Do you still use prefork (and is it easy to do so with loopy)?

@inducer
Copy link

inducer commented Nov 24, 2022

I still maintain it, just in case. As for use, the story is a bit complex. With OpenCL, the JIT is mostly in-process, however https://github.com/pocl/pocl/ does fork a linker AFAIK. None of this appears to have been a source of problems so far on Lassen (a DOE machine) that we run things on.

As for Loopy, if you use it to do the (C-based) JIT'ing, you'll be using codepy, which internally already calls into pytools.prefork.

@connorjward
Copy link
Collaborator Author

Closing as this has been moved to Firedrake firedrakeproject/firedrake#3820

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

4 participants