Roll back r20926, r20941, r20950: Iain's changes from last week.
This has turned into an MPI spec interpretation issue. :-( Open MPI has intrepreted the spec one way for the past several years; these commits reflect a different interpretation that changes how we treat the EXTRA_STATE parameter to the Fortran attribute copy and delete callbacks. This new way breaks our internal copy of the Intel Fortran attribute tests. So after talking with Terry/Sun, we're going to back out these changes (both here and on the v1.3 branch) until we get further clarification from the Forum. This commit was SVN r21028. The following SVN revision numbers were found above: r20926 --> open-mpi/ompi@0a24eadaad r20941 --> open-mpi/ompi@045b0e8871 r20950 --> open-mpi/ompi@73af921c22
Этот коммит содержится в:
родитель
1f7281957f
Коммит
25249c9843
@ -251,7 +251,7 @@
|
||||
MPI_Fint attr_val = translate_to_fortran_mpi1(attribute); \
|
||||
(*((keyval_obj->delete_attr_fn).attr_mpi1_fortran_delete_fn)) \
|
||||
(&(((ompi_##type##_t *)object)->attr_##type##_f), \
|
||||
&f_key, &attr_val, &keyval_obj->extra_state.f_integer, &f_err); \
|
||||
&f_key, &attr_val, (int*)keyval_obj->extra_state, &f_err); \
|
||||
if (MPI_SUCCESS != OMPI_FINT_2_INT(f_err)) { \
|
||||
if (need_lock) { \
|
||||
OPAL_THREAD_UNLOCK(&alock); \
|
||||
@ -264,7 +264,7 @@
|
||||
MPI_Aint attr_val = translate_to_fortran_mpi2(attribute); \
|
||||
(*((keyval_obj->delete_attr_fn).attr_mpi2_fortran_delete_fn)) \
|
||||
(&(((ompi_##type##_t *)object)->attr_##type##_f), \
|
||||
&f_key, (int*)&attr_val, &keyval_obj->extra_state.f_address, &f_err); \
|
||||
&f_key, (int*)&attr_val, (int*)keyval_obj->extra_state, &f_err); \
|
||||
if (MPI_SUCCESS != OMPI_FINT_2_INT(f_err)) { \
|
||||
if (need_lock) { \
|
||||
OPAL_THREAD_UNLOCK(&alock); \
|
||||
@ -279,7 +279,7 @@
|
||||
if ((err = (*((keyval_obj->delete_attr_fn).attr_##type##_delete_fn)) \
|
||||
((ompi_##type##_t *)object, \
|
||||
key, attr_val, \
|
||||
keyval_obj->extra_state.c_ptr)) != MPI_SUCCESS) {\
|
||||
keyval_obj->extra_state)) != MPI_SUCCESS) {\
|
||||
if (need_lock) { \
|
||||
OPAL_THREAD_UNLOCK(&alock); \
|
||||
} \
|
||||
@ -301,7 +301,7 @@
|
||||
in = translate_to_fortran_mpi1(in_attr); \
|
||||
(*((keyval_obj->copy_attr_fn).attr_mpi1_fortran_copy_fn)) \
|
||||
(&(((ompi_##type##_t *)old_object)->attr_##type##_f), \
|
||||
&f_key, &keyval_obj->extra_state.f_integer, \
|
||||
&f_key, (int*)keyval_obj->extra_state, \
|
||||
&in, &out, &f_flag, &f_err); \
|
||||
if (MPI_SUCCESS != OMPI_FINT_2_INT(f_err)) { \
|
||||
OPAL_THREAD_UNLOCK(&alock); \
|
||||
@ -317,7 +317,7 @@
|
||||
in = translate_to_fortran_mpi2(in_attr); \
|
||||
(*((keyval_obj->copy_attr_fn).attr_mpi2_fortran_copy_fn)) \
|
||||
(&(((ompi_##type##_t *)old_object)->attr_##type##_f), \
|
||||
&f_key, &keyval_obj->extra_state.f_address, &in, &out, \
|
||||
&f_key, keyval_obj->extra_state, &in, &out, \
|
||||
&f_flag, &f_err); \
|
||||
if (MPI_SUCCESS != OMPI_FINT_2_INT(f_err)) { \
|
||||
OPAL_THREAD_UNLOCK(&alock); \
|
||||
@ -332,7 +332,7 @@
|
||||
void *in, *out; \
|
||||
in = translate_to_c(in_attr); \
|
||||
if ((err = (*((keyval_obj->copy_attr_fn).attr_##type##_copy_fn)) \
|
||||
((ompi_##type##_t *)old_object, key, keyval_obj->extra_state.c_ptr, \
|
||||
((ompi_##type##_t *)old_object, key, keyval_obj->extra_state, \
|
||||
in, &out, &flag, (ompi_##type##_t *)(new_object))) != MPI_SUCCESS) { \
|
||||
OPAL_THREAD_UNLOCK(&alock); \
|
||||
return err; \
|
||||
@ -438,7 +438,7 @@ ompi_attribute_keyval_construct(ompi_attribute_keyval_t *keyval)
|
||||
keyval->attr_flag = 0;
|
||||
keyval->copy_attr_fn.attr_communicator_copy_fn = NULL;
|
||||
keyval->delete_attr_fn.attr_communicator_copy_fn = NULL;
|
||||
keyval->extra_state.c_ptr = NULL;
|
||||
keyval->extra_state = NULL;
|
||||
keyval->bindings_extra_state = NULL;
|
||||
|
||||
/* Set the keyval->key value to an invalid value so that we can know
|
||||
@ -530,12 +530,10 @@ int ompi_attr_finalize(void)
|
||||
}
|
||||
|
||||
|
||||
static int ompi_attr_create_keyval_impl(ompi_attribute_type_t type,
|
||||
int ompi_attr_create_keyval(ompi_attribute_type_t type,
|
||||
ompi_attribute_fn_ptr_union_t copy_attr_fn,
|
||||
ompi_attribute_fn_ptr_union_t delete_attr_fn,
|
||||
int *key,
|
||||
ompi_attribute_fortran_ptr_t *extra_state,
|
||||
int flags,
|
||||
int *key, void *extra_state, int flags,
|
||||
void *bindings_extra_state)
|
||||
{
|
||||
ompi_attribute_keyval_t *keyval;
|
||||
@ -560,7 +558,7 @@ static int ompi_attr_create_keyval_impl(ompi_attribute_type_t type,
|
||||
|
||||
keyval->copy_attr_fn = copy_attr_fn;
|
||||
keyval->delete_attr_fn = delete_attr_fn;
|
||||
keyval->extra_state = *extra_state;
|
||||
keyval->extra_state = extra_state;
|
||||
keyval->attr_type = type;
|
||||
keyval->attr_flag = flags;
|
||||
keyval->key = -1;
|
||||
@ -584,53 +582,6 @@ static int ompi_attr_create_keyval_impl(ompi_attribute_type_t type,
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_attr_create_keyval(ompi_attribute_type_t type,
|
||||
ompi_attribute_fn_ptr_union_t copy_attr_fn,
|
||||
ompi_attribute_fn_ptr_union_t delete_attr_fn,
|
||||
int *key,
|
||||
void *extra_state,
|
||||
int flags,
|
||||
void *bindings_extra_state)
|
||||
{
|
||||
ompi_attribute_fortran_ptr_t es_tmp;
|
||||
|
||||
es_tmp.c_ptr = extra_state;
|
||||
return ompi_attr_create_keyval_impl(type, copy_attr_fn, delete_attr_fn,
|
||||
key, &es_tmp, flags,
|
||||
bindings_extra_state);
|
||||
}
|
||||
|
||||
int ompi_attr_create_keyval_fint(ompi_attribute_type_t type,
|
||||
ompi_attribute_fn_ptr_union_t copy_attr_fn,
|
||||
ompi_attribute_fn_ptr_union_t delete_attr_fn,
|
||||
int *key,
|
||||
MPI_Fint extra_state,
|
||||
int flags,
|
||||
void *bindings_extra_state)
|
||||
{
|
||||
ompi_attribute_fortran_ptr_t es_tmp;
|
||||
|
||||
es_tmp.f_integer = extra_state;
|
||||
return ompi_attr_create_keyval_impl(type, copy_attr_fn, delete_attr_fn,
|
||||
key, &es_tmp, flags,
|
||||
bindings_extra_state);
|
||||
}
|
||||
|
||||
int ompi_attr_create_keyval_aint(ompi_attribute_type_t type,
|
||||
ompi_attribute_fn_ptr_union_t copy_attr_fn,
|
||||
ompi_attribute_fn_ptr_union_t delete_attr_fn,
|
||||
int *key,
|
||||
MPI_Aint extra_state,
|
||||
int flags,
|
||||
void *bindings_extra_state)
|
||||
{
|
||||
ompi_attribute_fortran_ptr_t es_tmp;
|
||||
|
||||
es_tmp.f_address = extra_state;
|
||||
return ompi_attr_create_keyval_impl(type, copy_attr_fn, delete_attr_fn,
|
||||
key, &es_tmp, flags,
|
||||
bindings_extra_state);
|
||||
}
|
||||
|
||||
int ompi_attr_free_keyval(ompi_attribute_type_t type, int *key,
|
||||
bool predefined)
|
||||
|
@ -144,7 +144,6 @@ typedef union ompi_attribute_fn_ptr_union_t ompi_attribute_fn_ptr_union_t;
|
||||
union ompi_attribute_fortran_ptr_t {
|
||||
void *c_ptr;
|
||||
MPI_Fint f_integer;
|
||||
MPI_Aint f_address;
|
||||
};
|
||||
/**
|
||||
* Convenience typedef
|
||||
@ -163,7 +162,7 @@ struct ompi_attribute_keyval_t {
|
||||
attribute */
|
||||
ompi_attribute_fn_ptr_union_t delete_attr_fn; /**< Delete function for the
|
||||
attribute */
|
||||
ompi_attribute_fortran_ptr_t extra_state; /**< Extra state of the attribute */
|
||||
void *extra_state; /**< Extra state of the attribute */
|
||||
int key; /**< Keep a track of which key this item belongs to, so that
|
||||
the key can be deleted when this object is destroyed */
|
||||
|
||||
@ -253,26 +252,6 @@ OMPI_DECLSPEC int ompi_attr_create_keyval(ompi_attribute_type_t type,
|
||||
int *key, void *extra_state, int flags,
|
||||
void *bindings_extra_state);
|
||||
|
||||
/**
|
||||
* Same as ompi_attr_create_keyval, but extra_state is a Fortran default integer.
|
||||
*/
|
||||
|
||||
OMPI_DECLSPEC int ompi_attr_create_keyval_fint(ompi_attribute_type_t type,
|
||||
ompi_attribute_fn_ptr_union_t copy_attr_fn,
|
||||
ompi_attribute_fn_ptr_union_t delete_attr_fn,
|
||||
int *key, MPI_Fint extra_state, int flags,
|
||||
void *bindings_extra_state);
|
||||
|
||||
/**
|
||||
* Same as ompi_attr_create_keyval, but extra_state is a Fortran address integer.
|
||||
*/
|
||||
|
||||
OMPI_DECLSPEC int ompi_attr_create_keyval_aint(ompi_attribute_type_t type,
|
||||
ompi_attribute_fn_ptr_union_t copy_attr_fn,
|
||||
ompi_attribute_fn_ptr_union_t delete_attr_fn,
|
||||
int *key, MPI_Aint extra_state, int flags,
|
||||
void *bindings_extra_state);
|
||||
|
||||
/**
|
||||
* Free an attribute keyval
|
||||
* @param type Type of attribute (COMM/WIN/DTYPE) (IN)
|
||||
|
@ -78,8 +78,8 @@ void mpi_comm_create_keyval_f(ompi_mpi2_fortran_copy_attr_function* comm_copy_at
|
||||
INTEGER(KIND=MPI_ADDRESS_KIND)-parameter functions (as opposed
|
||||
to the old MPI-1 INTEGER-parameter functions). */
|
||||
|
||||
ret = ompi_attr_create_keyval_aint(COMM_ATTR, copy_fn, del_fn,
|
||||
comm_keyval, *extra_state, OMPI_KEYVAL_F77,
|
||||
ret = ompi_attr_create_keyval(COMM_ATTR, copy_fn, del_fn,
|
||||
comm_keyval, extra_state, OMPI_KEYVAL_F77,
|
||||
NULL);
|
||||
|
||||
if (MPI_SUCCESS != ret) {
|
||||
|
@ -78,8 +78,8 @@ void mpi_keyval_create_f(ompi_mpi1_fortran_copy_attr_function* copy_attr_fn,
|
||||
new MPI-2 INTEGER(KIND=MPI_ADDRESS_KIND)-parameter
|
||||
functions). */
|
||||
|
||||
ret = ompi_attr_create_keyval_fint(COMM_ATTR, copy_fn, del_fn,
|
||||
keyval, *extra_state,
|
||||
ret = ompi_attr_create_keyval(COMM_ATTR, copy_fn, del_fn,
|
||||
keyval, extra_state,
|
||||
OMPI_KEYVAL_F77 | OMPI_KEYVAL_F77_MPI1,
|
||||
NULL);
|
||||
|
||||
|
@ -75,8 +75,8 @@ void mpi_type_create_keyval_f(ompi_mpi2_fortran_copy_attr_function* type_copy_at
|
||||
INTEGER(KIND=MPI_ADDRESS_KIND)-parameter functions (as opposed
|
||||
to the old MPI-1 INTEGER-parameter functions). */
|
||||
|
||||
ret = ompi_attr_create_keyval_aint(TYPE_ATTR, copy_fn, del_fn,
|
||||
type_keyval, *extra_state, OMPI_KEYVAL_F77,
|
||||
ret = ompi_attr_create_keyval(TYPE_ATTR, copy_fn, del_fn,
|
||||
type_keyval, extra_state, OMPI_KEYVAL_F77,
|
||||
NULL);
|
||||
|
||||
if (MPI_SUCCESS != ret) {
|
||||
|
@ -77,8 +77,8 @@ void mpi_win_create_keyval_f(ompi_mpi2_fortran_copy_attr_function* win_copy_attr
|
||||
INTEGER(KIND=MPI_ADDRESS_KIND)-parameter functions (as opposed
|
||||
to the old MPI-1 INTEGER-parameter functions). */
|
||||
|
||||
ret = ompi_attr_create_keyval_aint(WIN_ATTR, copy_fn, del_fn,
|
||||
win_keyval, *extra_state, OMPI_KEYVAL_F77,
|
||||
ret = ompi_attr_create_keyval(WIN_ATTR, copy_fn, del_fn,
|
||||
win_keyval, extra_state, OMPI_KEYVAL_F77,
|
||||
NULL);
|
||||
|
||||
if (MPI_SUCCESS != ret) {
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user