-
Notifications
You must be signed in to change notification settings - Fork 277
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
stdin returns EAGAIN after system("mpiexec ...") #1782
Comments
Originally by buntinas on 2013-01-16 13:48:10 -0600 May be related to #1622??? |
My colleagues and I have run into this problem and have traced it down a bit. Mpich's The code that's directly responsible in You can trigger this bug by running |
Also, from what I've seen, it seems as if the flag only gets turned on when the CC @guillochon |
@pavanbalaji I am able to reproduce this bad behavior with bash 4.4 on OSX as suggested. I think we should consider #2755 for inclusion in 3.3 and 3.2.1. |
Originally by goodell on 2013-01-16 13:40:26 -0600
Originally reported on stackoverflow.com: http://stackoverflow.com/questions/14167620/stdin-seems-to-be-broken-after-call-to-system-invoking-mpiexec
Basically, a
read
syscall on fd 0 is returningEAGAIN
for some reason after a parent process runsmpiexec
in a subshell. For higher-level libraries likestd::getline
or libc'sgetline
, this usually translates into something that looks like stdin has been closed.I poked at it a while and couldn't figure out what's going on. The strace does not show mpiexec doing anything surprising. For example, we are not explicitly setting fd 0 to
O_NONBLOCK
AFAICS.For debugging, I intentionally "broke" the proxy so that mpiexec could not
exec
it and the problem still occurs. The problem also still occurs whether or not the proxy is launched locally withfork
+exec
or with SSH. So whatever is inducing the problem lives entirely in thempiexec
executable.The text was updated successfully, but these errors were encountered: