Skip to content

Commit

Permalink
Merge pull request #6520 from hzhou/2305_mpiexec_noarg
Browse files Browse the repository at this point in the history
hydra/mpiexec: check empty command line and fail early

Approved-by: Ken Raffenetti
  • Loading branch information
hzhou authored May 15, 2023
2 parents bba85c7 + 73dddde commit 3a8737e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/pm/hydra/mpiexec/mpiexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ int main(int argc, char **argv)

PMISERV_pg_init();

if (argc == 1) {
HYDU_ERR_SETANDJUMP(status, HYD_INVALID_PARAM,
"No executable provided. Try -h for usages.\n");
}

/* Get user preferences */
status = HYD_uii_mpx_get_parameters(argv);
HYDU_ERR_POP(status, "error parsing parameters\n");
Expand Down

0 comments on commit 3a8737e

Please sign in to comment.