mca_base_var: use ERR_NOT_FOUND when var is inactive
After discussion with Nathan, change the ERR_VALUE_OUT_OF_BOUNDS to be ERR_NOT_FOUND, for two reasons: 1. It's consistent with other uses of ERR_NOT_FOUND in the code. 1. In this case, we could have just looked up a variable that is basically a "hole" -- e.g., var indexes 0, 1, 2 are valid, and 4, 5, and 5 are valid, but 3 is invalid (e.g., 3 was de-registered -- remember that MPI_T explicitly does not allow re-using indexes). So returning ERR_OUT_OF_BOUNDS seems weird -- returning ERR_NOT_FOUND seems a bit more natural. cmr=v1.8.2:ticket=trac:4587 This commit was SVN r32158. The following Trac tickets were found above: Ticket 4587 --> https://svn.open-mpi.org/trac/ompi/ticket/4587
Этот коммит содержится в:
родитель
1e17ab461b
Коммит
86f747c627
@ -424,7 +424,7 @@ int mca_base_var_get_value (int vari, const void *value,
|
||||
}
|
||||
|
||||
if (!VAR_IS_VALID(var[0])) {
|
||||
return OPAL_ERR_VALUE_OUT_OF_BOUNDS;
|
||||
return OPAL_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
if (NULL != value) {
|
||||
@ -843,7 +843,7 @@ int mca_base_var_get (int vari, const mca_base_var_t **var)
|
||||
}
|
||||
|
||||
if (!VAR_IS_VALID(*(var[0]))) {
|
||||
return OPAL_ERR_VALUE_OUT_OF_BOUNDS;
|
||||
return OPAL_ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user