Store the mapping mode so that it can be recovered later
This commit was SVN r13197.
Этот коммит содержится в:
родитель
2c46e10692
Коммит
1487e22ec8
@ -69,6 +69,7 @@ int orte_rmaps_base_get_job_map(orte_job_map_t **map, orte_jobid_t jobid)
|
|||||||
ORTE_NODE_OVERSUBSCRIBED_KEY,
|
ORTE_NODE_OVERSUBSCRIBED_KEY,
|
||||||
ORTE_JOB_VPID_START_KEY,
|
ORTE_JOB_VPID_START_KEY,
|
||||||
ORTE_JOB_VPID_RANGE_KEY,
|
ORTE_JOB_VPID_RANGE_KEY,
|
||||||
|
ORTE_JOB_MAPPING_MODE_KEY,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -87,13 +88,6 @@ int orte_rmaps_base_get_job_map(orte_job_map_t **map, orte_jobid_t jobid)
|
|||||||
/* set the jobid */
|
/* set the jobid */
|
||||||
mapping->job = jobid;
|
mapping->job = jobid;
|
||||||
|
|
||||||
/* get the vpid start/range info */
|
|
||||||
if (ORTE_SUCCESS != (rc = orte_rmgr.get_vpid_range(jobid, &mapping->vpid_start, &mapping->vpid_range))) {
|
|
||||||
ORTE_ERROR_LOG(rc);
|
|
||||||
OBJ_RELEASE(mapping);
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* get the job segment name */
|
/* get the job segment name */
|
||||||
if (ORTE_SUCCESS != (rc = orte_schema.get_job_segment_name(&segment, jobid))) {
|
if (ORTE_SUCCESS != (rc = orte_schema.get_job_segment_name(&segment, jobid))) {
|
||||||
ORTE_ERROR_LOG(rc);
|
ORTE_ERROR_LOG(rc);
|
||||||
@ -150,6 +144,14 @@ int orte_rmaps_base_get_job_map(orte_job_map_t **map, orte_jobid_t jobid)
|
|||||||
mapping->vpid_range = *vptr;
|
mapping->vpid_range = *vptr;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if(strcmp(value->keyvals[kv]->key, ORTE_JOB_MAPPING_MODE_KEY) == 0) {
|
||||||
|
/* use the dss.copy function here to protect us against zero-length strings */
|
||||||
|
if (ORTE_SUCCESS != (rc = orte_dss.copy((void**)&mapping->mapping_mode, value->keyvals[kv]->value->data, ORTE_STRING))) {
|
||||||
|
ORTE_ERROR_LOG(rc);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -332,12 +334,6 @@ int orte_rmaps_base_put_job_map(orte_job_map_t *map)
|
|||||||
return ORTE_ERR_BAD_PARAM;
|
return ORTE_ERR_BAD_PARAM;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* store the vpid start/range info */
|
|
||||||
if (ORTE_SUCCESS != (rc = orte_rmgr.set_vpid_range(map->job, map->vpid_start, map->vpid_range))) {
|
|
||||||
ORTE_ERROR_LOG(rc);
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* allocate value array. We need to reserve one extra spot so we can set the counter
|
* allocate value array. We need to reserve one extra spot so we can set the counter
|
||||||
* for the process INIT state to indicate that all procs are at that state. This will
|
* for the process INIT state to indicate that all procs are at that state. This will
|
||||||
@ -358,7 +354,7 @@ int orte_rmaps_base_put_job_map(orte_job_map_t *map)
|
|||||||
/** setup the last value in the array to store the vpid start/range and update the INIT counter */
|
/** setup the last value in the array to store the vpid start/range and update the INIT counter */
|
||||||
if (ORTE_SUCCESS != (rc = orte_gpr.create_value(&(values[num_procs]),
|
if (ORTE_SUCCESS != (rc = orte_gpr.create_value(&(values[num_procs]),
|
||||||
ORTE_GPR_OVERWRITE|ORTE_GPR_TOKENS_AND,
|
ORTE_GPR_OVERWRITE|ORTE_GPR_TOKENS_AND,
|
||||||
segment, 3, 1))) {
|
segment, 4, 1))) {
|
||||||
ORTE_ERROR_LOG(rc);
|
ORTE_ERROR_LOG(rc);
|
||||||
free(values);
|
free(values);
|
||||||
free(segment);
|
free(segment);
|
||||||
@ -376,6 +372,10 @@ int orte_rmaps_base_put_job_map(orte_job_map_t *map)
|
|||||||
ORTE_ERROR_LOG(rc);
|
ORTE_ERROR_LOG(rc);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
if (ORTE_SUCCESS != (rc = orte_gpr.create_keyval(&(values[num_procs]->keyvals[3]), ORTE_JOB_MAPPING_MODE_KEY, ORTE_STRING, map->mapping_mode))) {
|
||||||
|
ORTE_ERROR_LOG(rc);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
values[num_procs]->tokens[0] = strdup(ORTE_JOB_GLOBALS); /* counter is in the job's globals container */
|
values[num_procs]->tokens[0] = strdup(ORTE_JOB_GLOBALS); /* counter is in the job's globals container */
|
||||||
|
|
||||||
|
|
||||||
|
@ -81,6 +81,7 @@
|
|||||||
#define ORTE_JOB_TOTAL_SLOTS_ALLOC_KEY "orte-job-total-slots"
|
#define ORTE_JOB_TOTAL_SLOTS_ALLOC_KEY "orte-job-total-slots"
|
||||||
#define ORTE_JOB_IOF_KEY "orte-job-iof"
|
#define ORTE_JOB_IOF_KEY "orte-job-iof"
|
||||||
#define ORTE_JOB_STATE_KEY "orte-job-state"
|
#define ORTE_JOB_STATE_KEY "orte-job-state"
|
||||||
|
#define ORTE_JOB_MAPPING_MODE_KEY "orte-job-mapping-mode"
|
||||||
#define ORTE_PROC_NAME_KEY "orte-proc-name"
|
#define ORTE_PROC_NAME_KEY "orte-proc-name"
|
||||||
#define ORTE_PROC_RANK_KEY "orte-proc-rank"
|
#define ORTE_PROC_RANK_KEY "orte-proc-rank"
|
||||||
#define ORTE_PROC_PID_KEY "orte-proc-pid"
|
#define ORTE_PROC_PID_KEY "orte-proc-pid"
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user