A bunch of Fortran <--> macro fixes (mainly where the macros were
accidentally not used) This commit was SVN r6202.
Этот коммит содержится в:
родитель
05fcb9b373
Коммит
5485312f6a
@ -61,6 +61,7 @@ void mpi_add_error_class_f(MPI_Fint *errorclass, MPI_Fint *ierr)
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Add_error_class(OMPI_SINGLE_NAME_CONVERT(errorclass)
|
||||
));
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(errorclass);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
OMPI_SINGLE_INT_2_FINT(errorclass);
|
||||
}
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ void mpi_add_error_code_f(MPI_Fint *errorclass, MPI_Fint *errorcode, MPI_Fint *i
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Add_error_code(OMPI_FINT_2_INT(*errorclass),
|
||||
OMPI_SINGLE_NAME_CONVERT(errorcode)
|
||||
));
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(errorcode);
|
||||
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
OMPI_SINGLE_INT_2_FINT(errorcode);
|
||||
}
|
||||
}
|
||||
|
@ -60,6 +60,7 @@ void mpi_address_f(char *location, MPI_Fint *address, MPI_Fint *ierr)
|
||||
MPI_Aint addr;
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Address(location, &addr));
|
||||
|
||||
*address = (MPI_Fint) addr;
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*address = (MPI_Fint) addr;
|
||||
}
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ void mpi_bsend_init_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *
|
||||
OMPI_FINT_2_INT(*tag),
|
||||
c_comm, &c_req));
|
||||
|
||||
if (MPI_SUCCESS == *ierr) {
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*request = MPI_Request_c2f(c_req);
|
||||
}
|
||||
}
|
||||
|
@ -60,5 +60,7 @@ void mpi_buffer_detach_f(char *buffer, MPI_Fint *size, MPI_Fint *ierr)
|
||||
OMPI_SINGLE_NAME_DECL(size);
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Buffer_detach(buffer,
|
||||
OMPI_SINGLE_NAME_CONVERT(size)));
|
||||
OMPI_SINGLE_INT_2_FINT(size);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
OMPI_SINGLE_INT_2_FINT(size);
|
||||
}
|
||||
}
|
||||
|
@ -70,6 +70,7 @@ void mpi_cart_coords_f(MPI_Fint *comm, MPI_Fint *rank, MPI_Fint *maxdims,
|
||||
OMPI_FINT_2_INT(*rank),
|
||||
OMPI_FINT_2_INT(*maxdims),
|
||||
OMPI_ARRAY_NAME_CONVERT(coords)));
|
||||
|
||||
OMPI_ARRAY_INT_2_FINT(coords, size);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
OMPI_ARRAY_INT_2_FINT(coords, size);
|
||||
}
|
||||
}
|
||||
|
@ -76,8 +76,9 @@ void mpi_cart_create_f(MPI_Fint *old_comm, MPI_Fint *ndims, MPI_Fint *dims,
|
||||
OMPI_ARRAY_NAME_CONVERT(periods),
|
||||
OMPI_FINT_2_INT(*reorder),
|
||||
&c_comm2));
|
||||
|
||||
*comm_cart = MPI_Comm_c2f(c_comm2);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*comm_cart = MPI_Comm_c2f(c_comm2);
|
||||
}
|
||||
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(dims);
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(periods);
|
||||
|
@ -71,5 +71,7 @@ void mpi_cart_rank_f(MPI_Fint *comm, MPI_Fint *coords, MPI_Fint *rank,
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Cart_rank(c_comm,
|
||||
OMPI_ARRAY_NAME_CONVERT(coords),
|
||||
OMPI_SINGLE_NAME_CONVERT(rank)));
|
||||
OMPI_SINGLE_INT_2_FINT(rank);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
OMPI_SINGLE_INT_2_FINT(rank);
|
||||
}
|
||||
}
|
||||
|
@ -70,7 +70,8 @@ void mpi_cart_shift_f(MPI_Fint *comm, MPI_Fint *direction, MPI_Fint *disp,
|
||||
OMPI_FINT_2_INT(*disp),
|
||||
OMPI_SINGLE_NAME_CONVERT(rank_source),
|
||||
OMPI_SINGLE_NAME_CONVERT(rank_dest)));
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(rank_source);
|
||||
OMPI_SINGLE_INT_2_FINT(rank_dest);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
OMPI_SINGLE_INT_2_FINT(rank_source);
|
||||
OMPI_SINGLE_INT_2_FINT(rank_dest);
|
||||
}
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ void mpi_cart_sub_f(MPI_Fint *comm, MPI_Fint *remain_dims,
|
||||
c_new_comm = MPI_Comm_f2c(*new_comm);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Cart_sub(c_comm, remain_dims, &c_new_comm));
|
||||
|
||||
*new_comm = MPI_Comm_c2f(c_new_comm);
|
||||
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*new_comm = MPI_Comm_c2f(c_new_comm);
|
||||
}
|
||||
}
|
||||
|
@ -64,6 +64,7 @@ void mpi_cartdim_get_f(MPI_Fint *comm, MPI_Fint *ndims, MPI_Fint *ierr)
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Cartdim_get(c_comm,
|
||||
OMPI_SINGLE_NAME_CONVERT(ndims)));
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(ndims);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
OMPI_SINGLE_INT_2_FINT(ndims);
|
||||
}
|
||||
}
|
||||
|
@ -67,6 +67,7 @@ void mpi_comm_accept_f(char *port_name, MPI_Fint *info, MPI_Fint *root,
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Comm_accept(port_name, c_info,
|
||||
OMPI_FINT_2_INT(*root),
|
||||
c_comm, &c_new_comm));
|
||||
|
||||
*newcomm = MPI_Comm_c2f(c_new_comm);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*newcomm = MPI_Comm_c2f(c_new_comm);
|
||||
}
|
||||
}
|
||||
|
@ -63,6 +63,7 @@ void mpi_comm_compare_f(MPI_Fint *comm1, MPI_Fint *comm2, MPI_Fint *result, MPI_
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Comm_compare(c_comm1, c_comm2,
|
||||
OMPI_SINGLE_NAME_CONVERT(result)));
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(result);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
OMPI_SINGLE_INT_2_FINT(result);
|
||||
}
|
||||
}
|
||||
|
@ -68,6 +68,8 @@ void mpi_comm_connect_f(char *port_name, MPI_Fint *info,
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Comm_connect(port_name, c_info,
|
||||
OMPI_FINT_2_INT(*root),
|
||||
c_comm, &c_new_comm));
|
||||
*newcomm = MPI_Comm_c2f(c_new_comm);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*newcomm = MPI_Comm_c2f(c_new_comm);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -66,5 +66,7 @@ void mpi_comm_create_errhandler_f(ompi_errhandler_fortran_handler_fn_t *function
|
||||
*ierr = OMPI_INT_2_FINT(
|
||||
MPI_Comm_create_errhandler((MPI_Comm_errhandler_fn*)function,
|
||||
&c_errhandler));
|
||||
*errhandler = MPI_Errhandler_c2f(c_errhandler);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*errhandler = MPI_Errhandler_c2f(c_errhandler);
|
||||
}
|
||||
}
|
||||
|
@ -62,6 +62,7 @@ void mpi_comm_create_f(MPI_Fint *comm, MPI_Fint *group, MPI_Fint *newcomm, MPI_F
|
||||
MPI_Group c_group = MPI_Group_f2c(*group);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Comm_create (c_comm, c_group, &c_newcomm));
|
||||
|
||||
*newcomm = MPI_Comm_c2f (c_newcomm);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*newcomm = MPI_Comm_c2f (c_newcomm);
|
||||
}
|
||||
}
|
||||
|
@ -62,6 +62,7 @@ void mpi_comm_disconnect_f(MPI_Fint *comm, MPI_Fint *ierr)
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Comm_disconnect(&c_comm));
|
||||
|
||||
*comm = MPI_Comm_c2f(c_comm);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*comm = MPI_Comm_c2f(c_comm);
|
||||
}
|
||||
}
|
||||
|
@ -61,5 +61,7 @@ void mpi_comm_dup_f(MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr)
|
||||
MPI_Comm c_comm = MPI_Comm_f2c(*comm);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Comm_dup(c_comm, &c_newcomm));
|
||||
*newcomm = MPI_Comm_c2f(c_newcomm);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*newcomm = MPI_Comm_c2f(c_newcomm);
|
||||
}
|
||||
}
|
||||
|
@ -60,5 +60,7 @@ void mpi_comm_free_f(MPI_Fint *comm, MPI_Fint *ierr)
|
||||
MPI_Comm c_comm = MPI_Comm_f2c(*comm);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Comm_free(&c_comm));
|
||||
*comm = OMPI_INT_2_FINT(MPI_Comm_c2f(c_comm));
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*comm = MPI_Comm_c2f(c_comm);
|
||||
}
|
||||
}
|
||||
|
@ -63,6 +63,7 @@ void mpi_comm_free_keyval_f(MPI_Fint *comm_keyval, MPI_Fint *ierr)
|
||||
|
||||
*ierr =
|
||||
OMPI_INT_2_FINT(MPI_Comm_free_keyval(OMPI_SINGLE_NAME_CONVERT(comm_keyval)));
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(comm_keyval);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
OMPI_SINGLE_INT_2_FINT(comm_keyval);
|
||||
}
|
||||
}
|
||||
|
@ -64,5 +64,7 @@ void mpi_comm_get_errhandler_f(MPI_Fint *comm, MPI_Fint *errhandler,
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Comm_get_errhandler(c_comm, &c_errhandler));
|
||||
*errhandler = MPI_Errhandler_c2f(c_errhandler);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*errhandler = MPI_Errhandler_c2f(c_errhandler);
|
||||
}
|
||||
}
|
||||
|
@ -60,6 +60,7 @@ void mpi_comm_get_parent_f(MPI_Fint *parent, MPI_Fint *ierr)
|
||||
MPI_Comm c_parent;
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Comm_get_parent(&c_parent));
|
||||
|
||||
*parent = MPI_Comm_c2f(c_parent);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*parent = MPI_Comm_c2f(c_parent);
|
||||
}
|
||||
}
|
||||
|
@ -61,5 +61,7 @@ void mpi_comm_group_f(MPI_Fint *comm, MPI_Fint *group, MPI_Fint *ierr)
|
||||
MPI_Comm c_comm = MPI_Comm_f2c( *comm );
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Comm_group( c_comm, &c_group));
|
||||
*group = MPI_Group_c2f (c_group);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*group = MPI_Group_c2f (c_group);
|
||||
}
|
||||
}
|
||||
|
@ -61,5 +61,7 @@ void mpi_comm_join_f(MPI_Fint *fd, MPI_Fint *intercomm, MPI_Fint *ierr)
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Comm_join(OMPI_FINT_2_INT(*fd),
|
||||
&c_intercomm));
|
||||
*intercomm = MPI_Comm_c2f(c_intercomm);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*intercomm = MPI_Comm_c2f(c_intercomm);
|
||||
}
|
||||
}
|
||||
|
@ -62,5 +62,7 @@ void mpi_comm_rank_f(MPI_Fint *comm, MPI_Fint *rank, MPI_Fint *ierr)
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Comm_rank( c_comm,
|
||||
OMPI_SINGLE_NAME_CONVERT(rank)));
|
||||
OMPI_SINGLE_INT_2_FINT(rank);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
OMPI_SINGLE_INT_2_FINT(rank);
|
||||
}
|
||||
}
|
||||
|
@ -61,5 +61,7 @@ void mpi_comm_remote_group_f(MPI_Fint *comm, MPI_Fint *group, MPI_Fint *ierr)
|
||||
MPI_Comm c_comm = MPI_Comm_f2c ( *comm );
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Comm_remote_group ( c_comm, &c_group ));
|
||||
*group = MPI_Group_c2f (c_group);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*group = MPI_Group_c2f (c_group);
|
||||
}
|
||||
}
|
||||
|
@ -62,5 +62,7 @@ void mpi_comm_remote_size_f(MPI_Fint *comm, MPI_Fint *size, MPI_Fint *ierr)
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Comm_remote_size ( c_comm,
|
||||
OMPI_SINGLE_NAME_CONVERT(size )));
|
||||
OMPI_SINGLE_INT_2_FINT(size);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
OMPI_SINGLE_INT_2_FINT(size);
|
||||
}
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ void mpi_comm_set_errhandler_f(MPI_Fint *comm, MPI_Fint *errhandler,
|
||||
c_errhandler = MPI_Errhandler_f2c(*errhandler);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Comm_set_errhandler(c_comm, c_errhandler));
|
||||
if ( MPI_SUCCESS == *ierr &&
|
||||
if ( MPI_SUCCESS == OMPI_FINT_2_INT(*ierr) &&
|
||||
OMPI_ERRHANDLER_TYPE_PREDEFINED != c_errhandler->eh_mpi_object_type ) {
|
||||
c_errhandler->eh_fortran_function = true ;
|
||||
}
|
||||
|
@ -62,5 +62,7 @@ void mpi_comm_size_f(MPI_Fint *comm, MPI_Fint *size, MPI_Fint *ierr)
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Comm_size( c_comm,
|
||||
OMPI_SINGLE_NAME_CONVERT(size)));
|
||||
OMPI_SINGLE_INT_2_FINT(size);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
OMPI_SINGLE_INT_2_FINT(size);
|
||||
}
|
||||
}
|
||||
|
@ -98,8 +98,9 @@ void mpi_comm_spawn_f(char *command, char *argv, MPI_Fint *maxprocs,
|
||||
c_info,
|
||||
OMPI_FINT_2_INT(*root),
|
||||
c_comm, &c_new_comm, c_errs));
|
||||
|
||||
*intercomm = MPI_Comm_c2f(c_new_comm);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*intercomm = MPI_Comm_c2f(c_new_comm);
|
||||
}
|
||||
free(c_command);
|
||||
if (MPI_ARGV_NULL != c_argv && NULL != c_argv) {
|
||||
ompi_argv_free(c_argv);
|
||||
|
@ -118,8 +118,9 @@ void mpi_comm_spawn_multiple_f(MPI_Fint *count, char *array_commands,
|
||||
OMPI_FINT_2_INT(*root),
|
||||
c_comm, &c_new_comm,
|
||||
c_errs));
|
||||
|
||||
*intercomm = MPI_Comm_c2f(c_new_comm);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*intercomm = MPI_Comm_c2f(c_new_comm);
|
||||
}
|
||||
|
||||
if (!OMPI_IS_FORTRAN_ERRCODES_IGNORE(array_errcds)) {
|
||||
OMPI_ARRAY_INT_2_FINT(array_errcds, size);
|
||||
|
@ -65,5 +65,7 @@ void mpi_comm_split_f(MPI_Fint *comm, MPI_Fint *color, MPI_Fint *key,
|
||||
OMPI_FINT_2_INT(*color),
|
||||
OMPI_FINT_2_INT(*key),
|
||||
&c_newcomm ));
|
||||
*newcomm = MPI_Comm_c2f (c_newcomm);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*newcomm = MPI_Comm_c2f (c_newcomm);
|
||||
}
|
||||
}
|
||||
|
@ -62,5 +62,7 @@ void mpi_comm_test_inter_f(MPI_Fint *comm, MPI_Fint *flag, MPI_Fint *ierr)
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Comm_test_inter(c_comm,
|
||||
OMPI_SINGLE_NAME_CONVERT(flag)));
|
||||
OMPI_SINGLE_INT_2_FINT(flag);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
OMPI_SINGLE_INT_2_FINT(flag);
|
||||
}
|
||||
}
|
||||
|
@ -65,6 +65,7 @@ void mpi_dims_create_f(MPI_Fint *nnodes, MPI_Fint *ndims,
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Dims_create(OMPI_FINT_2_INT(*nnodes),
|
||||
OMPI_FINT_2_INT(*ndims),
|
||||
OMPI_ARRAY_NAME_CONVERT(dims)));
|
||||
|
||||
OMPI_ARRAY_INT_2_FINT(dims, *ndims);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
OMPI_ARRAY_INT_2_FINT(dims, *ndims);
|
||||
}
|
||||
}
|
||||
|
@ -66,5 +66,7 @@ void mpi_errhandler_create_f(ompi_errhandler_fortran_handler_fn_t* function,
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Errhandler_create(
|
||||
(MPI_Handler_function *) function,
|
||||
&c_errhandler));
|
||||
*errhandler = MPI_Errhandler_c2f(c_errhandler);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*errhandler = MPI_Errhandler_c2f(c_errhandler);
|
||||
}
|
||||
}
|
||||
|
@ -62,5 +62,7 @@ void mpi_errhandler_free_f(MPI_Fint *errhandler, MPI_Fint *ierr)
|
||||
c_errhandler = MPI_Errhandler_f2c(*errhandler);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Errhandler_free(&c_errhandler));
|
||||
*errhandler = MPI_Errhandler_c2f(c_errhandler);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*errhandler = MPI_Errhandler_c2f(c_errhandler);
|
||||
}
|
||||
}
|
||||
|
@ -63,6 +63,8 @@ void mpi_errhandler_get_f(MPI_Fint *comm, MPI_Fint *errhandler, MPI_Fint *ierr)
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Errhandler_get(c_comm, &c_errhandler));
|
||||
*errhandler = MPI_Errhandler_c2f(c_errhandler);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*errhandler = MPI_Errhandler_c2f(c_errhandler);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ void mpi_errhandler_set_f(MPI_Fint *comm, MPI_Fint *errhandler, MPI_Fint *ierr)
|
||||
c_errhandler = MPI_Errhandler_f2c(*errhandler);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Errhandler_set(c_comm, c_errhandler));
|
||||
if (MPI_SUCCESS == *ierr &&
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr) &&
|
||||
OMPI_ERRHANDLER_TYPE_PREDEFINED != c_errhandler->eh_mpi_object_type ) {
|
||||
c_errhandler->eh_fortran_function = true;
|
||||
}
|
||||
|
@ -63,6 +63,7 @@ void mpi_error_class_f(MPI_Fint *errorcode, MPI_Fint *errorclass,
|
||||
*ierr =
|
||||
OMPI_INT_2_FINT(MPI_Error_class(OMPI_FINT_2_INT(*errorcode),
|
||||
OMPI_SINGLE_NAME_CONVERT(errorclass)));
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(errorclass);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
OMPI_SINGLE_INT_2_FINT(errorclass);
|
||||
}
|
||||
}
|
||||
|
@ -65,6 +65,7 @@ void mpi_error_string_f(MPI_Fint *errorcode, char *string,
|
||||
string,
|
||||
OMPI_SINGLE_NAME_CONVERT(resultlen)
|
||||
));
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(resultlen);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
OMPI_SINGLE_INT_2_FINT(resultlen);
|
||||
}
|
||||
}
|
||||
|
@ -62,5 +62,7 @@ void mpi_file_close_f(MPI_Fint *fh, MPI_Fint *ierr)
|
||||
c_fh = MPI_File_f2c(*fh);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_File_close(&c_fh));
|
||||
*fh = MPI_File_c2f(c_fh);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*fh = MPI_File_c2f(c_fh);
|
||||
}
|
||||
}
|
||||
|
@ -66,6 +66,7 @@ void mpi_file_create_errhandler_f(ompi_errhandler_fortran_handler_fn_t* function
|
||||
*ierr = OMPI_INT_2_FINT(MPI_File_create_errhandler(
|
||||
(MPI_File_errhandler_fn *) function,
|
||||
&c_errhandler));
|
||||
|
||||
*errhandler = MPI_Errhandler_c2f(c_errhandler);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*errhandler = MPI_Errhandler_c2f(c_errhandler);
|
||||
}
|
||||
}
|
||||
|
@ -64,6 +64,7 @@ void mpi_file_get_amode_f(MPI_Fint *fh, MPI_Fint *amode, MPI_Fint *ierr)
|
||||
*ierr = OMPI_INT_2_FINT(MPI_File_get_amode(c_fh,
|
||||
OMPI_SINGLE_NAME_CONVERT(amode)
|
||||
));
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(amode);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
OMPI_SINGLE_INT_2_FINT(amode);
|
||||
}
|
||||
}
|
||||
|
@ -63,6 +63,7 @@ void mpi_file_get_atomicity_f(MPI_Fint *fh, MPI_Fint *flag, MPI_Fint *ierr)
|
||||
c_fh = MPI_File_f2c(*fh);
|
||||
*ierr = OMPI_INT_2_FINT(MPI_File_get_atomicity(c_fh,
|
||||
OMPI_SINGLE_NAME_CONVERT(flag)));
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(flag);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
OMPI_SINGLE_INT_2_FINT(flag);
|
||||
}
|
||||
}
|
||||
|
@ -63,6 +63,7 @@ void mpi_file_get_errhandler_f(MPI_Fint *fh, MPI_Fint *errhandler, MPI_Fint *ier
|
||||
c_fh = MPI_File_f2c(*fh);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_File_get_errhandler(c_fh, &c_errhandler));
|
||||
|
||||
*errhandler = MPI_Errhandler_c2f(c_errhandler);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*errhandler = MPI_Errhandler_c2f(c_errhandler);
|
||||
}
|
||||
}
|
||||
|
@ -61,6 +61,7 @@ void mpi_file_get_group_f(MPI_Fint *fh, MPI_Fint *group, MPI_Fint *ierr)
|
||||
MPI_Group c_grp;
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_File_get_group(c_fh, &c_grp));
|
||||
|
||||
*group = MPI_Group_c2f(c_grp);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*group = MPI_Group_c2f(c_grp);
|
||||
}
|
||||
}
|
||||
|
@ -61,6 +61,7 @@ void mpi_file_get_info_f(MPI_Fint *fh, MPI_Fint *info_used, MPI_Fint *ierr)
|
||||
MPI_Info c_info;
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_File_get_info(c_fh, &c_info));
|
||||
|
||||
*info_used = MPI_Info_c2f(c_info);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*info_used = MPI_Info_c2f(c_info);
|
||||
}
|
||||
}
|
||||
|
@ -62,5 +62,7 @@ void mpi_file_get_position_f(MPI_Fint *fh, MPI_Offset *offset, MPI_Fint *ierr)
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_File_get_position(c_fh,
|
||||
&c_offset));
|
||||
*offset = (MPI_Fint) c_offset;
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*offset = (MPI_Fint) c_offset;
|
||||
}
|
||||
}
|
||||
|
@ -63,5 +63,7 @@ void mpi_file_get_position_shared_f(MPI_Fint *fh, MPI_Offset *offset,
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_File_get_position_shared(c_fh,
|
||||
&c_offset));
|
||||
*offset = (MPI_Fint) c_offset;
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*offset = (MPI_Fint) c_offset;
|
||||
}
|
||||
}
|
||||
|
@ -62,5 +62,7 @@ void mpi_file_get_size_f(MPI_Fint *fh, MPI_Offset *size, MPI_Fint *ierr)
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_File_get_size(c_fh,
|
||||
&c_size));
|
||||
*size = (MPI_Fint) c_size;
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*size = (MPI_Fint) c_size;
|
||||
}
|
||||
}
|
||||
|
@ -65,6 +65,7 @@ void mpi_file_get_type_extent_f(MPI_Fint *fh, MPI_Fint *datatype,
|
||||
c_type = MPI_Type_f2c(*datatype);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_File_get_type_extent(c_fh, c_type, &c_extent));
|
||||
|
||||
*extent = (MPI_Fint) c_extent;
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*extent = (MPI_Fint) c_extent;
|
||||
}
|
||||
}
|
||||
|
@ -65,8 +65,9 @@ void mpi_file_get_view_f(MPI_Fint *fh, MPI_Offset *disp,
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_File_get_view(c_fh, &c_disp, &c_etype,
|
||||
&c_filetype, datarep));
|
||||
|
||||
*disp = (MPI_Fint) c_disp;
|
||||
*etype = MPI_Type_c2f(c_etype);
|
||||
*filetype = MPI_Type_c2f(c_filetype);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*disp = (MPI_Fint) c_disp;
|
||||
*etype = MPI_Type_c2f(c_etype);
|
||||
*filetype = MPI_Type_c2f(c_filetype);
|
||||
}
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ void mpi_file_iread_at_f(MPI_Fint *fh, MPI_Offset *offset,
|
||||
OMPI_FINT_2_INT(*count),
|
||||
c_type,
|
||||
&c_request));
|
||||
if (MPI_SUCCESS == *ierr) {
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*request = MPI_Request_c2f(c_request);
|
||||
}
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ void mpi_file_iread_f(MPI_Fint *fh, char *buf, MPI_Fint *count,
|
||||
OMPI_FINT_2_INT(*count),
|
||||
c_type, &c_request));
|
||||
|
||||
if (MPI_SUCCESS == *ierr) {
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*request = MPI_Request_c2f(c_request);
|
||||
}
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ void mpi_file_iread_shared_f(MPI_Fint *fh, char *buf, MPI_Fint *count,
|
||||
OMPI_FINT_2_INT(*count),
|
||||
c_type,
|
||||
&c_request));
|
||||
if (MPI_SUCCESS == *ierr) {
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*request = MPI_Request_c2f(c_request);
|
||||
}
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ void mpi_file_iwrite_at_f(MPI_Fint *fh, MPI_Offset *offset, char *buf,
|
||||
OMPI_ADDR(buf),
|
||||
OMPI_FINT_2_INT(*count),
|
||||
c_type, &c_request));
|
||||
if (MPI_SUCCESS == *ierr) {
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*request = MPI_Request_c2f(c_request);
|
||||
}
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ void mpi_file_iwrite_f(MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datat
|
||||
OMPI_FINT_2_INT(*count),
|
||||
c_type, &c_request));
|
||||
|
||||
if (MPI_SUCCESS == *ierr) {
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*request = MPI_Request_c2f(c_request);
|
||||
}
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ void mpi_file_iwrite_shared_f(MPI_Fint *fh, char *buf, MPI_Fint *count,
|
||||
OMPI_FINT_2_INT(*count),
|
||||
c_type,
|
||||
&c_request));
|
||||
if (MPI_SUCCESS == *ierr) {
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*request = MPI_Request_c2f(c_request);
|
||||
}
|
||||
}
|
||||
|
@ -65,6 +65,7 @@ void mpi_file_open_f(MPI_Fint *comm, char *filename, MPI_Fint *amode,
|
||||
*ierr = OMPI_INT_2_FINT(MPI_File_open(c_comm, filename,
|
||||
OMPI_FINT_2_INT(*amode),
|
||||
c_info, &c_fh));
|
||||
|
||||
*fh = MPI_File_c2f(c_fh);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*fh = MPI_File_c2f(c_fh);
|
||||
}
|
||||
}
|
||||
|
@ -87,7 +87,8 @@ void mpi_file_read_all_end_f(MPI_Fint *fh, char *buf, MPI_Fint *status,
|
||||
*ierr = OMPI_INT_2_FINT(MPI_File_read_all_end(c_fh, buf, c_status));
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_STATUS_IGNORE != c_status) {
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr) &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
|
@ -88,7 +88,8 @@ void mpi_file_read_all_f(MPI_Fint *fh, char *buf, MPI_Fint *count,
|
||||
c_type, c_status));
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_STATUS_IGNORE != c_status) {
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr) &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
|
@ -87,7 +87,8 @@ void mpi_file_read_at_all_end_f(MPI_Fint *fh, char *buf,
|
||||
*ierr = OMPI_FINT_2_INT(MPI_File_read_at_all_end(c_fh, buf, c_status));
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_STATUS_IGNORE != c_status) {
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr) &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
|
@ -93,7 +93,8 @@ void mpi_file_read_at_all_f(MPI_Fint *fh, MPI_Offset *offset,
|
||||
c_status));
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_STATUS_IGNORE != c_status) {
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr) &&&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
|
@ -93,7 +93,8 @@ void mpi_file_read_at_f(MPI_Fint *fh, MPI_Offset *offset, char *buf,
|
||||
c_type, c_status));
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_STATUS_IGNORE != c_status) {
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr) &&&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
|
@ -88,7 +88,8 @@ void mpi_file_read_f(MPI_Fint *fh, char *buf, MPI_Fint *count,
|
||||
c_type, c_status));
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_STATUS_IGNORE != c_status) {
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr) &&&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
|
@ -87,7 +87,8 @@ void mpi_file_read_ordered_end_f(MPI_Fint *fh, char *buf,
|
||||
*ierr = OMPI_INT_2_FINT(MPI_File_read_ordered_end(c_fh, buf, c_status));
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_STATUS_IGNORE != c_status) {
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr) &&&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
|
@ -91,7 +91,8 @@ void mpi_file_read_ordered_f(MPI_Fint *fh, char *buf, MPI_Fint *count,
|
||||
c_status));
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_STATUS_IGNORE != c_status) {
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr) &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
|
@ -91,7 +91,8 @@ void mpi_file_read_shared_f(MPI_Fint *fh, char *buf, MPI_Fint *count,
|
||||
c_status));
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_STATUS_IGNORE != c_status) {
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr) &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
|
@ -63,7 +63,7 @@ void mpi_file_set_errhandler_f(MPI_Fint *fh, MPI_Fint *errhandler,
|
||||
MPI_Errhandler c_err = MPI_Errhandler_f2c(*errhandler);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_File_set_errhandler(c_fh, c_err));
|
||||
if ( MPI_SUCCESS == *ierr &&
|
||||
if ( MPI_SUCCESS == OMPI_FINT_2_INT(*ierr) &&
|
||||
OMPI_ERRHANDLER_TYPE_PREDEFINED != c_err->eh_mpi_object_type ) {
|
||||
c_err->eh_fortran_function = true ;
|
||||
}
|
||||
|
@ -60,5 +60,4 @@ void mpi_file_sync_f(MPI_Fint *fh, MPI_Fint *ierr)
|
||||
MPI_File c_fh = MPI_File_f2c(*fh);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_File_sync(c_fh));
|
||||
|
||||
}
|
||||
|
@ -87,7 +87,8 @@ void mpi_file_write_all_end_f(MPI_Fint *fh, char *buf, MPI_Fint *status,
|
||||
*ierr = OMPI_INT_2_FINT(MPI_File_write_all_end(c_fh, buf, c_status));
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_STATUS_IGNORE != c_status) {
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr) &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
|
@ -88,9 +88,9 @@ void mpi_file_write_all_f(MPI_Fint *fh, char *buf, MPI_Fint *count,
|
||||
c_type, c_status));
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_STATUS_IGNORE != c_status) {
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr) &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
@ -87,7 +87,8 @@ void mpi_file_write_at_all_end_f(MPI_Fint *fh, char *buf,
|
||||
*ierr = OMPI_FINT_2_INT(MPI_File_write_at_all_end(c_fh, buf, c_status));
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_STATUS_IGNORE != c_status) {
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr) &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
|
@ -93,7 +93,8 @@ void mpi_file_write_at_all_f(MPI_Fint *fh, MPI_Offset *offset,
|
||||
c_status));
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_STATUS_IGNORE != c_status) {
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr) &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
|
@ -90,8 +90,9 @@ void mpi_file_write_at_f(MPI_Fint *fh, MPI_Offset *offset,
|
||||
c_type, c_status));
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr) &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -88,8 +88,9 @@ void mpi_file_write_f(MPI_Fint *fh, char *buf, MPI_Fint *count,
|
||||
c_type, c_status));
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr) &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -87,7 +87,8 @@ void mpi_file_write_ordered_end_f(MPI_Fint *fh, char *buf,
|
||||
*ierr = OMPI_INT_2_FINT(MPI_File_write_ordered_end(c_fh, buf, c_status));
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_STATUS_IGNORE != c_status) {
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr) &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
|
@ -91,8 +91,9 @@ void mpi_file_write_ordered_f(MPI_Fint *fh, char *buf, MPI_Fint *count,
|
||||
c_status));
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr) &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -91,8 +91,9 @@ void mpi_file_write_shared_f(MPI_Fint *fh, char *buf, MPI_Fint *count,
|
||||
c_status));
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INTEGER != SIZEOF_INT
|
||||
if (MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr) &&
|
||||
MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -59,5 +59,7 @@ void mpi_finalized_f(MPI_Fint *flag, MPI_Fint *ierr)
|
||||
{
|
||||
OMPI_SINGLE_NAME_DECL(flag);
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Finalized(OMPI_SINGLE_NAME_CONVERT(flag)));
|
||||
OMPI_SINGLE_INT_2_FINT(flag);
|
||||
if (OMPI_FINT_2_INT(*ierr)) {
|
||||
OMPI_SINGLE_INT_2_FINT(flag);
|
||||
}
|
||||
}
|
||||
|
@ -60,5 +60,7 @@ void mpi_get_address_f(char *location, MPI_Fint *address, MPI_Fint *ierr)
|
||||
MPI_Aint c_address;
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Get_address(location, &c_address));
|
||||
*address = (MPI_Fint) c_address;
|
||||
if (OMPI_FINT_2_INT(*ierr)) {
|
||||
*address = (MPI_Fint) c_address;
|
||||
}
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ void mpi_get_elements_f(MPI_Fint *status, MPI_Fint *datatype, MPI_Fint *count, M
|
||||
} else {
|
||||
*ierr = MPI_Status_f2c(status, &c_status);
|
||||
|
||||
if (MPI_SUCCESS == *ierr) {
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Get_elements(&c_status, c_type,
|
||||
OMPI_SINGLE_NAME_CONVERT(count)));
|
||||
OMPI_SINGLE_INT_2_FINT(count);
|
||||
|
@ -61,6 +61,7 @@ void mpi_get_processor_name_f(char *name, MPI_Fint *resultlen, MPI_Fint *ierr)
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Get_processor_name(name,
|
||||
OMPI_SINGLE_NAME_CONVERT(resultlen)));
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(resultlen);
|
||||
if (OMPI_FINT_2_INT(*ierr)) {
|
||||
OMPI_SINGLE_INT_2_FINT(resultlen);
|
||||
}
|
||||
}
|
||||
|
@ -62,6 +62,8 @@ void mpi_get_version_f(MPI_Fint *version, MPI_Fint *subversion, MPI_Fint *ierr)
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Get_version(OMPI_SINGLE_NAME_CONVERT(version),
|
||||
OMPI_SINGLE_NAME_CONVERT(subversion)));
|
||||
OMPI_SINGLE_INT_2_FINT(version);
|
||||
OMPI_SINGLE_INT_2_FINT(subversion);
|
||||
if (OMPI_FINT_2_INT(*ierr)) {
|
||||
OMPI_SINGLE_INT_2_FINT(version);
|
||||
OMPI_SINGLE_INT_2_FINT(subversion);
|
||||
}
|
||||
}
|
||||
|
@ -77,8 +77,9 @@ void mpi_graph_create_f(MPI_Fint *comm_old, MPI_Fint *nnodes,
|
||||
OMPI_ARRAY_NAME_CONVERT(edges),
|
||||
OMPI_FINT_2_INT(*reorder),
|
||||
&c_comm_graph));
|
||||
|
||||
*comm_graph = MPI_Comm_c2f(c_comm_graph);
|
||||
if (OMPI_FINT_2_INT(*ierr)) {
|
||||
*comm_graph = MPI_Comm_c2f(c_comm_graph);
|
||||
}
|
||||
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(index);
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(edges);
|
||||
|
@ -72,7 +72,8 @@ void mpi_graph_get_f(MPI_Fint *comm, MPI_Fint *maxindex,
|
||||
OMPI_FINT_2_INT(*maxedges),
|
||||
OMPI_ARRAY_NAME_CONVERT(index),
|
||||
OMPI_ARRAY_NAME_CONVERT(edges)));
|
||||
|
||||
OMPI_ARRAY_INT_2_FINT(index, *maxindex);
|
||||
OMPI_ARRAY_INT_2_FINT(edges, *maxedges);
|
||||
if (OMPI_FINT_2_INT(*ierr)) {
|
||||
OMPI_ARRAY_INT_2_FINT(index, *maxindex);
|
||||
OMPI_ARRAY_INT_2_FINT(edges, *maxedges);
|
||||
}
|
||||
}
|
||||
|
@ -73,8 +73,9 @@ void mpi_graph_map_f(MPI_Fint *comm, MPI_Fint *nnodes, MPI_Fint *index,
|
||||
OMPI_ARRAY_NAME_CONVERT(index),
|
||||
OMPI_ARRAY_NAME_CONVERT(edges),
|
||||
OMPI_SINGLE_NAME_CONVERT(nrank)));
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(nrank);
|
||||
if (OMPI_FINT_2_INT(*ierr)) {
|
||||
OMPI_SINGLE_INT_2_FINT(nrank);
|
||||
}
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(edges);
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(index);
|
||||
}
|
||||
|
@ -66,6 +66,7 @@ void mpi_graph_neighbors_count_f(MPI_Fint *comm, MPI_Fint *rank,
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Graph_neighbors_count(c_comm,
|
||||
OMPI_FINT_2_INT(*rank),
|
||||
OMPI_SINGLE_NAME_CONVERT(nneighbors)));
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(nneighbors);
|
||||
if (OMPI_FINT_2_INT(*ierr)) {
|
||||
OMPI_SINGLE_INT_2_FINT(nneighbors);
|
||||
}
|
||||
}
|
||||
|
@ -71,6 +71,7 @@ void mpi_graph_neighbors_f(MPI_Fint *comm, MPI_Fint *rank,
|
||||
OMPI_FINT_2_INT(*maxneighbors),
|
||||
OMPI_ARRAY_NAME_CONVERT(neighbors)
|
||||
));
|
||||
|
||||
OMPI_ARRAY_INT_2_FINT(neighbors, *maxneighbors);
|
||||
if (OMPI_FINT_2_INT(*ierr)) {
|
||||
OMPI_ARRAY_INT_2_FINT(neighbors, *maxneighbors);
|
||||
}
|
||||
}
|
||||
|
@ -68,7 +68,8 @@ void mpi_graphdims_get_f(MPI_Fint *comm, MPI_Fint *nnodes,
|
||||
OMPI_SINGLE_NAME_CONVERT(nnodes),
|
||||
OMPI_SINGLE_NAME_CONVERT(nedges)
|
||||
));
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(nnodes);
|
||||
OMPI_SINGLE_INT_2_FINT(nedges);
|
||||
if (OMPI_FINT_2_INT(*ierr)) {
|
||||
OMPI_SINGLE_INT_2_FINT(nnodes);
|
||||
OMPI_SINGLE_INT_2_FINT(nedges);
|
||||
}
|
||||
}
|
||||
|
@ -67,9 +67,7 @@ void mpi_grequest_start_f(MPI_F_Grequest_query_function* query_fn,
|
||||
(MPI_Grequest_free_function *) free_fn,
|
||||
(MPI_Grequest_cancel_function *) cancel_fn,
|
||||
extra_state, &c_req));
|
||||
|
||||
if (MPI_SUCCESS == *ierr) {
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*request = MPI_Request_c2f(c_req);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -73,5 +73,7 @@ void mpi_group_compare_f(MPI_Fint *group1, MPI_Fint *group2,
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Group_compare(c_group1, c_group2,
|
||||
OMPI_SINGLE_NAME_CONVERT(result)
|
||||
));
|
||||
OMPI_SINGLE_INT_2_FINT(result);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
OMPI_SINGLE_INT_2_FINT(result);
|
||||
}
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ void mpi_group_difference_f(MPI_Fint *group1, MPI_Fint *group2, MPI_Fint *newgro
|
||||
&c_newgroup));
|
||||
|
||||
/* translate the results from c to fortran */
|
||||
if (MPI_SUCCESS == *ierr) {
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*newgroup = c_newgroup->grp_f_to_c_index;
|
||||
}
|
||||
}
|
||||
|
@ -73,5 +73,7 @@ void mpi_group_excl_f(MPI_Fint *group, MPI_Fint *n,
|
||||
&c_newgroup));
|
||||
|
||||
/* translate the results from c to fortran */
|
||||
*newgroup = c_newgroup->grp_f_to_c_index;
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*newgroup = c_newgroup->grp_f_to_c_index;
|
||||
}
|
||||
}
|
||||
|
@ -68,5 +68,7 @@ void mpi_group_free_f(MPI_Fint *group, MPI_Fint *ierr)
|
||||
/* This value comes from the MPI_GROUP_NULL value in mpif.h. Do not
|
||||
change without consulting mpif.h! */
|
||||
|
||||
*group = 0;
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*group = 0;
|
||||
}
|
||||
}
|
||||
|
@ -72,5 +72,7 @@ void mpi_group_incl_f(MPI_Fint *group, MPI_Fint *n, MPI_Fint *ranks, MPI_Fint *n
|
||||
&c_newgroup));
|
||||
|
||||
/* translate the results from c to fortran */
|
||||
*newgroup = c_newgroup->grp_f_to_c_index;
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*newgroup = c_newgroup->grp_f_to_c_index;
|
||||
}
|
||||
}
|
||||
|
@ -68,5 +68,7 @@ void mpi_group_intersection_f(MPI_Fint *group1, MPI_Fint *group2, MPI_Fint *newg
|
||||
&c_newgroup));
|
||||
|
||||
/* translate the results from c to fortran */
|
||||
*newgroup = c_newgroup->grp_f_to_c_index;
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*newgroup = c_newgroup->grp_f_to_c_index;
|
||||
}
|
||||
}
|
||||
|
@ -71,7 +71,9 @@ void mpi_group_range_excl_f(MPI_Fint *group, MPI_Fint *n, MPI_Fint ranges[][3],
|
||||
&c_newgroup));
|
||||
|
||||
/* translate the results from c to fortran */
|
||||
*newgroup = c_newgroup->grp_f_to_c_index;
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*newgroup = c_newgroup->grp_f_to_c_index;
|
||||
}
|
||||
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(ranges);
|
||||
}
|
||||
|
@ -71,7 +71,9 @@ void mpi_group_range_incl_f(MPI_Fint *group, MPI_Fint *n, MPI_Fint ranges[][3],
|
||||
&c_newgroup));
|
||||
|
||||
/* translate the results from c to fortran */
|
||||
*newgroup = c_newgroup->grp_f_to_c_index;
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
*newgroup = c_newgroup->grp_f_to_c_index;
|
||||
}
|
||||
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(ranges);
|
||||
}
|
||||
|
@ -66,5 +66,7 @@ void mpi_group_rank_f(MPI_Fint *group, MPI_Fint *rank, MPI_Fint *ierr)
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Group_rank(c_group,
|
||||
OMPI_SINGLE_NAME_CONVERT(rank)));
|
||||
OMPI_SINGLE_INT_2_FINT(rank);
|
||||
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
|
||||
OMPI_SINGLE_INT_2_FINT(rank);
|
||||
}
|
||||
}
|
||||
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
x
Ссылка в новой задаче
Block a user