More f77 bindings
This commit was SVN r2439.
Этот коммит содержится в:
родитель
662ba7c344
Коммит
9dd541ef41
@ -50,6 +50,7 @@
|
||||
#define OMPI_ARRAY_FINT_2_INT_ALLOC(in, n)
|
||||
#define OMPI_ARRAY_FINT_2_INT(in, n)
|
||||
#define OMPI_ARRAY_FINT_2_INT_CLEANUP(in)
|
||||
#define OMPI_SINGLE_FINT_2_INT(in)
|
||||
#define OMPI_SINGLE_INT_2_FINT(in)
|
||||
#define OMPI_ARRAY_INT_2_FINT(in, n)
|
||||
|
||||
@ -58,7 +59,7 @@
|
||||
#define OMPI_SINGLE_NAME_DECL(a) int c_##a
|
||||
#define OMPI_ARRAY_NAME_CONVERT(a) c_##a
|
||||
#define OMPI_SINGLE_NAME_CONVERT(a) &c_##a
|
||||
#define OMPI_INT_2_FINT(a) (a)
|
||||
#define OMPI_INT_2_FINT(a) a
|
||||
#define OMPI_FINT_2_INT(a) (int) (a)
|
||||
|
||||
/* This is for OUT parameters. Does only alloc */
|
||||
@ -77,6 +78,10 @@
|
||||
#define OMPI_ARRAY_FINT_2_INT_CLEANUP(in) \
|
||||
free(OMPI_ARRAY_NAME_CONVERT(in))
|
||||
|
||||
/* This is for single IN parameter */
|
||||
#define OMPI_SINGLE_FINT_2_INT(in) \
|
||||
OMPI_ARRAY_NAME_CONVERT(in) = (int) *(in)
|
||||
|
||||
/* This is for single OUT parameter */
|
||||
#define OMPI_SINGLE_INT_2_FINT(in) \
|
||||
*(in) = OMPI_ARRAY_NAME_CONVERT(in)
|
||||
@ -111,6 +116,9 @@
|
||||
#define OMPI_ARRAY_FINT_2_INT_CLEANUP(in) \
|
||||
free(OMPI_ARRAY_NAME_CONVERT(in))
|
||||
|
||||
#define OMPI_SINGLE_FINT_2_INT(in)
|
||||
OMPI_ARRAY_NAME_CONVERT(in) = *(in)
|
||||
|
||||
#define OMPI_SINGLE_INT_2_FINT(n) \
|
||||
in = (MPI_Fint) OMPI_ARRAY_NAME_CONVERT(in)
|
||||
|
||||
|
@ -48,5 +48,5 @@ OMPI_GENERATE_F77_BINDINGS (MPI_CLOSE_PORT,
|
||||
|
||||
void mpi_close_port_f(char *port_name, MPI_Fint *ierr)
|
||||
{
|
||||
*ierr = MPI_Close_port(port_name);
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Close_port(port_name));
|
||||
}
|
||||
|
@ -53,8 +53,11 @@ void mpi_comm_accept_f(char *port_name, MPI_Fint *info, MPI_Fint *root,
|
||||
MPI_Info c_info;
|
||||
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
c_new_comm = MPI_Comm_f2c(*newcomm);
|
||||
c_info = MPI_Info_f2c(*info);
|
||||
|
||||
*ierr = MPI_Comm_accept(port_name, c_info, *root, c_comm, &c_new_comm);
|
||||
*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);
|
||||
}
|
||||
|
@ -53,5 +53,7 @@ void mpi_comm_call_errhandler_f(MPI_Fint *comm, MPI_Fint *errorcode,
|
||||
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
|
||||
*ierr = MPI_Comm_call_errhandler(c_comm, *errorcode);
|
||||
*ierr =
|
||||
OMPI_INT_2_FINT(MPI_Comm_call_errhandler(c_comm,
|
||||
OMPI_FINT_2_INT(*errorcode)));
|
||||
}
|
||||
|
@ -46,7 +46,19 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_CONNECT,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
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_connect_f(char *port_name, MPI_Fint *info,
|
||||
MPI_Fint *root, MPI_Fint *comm,
|
||||
MPI_Fint *newcomm, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Comm c_comm, c_new_comm;
|
||||
MPI_Info c_info;
|
||||
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
c_info = MPI_Info_f2c(*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);
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,13 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_CREATE_ERRHANDLER,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_comm_create_errhandler_f(MPI_Fint *function, MPI_Fint *errhandler, MPI_Fint *ierr)
|
||||
void mpi_comm_create_errhandler_f(MPI_Fint *function,
|
||||
MPI_Fint *errhandler, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Errhandler c_errhandler;
|
||||
|
||||
*ierr =
|
||||
OMPI_INT_2_FINT(MPI_Comm_create_errhandler((MPI_Comm_errhandler_fn *)
|
||||
function, &c_errhandler));
|
||||
*errhandler = MPI_Errhandler_c2f(c_errhandler);
|
||||
}
|
||||
|
@ -53,5 +53,6 @@ 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 = MPI_Comm_create (c_comm, c_group, &c_newcomm);
|
||||
|
||||
*newcomm = MPI_Comm_c2f (c_newcomm);
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "mpi.h"
|
||||
#include "mpi/f77/bindings.h"
|
||||
#include "attribute/attribute.h"
|
||||
|
||||
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
#pragma weak PMPI_COMM_CREATE_KEYVAL = mpi_comm_create_keyval_f
|
||||
@ -46,7 +47,38 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_CREATE_KEYVAL,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_comm_create_keyval_f(MPI_Fint *comm_copy_attr_fn, MPI_Fint *comm_delete_attr_fn, MPI_Fint *comm_keyval, char *extra_state, MPI_Fint *ierr)
|
||||
static const char FUNC_NAME[] = "MPI_Comm_create_keyval_f";
|
||||
|
||||
void mpi_comm_create_keyval_f(MPI_Fint *comm_copy_attr_fn,
|
||||
MPI_Fint *comm_delete_attr_fn,
|
||||
MPI_Fint *comm_keyval,
|
||||
char *extra_state, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
int ret;
|
||||
ompi_attribute_fn_ptr_union_t copy_fn;
|
||||
ompi_attribute_fn_ptr_union_t del_fn;
|
||||
|
||||
if (MPI_PARAM_CHECK) {
|
||||
if ((NULL == comm_copy_attr_fn) ||
|
||||
(NULL == comm_delete_attr_fn) ||
|
||||
(NULL == comm_keyval) ) {
|
||||
*ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD,
|
||||
MPI_ERR_ARG,
|
||||
FUNC_NAME);
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
ret = ompi_attr_create_keyval(COMM_ATTR, copy_fn, del_fn,
|
||||
comm_keyval, extra_state, OMPI_KEYVAL_F77);
|
||||
|
||||
if (MPI_SUCCESS != ret) {
|
||||
*ierr = OMPI_INT_2_FINT(OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD,
|
||||
MPI_ERR_OTHER,
|
||||
FUNC_NAME))
|
||||
} else {
|
||||
*ierr = MPI_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,14 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_DELETE_ATTR,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_comm_delete_attr_f(MPI_Fint *comm, MPI_Fint *comm_keyval, MPI_Fint *ierr)
|
||||
void mpi_comm_delete_attr_f(MPI_Fint *comm, MPI_Fint *comm_keyval,
|
||||
MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Comm c_comm;
|
||||
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
|
||||
*ierr =
|
||||
OMPI_INT_2_FINT(MPI_Comm_delete_attr(c_comm,
|
||||
OMPI_FINT_2_INT(*comm_keyval)));
|
||||
}
|
||||
|
@ -48,5 +48,11 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_DISCONNECT,
|
||||
|
||||
void mpi_comm_disconnect_f(MPI_Fint *comm, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Comm c_comm;
|
||||
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Comm_disconnect(&c_comm));
|
||||
|
||||
*comm = MPI_Comm_c2f(c_comm);
|
||||
}
|
||||
|
@ -52,5 +52,6 @@ void mpi_comm_dup_f(MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr)
|
||||
MPI_Comm c_comm = MPI_Comm_f2c( *comm );
|
||||
|
||||
*ierr = MPI_Comm_dup ( c_comm, &c_newcomm );
|
||||
|
||||
*newcomm = MPI_Comm_c2f (c_newcomm);
|
||||
}
|
||||
|
@ -48,5 +48,12 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_FREE_KEYVAL,
|
||||
|
||||
void mpi_comm_free_keyval_f(MPI_Fint *comm_keyval, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
OMPI_SINGLE_NAME_DECL(comm_keyval);
|
||||
|
||||
OMPI_SINGLE_FINT_2_INT(comm_keyval);
|
||||
|
||||
*ierr =
|
||||
OMPI_INT_2_FINT(MPI_Comm_free_keyval(OMPI_SINGLE_NAME_CONVERT(comm_keyval)));
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(comm_keyval);
|
||||
}
|
||||
|
@ -46,7 +46,18 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_GET_ATTR,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_comm_get_attr_f(MPI_Fint *comm, MPI_Fint *comm_keyval, char *attribute_val, MPI_Fint *flag, MPI_Fint *ierr)
|
||||
void mpi_comm_get_attr_f(MPI_Fint *comm, MPI_Fint *comm_keyval,
|
||||
char *attribute_val, MPI_Fint *flag, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Comm c_comm;
|
||||
OMPI_SINGLE_NAME_DECL(flag);
|
||||
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Comm_get_attr(c_comm,
|
||||
OMPI_FINT_2_INT(*comm_keyval),
|
||||
attribute_val,
|
||||
OMPI_SINGLE_NAME_CONVERT(flag)));
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(flag);
|
||||
}
|
||||
|
@ -46,7 +46,14 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_GET_ERRHANDLER,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_comm_get_errhandler_f(MPI_Fint *comm, MPI_Fint *erhandler, MPI_Fint *ierr)
|
||||
void mpi_comm_get_errhandler_f(MPI_Fint *comm, MPI_Fint *errhandler,
|
||||
MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Comm c_comm;
|
||||
MPI_Errhandler c_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);
|
||||
}
|
||||
|
@ -46,7 +46,16 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_GET_NAME,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_comm_get_name_f(MPI_Fint *comm, char *comm_name, MPI_Fint *resultlen, MPI_Fint *ierr)
|
||||
void mpi_comm_get_name_f(MPI_Fint *comm, char *comm_name,
|
||||
MPI_Fint *resultlen, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Comm c_comm;
|
||||
OMPI_SINGLE_NAME_DECL(resultlen);
|
||||
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
|
||||
*ierr =
|
||||
OMPI_INT_2_FINT(MPI_Comm_get_name(c_comm, comm_name,
|
||||
OMPI_SINGLE_NAME_CONVERT(resultlen)));
|
||||
OMPI_SINGLE_INT_2_FINT(resultlen);
|
||||
}
|
||||
|
@ -48,5 +48,9 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_JOIN,
|
||||
|
||||
void mpi_comm_join_f(MPI_Fint *fd, MPI_Fint *intercomm, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Comm c_intercomm;
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Comm_join(OMPI_FINT_2_INT(*fd),
|
||||
&c_intercomm));
|
||||
*intercomm = MPI_Comm_c2f(c_intercomm);
|
||||
}
|
||||
|
@ -46,7 +46,14 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_SET_ATTR,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_comm_set_attr_f(MPI_Fint *comm, MPI_Fint *comm_keyval, char *attribute_val, MPI_Fint *ierr)
|
||||
void mpi_comm_set_attr_f(MPI_Fint *comm, MPI_Fint *comm_keyval,
|
||||
char *attribute_val, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Comm c_comm;
|
||||
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Comm_set_attr(c_comm,
|
||||
OMPI_FINT_2_INT(*comm_keyval),
|
||||
attribute_val));
|
||||
}
|
||||
|
@ -46,7 +46,14 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_SET_ERRHANDLER,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_comm_set_errhandler_f(MPI_Fint *comm, MPI_Fint *errhandler, MPI_Fint *ierr)
|
||||
void mpi_comm_set_errhandler_f(MPI_Fint *comm, MPI_Fint *errhandler,
|
||||
MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Comm c_comm;
|
||||
MPI_Errhandler c_errhandler;
|
||||
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
c_errhandler = MPI_Errhandler_f2c(*errhandler);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Comm_set_errhandler(c_comm, c_errhandler));
|
||||
}
|
||||
|
@ -48,5 +48,9 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_SET_NAME,
|
||||
|
||||
void mpi_comm_set_name_f(MPI_Fint *comm, char *comm_name, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Comm c_comm;
|
||||
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Comm_set_name(c_comm, comm_name));
|
||||
}
|
||||
|
@ -46,7 +46,16 @@ OMPI_GENERATE_F77_BINDINGS (MPI_DIMS_CREATE,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_dims_create_f(MPI_Fint *nnodes, MPI_Fint *ndims, MPI_Fint *dims, MPI_Fint *ierr)
|
||||
void mpi_dims_create_f(MPI_Fint *nnodes, MPI_Fint *ndims,
|
||||
MPI_Fint *dims, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
OMPI_ARRAY_NAME_DECL(dims);
|
||||
|
||||
OMPI_ARRAY_FINT_2_INT(dims, *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);
|
||||
}
|
||||
|
@ -46,7 +46,13 @@ OMPI_GENERATE_F77_BINDINGS (MPI_ERRHANDLER_CREATE,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_errhandler_create_f(MPI_Fint *function, MPI_Fint *errhandler, MPI_Fint *ierr)
|
||||
void mpi_errhandler_create_f(MPI_Fint *function,
|
||||
MPI_Fint *errhandler, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Errhandler c_errhandler;
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Errhandler_create((MPI_Handler_function *)
|
||||
function,
|
||||
&c_errhandler));
|
||||
*errhandler = MPI_Errhandler_c2f(c_errhandler);
|
||||
}
|
||||
|
@ -48,5 +48,10 @@ OMPI_GENERATE_F77_BINDINGS (MPI_ERRHANDLER_FREE,
|
||||
|
||||
void mpi_errhandler_free_f(MPI_Fint *errhandler, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Errhandler c_errhandler;
|
||||
|
||||
c_errhandler = MPI_Errhandler_f2c(*errhandler);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Errhandler_free(&c_errhandler));
|
||||
*errhandler = MPI_Errhandler_c2f(c_errhandler);
|
||||
}
|
||||
|
@ -48,5 +48,12 @@ OMPI_GENERATE_F77_BINDINGS (MPI_ERRHANDLER_GET,
|
||||
|
||||
void mpi_errhandler_get_f(MPI_Fint *comm, MPI_Fint *errhandler, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Comm c_comm;
|
||||
MPI_Errhandler c_errhandler;
|
||||
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Errhandler_get(c_comm, &c_errhandler));
|
||||
*errhandler = MPI_Errhandler_c2f(c_errhandler);
|
||||
}
|
||||
|
||||
|
@ -48,5 +48,11 @@ OMPI_GENERATE_F77_BINDINGS (MPI_ERRHANDLER_SET,
|
||||
|
||||
void mpi_errhandler_set_f(MPI_Fint *comm, MPI_Fint *errhandler, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Comm c_comm;
|
||||
MPI_Errhandler c_errhandler;
|
||||
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
c_errhandler = MPI_Errhandler_f2c(*errhandler);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Errhandler_set(c_comm, c_errhandler));
|
||||
}
|
||||
|
@ -46,7 +46,14 @@ OMPI_GENERATE_F77_BINDINGS (MPI_ERROR_CLASS,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_error_class_f(MPI_Fint *errorcode, MPI_Fint *errorclass, MPI_Fint *ierr)
|
||||
void mpi_error_class_f(MPI_Fint *errorcode, MPI_Fint *errorclass,
|
||||
MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
OMPI_SINGLE_NAME_DECL(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);
|
||||
}
|
||||
|
@ -46,7 +46,16 @@ OMPI_GENERATE_F77_BINDINGS (MPI_ERROR_STRING,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_error_string_f(MPI_Fint *errorcode, char *string, MPI_Fint *resultlen, MPI_Fint *ierr)
|
||||
void mpi_error_string_f(MPI_Fint *errorcode, char *string,
|
||||
MPI_Fint *resultlen, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
OMPI_SINGLE_NAME_DECL(resultlen);
|
||||
|
||||
*ierr =
|
||||
OMPI_INT_2_FINT(MPI_Error_string(OMPI_FINT_2_INT(*errorcode),
|
||||
string,
|
||||
OMPI_SINGLE_NAME_CONVERT(resultlen)
|
||||
));
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(resultlen);
|
||||
}
|
||||
|
@ -46,7 +46,19 @@ OMPI_GENERATE_F77_BINDINGS (MPI_EXSCAN,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_exscan_f(char *sendbuf, char *recvbuf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *comm, MPI_Fint *ierr)
|
||||
void mpi_exscan_f(char *sendbuf, char *recvbuf, MPI_Fint *count,
|
||||
MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *comm,
|
||||
MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Comm c_comm;
|
||||
MPI_Datatype c_type;
|
||||
MPI_Op c_op;
|
||||
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
c_type = MPI_Type_f2c(*datatype);
|
||||
c_op = MPI_Op_f2c(*op);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Exscan(sendbuf, recvbuf,
|
||||
OMPI_FINT_2_INT(*count),
|
||||
c_type, c_op, c_comm));
|
||||
}
|
||||
|
@ -46,7 +46,14 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FILE_CALL_ERRHANDLER,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_file_call_errhandler_f(MPI_Fint *fh, MPI_Fint *errorcode, MPI_Fint *ierr)
|
||||
void mpi_file_call_errhandler_f(MPI_Fint *fh, MPI_Fint *errorcode,
|
||||
MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_File c_fh;
|
||||
|
||||
c_fh = MPI_File_f2c(*fh);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_File_call_errhandler(c_fh,
|
||||
OMPI_FINT_2_INT(*errorcode)
|
||||
));
|
||||
}
|
||||
|
@ -48,5 +48,10 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FILE_CLOSE,
|
||||
|
||||
void mpi_file_close_f(MPI_Fint *fh, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_File c_fh;
|
||||
|
||||
c_fh = MPI_File_f2c(*fh);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_File_close(&c_fh));
|
||||
*fh = MPI_File_c2f(c_fh);
|
||||
}
|
||||
|
@ -46,7 +46,15 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FILE_CREATE_ERRHANDLER,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_file_create_errhandler_f(MPI_Fint *function, MPI_Fint *errhandler, MPI_Fint *ierr)
|
||||
void mpi_file_create_errhandler_f(MPI_Fint *function,
|
||||
MPI_Fint *errhandler, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Errhandler c_errhandler;
|
||||
|
||||
*ierr =
|
||||
OMPI_INT_2_FINT(MPI_File_create_errhandler((MPI_File_errhandler_fn *)
|
||||
function,
|
||||
&c_errhandler));
|
||||
|
||||
*errhandler = MPI_Errhandler_c2f(c_errhandler);
|
||||
}
|
||||
|
@ -72,8 +72,9 @@ void mpi_type_create_keyval_f(MPI_Fint *type_copy_attr_fn, MPI_Fint *type_delete
|
||||
type_keyval, extra_state, OMPI_KEYVAL_F77);
|
||||
|
||||
if (MPI_SUCCESS != ret) {
|
||||
*ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_OTHER,
|
||||
FUNC_NAME);
|
||||
*ierr = OMPI_INT_2_FINT(OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD,
|
||||
MPI_ERR_OTHER,
|
||||
FUNC_NAME))
|
||||
} else {
|
||||
*ierr = MPI_SUCCESS;
|
||||
}
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user