1
1

Many fixes to MPI attributes. This mainly affected the following

areas:
- The MPI attribute functions in f77 (the MPI-2 set, get,
  keyval_create functions for each of the 3 types [comm, datatype,
  win], and the MPI-1 put/get functions)
- the src/attribute/* back-end implementation
- MPI_TYPE_DUP implementation
- back-end ddt implementation

Here are the foxes:
- F77 attributes were previously being saved by reference (!)
- Until a few days ago, I didn't realize that the Fortran callback
  functions between MPI-1 and MPI-2 had different signatures.  These
  changes update to handle all 3 kinds of callback functions: C, MPI-1
  Fortran, and MPI-2 fortran.
- Also clean up a few related bugs with respect to MPI_TYPE_DUP (i.e.,
  ensure that all attribute callbacks are properly invoked) and
  ompi_ddt_duplicate (ensure that flags, f2c index, and keyhash are
  all set properly).

This commit was SVN r6099.
Этот коммит содержится в:
Jeff Squyres 2005-06-20 16:41:28 +00:00
родитель 2ab7f0c208
Коммит e178fa7564
18 изменённых файлов: 344 добавлений и 156 удалений

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

@ -45,27 +45,63 @@
/* Not checking for NULL_DELETE_FN here, since according to the
MPI-standard it should be a valid function that returns
MPI_SUCCESS */
MPI_SUCCESS.
#define DELETE_ATTR_OBJECT(type, attribute) \
if((key_item->attr_flag & OMPI_KEYVAL_F77)) { \
This macro exists because we have to replicate the same code for
MPI_Comm, MPI_Datatype, and MPI_Win. Ick.
There are 3 possible sets of callbacks:
1. MPI-1 Fortran-style: attribute and extra state arguments are of
type (INTEGER). This is used if both the OMPI_KEYVAL_F77 and
OMPI_KEYVAL_F77_OLD flags are set.
2. MPI-2 Fortran-style: attribute and extra state arguments are of
type (INTEGER(KIND=MPI_ADDRESS_KIND)). This is used if the
OMPI_KEYVAL_F77 flag is set and the OMPI_KEYVAL_F77_OLD flag is
*not* set.
3. C-style: attribute arguments are of type (void*). This is used
if OMPI_KEYVAL_F77 is not set.
Ick.
*/
#define DELETE_ATTR_OBJECT(type, attribute, keyval_obj) \
if (0 != (keyval_obj->attr_flag & OMPI_KEYVAL_F77)) { \
MPI_Fint f_key = OMPI_INT_2_FINT(key); \
MPI_Fint f_err; \
(*((key_item->delete_attr_fn).attr_F_delete_fn)) \
(&(((ompi_##type##_t *)object)->attr_##type##_f), \
&f_key, (MPI_Fint *) &attribute, \
(MPI_Fint *) key_item->extra_state, &f_err); \
if (MPI_SUCCESS != OMPI_FINT_2_INT(f_err)) { \
if (need_lock) { \
OMPI_THREAD_UNLOCK(&alock); \
/* MPI-1 Fortran-style */ \
if (0 != (keyval_obj->attr_flag & OMPI_KEYVAL_F77_OLD)) { \
ompi_attribute_fortran_ptr_t value; \
value.c_ptr = attribute; \
(*((keyval_obj->delete_attr_fn).attr_mpi1_fortran_delete_fn)) \
(&(((ompi_##type##_t *)object)->attr_##type##_f), \
&f_key, &value.f_integer, keyval_obj->extra_state, &f_err); \
if (MPI_SUCCESS != OMPI_FINT_2_INT(f_err)) { \
if (need_lock) { \
OMPI_THREAD_UNLOCK(&alock); \
} \
return OMPI_FINT_2_INT(f_err); \
} \
return OMPI_FINT_2_INT(f_err); \
} \
} else { \
if ((err = (*((key_item->delete_attr_fn).attr_##type##_delete_fn)) \
/* MPI-2 Fortran-style */ \
else { \
(*((keyval_obj->delete_attr_fn).attr_mpi2_fortran_delete_fn)) \
(&(((ompi_##type##_t *)object)->attr_##type##_f), \
&f_key, &attribute, keyval_obj->extra_state, &f_err); \
if (MPI_SUCCESS != OMPI_FINT_2_INT(f_err)) { \
if (need_lock) { \
OMPI_THREAD_UNLOCK(&alock); \
} \
return OMPI_FINT_2_INT(f_err); \
} \
} \
} \
/* C style */ \
else { \
if ((err = (*((keyval_obj->delete_attr_fn).attr_##type##_delete_fn)) \
((ompi_##type##_t *)object, \
key, attribute, \
key_item->extra_state)) != MPI_SUCCESS) {\
keyval_obj->extra_state)) != MPI_SUCCESS) {\
if (need_lock) { \
OMPI_THREAD_UNLOCK(&alock); \
} \
@ -73,28 +109,58 @@
} \
}
#define COPY_ATTR_OBJECT(type, old_object, hash_value) \
if((hash_value->attr_flag & OMPI_KEYVAL_F77)) { \
/* See the big, long comment above from DELETE_ATTR_OBJECT -- most of
that text applies here, too. */
#define COPY_ATTR_OBJECT(type, old_object, keyval_obj, in_attr, out_attr) \
if (0 != (keyval_obj->attr_flag & OMPI_KEYVAL_F77)) { \
MPI_Fint f_key = OMPI_INT_2_FINT(key); \
MPI_Fint f_err; \
ompi_fortran_logical_t f_flag; \
(*((hash_value->copy_attr_fn).attr_F_copy_fn)) \
(&(((ompi_##type##_t *)old_object)->attr_##type##_f),\
&f_key, (MPI_Fint *) hash_value->extra_state, \
(MPI_Fint *) &old_attr, \
(MPI_Fint *) &new_attr, &f_flag, &f_err); \
if (MPI_SUCCESS != OMPI_FINT_2_INT(f_err)) { \
OMPI_THREAD_UNLOCK(&alock); \
return OMPI_FINT_2_INT(f_err); \
/* MPI-1 Fortran-style */ \
if (0 != (keyval_obj->attr_flag & OMPI_KEYVAL_F77_OLD)) { \
ompi_attribute_fortran_ptr_t in, out; \
MPI_Fint tmp = 0; \
in.c_ptr = 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, \
&in.f_integer, &tmp, &f_flag, &f_err); \
if (MPI_SUCCESS != OMPI_FINT_2_INT(f_err)) { \
OMPI_THREAD_UNLOCK(&alock); \
return OMPI_FINT_2_INT(f_err); \
} \
/* Must do weird sign extension -- see src/mpi/f77/attr_put_f.c for details */ \
if (tmp < 0) { \
out.c_ptr = (void *) -1; \
} else { \
out.c_ptr = (void *) 0; \
} \
out.f_integer = tmp; \
out_attr = out.c_ptr; \
flag = OMPI_FINT_2_INT(f_flag); \
} \
flag = OMPI_FINT_2_INT(f_flag); \
} else { \
if ((err = (*((hash_value->copy_attr_fn).attr_##type##_copy_fn)) \
((ompi_##type##_t *)old_object, key, hash_value->extra_state, \
old_attr, &new_attr, &flag)) != MPI_SUCCESS) { \
/* MPI-2 Fortran-style */ \
else { \
(*((keyval_obj->copy_attr_fn).attr_mpi2_fortran_copy_fn)) \
(&(((ompi_##type##_t *)old_object)->attr_##type##_f), \
&f_key, keyval_obj->extra_state, &in_attr, &out_attr, \
&f_flag, &f_err); \
if (MPI_SUCCESS != OMPI_FINT_2_INT(f_err)) { \
OMPI_THREAD_UNLOCK(&alock); \
return OMPI_FINT_2_INT(f_err); \
} \
flag = OMPI_FINT_2_INT(f_flag); \
} \
} \
/* C style */ \
else { \
if ((err = (*((keyval_obj->copy_attr_fn).attr_##type##_copy_fn)) \
((ompi_##type##_t *)old_object, key, keyval_obj->extra_state, \
in_attr, &out_attr, &flag)) != MPI_SUCCESS) { \
OMPI_THREAD_UNLOCK(&alock); \
return err; \
}\
} \
}
@ -342,17 +408,17 @@ ompi_attr_delete(ompi_attribute_type_t type, void *object,
if ( OMPI_SUCCESS == ret ) {
switch(type) {
case COMM_ATTR:
DELETE_ATTR_OBJECT(communicator, attr);
DELETE_ATTR_OBJECT(communicator, attr, key_item);
break;
#if OMPI_WANT_MPI2_ONE_SIDED
case WIN_ATTR:
DELETE_ATTR_OBJECT(win, attr);
DELETE_ATTR_OBJECT(win, attr, key_item);
break;
#endif
case TYPE_ATTR:
DELETE_ATTR_OBJECT(datatype, attr);
DELETE_ATTR_OBJECT(datatype, attr, key_item);
break;
default:
@ -436,17 +502,17 @@ ompi_attr_set(ompi_attribute_type_t type, void *object,
if ( OMPI_SUCCESS == ret ) {
switch(type) {
case COMM_ATTR:
DELETE_ATTR_OBJECT(communicator, oldattr);
DELETE_ATTR_OBJECT(communicator, oldattr, key_item);
break;
#if OMPI_WANT_MPI2_ONE_SIDED
case WIN_ATTR:
DELETE_ATTR_OBJECT(win, oldattr);
DELETE_ATTR_OBJECT(win, oldattr, key_item);
break;
#endif
case TYPE_ATTR:
DELETE_ATTR_OBJECT(datatype, oldattr);
DELETE_ATTR_OBJECT(datatype, oldattr, key_item);
break;
default:
@ -566,18 +632,18 @@ ompi_attr_copy_all(ompi_attribute_type_t type, void *old_object,
switch (type) {
case COMM_ATTR:
/* Now call the copy_attr_fn */
COPY_ATTR_OBJECT(communicator, old_object, hash_value);
COPY_ATTR_OBJECT(communicator, old_object, hash_value, old_attr, new_attr);
break;
case TYPE_ATTR:
/* Now call the copy_attr_fn */
COPY_ATTR_OBJECT(datatype, old_object, hash_value);
COPY_ATTR_OBJECT(datatype, old_object, hash_value, old_attr, new_attr);
break;
#if OMPI_WANT_MPI2_ONE_SIDED
case WIN_ATTR:
/* Now call the copy_attr_fn */
COPY_ATTR_OBJECT(win, old_object, hash_value);
COPY_ATTR_OBJECT(win, old_object, hash_value, old_attr, new_attr);
break;
#endif
}
@ -588,10 +654,6 @@ ompi_attr_copy_all(ompi_attribute_type_t type, void *old_object,
so that no comparison is done for prdefined at all and it
just falls off the error checking loop in attr_set */
/* VPS: we pass the address of new_attr in here, I am assuming
that new_attr should have actually been a double pointer in
the copy fn, but since its a pointer in that MPI specs, we
need to pass *new_attr here */
if (1 == flag) {
ompi_attr_set(type, new_object, &newkeyhash, key,
new_attr, true, false);

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

@ -39,6 +39,7 @@
#define OMPI_KEYVAL_PREDEFINED 1
#define OMPI_KEYVAL_F77 2
#define OMPI_KEYVAL_F77_OLD 4
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
@ -55,18 +56,39 @@ enum ompi_attribute_type_t{
typedef enum ompi_attribute_type_t ompi_attribute_type_t;
/* Fortran function pointer declarations for copy and delete. These
will only be used here and not in the front end functions */
/* Old-style MPI-1 Fortran function pointer declarations for copy and
delete. These will only be used here and not in the front end
functions. */
typedef void (MPI_F_copy_function)(MPI_Fint *oldcomm, MPI_Fint *keyval,
MPI_Fint *extra_state,
MPI_Fint *attr_in, MPI_Fint *attr_out,
ompi_fortran_logical_t *flag,
MPI_Fint *ierr);
typedef void (MPI_F_delete_function)(MPI_Fint *comm, MPI_Fint *keyval,
MPI_Fint *attr_in,
MPI_Fint *extra_state, MPI_Fint *ierr);
typedef void (ompi_mpi1_fortran_copy_attr_function)(MPI_Fint *oldobj,
MPI_Fint *keyval,
MPI_Fint *extra_state,
MPI_Fint *attr_in,
MPI_Fint *attr_out,
ompi_fortran_logical_t *flag,
MPI_Fint *ierr);
typedef void (ompi_mpi1_fortran_delete_attr_function)(MPI_Fint *obj,
MPI_Fint *keyval,
MPI_Fint *attr_in,
MPI_Fint *extra_state,
MPI_Fint *ierr);
/* New-style MPI-2 Fortran function pointer declarations for copy and
delete. These will only be used here and not in the front end
functions. */
typedef void (ompi_mpi2_fortran_copy_attr_function)(MPI_Fint *oldobj,
MPI_Fint *keyval,
void *extra_state,
void *attr_in,
void *attr_out,
ompi_fortran_logical_t *flag,
MPI_Fint *ierr);
typedef void (ompi_mpi2_fortran_delete_attr_function)(MPI_Fint *obj,
MPI_Fint *keyval,
void *attr_in,
void *extra_state,
MPI_Fint *ierr);
/* Union to take care of proper casting of the function pointers
passed from the front end functions depending on the type. This
@ -85,15 +107,34 @@ union ompi_attribute_fn_ptr_union_t {
MPI_Win_copy_attr_function *attr_win_copy_fn;
#endif
/* For Fortran functions */
/* For Fortran old MPI-1 callback functions */
MPI_F_delete_function *attr_F_delete_fn;
MPI_F_copy_function *attr_F_copy_fn;
ompi_mpi1_fortran_delete_attr_function *attr_mpi1_fortran_delete_fn;
ompi_mpi1_fortran_copy_attr_function *attr_mpi1_fortran_copy_fn;
/* For Fortran new MPI-2 callback functions */
ompi_mpi2_fortran_delete_attr_function *attr_mpi2_fortran_delete_fn;
ompi_mpi2_fortran_copy_attr_function *attr_mpi2_fortran_copy_fn;
};
typedef union ompi_attribute_fn_ptr_union_t ompi_attribute_fn_ptr_union_t;
/**
* Union to help convert between Fortran attributes (which must be
* stored by value) and C pointers (which is the back-end storage of
* all attributes).
*/
union ompi_attribute_fortran_ptr_t {
void *c_ptr;
MPI_Fint f_integer;
};
/**
* Convenience typedef
*/
typedef union ompi_attribute_fortran_ptr_t ompi_attribute_fortran_ptr_t;
struct ompi_attrkey_item_t {
ompi_object_t super;
ompi_attribute_type_t attr_type; /**< One of COMM/WIN/DTYPE. This

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

@ -23,9 +23,18 @@ int32_t ompi_ddt_duplicate( const ompi_datatype_t* oldType, ompi_datatype_t** ne
{
ompi_datatype_t* pdt = ompi_ddt_create( oldType->desc.used );
void* temp = pdt->desc.desc; /* temporary copy of the desc pointer */
int32_t old_index = pdt->d_f_to_c_index;
memcpy( pdt, oldType, sizeof(ompi_datatype_t) );
pdt->desc.desc = temp;
pdt->flags &= (~DT_FLAG_PREDEFINED);
/* ompi_ddt_create() creates a new f_to_c index that was saved
before we did the memcpy, above */
pdt->d_f_to_c_index = old_index;
/* Set the keyhash to NULL -- copying attributes is *only* done at
the top level (specifically, MPI_TYPE_DUP). */
pdt->d_keyhash = NULL;
memcpy( pdt->desc.desc, oldType->desc.desc, sizeof(dt_elem_desc_t) * oldType->desc.used );
pdt->id = 0;
pdt->args = NULL;

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

@ -21,6 +21,7 @@
#include "datatype/datatype.h"
#include "errhandler/errhandler.h"
#include "communicator/communicator.h"
#include "attribute/attribute.h"
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
#pragma weak MPI_Type_dup = PMPI_Type_dup
@ -55,5 +56,23 @@ int MPI_Type_dup (MPI_Datatype type,
}
ompi_ddt_set_args( *newtype, 0, NULL, 0, NULL, 1, &type, MPI_COMBINER_DUP );
/* Copy all the old attributes, if there were any. This is done
here (vs. ompi_ddt_duplicate()) because MPI_TYPE_DUP is the
only MPI function that copies attributes. All other MPI
functions that take an old type and generate a newtype do not
copy attributes. Really. */
if (NULL != type->d_keyhash) {
ompi_attr_hash_init(&(*newtype)->d_keyhash);
if (OMPI_SUCCESS != (rc = ompi_attr_copy_all(TYPE_ATTR,
type, *newtype,
type->d_keyhash,
(*newtype)->d_keyhash))) {
ompi_ddt_destroy(newtype);
OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, MPI_COMM_WORLD,
MPI_ERR_INTERN, FUNC_NAME );
}
}
return MPI_SUCCESS;
}

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

@ -60,7 +60,7 @@ void mpi_attr_get_f(MPI_Fint *comm, MPI_Fint *keyval,
{
int c_err, c_flag;
MPI_Comm c_comm;
int *c_value;
ompi_attribute_fortran_ptr_t value;
c_comm = MPI_Comm_f2c(*comm);
@ -72,22 +72,26 @@ void mpi_attr_get_f(MPI_Fint *comm, MPI_Fint *keyval,
high-performance function, was worth it */
/* Note that this function deals with attribute values that are
the size of Fortran INTEGERS; MPI_ATTR_GET deals with attribute
values that are the size of address integers. Hence, it is
possible that you'll lose some precision upon the cast. Per
MPI-2 4.12.7, use MPI_xxx_get/put_attr when you need lossless
conversion. */
the size of Fortran INTEGERS; the C function MPI_Attr_get deals
with attribute values that are the size of address integers.
Hence, it is possible that you'll lose some precision upon the
cast. Per MPI-2 4.12.7, use MPI_xxx_GET/SET_ATTR when you need
lossless conversion. */
c_err = MPI_Attr_get(c_comm, OMPI_FINT_2_INT(*keyval), &c_value, &c_flag);
c_err = MPI_Attr_get(c_comm, OMPI_FINT_2_INT(*keyval),
&value.c_ptr, &c_flag);
*ierr = OMPI_INT_2_FINT(c_err);
*flag = OMPI_INT_2_FINT(c_flag);
/* Note that MPI-2 4.12.7 specifically says that Fortran's
ATTR_GET function will take the address returned from C and
"convert it to an integer" (which assumedly means
dereference) */
"convert it to an integer". This compliments ATTR_PUT, who,
since we need to save Fortran attributes by value, saves only
the MPI_Fint (regardless of the size of the back-end attribute
storeage). So here we simply extract that MPI_Fint and get the
value back. */
if (MPI_SUCCESS == c_err && 1 == c_flag) {
*attribute_val = OMPI_INT_2_FINT(*c_value);
*attribute_val = value.f_integer;
}
}

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

@ -59,18 +59,31 @@ void mpi_attr_put_f(MPI_Fint *comm, MPI_Fint *keyval, MPI_Fint *attribute_val,
MPI_Fint *ierr)
{
MPI_Comm c_comm;
ompi_attribute_fortran_ptr_t convert;
c_comm = MPI_Comm_f2c(*comm);
/* This stuff is very confusing. Be sure to see MPI-2 4.12.7. */
/* Note that this function deals with attribute values that are
the size of Fortran INTEGERS; MPI_ATTR_PUT deals with attribute
values that are the size of address integers. Hence, it is
possible that the C value is larger than the Fortran value.
MPI says that we sign-extend in this case. */
the size of Fortran INTEGERS; the C function MPI_Attr_put deals
with attribute values that are the size of address integers.
Hence, it is possible that the C value is larger than the
Fortran value. MPI says that we sign-extend in this case. */
/* Fortran attributes are integers. So we need to save those by
value -- not by reference. Hence, we don't save the pointer to
the fortran parameter that came in, but rather its dereferenced
value. Assign to the c_ptr member first, filling out the sign
extension. */
if (OMPI_FINT_2_INT(*attribute_val) >= 0) {
convert.c_ptr = (void*) 0;
} else {
convert.c_ptr = (void*) -1;
}
convert.f_integer = *attribute_val;
*ierr = OMPI_INT_2_FINT(MPI_Attr_put(c_comm,
OMPI_FINT_2_INT(*keyval),
attribute_val));
convert.c_ptr));
}

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

@ -30,7 +30,7 @@ OMPI_GENERATE_F77_BINDINGS (PMPI_COMM_CREATE_KEYVAL,
pmpi_comm_create_keyval_,
pmpi_comm_create_keyval__,
pmpi_comm_create_keyval_f,
(MPI_F_copy_function* comm_copy_attr_fn, MPI_F_delete_function* comm_delete_attr_fn, MPI_Fint *comm_keyval, MPI_Fint *extra_state, MPI_Fint *ierr),
(ompi_mpi2_fortran_copy_attr_function* comm_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* comm_delete_attr_fn, MPI_Fint *comm_keyval, MPI_Fint *extra_state, MPI_Fint *ierr),
(comm_copy_attr_fn, comm_delete_attr_fn, comm_keyval, extra_state, ierr) )
#endif
@ -47,7 +47,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_CREATE_KEYVAL,
mpi_comm_create_keyval_,
mpi_comm_create_keyval__,
mpi_comm_create_keyval_f,
(MPI_F_copy_function* comm_copy_attr_fn, MPI_F_delete_function* comm_delete_attr_fn, MPI_Fint *comm_keyval, MPI_Fint *extra_state, MPI_Fint *ierr),
(ompi_mpi2_fortran_copy_attr_function* comm_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* comm_delete_attr_fn, MPI_Fint *comm_keyval, MPI_Fint *extra_state, MPI_Fint *ierr),
(comm_copy_attr_fn, comm_delete_attr_fn, comm_keyval, extra_state, ierr) )
#endif
@ -58,8 +58,8 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_CREATE_KEYVAL,
static const char FUNC_NAME[] = "MPI_Comm_create_keyval_f";
void mpi_comm_create_keyval_f(MPI_F_copy_function* comm_copy_attr_fn,
MPI_F_delete_function* comm_delete_attr_fn,
void mpi_comm_create_keyval_f(ompi_mpi2_fortran_copy_attr_function* comm_copy_attr_fn,
ompi_mpi2_fortran_delete_attr_function* comm_delete_attr_fn,
MPI_Fint *comm_keyval,
MPI_Fint *extra_state, MPI_Fint *ierr)
{
@ -67,11 +67,13 @@ void mpi_comm_create_keyval_f(MPI_F_copy_function* comm_copy_attr_fn,
ompi_attribute_fn_ptr_union_t copy_fn;
ompi_attribute_fn_ptr_union_t del_fn;
/* See the note in src/mpi/f77/prototypes_mpi.h about the use of
(void*) for function pointers in this function */
copy_fn.attr_mpi2_fortran_copy_fn = comm_copy_attr_fn;
del_fn.attr_mpi2_fortran_delete_fn = comm_delete_attr_fn;
copy_fn.attr_F_copy_fn = (MPI_F_copy_function *) comm_copy_attr_fn;
del_fn.attr_F_delete_fn = (MPI_F_delete_function *) comm_delete_attr_fn;
/* Note that we only set the "F77" bit and exclude the "F77_OLD"
bit, indicating that the callbacks should use the new MPI-2
INTEGER(KIND=MPI_ADDRESS_KIND)-parameter functions (as opposed
to the old MPI-1 INTEGER-parameter functions). */
ret = ompi_attr_create_keyval(COMM_ATTR, copy_fn, del_fn,
comm_keyval, extra_state, OMPI_KEYVAL_F77);

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

@ -81,10 +81,13 @@ void mpi_comm_get_attr_f(MPI_Fint *comm, MPI_Fint *comm_keyval,
/* Note that MPI-2 4.12.7 specifically says that Fortran's
xxx_GET_ATTR functions will take the address returned from C
and "convert it to an integer" (which assumedly means
dereference) */
and "convert it to an integer". Since we stored the *value* of
the attribute in the corresponding xxx_SET_ATTR function, we
simply cast here to get the value back (remember, MPI
guarantess that xxx_SET_ATTR fortran parameters are the right
size). */
if (MPI_SUCCESS == c_err && 1 == c_flag) {
*attribute_val = (MPI_Aint) *c_value;
*attribute_val = (MPI_Aint) c_value;
}
}

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

@ -60,7 +60,13 @@ void mpi_comm_set_attr_f(MPI_Fint *comm, MPI_Fint *comm_keyval,
{
MPI_Comm c_comm = MPI_Comm_f2c(*comm);
/* We save fortran attributes by value, so dereference
attribute_val. MPI-2 guarantees that xxx_SET_ATTR will be
called in fortran with an address-sized integer parameter for
the attribute, so there's no need to do any size conversions
before calling the back-end C function. */
*ierr = OMPI_INT_2_FINT(MPI_Comm_set_attr(c_comm,
OMPI_FINT_2_INT(*comm_keyval),
attribute_val));
(void*) *attribute_val));
}

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

@ -30,7 +30,7 @@ OMPI_GENERATE_F77_BINDINGS (PMPI_KEYVAL_CREATE,
pmpi_keyval_create_,
pmpi_keyval_create__,
pmpi_keyval_create_f,
(MPI_F_copy_function* copy_fn, MPI_F_delete_function* delete_fn, MPI_Fint *keyval, MPI_Fint *extra_state, MPI_Fint *ierr),
(ompi_mpi1_fortran_copy_attr_function* copy_fn, ompi_mpi1_fortran_delete_attr_function* delete_fn, MPI_Fint *keyval, MPI_Fint *extra_state, MPI_Fint *ierr),
(copy_fn, delete_fn, keyval, extra_state, ierr) )
#endif
@ -47,7 +47,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_KEYVAL_CREATE,
mpi_keyval_create_,
mpi_keyval_create__,
mpi_keyval_create_f,
(MPI_F_copy_function* copy_fn, MPI_F_delete_function* delete_fn, MPI_Fint *keyval, MPI_Fint *extra_state, MPI_Fint *ierr),
(ompi_mpi1_fortran_copy_attr_function* copy_fn, ompi_mpi1_fortran_delete_attr_function* delete_fn, MPI_Fint *keyval, MPI_Fint *extra_state, MPI_Fint *ierr),
(copy_fn, delete_fn, keyval, extra_state, ierr) )
#endif
@ -58,19 +58,26 @@ OMPI_GENERATE_F77_BINDINGS (MPI_KEYVAL_CREATE,
static const char FUNC_NAME[] = "MPI_keyval_create_f";
void mpi_keyval_create_f(MPI_F_copy_function* copy_attr_fn,
MPI_F_delete_function* delete_attr_fn,
MPI_Fint *keyval, MPI_Fint *extra_state, MPI_Fint *ierr)
void mpi_keyval_create_f(ompi_mpi1_fortran_copy_attr_function* copy_attr_fn,
ompi_mpi1_fortran_delete_attr_function* delete_attr_fn,
MPI_Fint *keyval, MPI_Fint *extra_state,
MPI_Fint *ierr)
{
int ret, c_err;
ompi_attribute_fn_ptr_union_t copy_fn;
ompi_attribute_fn_ptr_union_t del_fn;
copy_fn.attr_F_copy_fn = copy_attr_fn;
del_fn.attr_F_delete_fn = delete_attr_fn;
copy_fn.attr_mpi1_fortran_copy_fn = copy_attr_fn;
del_fn.attr_mpi1_fortran_delete_fn = delete_attr_fn;
/* Set the "F77_OLD" bit to denote that the callbacks should use
the old MPI-1 INTEGER-parameter functions (as opposed to the
new MPI-2 INTEGER(KIND=MPI_ADDRESS_KIND)-parameter
functions). */
ret = ompi_attr_create_keyval(COMM_ATTR, copy_fn, del_fn,
keyval, extra_state, OMPI_KEYVAL_F77);
keyval, extra_state,
OMPI_KEYVAL_F77 | OMPI_KEYVAL_F77_OLD);
if (MPI_SUCCESS != ret) {
c_err = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD,

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

@ -79,7 +79,7 @@ void pmpi_comm_call_errhandler_f(MPI_Fint *comm, MPI_Fint *errorcode, MPI_Fint *
void pmpi_comm_compare_f(MPI_Fint *comm1, MPI_Fint *comm2, MPI_Fint *result, MPI_Fint *ierr);
void pmpi_comm_connect_f(char *port_name, MPI_Fint *info, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr);
void pmpi_comm_create_errhandler_f(ompi_errhandler_fortran_handler_fn_t* function, MPI_Fint *errhandler, MPI_Fint *ierr);
void pmpi_comm_create_keyval_f(MPI_F_copy_function* comm_copy_attr_fn, MPI_F_delete_function* comm_delete_attr_fn, MPI_Fint *comm_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_comm_create_keyval_f(ompi_mpi2_fortran_copy_attr_function* comm_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* comm_delete_attr_fn, MPI_Fint *comm_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_comm_create_f(MPI_Fint *comm, MPI_Fint *group, MPI_Fint *newcomm, MPI_Fint *ierr);
void pmpi_comm_delete_attr_f(MPI_Fint *comm, MPI_Fint *comm_keyval, MPI_Fint *ierr);
void pmpi_comm_disconnect_f(MPI_Fint *comm, MPI_Fint *ierr);
@ -223,7 +223,7 @@ void pmpi_irsend_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *des
void pmpi_isend_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr);
void pmpi_issend_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr);
void pmpi_is_thread_main_f(MPI_Fint *flag, MPI_Fint *ierr);
void pmpi_keyval_create_f(MPI_F_copy_function* copy_fn, MPI_F_delete_function* delete_fn, MPI_Fint *keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_keyval_create_f(ompi_mpi1_fortran_copy_attr_function* copy_fn, ompi_mpi1_fortran_delete_attr_function* delete_fn, MPI_Fint *keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_keyval_free_f(MPI_Fint *keyval, MPI_Fint *ierr);
void pmpi_lookup_name_f(char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr);
void pmpi_op_create_f(ompi_op_fortran_handler_fn_t* function, MPI_Fint *commute, MPI_Fint *op, MPI_Fint *ierr);
@ -274,7 +274,7 @@ void pmpi_type_create_f90_integer_f(MPI_Fint *r, MPI_Fint *newtype, MPI_Fint *ie
void pmpi_type_create_f90_real_f(MPI_Fint *p, MPI_Fint *r, MPI_Fint *newtype, MPI_Fint *ierr);
void pmpi_type_create_hindexed_f(MPI_Fint *count, MPI_Fint *array_of_blocklengths, MPI_Fint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void pmpi_type_create_hvector_f(MPI_Fint *count, MPI_Fint *blocklength, MPI_Fint *stride, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void pmpi_type_create_keyval_f(MPI_F_copy_function* type_copy_attr_fn, MPI_F_delete_function* type_delete_attr_fn, MPI_Fint *type_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_type_create_keyval_f(ompi_mpi2_fortran_copy_attr_function* type_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* type_delete_attr_fn, MPI_Fint *type_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_type_create_indexed_block_f(MPI_Fint *count, MPI_Fint *blocklength, MPI_Fint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void pmpi_type_create_struct_f(MPI_Fint *count, MPI_Fint *array_of_block_lengths, MPI_Fint *array_of_displacements, MPI_Fint *array_of_types, MPI_Fint *newtype, MPI_Fint *ierr);
void pmpi_type_create_subarray_f(MPI_Fint *ndims, MPI_Fint *size_array, MPI_Fint *subsize_array, MPI_Fint *start_array, MPI_Fint *order, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
@ -312,7 +312,7 @@ void pmpi_win_call_errhandler_f(MPI_Fint *win, MPI_Fint *errorcode, MPI_Fint *ie
void pmpi_win_complete_f(MPI_Fint *win, MPI_Fint *ierr);
void pmpi_win_create_f(char *base, MPI_Fint *size, MPI_Fint *disp_unit, MPI_Fint *info, MPI_Fint *comm, MPI_Fint *win, MPI_Fint *ierr);
void pmpi_win_create_errhandler_f(ompi_errhandler_fortran_handler_fn_t* function, MPI_Fint *errhandler, MPI_Fint *ierr);
void pmpi_win_create_keyval_f(MPI_F_copy_function* win_copy_attr_fn, MPI_F_delete_function* win_delete_attr_fn, MPI_Fint *win_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_win_create_keyval_f(ompi_mpi2_fortran_copy_attr_function* win_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* win_delete_attr_fn, MPI_Fint *win_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_win_delete_attr_f(MPI_Fint *win, MPI_Fint *win_keyval, MPI_Fint *ierr);
void pmpi_win_fence_f(MPI_Fint *assert, MPI_Fint *win, MPI_Fint *ierr);
void pmpi_win_free_f(MPI_Fint *win, MPI_Fint *ierr);
@ -371,7 +371,7 @@ void pmpi_comm_call_errhandler(MPI_Fint *comm, MPI_Fint *errorcode, MPI_Fint *ie
void pmpi_comm_compare(MPI_Fint *comm1, MPI_Fint *comm2, MPI_Fint *result, MPI_Fint *ierr);
void pmpi_comm_connect(char *port_name, MPI_Fint *info, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr);
void pmpi_comm_create_errhandler(ompi_errhandler_fortran_handler_fn_t* function, MPI_Fint *errhandler, MPI_Fint *ierr);
void pmpi_comm_create_keyval(MPI_F_copy_function* comm_copy_attr_fn, MPI_F_delete_function* comm_delete_attr_fn, MPI_Fint *comm_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_comm_create_keyval(ompi_mpi2_fortran_copy_attr_function* comm_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* comm_delete_attr_fn, MPI_Fint *comm_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_comm_create(MPI_Fint *comm, MPI_Fint *group, MPI_Fint *newcomm, MPI_Fint *ierr);
void pmpi_comm_delete_attr(MPI_Fint *comm, MPI_Fint *comm_keyval, MPI_Fint *ierr);
void pmpi_comm_disconnect(MPI_Fint *comm, MPI_Fint *ierr);
@ -510,7 +510,7 @@ void pmpi_irsend(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest,
void pmpi_isend(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr);
void pmpi_issend(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr);
void pmpi_is_thread_main(MPI_Fint *flag, MPI_Fint *ierr);
void pmpi_keyval_create(MPI_F_copy_function* copy_fn, MPI_F_delete_function* delete_fn, MPI_Fint *keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_keyval_create(ompi_mpi1_fortran_copy_attr_function* copy_fn, ompi_mpi1_fortran_delete_attr_function* delete_fn, MPI_Fint *keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_keyval_free(MPI_Fint *keyval, MPI_Fint *ierr);
void pmpi_lookup_name(char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr);
void pmpi_op_create(ompi_op_fortran_handler_fn_t* function, MPI_Fint *commute, MPI_Fint *op, MPI_Fint *ierr);
@ -561,7 +561,7 @@ void pmpi_type_create_f90_integer(MPI_Fint *r, MPI_Fint *newtype, MPI_Fint *ierr
void pmpi_type_create_f90_real(MPI_Fint *p, MPI_Fint *r, MPI_Fint *newtype, MPI_Fint *ierr);
void pmpi_type_create_hindexed(MPI_Fint *count, MPI_Fint *array_of_blocklengths, MPI_Fint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void pmpi_type_create_hvector(MPI_Fint *count, MPI_Fint *blocklength, MPI_Fint *stride, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void pmpi_type_create_keyval(MPI_F_copy_function* type_copy_attr_fn, MPI_F_delete_function* type_delete_attr_fn, MPI_Fint *type_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_type_create_keyval(ompi_mpi2_fortran_copy_attr_function* type_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* type_delete_attr_fn, MPI_Fint *type_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_type_create_indexed_block(MPI_Fint *count, MPI_Fint *blocklength, MPI_Fint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void pmpi_type_create_struct(MPI_Fint *count, MPI_Fint *array_of_block_lengths, MPI_Fint *array_of_displacements, MPI_Fint *array_of_types, MPI_Fint *newtype, MPI_Fint *ierr);
void pmpi_type_create_subarray(MPI_Fint *ndims, MPI_Fint *size_array, MPI_Fint *subsize_array, MPI_Fint *start_array, MPI_Fint *order, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
@ -599,7 +599,7 @@ void pmpi_win_call_errhandler(MPI_Fint *win, MPI_Fint *errorcode, MPI_Fint *ierr
void pmpi_win_complete(MPI_Fint *win, MPI_Fint *ierr);
void pmpi_win_create(char *base, MPI_Fint *size, MPI_Fint *disp_unit, MPI_Fint *info, MPI_Fint *comm, MPI_Fint *win, MPI_Fint *ierr);
void pmpi_win_create_errhandler(ompi_errhandler_fortran_handler_fn_t* function, MPI_Fint *errhandler, MPI_Fint *ierr);
void pmpi_win_create_keyval(MPI_F_copy_function* win_copy_attr_fn, MPI_F_delete_function* win_delete_attr_fn, MPI_Fint *win_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_win_create_keyval(ompi_mpi2_fortran_copy_attr_function* win_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* win_delete_attr_fn, MPI_Fint *win_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_win_delete_attr(MPI_Fint *win, MPI_Fint *win_keyval, MPI_Fint *ierr);
void pmpi_win_fence(MPI_Fint *assert, MPI_Fint *win, MPI_Fint *ierr);
void pmpi_win_free(MPI_Fint *win, MPI_Fint *ierr);
@ -658,7 +658,7 @@ void pmpi_comm_call_errhandler_(MPI_Fint *comm, MPI_Fint *errorcode, MPI_Fint *i
void pmpi_comm_compare_(MPI_Fint *comm1, MPI_Fint *comm2, MPI_Fint *result, MPI_Fint *ierr);
void pmpi_comm_connect_(char *port_name, MPI_Fint *info, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr);
void pmpi_comm_create_errhandler_(ompi_errhandler_fortran_handler_fn_t* function, MPI_Fint *errhandler, MPI_Fint *ierr);
void pmpi_comm_create_keyval_(MPI_F_copy_function* comm_copy_attr_fn, MPI_F_delete_function* comm_delete_attr_fn, MPI_Fint *comm_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_comm_create_keyval_(ompi_mpi2_fortran_copy_attr_function* comm_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* comm_delete_attr_fn, MPI_Fint *comm_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_comm_create_(MPI_Fint *comm, MPI_Fint *group, MPI_Fint *newcomm, MPI_Fint *ierr);
void pmpi_comm_delete_attr_(MPI_Fint *comm, MPI_Fint *comm_keyval, MPI_Fint *ierr);
void pmpi_comm_disconnect_(MPI_Fint *comm, MPI_Fint *ierr);
@ -797,7 +797,7 @@ void pmpi_irsend_(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest
void pmpi_isend_(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr);
void pmpi_issend_(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr);
void pmpi_is_thread_main_(MPI_Fint *flag, MPI_Fint *ierr);
void pmpi_keyval_create_(MPI_F_copy_function* copy_fn, MPI_F_delete_function* delete_fn, MPI_Fint *keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_keyval_create_(ompi_mpi1_fortran_copy_attr_function* copy_fn, ompi_mpi1_fortran_delete_attr_function* delete_fn, MPI_Fint *keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_keyval_free_(MPI_Fint *keyval, MPI_Fint *ierr);
void pmpi_lookup_name_(char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr);
void pmpi_op_create_(ompi_op_fortran_handler_fn_t* function, MPI_Fint *commute, MPI_Fint *op, MPI_Fint *ierr);
@ -848,7 +848,7 @@ void pmpi_type_create_f90_integer_(MPI_Fint *r, MPI_Fint *newtype, MPI_Fint *ier
void pmpi_type_create_f90_real_(MPI_Fint *p, MPI_Fint *r, MPI_Fint *newtype, MPI_Fint *ierr);
void pmpi_type_create_hindexed_(MPI_Fint *count, MPI_Fint *array_of_blocklengths, MPI_Fint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void pmpi_type_create_hvector_(MPI_Fint *count, MPI_Fint *blocklength, MPI_Fint *stride, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void pmpi_type_create_keyval_(MPI_F_copy_function* type_copy_attr_fn, MPI_F_delete_function* type_delete_attr_fn, MPI_Fint *type_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_type_create_keyval_(ompi_mpi2_fortran_copy_attr_function* type_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* type_delete_attr_fn, MPI_Fint *type_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_type_create_indexed_block_(MPI_Fint *count, MPI_Fint *blocklength, MPI_Fint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void pmpi_type_create_struct_(MPI_Fint *count, MPI_Fint *array_of_block_lengths, MPI_Fint *array_of_displacements, MPI_Fint *array_of_types, MPI_Fint *newtype, MPI_Fint *ierr);
void pmpi_type_create_subarray_(MPI_Fint *ndims, MPI_Fint *size_array, MPI_Fint *subsize_array, MPI_Fint *start_array, MPI_Fint *order, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
@ -886,7 +886,7 @@ void pmpi_win_call_errhandler_(MPI_Fint *win, MPI_Fint *errorcode, MPI_Fint *ier
void pmpi_win_complete_(MPI_Fint *win, MPI_Fint *ierr);
void pmpi_win_create_(char *base, MPI_Fint *size, MPI_Fint *disp_unit, MPI_Fint *info, MPI_Fint *comm, MPI_Fint *win, MPI_Fint *ierr);
void pmpi_win_create_errhandler_(ompi_errhandler_fortran_handler_fn_t* function, MPI_Fint *errhandler, MPI_Fint *ierr);
void pmpi_win_create_keyval_(MPI_F_copy_function* win_copy_attr_fn, MPI_F_delete_function* win_delete_attr_fn, MPI_Fint *win_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_win_create_keyval_(ompi_mpi2_fortran_copy_attr_function* win_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* win_delete_attr_fn, MPI_Fint *win_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_win_delete_attr_(MPI_Fint *win, MPI_Fint *win_keyval, MPI_Fint *ierr);
void pmpi_win_fence_(MPI_Fint *assert, MPI_Fint *win, MPI_Fint *ierr);
void pmpi_win_free_(MPI_Fint *win, MPI_Fint *ierr);
@ -945,7 +945,7 @@ void pmpi_comm_call_errhandler__(MPI_Fint *comm, MPI_Fint *errorcode, MPI_Fint *
void pmpi_comm_compare__(MPI_Fint *comm1, MPI_Fint *comm2, MPI_Fint *result, MPI_Fint *ierr);
void pmpi_comm_connect__(char *port_name, MPI_Fint *info, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr);
void pmpi_comm_create_errhandler__(ompi_errhandler_fortran_handler_fn_t* function, MPI_Fint *errhandler, MPI_Fint *ierr);
void pmpi_comm_create_keyval__(MPI_F_copy_function* comm_copy_attr_fn, MPI_F_delete_function* comm_delete_attr_fn, MPI_Fint *comm_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_comm_create_keyval__(ompi_mpi2_fortran_copy_attr_function* comm_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* comm_delete_attr_fn, MPI_Fint *comm_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_comm_create__(MPI_Fint *comm, MPI_Fint *group, MPI_Fint *newcomm, MPI_Fint *ierr);
void pmpi_comm_delete_attr__(MPI_Fint *comm, MPI_Fint *comm_keyval, MPI_Fint *ierr);
void pmpi_comm_disconnect__(MPI_Fint *comm, MPI_Fint *ierr);
@ -1084,7 +1084,7 @@ void pmpi_irsend__(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *des
void pmpi_isend__(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr);
void pmpi_issend__(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr);
void pmpi_is_thread_main__(MPI_Fint *flag, MPI_Fint *ierr);
void pmpi_keyval_create__(MPI_F_copy_function* copy_fn, MPI_F_delete_function* delete_fn, MPI_Fint *keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_keyval_create__(ompi_mpi1_fortran_copy_attr_function* copy_fn, ompi_mpi1_fortran_delete_attr_function* delete_fn, MPI_Fint *keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_keyval_free__(MPI_Fint *keyval, MPI_Fint *ierr);
void pmpi_lookup_name__(char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr);
void pmpi_op_create__(ompi_op_fortran_handler_fn_t* function, MPI_Fint *commute, MPI_Fint *op, MPI_Fint *ierr);
@ -1135,7 +1135,7 @@ void pmpi_type_create_f90_integer__(MPI_Fint *r, MPI_Fint *newtype, MPI_Fint *ie
void pmpi_type_create_f90_real__(MPI_Fint *p, MPI_Fint *r, MPI_Fint *newtype, MPI_Fint *ierr);
void pmpi_type_create_hindexed__(MPI_Fint *count, MPI_Fint *array_of_blocklengths, MPI_Fint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void pmpi_type_create_hvector__(MPI_Fint *count, MPI_Fint *blocklength, MPI_Fint *stride, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void pmpi_type_create_keyval__(MPI_F_copy_function* type_copy_attr_fn, MPI_F_delete_function* type_delete_attr_fn, MPI_Fint *type_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_type_create_keyval__(ompi_mpi2_fortran_copy_attr_function* type_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* type_delete_attr_fn, MPI_Fint *type_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_type_create_indexed_block__(MPI_Fint *count, MPI_Fint *blocklength, MPI_Fint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void pmpi_type_create_struct__(MPI_Fint *count, MPI_Fint *array_of_block_lengths, MPI_Fint *array_of_displacements, MPI_Fint *array_of_types, MPI_Fint *newtype, MPI_Fint *ierr);
void pmpi_type_create_subarray__(MPI_Fint *ndims, MPI_Fint *size_array, MPI_Fint *subsize_array, MPI_Fint *start_array, MPI_Fint *order, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
@ -1173,7 +1173,7 @@ void pmpi_win_call_errhandler__(MPI_Fint *win, MPI_Fint *errorcode, MPI_Fint *ie
void pmpi_win_complete__(MPI_Fint *win, MPI_Fint *ierr);
void pmpi_win_create__(char *base, MPI_Fint *size, MPI_Fint *disp_unit, MPI_Fint *info, MPI_Fint *comm, MPI_Fint *win, MPI_Fint *ierr);
void pmpi_win_create_errhandler__(ompi_errhandler_fortran_handler_fn_t* function, MPI_Fint *errhandler, MPI_Fint *ierr);
void pmpi_win_create_keyval__(MPI_F_copy_function* win_copy_attr_fn, MPI_F_delete_function* win_delete_attr_fn, MPI_Fint *win_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_win_create_keyval__(ompi_mpi2_fortran_copy_attr_function* win_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* win_delete_attr_fn, MPI_Fint *win_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void pmpi_win_delete_attr__(MPI_Fint *win, MPI_Fint *win_keyval, MPI_Fint *ierr);
void pmpi_win_fence__(MPI_Fint *assert, MPI_Fint *win, MPI_Fint *ierr);
void pmpi_win_free__(MPI_Fint *win, MPI_Fint *ierr);
@ -1232,7 +1232,7 @@ void PMPI_COMM_CALL_ERRHANDLER(MPI_Fint *comm, MPI_Fint *errorcode, MPI_Fint *ie
void PMPI_COMM_COMPARE(MPI_Fint *comm1, MPI_Fint *comm2, MPI_Fint *result, MPI_Fint *ierr);
void PMPI_COMM_CONNECT(char *port_name, MPI_Fint *info, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr);
void PMPI_COMM_CREATE_ERRHANDLER(ompi_errhandler_fortran_handler_fn_t *function, MPI_Fint *errhandler, MPI_Fint *ierr);
void PMPI_COMM_CREATE_KEYVAL(MPI_F_copy_function* comm_copy_attr_fn, MPI_F_delete_function* comm_delete_attr_fn, MPI_Fint *comm_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void PMPI_COMM_CREATE_KEYVAL(ompi_mpi2_fortran_copy_attr_function* comm_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* comm_delete_attr_fn, MPI_Fint *comm_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void PMPI_COMM_CREATE(MPI_Fint *comm, MPI_Fint *group, MPI_Fint *newcomm, MPI_Fint *ierr);
void PMPI_COMM_DELETE_ATTR(MPI_Fint *comm, MPI_Fint *comm_keyval, MPI_Fint *ierr);
void PMPI_COMM_DISCONNECT(MPI_Fint *comm, MPI_Fint *ierr);
@ -1371,7 +1371,7 @@ void PMPI_IRSEND(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest,
void PMPI_ISEND(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr);
void PMPI_ISSEND(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr);
void PMPI_IS_THREAD_MAIN(MPI_Fint *flag, MPI_Fint *ierr);
void PMPI_KEYVAL_CREATE(MPI_F_copy_function* copy_fn, MPI_F_delete_function* delete_fn, MPI_Fint *keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void PMPI_KEYVAL_CREATE(ompi_mpi1_fortran_copy_attr_function* copy_fn, ompi_mpi1_fortran_delete_attr_function* delete_fn, MPI_Fint *keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void PMPI_KEYVAL_FREE(MPI_Fint *keyval, MPI_Fint *ierr);
void PMPI_LOOKUP_NAME(char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr);
void PMPI_OP_CREATE(ompi_op_fortran_handler_fn_t* function, MPI_Fint *commute, MPI_Fint *op, MPI_Fint *ierr);
@ -1422,7 +1422,7 @@ void PMPI_TYPE_CREATE_F90_INTEGER(MPI_Fint *r, MPI_Fint *newtype, MPI_Fint *ierr
void PMPI_TYPE_CREATE_F90_REAL(MPI_Fint *p, MPI_Fint *r, MPI_Fint *newtype, MPI_Fint *ierr);
void PMPI_TYPE_CREATE_HINDEXED(MPI_Fint *count, MPI_Fint *array_of_blocklengths, MPI_Fint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void PMPI_TYPE_CREATE_HVECTOR(MPI_Fint *count, MPI_Fint *blocklength, MPI_Fint *stride, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void PMPI_TYPE_CREATE_KEYVAL(MPI_F_copy_function* type_copy_attr_fn, MPI_F_delete_function* type_delete_attr_fn, MPI_Fint *type_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void PMPI_TYPE_CREATE_KEYVAL(ompi_mpi2_fortran_copy_attr_function* type_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* type_delete_attr_fn, MPI_Fint *type_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void PMPI_TYPE_CREATE_INDEXED_BLOCK(MPI_Fint *count, MPI_Fint *blocklength, MPI_Fint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void PMPI_TYPE_CREATE_STRUCT(MPI_Fint *count, MPI_Fint *array_of_block_lengths, MPI_Fint *array_of_displacements, MPI_Fint *array_of_types, MPI_Fint *newtype, MPI_Fint *ierr);
void PMPI_TYPE_CREATE_SUBARRAY(MPI_Fint *ndims, MPI_Fint *size_array, MPI_Fint *subsize_array, MPI_Fint *start_array, MPI_Fint *order, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
@ -1460,7 +1460,7 @@ void PMPI_WIN_CALL_ERRHANDLER(MPI_Fint *win, MPI_Fint *errorcode, MPI_Fint *ierr
void PMPI_WIN_COMPLETE(MPI_Fint *win, MPI_Fint *ierr);
void PMPI_WIN_CREATE(char *base, MPI_Fint *size, MPI_Fint *disp_unit, MPI_Fint *info, MPI_Fint *comm, MPI_Fint *win, MPI_Fint *ierr);
void PMPI_WIN_CREATE_ERRHANDLER(ompi_errhandler_fortran_handler_fn_t* function, MPI_Fint *errhandler, MPI_Fint *ierr);
void PMPI_WIN_CREATE_KEYVAL(MPI_F_copy_function* win_copy_attr_fn, MPI_F_delete_function* win_delete_attr_fn, MPI_Fint *win_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void PMPI_WIN_CREATE_KEYVAL(ompi_mpi2_fortran_copy_attr_function* win_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* win_delete_attr_fn, MPI_Fint *win_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void PMPI_WIN_DELETE_ATTR(MPI_Fint *win, MPI_Fint *win_keyval, MPI_Fint *ierr);
void PMPI_WIN_FENCE(MPI_Fint *assert, MPI_Fint *win, MPI_Fint *ierr);
void PMPI_WIN_FREE(MPI_Fint *win, MPI_Fint *ierr);

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

@ -80,7 +80,7 @@ void mpi_comm_call_errhandler_f(MPI_Fint *comm, MPI_Fint *errorcode, MPI_Fint *i
void mpi_comm_compare_f(MPI_Fint *comm1, MPI_Fint *comm2, MPI_Fint *result, MPI_Fint *ierr);
void mpi_comm_connect_f(char *port_name, MPI_Fint *info, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr);
void mpi_comm_create_errhandler_f(ompi_errhandler_fortran_handler_fn_t* function, MPI_Fint *errhandler, MPI_Fint *ierr);
void mpi_comm_create_keyval_f(MPI_F_copy_function* comm_copy_attr_fn, MPI_F_delete_function* comm_delete_attr_fn, MPI_Fint *comm_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_comm_create_keyval_f(ompi_mpi2_fortran_copy_attr_function* comm_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* comm_delete_attr_fn, MPI_Fint *comm_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_comm_create_f(MPI_Fint *comm, MPI_Fint *group, MPI_Fint *newcomm, MPI_Fint *ierr);
void mpi_comm_delete_attr_f(MPI_Fint *comm, MPI_Fint *comm_keyval, MPI_Fint *ierr);
void mpi_comm_disconnect_f(MPI_Fint *comm, MPI_Fint *ierr);
@ -224,7 +224,7 @@ void mpi_irsend_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest
void mpi_isend_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr);
void mpi_issend_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr);
void mpi_is_thread_main_f(MPI_Fint *flag, MPI_Fint *ierr);
void mpi_keyval_create_f(MPI_F_copy_function* copy_fn, MPI_F_delete_function* delete_fn, MPI_Fint *keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_keyval_create_f(ompi_mpi1_fortran_copy_attr_function* copy_fn, ompi_mpi1_fortran_delete_attr_function* delete_fn, MPI_Fint *keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_keyval_free_f(MPI_Fint *keyval, MPI_Fint *ierr);
void mpi_lookup_name_f(char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr);
void mpi_op_create_f(ompi_op_fortran_handler_fn_t* function, MPI_Fint *commute, MPI_Fint *op, MPI_Fint *ierr);
@ -275,7 +275,7 @@ void mpi_type_create_f90_integer_f(MPI_Fint *r, MPI_Fint *newtype, MPI_Fint *ier
void mpi_type_create_f90_real_f(MPI_Fint *p, MPI_Fint *r, MPI_Fint *newtype, MPI_Fint *ierr);
void mpi_type_create_hindexed_f(MPI_Fint *count, MPI_Fint *array_of_blocklengths, MPI_Fint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void mpi_type_create_hvector_f(MPI_Fint *count, MPI_Fint *blocklength, MPI_Fint *stride, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void mpi_type_create_keyval_f(MPI_F_copy_function* type_copy_attr_fn, MPI_F_delete_function* type_delete_attr_fn, MPI_Fint *type_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_type_create_keyval_f(ompi_mpi2_fortran_copy_attr_function* type_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* type_delete_attr_fn, MPI_Fint *type_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_type_create_indexed_block_f(MPI_Fint *count, MPI_Fint *blocklength, MPI_Fint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void mpi_type_create_struct_f(MPI_Fint *count, MPI_Fint *array_of_block_lengths, MPI_Fint *array_of_displacements, MPI_Fint *array_of_types, MPI_Fint *newtype, MPI_Fint *ierr);
void mpi_type_create_subarray_f(MPI_Fint *ndims, MPI_Fint *size_array, MPI_Fint *subsize_array, MPI_Fint *start_array, MPI_Fint *order, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
@ -314,7 +314,7 @@ void mpi_win_call_errhandler_f(MPI_Fint *win, MPI_Fint *errorcode, MPI_Fint *ier
void mpi_win_complete_f(MPI_Fint *win, MPI_Fint *ierr);
void mpi_win_create_f(char *base, MPI_Fint *size, MPI_Fint *disp_unit, MPI_Fint *info, MPI_Fint *comm, MPI_Fint *win, MPI_Fint *ierr);
void mpi_win_create_errhandler_f(ompi_errhandler_fortran_handler_fn_t* function, MPI_Fint *errhandler, MPI_Fint *ierr);
void mpi_win_create_keyval_f(MPI_F_copy_function* win_copy_attr_fn, MPI_F_delete_function* win_delete_attr_fn, MPI_Fint *win_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_win_create_keyval_f(ompi_mpi2_fortran_copy_attr_function* win_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* win_delete_attr_fn, MPI_Fint *win_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_win_delete_attr_f(MPI_Fint *win, MPI_Fint *win_keyval, MPI_Fint *ierr);
void mpi_win_fence_f(MPI_Fint *assert, MPI_Fint *win, MPI_Fint *ierr);
void mpi_win_free_f(MPI_Fint *win, MPI_Fint *ierr);
@ -389,7 +389,7 @@ void mpi_comm_call_errhandler(MPI_Fint *comm, MPI_Fint *errorcode, MPI_Fint *ier
void mpi_comm_compare(MPI_Fint *comm1, MPI_Fint *comm2, MPI_Fint *result, MPI_Fint *ierr);
void mpi_comm_connect(char *port_name, MPI_Fint *info, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr);
void mpi_comm_create_errhandler(ompi_errhandler_fortran_handler_fn_t* function, MPI_Fint *errhandler, MPI_Fint *ierr);
void mpi_comm_create_keyval(MPI_F_copy_function* comm_copy_attr_fn, MPI_F_delete_function* comm_delete_attr_fn, MPI_Fint *comm_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_comm_create_keyval(ompi_mpi2_fortran_copy_attr_function* comm_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* comm_delete_attr_fn, MPI_Fint *comm_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_comm_create(MPI_Fint *comm, MPI_Fint *group, MPI_Fint *newcomm, MPI_Fint *ierr);
void mpi_comm_delete_attr(MPI_Fint *comm, MPI_Fint *comm_keyval, MPI_Fint *ierr);
void mpi_comm_disconnect(MPI_Fint *comm, MPI_Fint *ierr);
@ -528,7 +528,7 @@ void mpi_irsend(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest,
void mpi_isend(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr);
void mpi_issend(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr);
void mpi_is_thread_main(MPI_Fint *flag, MPI_Fint *ierr);
void mpi_keyval_create(MPI_F_copy_function* copy_fn, MPI_F_delete_function* delete_fn, MPI_Fint *keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_keyval_create(ompi_mpi1_fortran_copy_attr_function* copy_fn, ompi_mpi1_fortran_delete_attr_function* delete_fn, MPI_Fint *keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_keyval_free(MPI_Fint *keyval, MPI_Fint *ierr);
void mpi_lookup_name(char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr);
void mpi_op_create(ompi_op_fortran_handler_fn_t* function, MPI_Fint *commute, MPI_Fint *op, MPI_Fint *ierr);
@ -579,7 +579,7 @@ void mpi_type_create_f90_integer(MPI_Fint *r, MPI_Fint *newtype, MPI_Fint *ierr)
void mpi_type_create_f90_real(MPI_Fint *p, MPI_Fint *r, MPI_Fint *newtype, MPI_Fint *ierr);
void mpi_type_create_hindexed(MPI_Fint *count, MPI_Fint *array_of_blocklengths, MPI_Fint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void mpi_type_create_hvector(MPI_Fint *count, MPI_Fint *blocklength, MPI_Fint *stride, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void mpi_type_create_keyval(MPI_F_copy_function* type_copy_attr_fn, MPI_F_delete_function* type_delete_attr_fn, MPI_Fint *type_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_type_create_keyval(ompi_mpi2_fortran_copy_attr_function* type_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* type_delete_attr_fn, MPI_Fint *type_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_type_create_indexed_block(MPI_Fint *count, MPI_Fint *blocklength, MPI_Fint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void mpi_type_create_struct(MPI_Fint *count, MPI_Fint *array_of_block_lengths, MPI_Fint *array_of_displacements, MPI_Fint *array_of_types, MPI_Fint *newtype, MPI_Fint *ierr);
void mpi_type_create_subarray(MPI_Fint *ndims, MPI_Fint *size_array, MPI_Fint *subsize_array, MPI_Fint *start_array, MPI_Fint *order, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
@ -617,7 +617,7 @@ void mpi_win_call_errhandler(MPI_Fint *win, MPI_Fint *errorcode, MPI_Fint *ierr)
void mpi_win_complete(MPI_Fint *win, MPI_Fint *ierr);
void mpi_win_create(char *base, MPI_Fint *size, MPI_Fint *disp_unit, MPI_Fint *info, MPI_Fint *comm, MPI_Fint *win, MPI_Fint *ierr);
void mpi_win_create_errhandler(ompi_errhandler_fortran_handler_fn_t* function, MPI_Fint *errhandler, MPI_Fint *ierr);
void mpi_win_create_keyval(MPI_F_copy_function* win_copy_attr_fn, MPI_F_delete_function* win_delete_attr_fn, MPI_Fint *win_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_win_create_keyval(ompi_mpi2_fortran_copy_attr_function* win_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* win_delete_attr_fn, MPI_Fint *win_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_win_delete_attr(MPI_Fint *win, MPI_Fint *win_keyval, MPI_Fint *ierr);
void mpi_win_fence(MPI_Fint *assert, MPI_Fint *win, MPI_Fint *ierr);
void mpi_win_free(MPI_Fint *win, MPI_Fint *ierr);
@ -690,7 +690,7 @@ void mpi_comm_call_errhandler_(MPI_Fint *comm, MPI_Fint *errorcode, MPI_Fint *ie
void mpi_comm_compare_(MPI_Fint *comm1, MPI_Fint *comm2, MPI_Fint *result, MPI_Fint *ierr);
void mpi_comm_connect_(char *port_name, MPI_Fint *info, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr);
void mpi_comm_create_errhandler_(ompi_errhandler_fortran_handler_fn_t* function, MPI_Fint *errhandler, MPI_Fint *ierr);
void mpi_comm_create_keyval_(MPI_F_copy_function* comm_copy_attr_fn, MPI_F_delete_function* comm_delete_attr_fn, MPI_Fint *comm_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_comm_create_keyval_(ompi_mpi2_fortran_copy_attr_function* comm_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* comm_delete_attr_fn, MPI_Fint *comm_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_comm_create_(MPI_Fint *comm, MPI_Fint *group, MPI_Fint *newcomm, MPI_Fint *ierr);
void mpi_comm_delete_attr_(MPI_Fint *comm, MPI_Fint *comm_keyval, MPI_Fint *ierr);
void mpi_comm_disconnect_(MPI_Fint *comm, MPI_Fint *ierr);
@ -829,7 +829,7 @@ void mpi_irsend_(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest,
void mpi_isend_(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr);
void mpi_issend_(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr);
void mpi_is_thread_main_(MPI_Fint *flag, MPI_Fint *ierr);
void mpi_keyval_create_(MPI_F_copy_function* copy_fn, MPI_F_delete_function* delete_fn, MPI_Fint *keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_keyval_create_(ompi_mpi1_fortran_copy_attr_function* copy_fn, ompi_mpi1_fortran_delete_attr_function* delete_fn, MPI_Fint *keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_keyval_free_(MPI_Fint *keyval, MPI_Fint *ierr);
void mpi_lookup_name_(char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr);
void mpi_op_create_(ompi_op_fortran_handler_fn_t* function, MPI_Fint *commute, MPI_Fint *op, MPI_Fint *ierr);
@ -880,7 +880,7 @@ void mpi_type_create_f90_integer_(MPI_Fint *r, MPI_Fint *newtype, MPI_Fint *ierr
void mpi_type_create_f90_real_(MPI_Fint *p, MPI_Fint *r, MPI_Fint *newtype, MPI_Fint *ierr);
void mpi_type_create_hindexed_(MPI_Fint *count, MPI_Fint *array_of_blocklengths, MPI_Fint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void mpi_type_create_hvector_(MPI_Fint *count, MPI_Fint *blocklength, MPI_Fint *stride, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void mpi_type_create_keyval_(MPI_F_copy_function* type_copy_attr_fn, MPI_F_delete_function* type_delete_attr_fn, MPI_Fint *type_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_type_create_keyval_(ompi_mpi2_fortran_copy_attr_function* type_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* type_delete_attr_fn, MPI_Fint *type_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_type_create_indexed_block_(MPI_Fint *count, MPI_Fint *blocklength, MPI_Fint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void mpi_type_create_struct_(MPI_Fint *count, MPI_Fint *array_of_block_lengths, MPI_Fint *array_of_displacements, MPI_Fint *array_of_types, MPI_Fint *newtype, MPI_Fint *ierr);
void mpi_type_create_subarray_(MPI_Fint *ndims, MPI_Fint *size_array, MPI_Fint *subsize_array, MPI_Fint *start_array, MPI_Fint *order, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
@ -918,7 +918,7 @@ void mpi_win_call_errhandler_(MPI_Fint *win, MPI_Fint *errorcode, MPI_Fint *ierr
void mpi_win_complete_(MPI_Fint *win, MPI_Fint *ierr);
void mpi_win_create_(char *base, MPI_Fint *size, MPI_Fint *disp_unit, MPI_Fint *info, MPI_Fint *comm, MPI_Fint *win, MPI_Fint *ierr);
void mpi_win_create_errhandler_(ompi_errhandler_fortran_handler_fn_t* function, MPI_Fint *errhandler, MPI_Fint *ierr);
void mpi_win_create_keyval_(MPI_F_copy_function* win_copy_attr_fn, MPI_F_delete_function* win_delete_attr_fn, MPI_Fint *win_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_win_create_keyval_(ompi_mpi2_fortran_copy_attr_function* win_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* win_delete_attr_fn, MPI_Fint *win_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_win_delete_attr_(MPI_Fint *win, MPI_Fint *win_keyval, MPI_Fint *ierr);
void mpi_win_fence_(MPI_Fint *assert, MPI_Fint *win, MPI_Fint *ierr);
void mpi_win_free_(MPI_Fint *win, MPI_Fint *ierr);
@ -991,7 +991,7 @@ void mpi_comm_call_errhandler__(MPI_Fint *comm, MPI_Fint *errorcode, MPI_Fint *i
void mpi_comm_compare__(MPI_Fint *comm1, MPI_Fint *comm2, MPI_Fint *result, MPI_Fint *ierr);
void mpi_comm_connect__(char *port_name, MPI_Fint *info, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr);
void mpi_comm_create_errhandler__(ompi_errhandler_fortran_handler_fn_t* function, MPI_Fint *errhandler, MPI_Fint *ierr);
void mpi_comm_create_keyval__(MPI_F_copy_function* comm_copy_attr_fn, MPI_F_delete_function* comm_delete_attr_fn, MPI_Fint *comm_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_comm_create_keyval__(ompi_mpi2_fortran_copy_attr_function* comm_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* comm_delete_attr_fn, MPI_Fint *comm_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_comm_create__(MPI_Fint *comm, MPI_Fint *group, MPI_Fint *newcomm, MPI_Fint *ierr);
void mpi_comm_delete_attr__(MPI_Fint *comm, MPI_Fint *comm_keyval, MPI_Fint *ierr);
void mpi_comm_disconnect__(MPI_Fint *comm, MPI_Fint *ierr);
@ -1130,7 +1130,7 @@ void mpi_irsend__(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest
void mpi_isend__(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr);
void mpi_issend__(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr);
void mpi_is_thread_main__(MPI_Fint *flag, MPI_Fint *ierr);
void mpi_keyval_create__(MPI_F_copy_function* copy_fn, MPI_F_delete_function* delete_fn, MPI_Fint *keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_keyval_create__(ompi_mpi1_fortran_copy_attr_function* copy_fn, ompi_mpi1_fortran_delete_attr_function* delete_fn, MPI_Fint *keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_keyval_free__(MPI_Fint *keyval, MPI_Fint *ierr);
void mpi_lookup_name__(char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr);
void mpi_op_create__(ompi_op_fortran_handler_fn_t* function, MPI_Fint *commute, MPI_Fint *op, MPI_Fint *ierr);
@ -1181,7 +1181,7 @@ void mpi_type_create_f90_integer__(MPI_Fint *r, MPI_Fint *newtype, MPI_Fint *ier
void mpi_type_create_f90_real__(MPI_Fint *p, MPI_Fint *r, MPI_Fint *newtype, MPI_Fint *ierr);
void mpi_type_create_hindexed__(MPI_Fint *count, MPI_Fint *array_of_blocklengths, MPI_Fint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void mpi_type_create_hvector__(MPI_Fint *count, MPI_Fint *blocklength, MPI_Fint *stride, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void mpi_type_create_keyval__(MPI_F_copy_function* type_copy_attr_fn, MPI_F_delete_function* type_delete_attr_fn, MPI_Fint *type_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_type_create_keyval__(ompi_mpi2_fortran_copy_attr_function* type_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* type_delete_attr_fn, MPI_Fint *type_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_type_create_indexed_block__(MPI_Fint *count, MPI_Fint *blocklength, MPI_Fint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void mpi_type_create_struct__(MPI_Fint *count, MPI_Fint *array_of_block_lengths, MPI_Fint *array_of_displacements, MPI_Fint *array_of_types, MPI_Fint *newtype, MPI_Fint *ierr);
void mpi_type_create_subarray__(MPI_Fint *ndims, MPI_Fint *size_array, MPI_Fint *subsize_array, MPI_Fint *start_array, MPI_Fint *order, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
@ -1219,7 +1219,7 @@ void mpi_win_call_errhandler__(MPI_Fint *win, MPI_Fint *errorcode, MPI_Fint *ier
void mpi_win_complete__(MPI_Fint *win, MPI_Fint *ierr);
void mpi_win_create__(char *base, MPI_Fint *size, MPI_Fint *disp_unit, MPI_Fint *info, MPI_Fint *comm, MPI_Fint *win, MPI_Fint *ierr);
void mpi_win_create_errhandler__(ompi_errhandler_fortran_handler_fn_t* function, MPI_Fint *errhandler, MPI_Fint *ierr);
void mpi_win_create_keyval__(MPI_F_copy_function* win_copy_attr_fn, MPI_F_delete_function* win_delete_attr_fn, MPI_Fint *win_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_win_create_keyval__(ompi_mpi2_fortran_copy_attr_function* win_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* win_delete_attr_fn, MPI_Fint *win_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void mpi_win_delete_attr__(MPI_Fint *win, MPI_Fint *win_keyval, MPI_Fint *ierr);
void mpi_win_fence__(MPI_Fint *assert, MPI_Fint *win, MPI_Fint *ierr);
void mpi_win_free__(MPI_Fint *win, MPI_Fint *ierr);
@ -1292,7 +1292,7 @@ void MPI_COMM_CALL_ERRHANDLER(MPI_Fint *comm, MPI_Fint *errorcode, MPI_Fint *ier
void MPI_COMM_COMPARE(MPI_Fint *comm1, MPI_Fint *comm2, MPI_Fint *result, MPI_Fint *ierr);
void MPI_COMM_CONNECT(char *port_name, MPI_Fint *info, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr);
void MPI_COMM_CREATE_ERRHANDLER(ompi_errhandler_fortran_handler_fn_t *function, MPI_Fint *errhandler, MPI_Fint *ierr);
void MPI_COMM_CREATE_KEYVAL(MPI_F_copy_function* comm_copy_attr_fn, MPI_F_delete_function* comm_delete_attr_fn, MPI_Fint *comm_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void MPI_COMM_CREATE_KEYVAL(ompi_mpi2_fortran_copy_attr_function* comm_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* comm_delete_attr_fn, MPI_Fint *comm_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void MPI_COMM_CREATE(MPI_Fint *comm, MPI_Fint *group, MPI_Fint *newcomm, MPI_Fint *ierr);
void MPI_COMM_DELETE_ATTR(MPI_Fint *comm, MPI_Fint *comm_keyval, MPI_Fint *ierr);
void MPI_COMM_DISCONNECT(MPI_Fint *comm, MPI_Fint *ierr);
@ -1431,7 +1431,7 @@ void MPI_IRSEND(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest,
void MPI_ISEND(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr);
void MPI_ISSEND(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr);
void MPI_IS_THREAD_MAIN(MPI_Fint *flag, MPI_Fint *ierr);
void MPI_KEYVAL_CREATE(MPI_F_copy_function *copy_fn, MPI_F_delete_function *delete_fn, MPI_Fint *keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void MPI_KEYVAL_CREATE(ompi_mpi1_fortran_copy_attr_function *copy_fn, ompi_mpi1_fortran_delete_attr_function *delete_fn, MPI_Fint *keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void MPI_KEYVAL_FREE(MPI_Fint *keyval, MPI_Fint *ierr);
void MPI_LOOKUP_NAME(char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr);
void MPI_OP_CREATE(ompi_op_fortran_handler_fn_t* function, MPI_Fint *commute, MPI_Fint *op, MPI_Fint *ierr);
@ -1482,7 +1482,7 @@ void MPI_TYPE_CREATE_F90_INTEGER(MPI_Fint *r, MPI_Fint *newtype, MPI_Fint *ierr)
void MPI_TYPE_CREATE_F90_REAL(MPI_Fint *p, MPI_Fint *r, MPI_Fint *newtype, MPI_Fint *ierr);
void MPI_TYPE_CREATE_HINDEXED(MPI_Fint *count, MPI_Fint *array_of_blocklengths, MPI_Fint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void MPI_TYPE_CREATE_HVECTOR(MPI_Fint *count, MPI_Fint *blocklength, MPI_Fint *stride, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void MPI_TYPE_CREATE_KEYVAL(MPI_F_copy_function* type_copy_attr_fn, MPI_F_delete_function* type_delete_attr_fn, MPI_Fint *type_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void MPI_TYPE_CREATE_KEYVAL(ompi_mpi2_fortran_copy_attr_function* type_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* type_delete_attr_fn, MPI_Fint *type_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void MPI_TYPE_CREATE_INDEXED_BLOCK(MPI_Fint *count, MPI_Fint *blocklength, MPI_Fint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
void MPI_TYPE_CREATE_STRUCT(MPI_Fint *count, MPI_Fint *array_of_block_lengths, MPI_Fint *array_of_displacements, MPI_Fint *array_of_types, MPI_Fint *newtype, MPI_Fint *ierr);
void MPI_TYPE_CREATE_SUBARRAY(MPI_Fint *ndims, MPI_Fint *size_array, MPI_Fint *subsize_array, MPI_Fint *start_array, MPI_Fint *order, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr);
@ -1520,7 +1520,7 @@ void MPI_WIN_CALL_ERRHANDLER(MPI_Fint *win, MPI_Fint *errorcode, MPI_Fint *ierr)
void MPI_WIN_COMPLETE(MPI_Fint *win, MPI_Fint *ierr);
void MPI_WIN_CREATE(char *base, MPI_Fint *size, MPI_Fint *disp_unit, MPI_Fint *info, MPI_Fint *comm, MPI_Fint *win, MPI_Fint *ierr);
void MPI_WIN_CREATE_ERRHANDLER(ompi_errhandler_fortran_handler_fn_t* function, MPI_Fint *errhandler, MPI_Fint *ierr);
void MPI_WIN_CREATE_KEYVAL(MPI_F_copy_function* win_copy_attr_fn, MPI_F_delete_function* win_delete_attr_fn, MPI_Fint *win_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void MPI_WIN_CREATE_KEYVAL(ompi_mpi2_fortran_copy_attr_function* win_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* win_delete_attr_fn, MPI_Fint *win_keyval, MPI_Fint *extra_state, MPI_Fint *ierr);
void MPI_WIN_DELETE_ATTR(MPI_Fint *win, MPI_Fint *win_keyval, MPI_Fint *ierr);
void MPI_WIN_FENCE(MPI_Fint *assert, MPI_Fint *win, MPI_Fint *ierr);
void MPI_WIN_FREE(MPI_Fint *win, MPI_Fint *ierr);

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

@ -30,7 +30,7 @@ OMPI_GENERATE_F77_BINDINGS (PMPI_TYPE_CREATE_KEYVAL,
pmpi_type_create_keyval_,
pmpi_type_create_keyval__,
pmpi_type_create_keyval_f,
(MPI_F_copy_function* type_copy_attr_fn, MPI_F_delete_function* type_delete_attr_fn, MPI_Fint *type_keyval, MPI_Fint *extra_state, MPI_Fint *ierr),
(ompi_mpi2_fortran_copy_attr_function* type_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* type_delete_attr_fn, MPI_Fint *type_keyval, MPI_Fint *extra_state, MPI_Fint *ierr),
(type_copy_attr_fn, type_delete_attr_fn, type_keyval, extra_state, ierr) )
#endif
@ -47,7 +47,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_TYPE_CREATE_KEYVAL,
mpi_type_create_keyval_,
mpi_type_create_keyval__,
mpi_type_create_keyval_f,
(MPI_F_copy_function* type_copy_attr_fn, MPI_F_delete_function* type_delete_attr_fn, MPI_Fint *type_keyval, MPI_Fint *extra_state, MPI_Fint *ierr),
(ompi_mpi2_fortran_copy_attr_function* type_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* type_delete_attr_fn, MPI_Fint *type_keyval, MPI_Fint *extra_state, MPI_Fint *ierr),
(type_copy_attr_fn, type_delete_attr_fn, type_keyval, extra_state, ierr) )
#endif
@ -58,17 +58,19 @@ OMPI_GENERATE_F77_BINDINGS (MPI_TYPE_CREATE_KEYVAL,
static char FUNC_NAME[] = "MPI_Type_create_keyval_f";
void mpi_type_create_keyval_f(MPI_F_copy_function* type_copy_attr_fn, MPI_F_delete_function* type_delete_attr_fn, MPI_Fint *type_keyval, MPI_Fint *extra_state, MPI_Fint *ierr)
void mpi_type_create_keyval_f(ompi_mpi2_fortran_copy_attr_function* type_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* type_delete_attr_fn, MPI_Fint *type_keyval, MPI_Fint *extra_state, MPI_Fint *ierr)
{
int ret, c_err;
ompi_attribute_fn_ptr_union_t copy_fn;
ompi_attribute_fn_ptr_union_t del_fn;
/* See the note in src/mpi/f77/prototypes_mpi.h about the use of
(void*) for function pointers in this function */
copy_fn.attr_mpi2_fortran_copy_fn = type_copy_attr_fn;
del_fn.attr_mpi2_fortran_delete_fn = type_delete_attr_fn;
copy_fn.attr_F_copy_fn = (MPI_F_copy_function *) type_copy_attr_fn;
del_fn.attr_F_delete_fn = (MPI_F_delete_function *) type_delete_attr_fn;
/* Note that we only set the "F77" bit and exclude the "F77_OLD"
bit, indicating that the callbacks should use the new MPI-2
INTEGER(KIND=MPI_ADDRESS_KIND)-parameter functions (as opposed
to the old MPI-1 INTEGER-parameter functions). */
ret = ompi_attr_create_keyval(TYPE_ATTR, copy_fn, del_fn,
type_keyval, extra_state, OMPI_KEYVAL_F77);

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

@ -81,10 +81,13 @@ void mpi_type_get_attr_f(MPI_Fint *type, MPI_Fint *type_keyval,
/* Note that MPI-2 4.12.7 specifically says that Fortran's
xxx_GET_ATTR functions will take the address returned from C
and "convert it to an integer" (which assumedly means
dereference) */
and "convert it to an integer". Since we stored the *value* of
the attribute in the corresponding xxx_SET_ATTR function, we
simply cast here to get the value back (remember, MPI
guarantess that xxx_SET_ATTR fortran parameters are the right
size). */
if (MPI_SUCCESS == c_err && 1 == c_flag) {
*attribute_val = (MPI_Aint) *c_value;
*attribute_val = (MPI_Aint) c_value;
}
}

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

@ -59,7 +59,13 @@ void mpi_type_set_attr_f(MPI_Fint *type, MPI_Fint *type_keyval, MPI_Aint *attr_v
{
MPI_Datatype c_type = MPI_Type_f2c( *type );
/* We save fortran attributes by value, so dereference
attribute_val. MPI-2 guarantees that xxx_SET_ATTR will be
called in fortran with an address-sized integer parameter for
the attribute, so there's no need to do any size conversions
before calling the back-end C function. */
*ierr = OMPI_INT_2_FINT(MPI_Type_set_attr( c_type,
OMPI_FINT_2_INT(*type_keyval),
attr_val ));
(void*) *attr_val ));
}

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

@ -30,7 +30,7 @@ OMPI_GENERATE_F77_BINDINGS (PMPI_WIN_CREATE_KEYVAL,
pmpi_win_create_keyval_,
pmpi_win_create_keyval__,
pmpi_win_create_keyval_f,
(MPI_F_copy_function* win_copy_attr_fn, MPI_F_delete_function* win_delete_attr_fn, MPI_Fint *win_keyval, MPI_Fint *extra_state, MPI_Fint *ierr),
(ompi_mpi2_fortran_copy_attr_function* win_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* win_delete_attr_fn, MPI_F_int *win_keyval, MPI_F_int *extra_state, MPI_F_int *ierr),
(win_copy_attr_fn, win_delete_attr_fn, win_keyval, extra_state, ierr) )
#endif
@ -47,7 +47,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_WIN_CREATE_KEYVAL,
mpi_win_create_keyval_,
mpi_win_create_keyval__,
mpi_win_create_keyval_f,
(MPI_F_copy_function* win_copy_attr_fn, MPI_F_delete_function* win_delete_attr_fn, MPI_Fint *win_keyval, MPI_Fint *extra_state, MPI_Fint *ierr),
(ompi_mpi2_fortran_copy_attr_function* win_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* win_delete_attr_fn, MPI_F_int *win_keyval, MPI_F_int *extra_state, MPI_F_int *ierr),
(win_copy_attr_fn, win_delete_attr_fn, win_keyval, extra_state, ierr) )
#endif
@ -58,21 +58,23 @@ OMPI_GENERATE_F77_BINDINGS (MPI_WIN_CREATE_KEYVAL,
static char FUNC_NAME[] = "MPI_Win_create_keyval";
void mpi_win_create_keyval_f(MPI_F_copy_function* win_copy_attr_fn,
MPI_F_delete_function* win_delete_attr_fn,
MPI_Fint *win_keyval, MPI_Fint *extra_state, MPI_Fint *ierr)
void mpi_win_create_keyval_f(ompi_mpi2_fortran_copy_attr_function* win_copy_attr_fn,
ompi_mpi2_fortran_delete_attr_function* win_delete_attr_fn,
MPI_F_int *win_keyval, MPI_F_int *extra_state, MPI_F_int *ierr)
{
int ret, c_err;
ompi_attribute_fn_ptr_union_t copy_fn;
ompi_attribute_fn_ptr_union_t del_fn;
/* See the note in src/mpi/f77/prototypes_mpi.h about the use of
(void*) for function pointers in this function */
copy_fn.attr_mpi2_fortran_copy_fn = win_copy_attr_fn;
del_fn.attr_mpi2_fortran_delete_fn = win_delete_attr_fn;
copy_fn.attr_F_copy_fn = (MPI_F_copy_function *) win_copy_attr_fn;
del_fn.attr_F_delete_fn = (MPI_F_delete_function *) win_delete_attr_fn;
/* Note that we only set the "F77" bit and exclude the "F77_OLD"
bit, indicating that the callbacks should use the new MPI-2
INTEGER(KIND=MPI_ADDRESS_KIND)-parameter functions (as opposed
to the old MPI-1 INTEGER-parameter functions). */
ret = ompi_attr_create_keyval(WIN_ATTR, copy_fn, del_fn,
ret = ompi_attr_create_keyval(WIN_ATTR, copy_fn, del_fn,
win_keyval, extra_state, OMPI_KEYVAL_F77);
if (MPI_SUCCESS != ret) {

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

@ -81,10 +81,13 @@ void mpi_win_get_attr_f(MPI_Fint *win, MPI_Fint *win_keyval,
/* Note that MPI-2 4.12.7 specifically says that Fortran's
xxx_GET_ATTR functions will take the address returned from C
and "convert it to an integer" (which assumedly means
dereference) */
and "convert it to an integer" Since we stored the *value* of
the attribute in the corresponding xxx_SET_ATTR function, we
simply cast here to get the value back (remember, MPI
guarantess that xxx_SET_ATTR fortran parameters are the right
size). */
if (MPI_SUCCESS == c_err && 1 == c_flag) {
*attribute_val = (MPI_Aint) *c_value;
*attribute_val = (MPI_Aint) c_value;
}
}

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

@ -60,7 +60,13 @@ void mpi_win_set_attr_f(MPI_Fint *win, MPI_Fint *win_keyval,
{
MPI_Win c_win = MPI_Win_f2c( *win );
/* We save fortran attributes by value, so dereference
attribute_val. MPI-2 guarantees that xxx_SET_ATTR will be
called in fortran with an address-sized integer parameter for
the attribute, so there's no need to do any size conversions
before calling the back-end C function. */
*ierr = OMPI_INT_2_FINT(MPI_Win_set_attr( c_win,
OMPI_FINT_2_INT(*win_keyval),
attribute_val ));
(void*) *attribute_val ));
}