Update SLURM environmental variables used to describe allocation. Retain backwards compatibility to SLURM 1.1 and earlier versions.
This commit was SVN r19647.
Этот коммит содержится в:
родитель
aaae28b6c7
Коммит
edb3d99687
@ -75,11 +75,18 @@ static int orte_ras_slurm_allocate(opal_list_t *nodes)
|
|||||||
}
|
}
|
||||||
regexp = strdup(slurm_node_str);
|
regexp = strdup(slurm_node_str);
|
||||||
|
|
||||||
tasks_per_node = getenv("SLURM_TASKS_PER_NODE");
|
tasks_per_node = getenv("SLURM_JOB_CPUS_PER_NODE");
|
||||||
if (NULL == tasks_per_node) {
|
if (NULL == tasks_per_node) {
|
||||||
orte_show_help("help-ras-slurm.txt", "slurm-env-var-not-found", 1,
|
/* didn't find SLURM 1.2 or above envar - look for prior
|
||||||
"SLURM_TASKS_PER_NODE");
|
* version
|
||||||
return ORTE_ERR_NOT_FOUND;
|
*/
|
||||||
|
tasks_per_node = getenv("SLURM_TASKS_PER_NODE");
|
||||||
|
if (NULL == tasks_per_node) {
|
||||||
|
/* couldn't find any version - abort */
|
||||||
|
orte_show_help("help-ras-slurm.txt", "slurm-env-var-not-found", 1,
|
||||||
|
"SLURM_JOB_CPUS_PER NODE or SLURM_TASKS_PER_NODE");
|
||||||
|
return ORTE_ERR_NOT_FOUND;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
node_tasks = strdup(tasks_per_node);
|
node_tasks = strdup(tasks_per_node);
|
||||||
|
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user