1
1

Update SLURM environmental variables used to describe allocation. Retain backwards compatibility to SLURM 1.1 and earlier versions.

This commit was SVN r19647.
Этот коммит содержится в:
Ralph Castain 2008-09-26 02:38:37 +00:00
родитель aaae28b6c7
Коммит edb3d99687

Просмотреть файл

@ -75,11 +75,18 @@ static int orte_ras_slurm_allocate(opal_list_t *nodes)
}
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) {
orte_show_help("help-ras-slurm.txt", "slurm-env-var-not-found", 1,
"SLURM_TASKS_PER_NODE");
return ORTE_ERR_NOT_FOUND;
/* didn't find SLURM 1.2 or above envar - look for prior
* version
*/
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);