diff --git a/src/srun/attach.h b/src/srun/attach.h index 6d13cd80a79b73ea1d2eadced1847e45471a9b67..7238f75a967b3ba2e7b41efcf40fe6086efdb28d 100644 --- a/src/srun/attach.h +++ b/src/srun/attach.h @@ -77,4 +77,8 @@ extern int MPIR_acquired_pre_main; extern void MPIR_Breakpoint(void); extern void tv_launch_failure(void); +/* Value for totalview %J expansion in bulk launch string + */ +extern char *totalview_jobid; + #endif diff --git a/src/srun/msg.c b/src/srun/msg.c index 355b1e0b864ca4d815f0c012b4e8eb0cab403233..deda10f4304aee74979b89e30f7daacda13c52d1 100644 --- a/src/srun/msg.c +++ b/src/srun/msg.c @@ -62,6 +62,8 @@ # include "src/srun/attach.h" #endif +#include "src/common/xstring.h" + #define LAUNCH_WAIT_SEC 60 /* max wait to confirm launches, sec */ static int tasks_exited = 0; @@ -113,6 +115,8 @@ _build_tv_list(job_t *job, char *host, int nodeid, int ntasks, uint32_t *pid) if (MPIR_proctable_size == 0) { MPIR_proctable_size = opt.nprocs; MPIR_proctable = xmalloc(sizeof(MPIR_PROCDESC) * opt.nprocs); + totalview_jobid = NULL; + xstrfmtcat(totalview_jobid, "%lu", job->jobid); } for (i = 0; i < ntasks; i++) {