1
1

Remove non-standard MPI_ERR_SYSRESOURCE error code

Replaced internal usage with OMPI_ERR_OUT_OF_RESOURCE.

Signed-off-by: Nathan Hjelm <hjelmn@me.com>
Этот коммит содержится в:
Nathan Hjelm 2015-05-22 19:59:37 -06:00
родитель 403b3b20d7
Коммит 163a1b4505
5 изменённых файлов: 9 добавлений и 15 удалений

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

@ -479,7 +479,7 @@ int ompi_attr_init(void)
keyval_hash = OBJ_NEW(opal_hash_table_t); keyval_hash = OBJ_NEW(opal_hash_table_t);
if (NULL == keyval_hash) { if (NULL == keyval_hash) {
return MPI_ERR_SYSRESOURCE; return OMPI_ERR_OUT_OF_RESOURCE;
} }
key_bitmap = OBJ_NEW(opal_bitmap_t); key_bitmap = OBJ_NEW(opal_bitmap_t);
/* /*
@ -487,7 +487,7 @@ int ompi_attr_init(void)
*/ */
opal_bitmap_set_max_size (key_bitmap, OMPI_FORTRAN_HANDLE_MAX); opal_bitmap_set_max_size (key_bitmap, OMPI_FORTRAN_HANDLE_MAX);
if (0 != opal_bitmap_init(key_bitmap, 32)) { if (0 != opal_bitmap_init(key_bitmap, 32)) {
return MPI_ERR_SYSRESOURCE; return OMPI_ERR_OUT_OF_RESOURCE;
} }
for (int_pos = 0; int_pos < (sizeof(void*) / sizeof(MPI_Fint)); for (int_pos = 0; int_pos < (sizeof(void*) / sizeof(MPI_Fint));
@ -540,7 +540,7 @@ static int ompi_attr_create_keyval_impl(ompi_attribute_type_t type,
/* Allocate space for the list item */ /* Allocate space for the list item */
keyval = OBJ_NEW(ompi_attribute_keyval_t); keyval = OBJ_NEW(ompi_attribute_keyval_t);
if (NULL == keyval) { if (NULL == keyval) {
return MPI_ERR_SYSRESOURCE; return OMPI_ERR_OUT_OF_RESOURCE;
} }
/* Fill in the list item (must be done before we set the keyval /* Fill in the list item (must be done before we set the keyval
@ -667,7 +667,7 @@ int ompi_attr_set_c(ompi_attribute_type_t type, void *object,
int ret; int ret;
attribute_value_t *new_attr = OBJ_NEW(attribute_value_t); attribute_value_t *new_attr = OBJ_NEW(attribute_value_t);
if (NULL == new_attr) { if (NULL == new_attr) {
return MPI_ERR_SYSRESOURCE; return OMPI_ERR_OUT_OF_RESOURCE;
} }
OPAL_THREAD_LOCK(&attribute_lock); OPAL_THREAD_LOCK(&attribute_lock);
@ -698,7 +698,7 @@ int ompi_attr_set_fortran_mpi1(ompi_attribute_type_t type, void *object,
int ret; int ret;
attribute_value_t *new_attr = OBJ_NEW(attribute_value_t); attribute_value_t *new_attr = OBJ_NEW(attribute_value_t);
if (NULL == new_attr) { if (NULL == new_attr) {
return MPI_ERR_SYSRESOURCE; return OMPI_ERR_OUT_OF_RESOURCE;
} }
OPAL_THREAD_LOCK(&attribute_lock); OPAL_THREAD_LOCK(&attribute_lock);
@ -730,7 +730,7 @@ int ompi_attr_set_fortran_mpi2(ompi_attribute_type_t type, void *object,
int ret; int ret;
attribute_value_t *new_attr = OBJ_NEW(attribute_value_t); attribute_value_t *new_attr = OBJ_NEW(attribute_value_t);
if (NULL == new_attr) { if (NULL == new_attr) {
return MPI_ERR_SYSRESOURCE; return OMPI_ERR_OUT_OF_RESOURCE;
} }
OPAL_THREAD_LOCK(&attribute_lock); OPAL_THREAD_LOCK(&attribute_lock);
@ -1056,7 +1056,7 @@ int ompi_attr_delete_all(ompi_attribute_type_t type, void *object,
attrs = malloc(sizeof(attribute_value_t *) * num_attrs); attrs = malloc(sizeof(attribute_value_t *) * num_attrs);
if (NULL == attrs) { if (NULL == attrs) {
OPAL_THREAD_UNLOCK(&attribute_lock); OPAL_THREAD_UNLOCK(&attribute_lock);
return MPI_ERR_SYSRESOURCE; return OMPI_ERR_OUT_OF_RESOURCE;
} }
ret = opal_hash_table_get_first_key_uint32(attr_hash, &key, &attr, &node); ret = opal_hash_table_get_first_key_uint32(attr_hash, &key, &attr, &node);

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

@ -189,10 +189,10 @@ int ompi_attr_hash_init(opal_hash_table_t **hash)
*hash = OBJ_NEW(opal_hash_table_t); *hash = OBJ_NEW(opal_hash_table_t);
if (NULL == *hash) { if (NULL == *hash) {
fprintf(stderr, "Error while creating the local attribute list\n"); fprintf(stderr, "Error while creating the local attribute list\n");
return MPI_ERR_SYSRESOURCE; return OMPI_ERR_OUT_OF_RESOURCE;
} }
if (OMPI_SUCCESS != opal_hash_table_init(*hash, ATTR_HASH_SIZE)) { if (OMPI_SUCCESS != opal_hash_table_init(*hash, ATTR_HASH_SIZE)) {
return MPI_ERR_SYSRESOURCE; return OMPI_ERR_OUT_OF_RESOURCE;
} }
return MPI_SUCCESS; return MPI_SUCCESS;

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

@ -610,9 +610,6 @@ enum {
error codes without breaking ABI. */ error codes without breaking ABI. */
#define MPI_ERR_LASTCODE 92 #define MPI_ERR_LASTCODE 92
#define MPI_ERR_SYSRESOURCE -2
/* /*
* Comparison results. Don't change the order of these, the group * Comparison results. Don't change the order of these, the group
* comparison functions rely on it. * comparison functions rely on it.

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

@ -328,8 +328,6 @@ $constants->{MPI_ERR_RMA_SHARED} = 71;
$constants->{MPI_T_ERR_INVALID} = 72; $constants->{MPI_T_ERR_INVALID} = 72;
$constants->{MPI_ERR_LASTCODE} = 92; $constants->{MPI_ERR_LASTCODE} = 92;
$constants->{MPI_ERR_SYSRESOURCE} = -2;
$constants->{MPI_IDENT} = 0; $constants->{MPI_IDENT} = 0;
$constants->{MPI_CONGRUENT} = 1; $constants->{MPI_CONGRUENT} = 1;
$constants->{MPI_SIMILAR} = 2; $constants->{MPI_SIMILAR} = 2;

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

@ -176,5 +176,4 @@ JNIEXPORT void JNICALL Java_mpi_Constant_setConstant(JNIEnv *env, jobject obj)
ompi_java_setIntField(env, c, obj, "ERR_WIN", MPI_ERR_WIN); ompi_java_setIntField(env, c, obj, "ERR_WIN", MPI_ERR_WIN);
ompi_java_setIntField(env, c, obj, "ERR_LASTCODE", MPI_ERR_LASTCODE); ompi_java_setIntField(env, c, obj, "ERR_LASTCODE", MPI_ERR_LASTCODE);
ompi_java_setIntField(env, c, obj, "ERR_SYSRESOURCE", MPI_ERR_SYSRESOURCE);
} }