Skip to content

Commit

Permalink
wreck: issue fatal error if nnodes > ntasks
Browse files Browse the repository at this point in the history
Issue a fatal error in wrexecd if nnodes > ntasks. This case
is not handled correctly in wrexecd, and it is deemed unimportant
to fix now. Terminating the job with a failure is a better solution
than a hang or inconsistent state.
  • Loading branch information
grondo committed Mar 30, 2018
1 parent 1042efe commit 2d55622
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/modules/wreck/wrexecd.c
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,12 @@ int prog_ctx_load_lwj_info (struct prog_ctx *ctx)

prog_ctx_kz_err_open (ctx);

if (ctx->nnodes > ctx->total_ntasks) {
wlog_fatal (ctx, 1,
"nnodes assigned to job (%d) greater than ntasks (%d)!",
ctx->nnodes, ctx->total_ntasks);
}

if (prog_ctx_options_init (ctx) < 0)
wlog_fatal (ctx, 1, "failed to read %s.options",
flux_kvsdir_key (ctx->kvs));
Expand Down

0 comments on commit 2d55622

Please sign in to comment.