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

Revert mods of 7728:7729 for easier merge from v1.0 branch later.

parent 0563a90f
No related branches found
No related tags found
No related merge requests found
...@@ -257,8 +257,11 @@ extern int task_layout(slurm_step_layout_t *step_layout) ...@@ -257,8 +257,11 @@ extern int task_layout(slurm_step_layout_t *step_layout)
* step_layout->num_hosts); * step_layout->num_hosts);
step_layout->host = xmalloc(sizeof(char *) step_layout->host = xmalloc(sizeof(char *)
* step_layout->num_hosts); * step_layout->num_hosts);
step_layout->tids = xmalloc(sizeof(uint32_t *) if ((step_layout->cpus == NULL) || (step_layout->tasks == NULL) ||
* step_layout->num_hosts); (step_layout->host == NULL)) {
slurm_seterrno(ENOMEM);
return SLURM_ERROR;
}
for (i=0; i<step_layout->num_hosts; i++) { for (i=0; i<step_layout->num_hosts; i++) {
step_layout->host[i] = hostlist_shift(step_layout->hl); step_layout->host[i] = hostlist_shift(step_layout->hl);
...@@ -269,6 +272,14 @@ extern int task_layout(slurm_step_layout_t *step_layout) ...@@ -269,6 +272,14 @@ extern int task_layout(slurm_step_layout_t *step_layout)
cpu_cnt = 0; cpu_cnt = 0;
} }
} }
step_layout->tasks = xmalloc(sizeof(uint32_t)
* step_layout->num_hosts);
step_layout->tids = xmalloc(sizeof(uint32_t *)
* step_layout->num_hosts);
if ((step_layout->tasks == NULL) || (step_layout->tids == NULL)) {
slurm_seterrno(ENOMEM);
return SLURM_ERROR;
}
if (step_layout->task_dist == SLURM_DIST_CYCLIC) if (step_layout->task_dist == SLURM_DIST_CYCLIC)
return _task_layout_cyclic(step_layout); return _task_layout_cyclic(step_layout);
......
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