1
1

Revert out r14910. Turns out that the GPR *has* to be able to deal with NULL data values. We fixed this a long time ago on the "put" side, but never dealt with it for "get" - hence, we could "put" ORTE_UNDEF'd attributes in a mapping policy, but couldn't retrieve them. This is why you only encountered the error on comm_spawn and not during the original launch of a job.

This correctly repairs the problem by enabling the GPR's "get" function to correctly handle NULL data values.

This commit was SVN r14916.

The following SVN revision numbers were found above:
  r14910 --> open-mpi/ompi@0757467d77
Этот коммит содержится в:
Ralph Castain 2007-06-06 18:34:54 +00:00
родитель d8b06a2eff
Коммит ea0c03fd7a
2 изменённых файлов: 31 добавлений и 18 удалений

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

@ -406,11 +406,16 @@ int orte_gpr_replica_get_fn(orte_gpr_addr_mode_t addr_mode,
} }
ival_list->itag = iptr[j]->itag; ival_list->itag = iptr[j]->itag;
ival_list->value.type = iptr[j]->value->type; ival_list->value.type = iptr[j]->value->type;
/* it is okay for the data to be NULL as we may not have stored a value yet
* or we may be dealing with an UNDEF type
*/
if (NULL != iptr[j]->value->data) {
if (ORTE_SUCCESS != (rc = orte_dss.copy(&((ival_list->value).data), iptr[j]->value->data, iptr[j]->value->type))) { if (ORTE_SUCCESS != (rc = orte_dss.copy(&((ival_list->value).data), iptr[j]->value->data, iptr[j]->value->type))) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
OBJ_RELEASE(ival_list); OBJ_RELEASE(ival_list);
return rc; return rc;
} }
}
opal_list_append(gptr->ival_list, &ival_list->item); opal_list_append(gptr->ival_list, &ival_list->item);
} }
} }
@ -489,10 +494,13 @@ int orte_gpr_replica_get_fn(orte_gpr_addr_mode_t addr_mode,
goto CLEANUP; goto CLEANUP;
} }
kptr[j]->value->type = ival_list->value.type; kptr[j]->value->type = ival_list->value.type;
/* okay to have NULL data */
if (NULL != ival_list->value.data) {
if (ORTE_SUCCESS != (rc = orte_dss.copy(&((kptr[j]->value)->data), ival_list->value.data, ival_list->value.type))) { if (ORTE_SUCCESS != (rc = orte_dss.copy(&((kptr[j]->value)->data), ival_list->value.data, ival_list->value.type))) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
goto CLEANUP; goto CLEANUP;
} }
}
OBJ_RELEASE(ival_list); OBJ_RELEASE(ival_list);
} }
OBJ_RELEASE(gptr); OBJ_RELEASE(gptr);
@ -599,11 +607,14 @@ int orte_gpr_replica_get_conditional_fn(orte_gpr_addr_mode_t addr_mode,
} }
ival_list->itag = iptr[j]->itag; ival_list->itag = iptr[j]->itag;
ival_list->value.type = iptr[j]->value->type; ival_list->value.type = iptr[j]->value->type;
/* it is okay to have NULL data */
if (NULL != iptr[j]->value->data) {
if (ORTE_SUCCESS != (rc = orte_dss.copy(&((ival_list->value).data), iptr[j]->value->data, iptr[j]->value->type))) { if (ORTE_SUCCESS != (rc = orte_dss.copy(&((ival_list->value).data), iptr[j]->value->data, iptr[j]->value->type))) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
OBJ_RELEASE(ival_list); OBJ_RELEASE(ival_list);
return rc; return rc;
} }
}
opal_list_append(gptr->ival_list, &ival_list->item); opal_list_append(gptr->ival_list, &ival_list->item);
} }
} }
@ -684,10 +695,13 @@ MOVEON:
goto CLEANUP; goto CLEANUP;
} }
kptr[j]->value->type = ival_list->value.type; kptr[j]->value->type = ival_list->value.type;
/* okay to have NULL data */
if (NULL != ival_list->value.data) {
if (ORTE_SUCCESS != (rc = orte_dss.copy(&((kptr[j]->value)->data), ival_list->value.data, ival_list->value.type))) { if (ORTE_SUCCESS != (rc = orte_dss.copy(&((kptr[j]->value)->data), ival_list->value.data, ival_list->value.type))) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
goto CLEANUP; goto CLEANUP;
} }
}
OBJ_RELEASE(ival_list); OBJ_RELEASE(ival_list);
} }
OBJ_RELEASE(gptr); OBJ_RELEASE(gptr);

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

@ -596,7 +596,6 @@ int orte_rmaps_base_store_mapping_plan(orte_jobid_t job, opal_list_t *attr_list)
ORTE_RMAPS_BOOKMARK ORTE_RMAPS_BOOKMARK
}; };
orte_std_cntr_t num_attrs_defd; orte_std_cntr_t num_attrs_defd;
bool tval = true;
OPAL_TRACE(2); OPAL_TRACE(2);
@ -638,7 +637,7 @@ int orte_rmaps_base_store_mapping_plan(orte_jobid_t job, opal_list_t *attr_list)
} }
} else { } else {
if (ORTE_SUCCESS != (rc = orte_gpr.create_keyval(&(value->keyvals[j]), attr->key, if (ORTE_SUCCESS != (rc = orte_gpr.create_keyval(&(value->keyvals[j]), attr->key,
ORTE_BOOL, &tval))) { ORTE_UNDEF, NULL))) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
OBJ_RELEASE(value); OBJ_RELEASE(value);
return rc; return rc;