mpit: update the return code check for mca_base_var_get
mca_base_var_get now can return OPAL_ERR_NOT_FOUND if a variable no longer exists. This commit updates the return code check to ensure the correct MPI_T error code is returned to the user. cmr=v1.8.2:reviewer=jsquyres This commit was SVN r32161.
Этот коммит содержится в:
родитель
b6abe68972
Коммит
1eb6ac5e80
@ -37,7 +37,7 @@ int MPI_T_cvar_get_info(int cvar_index, char *name, int *name_len, int *verbosit
|
||||
do {
|
||||
rc = mca_base_var_get (cvar_index, &var);
|
||||
if (OPAL_SUCCESS != rc) {
|
||||
rc = (OPAL_ERR_VALUE_OUT_OF_BOUNDS == rc) ? MPI_T_ERR_INVALID_INDEX :
|
||||
rc = (OPAL_ERR_VALUE_OUT_OF_BOUNDS == rc || OPAL_ERR_NOT_FOUND == rc) ? MPI_T_ERR_INVALID_INDEX :
|
||||
MPI_ERR_OTHER;
|
||||
break;
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ int MPI_T_cvar_handle_alloc (int cvar_index, void *obj_handle,
|
||||
|
||||
rc = mca_base_var_get(cvar_index, &new_handle->var);
|
||||
if (OPAL_SUCCESS != rc) {
|
||||
rc = (OPAL_ERR_VALUE_OUT_OF_BOUNDS == rc) ? MPI_T_ERR_INVALID_INDEX:
|
||||
rc = (OPAL_ERR_VALUE_OUT_OF_BOUNDS == rc || OPAL_ERR_NOT_FOUND == rc) ? MPI_T_ERR_INVALID_INDEX:
|
||||
MPI_ERR_OTHER;
|
||||
free (new_handle);
|
||||
break;
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user