Skip to content
Snippets Groups Projects
Commit b017fb8c authored by Moe Jette's avatar Moe Jette
Browse files

Propogate SLURM_LL_API_DEBUG into MP_POERESTART_ENV.

parent d1199d9d
No related branches found
No related tags found
No related merge requests found
...@@ -362,19 +362,22 @@ int setup_env(env_t *env) ...@@ -362,19 +362,22 @@ int setup_env(env_t *env)
uname(&name); uname(&name);
if (strcasecmp(name.sysname, "AIX") == 0) { if (strcasecmp(name.sysname, "AIX") == 0) {
char res_env[64]; char res_env[128], tmp_env[32];
if (env->jobid >= 0) char *debug_env = getenv("SLURM_LL_API_DEBUG");
snprintf(res_env, sizeof(res_env), "SLURM_JOBID=%d", int debug_num = 0;
if (debug_env)
debug_num = atoi(debug_env);
snprintf(res_env, sizeof(res_env), "SLURM_LL_API_DEBUG=%d",
debug_num);
if (env->jobid >= 0) {
snprintf(tmp_env, sizeof(tmp_env), "\nSLURM_JOBID=%d",
env->jobid); env->jobid);
else strcat(res_env, tmp_env);
res_env[0] = '\0'; }
if (env->stepid >= 0) { if (env->stepid >= 0) {
char step_env[32]; snprintf(tmp_env, sizeof(tmp_env), "\nSLURM_STEPID=%d",
snprintf(step_env, sizeof(res_env), "SLURM_STEPID=%d",
env->stepid); env->stepid);
if (res_env[0] != '\0') strcat(res_env, tmp_env);
strcat(res_env, "\n");
strcat(res_env, step_env);
} }
setenvf(&env->env, "MP_POERESTART_ENV", res_env); setenvf(&env->env, "MP_POERESTART_ENV", res_env);
/* Required for AIX/POE systems indicating pre-allocation */ /* Required for AIX/POE systems indicating pre-allocation */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment