Cleanup pointer array addressing
This commit was SVN r23329.
Этот коммит содержится в:
родитель
26fbae447e
Коммит
dd85689560
@ -39,9 +39,9 @@
|
|||||||
|
|
||||||
int orte_rml_base_get_contact_info(orte_jobid_t job, opal_buffer_t *data)
|
int orte_rml_base_get_contact_info(orte_jobid_t job, opal_buffer_t *data)
|
||||||
{
|
{
|
||||||
orte_vpid_t i;
|
int i;
|
||||||
orte_job_t *jdata;
|
orte_job_t *jdata;
|
||||||
orte_proc_t **procs;
|
orte_proc_t *proc;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
/* lookup the job */
|
/* lookup the job */
|
||||||
@ -52,13 +52,15 @@ int orte_rml_base_get_contact_info(orte_jobid_t job, opal_buffer_t *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* cycle through all procs in the job, adding their contact info to the buffer */
|
/* cycle through all procs in the job, adding their contact info to the buffer */
|
||||||
procs = (orte_proc_t**)jdata->procs->addr;
|
for (i=0; i < jdata->procs->size; i++) {
|
||||||
for (i=0; i < jdata->num_procs; i++) {
|
if (NULL == (proc = (orte_proc_t*)opal_pointer_array_get_item(jdata->procs, i))) {
|
||||||
/* if this proc doesn't have any contact info, ignore it */
|
|
||||||
if (NULL == procs[i]->rml_uri) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (ORTE_SUCCESS != (rc = opal_dss.pack(data, &procs[i]->rml_uri, 1, OPAL_STRING))) {
|
/* if this proc doesn't have any contact info, ignore it */
|
||||||
|
if (NULL == proc->rml_uri) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (ORTE_SUCCESS != (rc = opal_dss.pack(data, &proc->rml_uri, 1, OPAL_STRING))) {
|
||||||
ORTE_ERROR_LOG(rc);
|
ORTE_ERROR_LOG(rc);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user