Skip to content
Snippets Groups Projects
Commit 0804e545 authored by Morris Jette's avatar Morris Jette
Browse files

cray mpmd - Add APID to data structure

parent 61269e2f
No related branches found
No related tags found
No related merge requests found
...@@ -316,6 +316,7 @@ extern void multi_prog_parse(stepd_step_rec_t *job, uint32_t **gtid) ...@@ -316,6 +316,7 @@ extern void multi_prog_parse(stepd_step_rec_t *job, uint32_t **gtid)
hostlist_t hl; hostlist_t hl;
tmp_cmd = xmalloc(sizeof(char *) * job->ntasks); tmp_cmd = xmalloc(sizeof(char *) * job->ntasks);
node_id2nid = xmalloc(sizeof(uint32_t) * job->nnodes);
ranks_node_id = xmalloc(sizeof(uint32_t) * job->ntasks); ranks_node_id = xmalloc(sizeof(uint32_t) * job->ntasks);
local_data = xstrdup(job->argv[1]); local_data = xstrdup(job->argv[1]);
while (1) { while (1) {
...@@ -377,12 +378,6 @@ extern void multi_prog_parse(stepd_step_rec_t *job, uint32_t **gtid) ...@@ -377,12 +378,6 @@ extern void multi_prog_parse(stepd_step_rec_t *job, uint32_t **gtid)
if (total_ranks != job->ntasks) if (total_ranks != job->ntasks)
goto fail; goto fail;
#if _DEBUG
info("MPMD NumPEs:%u", job->ntasks); /* Total rank count */
info("MPMD NumPEsHere:%u", job->node_tasks); /* Node's rank count */
#endif
node_id2nid = xmalloc(sizeof(uint32_t) * job->nnodes);
if (job->msg->complete_nodelist && if (job->msg->complete_nodelist &&
((hl = hostlist_create(job->msg->complete_nodelist)))) { ((hl = hostlist_create(job->msg->complete_nodelist)))) {
i = 0; i = 0;
...@@ -428,6 +423,7 @@ extern void multi_prog_parse(stepd_step_rec_t *job, uint32_t **gtid) ...@@ -428,6 +423,7 @@ extern void multi_prog_parse(stepd_step_rec_t *job, uint32_t **gtid)
} }
job->mpmd_set = xmalloc(sizeof(mpmd_set_t)); job->mpmd_set = xmalloc(sizeof(mpmd_set_t));
job->mpmd_set->apid = SLURM_ID_HASH(job->jobid, job->stepid);
job->mpmd_set->command = xmalloc(sizeof(char *) * job->ntasks); job->mpmd_set->command = xmalloc(sizeof(char *) * job->ntasks);
job->mpmd_set->first_pe = xmalloc(sizeof(int) * job->ntasks); job->mpmd_set->first_pe = xmalloc(sizeof(int) * job->ntasks);
job->mpmd_set->start_pe = xmalloc(sizeof(int) * job->ntasks); job->mpmd_set->start_pe = xmalloc(sizeof(int) * job->ntasks);
...@@ -461,6 +457,9 @@ extern void multi_prog_parse(stepd_step_rec_t *job, uint32_t **gtid) ...@@ -461,6 +457,9 @@ extern void multi_prog_parse(stepd_step_rec_t *job, uint32_t **gtid)
} }
} }
#if _DEBUG #if _DEBUG
info("MPMD Apid=%"PRIu64"", job->mpmd_set->apid);
info("MPMD NumPEs:%u", job->ntasks); /* Total rank count */
info("MPMD NumPEsHere:%u", job->node_tasks); /* Node's rank count */
info("MPMD NumCmds=%d", job->mpmd_set->num_cmds); info("MPMD NumCmds=%d", job->mpmd_set->num_cmds);
for (i = 0; i < job->mpmd_set->num_cmds; i++) { for (i = 0; i < job->mpmd_set->num_cmds; i++) {
info("MPMD Command:%s FirstPE: %d StartPE:%d TotalPEs:%d ", info("MPMD Command:%s FirstPE: %d StartPE:%d TotalPEs:%d ",
......
...@@ -113,6 +113,7 @@ typedef struct { ...@@ -113,6 +113,7 @@ typedef struct {
} stepd_step_task_info_t; } stepd_step_task_info_t;
typedef struct { /* MPMD specifications, needed for Cray */ typedef struct { /* MPMD specifications, needed for Cray */
uint64_t apid; /* Application ID */
int num_cmds; /* Number of executables in MPMD set */ int num_cmds; /* Number of executables in MPMD set */
char **command; /* Array of command name for each executable */ char **command; /* Array of command name for each executable */
int *first_pe; /* First rank on this node of each executable, int *first_pe; /* First rank on this node of each executable,
......
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