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

hydra/mpiexec: detect missing executables #6568

Merged
merged 1 commit into from
Jun 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/pm/hydra/mpiexec/mpiexec.c
Original file line number Diff line number Diff line change
@@ -53,6 +53,14 @@ int main(int argc, char **argv)
status = HYD_uii_mpx_get_parameters(argv);
HYDU_ERR_POP(status, "error parsing parameters\n");

/* Check if any exec argument is missing */
for (exec = HYD_uii_mpx_exec_list; exec; exec = exec->next) {
if (exec->exec[0] == NULL) {
HYDU_ERR_SETANDJUMP(status, HYD_INVALID_PARAM,
"Missing executable. Try -h for usages.\n");
}
}

/* The demux engine should be initialized before any sockets are
* created, since it checks for STDIN's validity. If STDIN was
* closed and we opened a socket that got the same fd as STDIN,