Update the rml_uri for each proc so debuggers can attach
This commit was SVN r28452.
Этот коммит содержится в:
родитель
707d0e653a
Коммит
756ee4b5e0
@ -76,6 +76,8 @@ int orte_rml_base_update_contact_info(opal_buffer_t* data)
|
|||||||
orte_process_name_t name;
|
orte_process_name_t name;
|
||||||
bool got_name;
|
bool got_name;
|
||||||
int rc;
|
int rc;
|
||||||
|
orte_job_t *jdata;
|
||||||
|
orte_proc_t *proc;
|
||||||
|
|
||||||
/* unpack the data for each entry */
|
/* unpack the data for each entry */
|
||||||
num_procs = 0;
|
num_procs = 0;
|
||||||
@ -96,16 +98,36 @@ int orte_rml_base_update_contact_info(opal_buffer_t* data)
|
|||||||
free(rml_uri);
|
free(rml_uri);
|
||||||
return(rc);
|
return(rc);
|
||||||
}
|
}
|
||||||
if (!got_name) {
|
/* extract the name */
|
||||||
/* we only get an update from a single jobid - the command
|
|
||||||
* that creates these doesn't cross jobid boundaries - so
|
|
||||||
* record it here
|
|
||||||
*/
|
|
||||||
if (ORTE_SUCCESS != (rc = orte_rml_base_parse_uris(rml_uri, &name, NULL))) {
|
if (ORTE_SUCCESS != (rc = orte_rml_base_parse_uris(rml_uri, &name, NULL))) {
|
||||||
ORTE_ERROR_LOG(rc);
|
ORTE_ERROR_LOG(rc);
|
||||||
free(rml_uri);
|
free(rml_uri);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
/* if we are the HNP, then we need to update the proc info
|
||||||
|
* so that debuggers can attach
|
||||||
|
*/
|
||||||
|
if (ORTE_PROC_IS_HNP) {
|
||||||
|
if (NULL == (jdata = orte_get_job_data_object(name.jobid))) {
|
||||||
|
ORTE_ERROR_LOG(ORTE_ERR_NOT_FOUND);
|
||||||
|
free(rml_uri);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (NULL == (proc = (orte_proc_t*)opal_pointer_array_get_item(jdata->procs, name.vpid))) {
|
||||||
|
ORTE_ERROR_LOG(ORTE_ERR_NOT_FOUND);
|
||||||
|
free(rml_uri);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (NULL != proc->rml_uri) {
|
||||||
|
free(proc->rml_uri);
|
||||||
|
}
|
||||||
|
proc->rml_uri = strdup(rml_uri);
|
||||||
|
}
|
||||||
|
if (!got_name) {
|
||||||
|
/* we only get an update from a single jobid - the command
|
||||||
|
* that creates these doesn't cross jobid boundaries - so
|
||||||
|
* only do this once
|
||||||
|
*/
|
||||||
got_name = true;
|
got_name = true;
|
||||||
/* if this is for a different job family, update the route to this proc */
|
/* if this is for a different job family, update the route to this proc */
|
||||||
if (ORTE_JOB_FAMILY(name.jobid) != ORTE_JOB_FAMILY(ORTE_PROC_MY_NAME->jobid)) {
|
if (ORTE_JOB_FAMILY(name.jobid) != ORTE_JOB_FAMILY(ORTE_PROC_MY_NAME->jobid)) {
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user