$ mpiexec bash -c "exit 1" $ echo $? 0 I'm not that familiar with perl, but it looks like the return value for the system command here: https://github.com/SchedMD/slurm/blob/b1656169f48a73c1229560d8d19a902e1956aac7/contribs/torque/mpiexec.pl#L165 should be captured (https://perldoc.perl.org/functions/system.html) so something like my $exit_code = system($command); system("rm -f $new_config") if($new_config); exit($exit_code >> 8);
Created attachment 15353 [details] Patch to correctly propagate exit code
Are there any plans to fix this issue? We've just replicated that workaround for us locally. But it would be nice if it gets into a future release.
Simon - Thanks for the submission. It's finally upstream, and will be included in the 23.11 release later this fall. Commit details follow for reference. - Tim commit 5ab128ca079102305be383a1ae23c7a87543150b Author: Simon Byrne <simonbyrne@gmail.com> AuthorDate: Tue Jun 27 10:43:52 2023 -0600 torque/mpiexec - Propagate exit code from launched process. Bug 9528.