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,10 +406,15 @@ int orte_gpr_replica_get_fn(orte_gpr_addr_mode_t addr_mode,
}
ival_list->itag = iptr[j]->itag;
ival_list->value.type = 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);
OBJ_RELEASE(ival_list);
return rc;
/* 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))) {
ORTE_ERROR_LOG(rc);
OBJ_RELEASE(ival_list);
return rc;
}
}
opal_list_append(gptr->ival_list, &ival_list->item);
}
@ -489,9 +494,12 @@ int orte_gpr_replica_get_fn(orte_gpr_addr_mode_t addr_mode,
goto CLEANUP;
}
kptr[j]->value->type = 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);
goto CLEANUP;
/* 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))) {
ORTE_ERROR_LOG(rc);
goto CLEANUP;
}
}
OBJ_RELEASE(ival_list);
}
@ -599,10 +607,13 @@ int orte_gpr_replica_get_conditional_fn(orte_gpr_addr_mode_t addr_mode,
}
ival_list->itag = iptr[j]->itag;
ival_list->value.type = 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);
OBJ_RELEASE(ival_list);
return rc;
/* 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))) {
ORTE_ERROR_LOG(rc);
OBJ_RELEASE(ival_list);
return rc;
}
}
opal_list_append(gptr->ival_list, &ival_list->item);
}
@ -684,10 +695,13 @@ MOVEON:
goto CLEANUP;
}
kptr[j]->value->type = 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);
goto CLEANUP;
/* 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))) {
ORTE_ERROR_LOG(rc);
goto CLEANUP;
}
}
OBJ_RELEASE(ival_list);
}
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_std_cntr_t num_attrs_defd;
bool tval = true;
OPAL_TRACE(2);
@ -638,7 +637,7 @@ int orte_rmaps_base_store_mapping_plan(orte_jobid_t job, opal_list_t *attr_list)
}
} else {
if (ORTE_SUCCESS != (rc = orte_gpr.create_keyval(&(value->keyvals[j]), attr->key,
ORTE_BOOL, &tval))) {
ORTE_UNDEF, NULL))) {
ORTE_ERROR_LOG(rc);
OBJ_RELEASE(value);
return rc;
@ -716,7 +715,7 @@ int orte_rmaps_base_get_mapping_plan(orte_jobid_t job, opal_list_t *attr_list)
value = values[0];
for (i=0; i < value->cnt; i++) {
kval = value->keyvals[i];
if (ORTE_SUCCESS != (rc = orte_rmgr.add_attribute(attr_list, kval->key,
kval->value->type,
kval->value->data,
@ -727,7 +726,7 @@ int orte_rmaps_base_get_mapping_plan(orte_jobid_t job, opal_list_t *attr_list)
}
}
OBJ_RELEASE(value);
OBJ_RELEASE(value);
return ORTE_SUCCESS;
}