Skip to content

Commit

Permalink
3.0: fix support for MPIEXEC_TIMEOUT
Browse files Browse the repository at this point in the history
linter fix for comparison of int to uint resulted in MPIEXEC_TIMEOUT env being ignored

bot:notacherrypick

Signed-off-by: Min RK <benjaminrk@gmail.com>
  • Loading branch information
minrk committed Oct 1, 2024
1 parent c75e380 commit 74e45ee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tools/prte/prte.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ int main(int argc, char *argv[])
pmix_info_t *iptr, *iptr2, info;
pmix_status_t ret;
bool flag;
size_t n, m, ninfo, param_len;
size_t n, ninfo, param_len;
pmix_app_t *papps;
size_t napps;
mylock_t mylock;
Expand Down Expand Up @@ -1085,11 +1085,11 @@ int main(int argc, char *argv[])
opt = pmix_cmd_line_get_param(&results, PRTE_CLI_TIMEOUT);
if (NULL != opt || NULL != (timeoutenv = getenv("MPIEXEC_TIMEOUT"))) {
if (NULL != timeoutenv) {
m = strtoul(timeoutenv, NULL, 10);
i = strtol(timeoutenv, NULL, 10);
/* both cannot be present, or they must agree */
if (NULL != opt) {
n = strtoul(opt->values[0], NULL, 10);
if (m != n) {
n = strtol(opt->values[0], NULL, 10);
if (i != (int)n) {
pmix_show_help("help-prun.txt", "prun:timeoutconflict", false,
prte_tool_basename, n, timeoutenv);
PRTE_UPDATE_EXIT_STATUS(1);
Expand Down

0 comments on commit 74e45ee

Please sign in to comment.