Point to the corect MPI object.
Store the pointer to the object handle and not the pointer to the pointer. We should not assert(0) in the code ! Signed-off-by: George Bosilca <bosilca@icl.utk.edu>
Этот коммит содержится в:
родитель
d261282029
Коммит
e57834aaaa
@ -189,7 +189,6 @@ int mca_base_pvar_register (const char *project, const char *framework, const ch
|
||||
|
||||
/* assert on usage errors */
|
||||
if (!get_value && !ctx) {
|
||||
assert (0);
|
||||
return OPAL_ERR_BAD_PARAM;
|
||||
}
|
||||
|
||||
@ -203,14 +202,12 @@ int mca_base_pvar_register (const char *project, const char *framework, const ch
|
||||
case MCA_BASE_PVAR_CLASS_STATE:
|
||||
/* states MUST be integers */
|
||||
if (MCA_BASE_VAR_TYPE_INT != type) {
|
||||
assert (0);
|
||||
return OPAL_ERR_BAD_PARAM;
|
||||
}
|
||||
break;
|
||||
case MCA_BASE_PVAR_CLASS_COUNTER:
|
||||
/* counters can have the any of types in the fall-through except double */
|
||||
if (MCA_BASE_VAR_TYPE_DOUBLE == type) {
|
||||
assert (0);
|
||||
return OPAL_ERR_BAD_PARAM;
|
||||
}
|
||||
/* fall-through */
|
||||
@ -224,14 +221,12 @@ int mca_base_pvar_register (const char *project, const char *framework, const ch
|
||||
MCA_BASE_VAR_TYPE_UNSIGNED_LONG != type &&
|
||||
MCA_BASE_VAR_TYPE_UNSIGNED_LONG_LONG != type &&
|
||||
MCA_BASE_VAR_TYPE_DOUBLE != type) {
|
||||
assert (0);
|
||||
return OPAL_ERR_BAD_PARAM;
|
||||
}
|
||||
break;
|
||||
case MCA_BASE_PVAR_CLASS_PERCENTAGE:
|
||||
/* percentages must be doubles */
|
||||
if (MCA_BASE_VAR_TYPE_DOUBLE != type) {
|
||||
assert (0);
|
||||
return OPAL_ERR_BAD_PARAM;
|
||||
}
|
||||
break;
|
||||
@ -240,8 +235,7 @@ int mca_base_pvar_register (const char *project, const char *framework, const ch
|
||||
variables */
|
||||
break;
|
||||
default:
|
||||
assert (0);
|
||||
break;
|
||||
return OPAL_ERR_BAD_PARAM;
|
||||
}
|
||||
|
||||
/* update this assert if more MPIT verbosity levels are added */
|
||||
@ -253,7 +247,6 @@ int mca_base_pvar_register (const char *project, const char *framework, const ch
|
||||
ret = mca_base_pvar_get_internal (ret, &pvar, true);
|
||||
if (OPAL_SUCCESS != ret) {
|
||||
/* inconsistent internal state */
|
||||
assert (0);
|
||||
return OPAL_ERROR;
|
||||
}
|
||||
|
||||
@ -463,7 +456,7 @@ int mca_base_pvar_handle_alloc (mca_base_pvar_session_t *session, int index, voi
|
||||
break;
|
||||
}
|
||||
|
||||
pvar_handle->obj_handle = obj_handle;
|
||||
pvar_handle->obj_handle = (NULL == obj_handle ? NULL : *(void**)obj_handle);
|
||||
pvar_handle->pvar = pvar;
|
||||
|
||||
*handle = pvar_handle;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user