More f77 bindings
This commit was SVN r2460.
Этот коммит содержится в:
родитель
8d3055e3e7
Коммит
4efad65f63
@ -50,7 +50,17 @@ void mpi_cart_rank_f(MPI_Fint *comm, MPI_Fint *coords, MPI_Fint *rank,
|
||||
MPI_Fint *ierr)
|
||||
{
|
||||
MPI_Comm c_comm;
|
||||
int ndims;
|
||||
OMPI_ARRAY_NAME_DECL(coords);
|
||||
OMPI_SINGLE_NAME_DECL(rank);
|
||||
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
|
||||
*ierr = MPI_Cart_rank(c_comm, coords, rank);
|
||||
MPI_Cartdim_get(c_comm, &ndims);
|
||||
OMPI_ARRAY_FINT_2_INT(coords, ndims);
|
||||
|
||||
*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);
|
||||
}
|
||||
|
@ -46,7 +46,21 @@ OMPI_GENERATE_F77_BINDINGS (MPI_GATHER,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_gather_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *ierr)
|
||||
void mpi_gather_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype,
|
||||
char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype,
|
||||
MPI_Fint *root, MPI_Fint *comm, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Comm c_comm;
|
||||
MPI_Datatype c_sendtype, c_recvtype;
|
||||
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
c_sendtype = MPI_Type_f2c(*sendtype);
|
||||
c_recvtype = MPI_Type_f2c(*recvtype);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Gather(sendbuf, OMPI_FINT_2_INT(*sendcount),
|
||||
c_sendtype, recvbuf,
|
||||
OMPI_FINT_2_INT(*recvcount),
|
||||
c_recvtype,
|
||||
OMPI_FINT_2_INT(*root),
|
||||
c_comm));
|
||||
}
|
||||
|
@ -46,7 +46,30 @@ OMPI_GENERATE_F77_BINDINGS (MPI_GATHERV,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_gatherv_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *displs, MPI_Fint *recvtype, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *ierr)
|
||||
void mpi_gatherv_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype,
|
||||
char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *displs,
|
||||
MPI_Fint *recvtype, MPI_Fint *root, MPI_Fint *comm,
|
||||
MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Comm c_comm;
|
||||
MPI_Datatype c_sendtype, c_recvtype;
|
||||
int size;
|
||||
OMPI_ARRAY_NAME_DECL(recvcounts);
|
||||
OMPI_ARRAY_NAME_DECL(displs);
|
||||
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
c_sendtype = MPI_Type_f2c(*sendtype);
|
||||
c_recvtype = MPI_Type_f2c(*recvtype);
|
||||
|
||||
MPI_Comm_size(c_comm, &size);
|
||||
OMPI_ARRAY_FINT_2_INT(recvcounts, size);
|
||||
OMPI_ARRAY_FINT_2_INT(displs, size);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Gatherv(sendbuf, OMPI_FINT_2_INT(*sendcount),
|
||||
c_sendtype, recvbuf,
|
||||
OMPI_ARRAY_NAME_CONVERT(recvcounts),
|
||||
OMPI_ARRAY_NAME_CONVERT(displs),
|
||||
c_recvtype,
|
||||
OMPI_FINT_2_INT(*root),
|
||||
c_comm));
|
||||
}
|
||||
|
@ -48,5 +48,8 @@ OMPI_GENERATE_F77_BINDINGS (MPI_GET_ADDRESS,
|
||||
|
||||
void mpi_get_address_f(char *location, MPI_Fint *address, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Aint c_address;
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Get_address(location, &c_address));
|
||||
*address = (MPI_Fint) c_address;
|
||||
}
|
||||
|
@ -48,5 +48,10 @@ OMPI_GENERATE_F77_BINDINGS (MPI_GET_PROCESSOR_NAME,
|
||||
|
||||
void mpi_get_processor_name_f(char *name, MPI_Fint *resultlen, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
OMPI_SINGLE_NAME_DECL(resultlen);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Get_processor_name(name,
|
||||
OMPI_SINGLE_NAME_CONVERT(resultlen)));
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(resultlen);
|
||||
}
|
||||
|
@ -46,7 +46,31 @@ OMPI_GENERATE_F77_BINDINGS (MPI_GRAPH_CREATE,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_graph_create_f(MPI_Fint *comm_old, MPI_Fint *nnodes, MPI_Fint *index, MPI_Fint *edges, MPI_Fint *reorder, MPI_Fint *comm_graph, MPI_Fint *ierr)
|
||||
void mpi_graph_create_f(MPI_Fint *comm_old, MPI_Fint *nnodes,
|
||||
MPI_Fint *index, MPI_Fint *edges,
|
||||
MPI_Fint *reorder, MPI_Fint *comm_graph,
|
||||
MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Comm c_comm_old, c_comm_graph;
|
||||
OMPI_ARRAY_NAME_DECL(index);
|
||||
OMPI_ARRAY_NAME_DECL(edges);
|
||||
|
||||
c_comm_old = MPI_Comm_f2c(*comm_old);
|
||||
|
||||
OMPI_ARRAY_FINT_2_INT(index, *nnodes);
|
||||
|
||||
/* Number of edges is equal to the last entry in the index array */
|
||||
OMPI_ARRAY_FINT_2_INT(edges, index[*nnodes - 1]);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Graph_create(c_comm_old,
|
||||
OMPI_FINT_2_INT(*nnodes),
|
||||
OMPI_ARRAY_NAME_CONVERT(index),
|
||||
OMPI_ARRAY_NAME_CONVERT(edges),
|
||||
OMPI_FINT_2_INT(*reorder),
|
||||
&c_comm_graph));
|
||||
|
||||
*comm_graph = MPI_Comm_c2f(c_comm_graph);
|
||||
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(index);
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(edges);
|
||||
}
|
||||
|
@ -46,7 +46,24 @@ OMPI_GENERATE_F77_BINDINGS (MPI_GRAPH_GET,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_graph_get_f(MPI_Fint *comm, MPI_Fint *maxindex, MPI_Fint *maxedges, MPI_Fint *index, MPI_Fint *edges, MPI_Fint *ierr)
|
||||
void mpi_graph_get_f(MPI_Fint *comm, MPI_Fint *maxindex,
|
||||
MPI_Fint *maxedges, MPI_Fint *index,
|
||||
MPI_Fint *edges, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Comm c_comm;
|
||||
OMPI_ARRAY_NAME_DECL(index);
|
||||
OMPI_ARRAY_NAME_DECL(edges);
|
||||
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
OMPI_ARRAY_FINT_2_INT_ALLOC(index, *maxindex);
|
||||
OMPI_ARRAY_FINT_2_INT_ALLOC(edges, *maxedges);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Graph_get(c_comm,
|
||||
OMPI_FINT_2_INT(*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);
|
||||
}
|
||||
|
@ -46,7 +46,26 @@ OMPI_GENERATE_F77_BINDINGS (MPI_GRAPH_MAP,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_graph_map_f(MPI_Fint *comm, MPI_Fint *nnodes, MPI_Fint *index, MPI_Fint *edges, MPI_Fint *newrank, MPI_Fint *ierr)
|
||||
void mpi_graph_map_f(MPI_Fint *comm, MPI_Fint *nnodes, MPI_Fint *index,
|
||||
MPI_Fint *edges, MPI_Fint *nrank, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Comm c_comm;
|
||||
OMPI_ARRAY_NAME_DECL(index);
|
||||
OMPI_ARRAY_NAME_DECL(edges);
|
||||
OMPI_SINGLE_NAME_DECL(nrank);
|
||||
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
|
||||
/* Number of edges is equal to the last entry in the index array */
|
||||
OMPI_ARRAY_FINT_2_INT(edges, index[*nnodes - 1]);
|
||||
OMPI_ARRAY_FINT_2_INT(index, *nnodes);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Graph_map(c_comm, OMPI_FINT_2_INT(*nnodes),
|
||||
OMPI_ARRAY_NAME_CONVERT(index),
|
||||
OMPI_ARRAY_NAME_CONVERT(edges),
|
||||
OMPI_SINGLE_NAME_CONVERT(nrank)));
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(nrank);
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(edges);
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(index);
|
||||
}
|
||||
|
@ -46,7 +46,17 @@ OMPI_GENERATE_F77_BINDINGS (MPI_GRAPH_NEIGHBORS_COUNT,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_graph_neighbors_count_f(MPI_Fint *comm, MPI_Fint *rank, MPI_Fint *nneighbors, MPI_Fint *ierr)
|
||||
void mpi_graph_neighbors_count_f(MPI_Fint *comm, MPI_Fint *rank,
|
||||
MPI_Fint *nneighbors, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Comm c_comm;
|
||||
OMPI_SINGLE_NAME_DECL(nneighbors);
|
||||
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
|
||||
*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);
|
||||
}
|
||||
|
@ -46,7 +46,22 @@ OMPI_GENERATE_F77_BINDINGS (MPI_GRAPH_NEIGHBORS,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_graph_neighbors_f(MPI_Fint *comm, MPI_Fint *rank, MPI_Fint *maxneighbors, MPI_Fint *neighbors, MPI_Fint *ierr)
|
||||
void mpi_graph_neighbors_f(MPI_Fint *comm, MPI_Fint *rank,
|
||||
MPI_Fint *maxneighbors, MPI_Fint *neighbors,
|
||||
MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Comm c_comm;
|
||||
OMPI_ARRAY_NAME_DECL(neighbors);
|
||||
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
|
||||
OMPI_ARRAY_FINT_2_INT_ALLOC(neighbors, *maxneighbors);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Graph_neighbors(c_comm,
|
||||
OMPI_FINT_2_INT(*rank),
|
||||
OMPI_FINT_2_INT(*maxneighbors),
|
||||
OMPI_ARRAY_NAME_CONVERT(neighbors)
|
||||
));
|
||||
|
||||
OMPI_ARRAY_INT_2_FINT(neighbors, *maxneighbors);
|
||||
}
|
||||
|
@ -46,7 +46,20 @@ OMPI_GENERATE_F77_BINDINGS (MPI_GRAPHDIMS_GET,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_graphdims_get_f(MPI_Fint *comm, MPI_Fint *nnodes, MPI_Fint *nedges, MPI_Fint *ierr)
|
||||
void mpi_graphdims_get_f(MPI_Fint *comm, MPI_Fint *nnodes,
|
||||
MPI_Fint *nedges, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Comm c_comm;
|
||||
OMPI_SINGLE_NAME_DECL(nnodes);
|
||||
OMPI_SINGLE_NAME_DECL(nedges);
|
||||
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Graphdims_get(c_comm,
|
||||
OMPI_SINGLE_NAME_CONVERT(nnodes),
|
||||
OMPI_SINGLE_NAME_CONVERT(nedges)
|
||||
));
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(nnodes);
|
||||
OMPI_SINGLE_INT_2_FINT(nedges);
|
||||
}
|
||||
|
@ -48,5 +48,9 @@ OMPI_GENERATE_F77_BINDINGS (MPI_INFO_CREATE,
|
||||
|
||||
void mpi_info_create_f(MPI_Fint *info, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Info c_info;
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Info_create(&c_info));
|
||||
|
||||
*info = MPI_Info_c2f(c_info);
|
||||
}
|
||||
|
@ -48,5 +48,9 @@ OMPI_GENERATE_F77_BINDINGS (MPI_INFO_DELETE,
|
||||
|
||||
void mpi_info_delete_f(MPI_Fint *info, char *key, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Info c_info;
|
||||
|
||||
c_info = MPI_Info_f2c(*info);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Info_delete(c_info, key));
|
||||
}
|
||||
|
@ -48,5 +48,12 @@ OMPI_GENERATE_F77_BINDINGS (MPI_INFO_DUP,
|
||||
|
||||
void mpi_info_dup_f(MPI_Fint *info, MPI_Fint *newinfo, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Info c_info, c_new_info;
|
||||
|
||||
c_info = MPI_Info_f2c(*info);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Info_dup(c_info, &c_new_info));
|
||||
|
||||
*newinfo = MPI_Info_c2f(c_new_info);
|
||||
|
||||
}
|
||||
|
@ -48,5 +48,11 @@ OMPI_GENERATE_F77_BINDINGS (MPI_INFO_FREE,
|
||||
|
||||
void mpi_info_free_f(MPI_Fint *info, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Info c_info;
|
||||
|
||||
c_info = MPI_Info_f2c(*info);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Info_free(&c_info));
|
||||
|
||||
*info = MPI_Info_c2f(c_info);
|
||||
}
|
||||
|
@ -46,7 +46,18 @@ OMPI_GENERATE_F77_BINDINGS (MPI_INFO_GET,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_info_get_f(MPI_Fint *info, char *key, MPI_Fint *valuelen, char *value, MPI_Fint *flag, MPI_Fint *ierr)
|
||||
void mpi_info_get_f(MPI_Fint *info, char *key, MPI_Fint *valuelen,
|
||||
char *value, MPI_Fint *flag, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Info c_info;
|
||||
OMPI_SINGLE_NAME_DECL(flag);
|
||||
|
||||
c_info = MPI_Info_f2c(*info);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Info_get(c_info, key,
|
||||
OMPI_FINT_2_INT(*valuelen),
|
||||
value,
|
||||
OMPI_SINGLE_NAME_CONVERT(flag)));
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(flag);
|
||||
}
|
||||
|
@ -48,5 +48,14 @@ OMPI_GENERATE_F77_BINDINGS (MPI_INFO_GET_NKEYS,
|
||||
|
||||
void mpi_info_get_nkeys_f(MPI_Fint *info, MPI_Fint *nkeys, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Info c_info;
|
||||
OMPI_SINGLE_NAME_DECL(nkeys);
|
||||
|
||||
c_info = MPI_Info_f2c(*info);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Info_get_nkeys(c_info,
|
||||
OMPI_SINGLE_NAME_CONVERT(nkeys)
|
||||
));
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(nkeys);
|
||||
}
|
||||
|
@ -46,7 +46,14 @@ OMPI_GENERATE_F77_BINDINGS (MPI_INFO_GET_NTHKEY,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_info_get_nthkey_f(MPI_Fint *info, MPI_Fint *n, char *key, MPI_Fint *ierr)
|
||||
void mpi_info_get_nthkey_f(MPI_Fint *info, MPI_Fint *n, char *key,
|
||||
MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Info c_info;
|
||||
|
||||
c_info = MPI_Info_f2c(*info);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Info_get_nthkey(c_info,
|
||||
OMPI_FINT_2_INT(*n),
|
||||
key));
|
||||
}
|
||||
|
@ -46,7 +46,20 @@ OMPI_GENERATE_F77_BINDINGS (MPI_INFO_GET_VALUELEN,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_info_get_valuelen_f(MPI_Fint *info, char *key, MPI_Fint *valuelen, MPI_Fint *flag, MPI_Fint *ierr)
|
||||
void mpi_info_get_valuelen_f(MPI_Fint *info, char *key,
|
||||
MPI_Fint *valuelen, MPI_Fint *flag,
|
||||
MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Info c_info;
|
||||
OMPI_SINGLE_NAME_DECL(valuelen);
|
||||
OMPI_SINGLE_NAME_DECL(flag);
|
||||
|
||||
c_info = MPI_Info_f2c(*info);
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Info_get_valuelen(c_info, key,
|
||||
OMPI_SINGLE_NAME_CONVERT(valuelen),
|
||||
OMPI_SINGLE_NAME_CONVERT(flag)
|
||||
));
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(valuelen);
|
||||
OMPI_SINGLE_INT_2_FINT(flag);
|
||||
}
|
||||
|
@ -48,5 +48,9 @@ OMPI_GENERATE_F77_BINDINGS (MPI_INFO_SET,
|
||||
|
||||
void mpi_info_set_f(MPI_Fint *info, char *key, char *value, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Info c_info;
|
||||
|
||||
c_info = MPI_Info_f2c(*info);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Info_set(c_info, key, value));
|
||||
}
|
||||
|
@ -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_KEYVAL_CREATE = mpi_keyval_create_f
|
||||
@ -46,7 +47,36 @@ OMPI_GENERATE_F77_BINDINGS (MPI_KEYVAL_CREATE,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_keyval_create_f(MPI_Fint *copy_fn, MPI_Fint *delete_fn, MPI_Fint *keyval, char *extra_state, MPI_Fint *ierr)
|
||||
static const char FUNC_NAME[] = "MPI_keyval_create_f";
|
||||
|
||||
void mpi_keyval_create_f(MPI_Fint *copy_attr_fn, MPI_Fint *delete_attr_fn,
|
||||
MPI_Fint *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 == copy_attr_fn) ||
|
||||
(NULL == delete_attr_fn) ||
|
||||
(NULL == keyval) ) {
|
||||
*ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD,
|
||||
MPI_ERR_ARG,
|
||||
FUNC_NAME);
|
||||
}
|
||||
}
|
||||
|
||||
copy_fn.attr_F_copy_fn = (MPI_F_copy_function *)copy_attr_fn;
|
||||
del_fn.attr_F_delete_fn = (MPI_F_delete_function *)delete_attr_fn;
|
||||
|
||||
ret = ompi_attr_create_keyval(COMM_ATTR, copy_fn, del_fn,
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -48,5 +48,12 @@ OMPI_GENERATE_F77_BINDINGS (MPI_KEYVAL_FREE,
|
||||
|
||||
void mpi_keyval_free_f(MPI_Fint *keyval, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
OMPI_SINGLE_NAME_DECL(keyval);
|
||||
|
||||
OMPI_SINGLE_FINT_2_INT(keyval);
|
||||
|
||||
*ierr =
|
||||
OMPI_INT_2_FINT(MPI_Keyval_free(OMPI_SINGLE_NAME_CONVERT(keyval)));
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(keyval);
|
||||
}
|
||||
|
@ -46,7 +46,13 @@ OMPI_GENERATE_F77_BINDINGS (MPI_LOOKUP_NAME,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_lookup_name_f(char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr)
|
||||
void mpi_lookup_name_f(char *service_name, MPI_Fint *info,
|
||||
char *port_name, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Info c_info;
|
||||
|
||||
c_info = MPI_Info_f2c(*info);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Lookup_name(service_name, c_info,
|
||||
port_name));
|
||||
}
|
||||
|
@ -46,7 +46,14 @@ OMPI_GENERATE_F77_BINDINGS (MPI_OP_CREATE,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_op_create_f(MPI_Fint *function, MPI_Fint *commute, MPI_Fint *op, MPI_Fint *ierr)
|
||||
void mpi_op_create_f(MPI_Fint *function, MPI_Fint *commute,
|
||||
MPI_Fint *op, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Op c_op;
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Op_create((MPI_User_function *)function,
|
||||
OMPI_FINT_2_INT(*commute),
|
||||
&c_op));
|
||||
|
||||
*op = MPI_Op_c2f(c_op);
|
||||
}
|
||||
|
@ -48,5 +48,11 @@ OMPI_GENERATE_F77_BINDINGS (MPI_OP_FREE,
|
||||
|
||||
void mpi_op_free_f(MPI_Fint *op, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Op c_op;
|
||||
|
||||
c_op = MPI_Op_f2c(*op);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Op_free(&c_op));
|
||||
|
||||
*op = MPI_Op_c2f(c_op);
|
||||
}
|
||||
|
@ -48,5 +48,9 @@ OMPI_GENERATE_F77_BINDINGS (MPI_OPEN_PORT,
|
||||
|
||||
void mpi_open_port_f(MPI_Fint *info, char *port_name, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Info c_info;
|
||||
|
||||
c_info = MPI_Info_f2c(*info);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Open_port(c_info, port_name));
|
||||
}
|
||||
|
@ -46,7 +46,23 @@ OMPI_GENERATE_F77_BINDINGS (MPI_PACK,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_pack_f(char *inbuf, MPI_Fint *incount, MPI_Fint *datatype, char *outbuf, MPI_Fint *outsize, MPI_Fint *position, MPI_Fint *comm, MPI_Fint *ierr)
|
||||
void mpi_pack_f(char *inbuf, MPI_Fint *incount, MPI_Fint *datatype,
|
||||
char *outbuf, MPI_Fint *outsize, MPI_Fint *position,
|
||||
MPI_Fint *comm, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Comm c_comm;
|
||||
MPI_Datatype c_type;
|
||||
OMPI_SINGLE_NAME_DECL(position);
|
||||
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
c_type = MPI_Type_f2c(*datatype);
|
||||
OMPI_SINGLE_FINT_2_INT(position);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Pack(inbuf, OMPI_FINT_2_INT(*incount),
|
||||
c_type, outbuf,
|
||||
OMPI_FINT_2_INT(*outsize),
|
||||
OMPI_SINGLE_NAME_CONVERT(position),
|
||||
c_comm));
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(position);
|
||||
}
|
||||
|
@ -46,7 +46,19 @@ OMPI_GENERATE_F77_BINDINGS (MPI_PACK_SIZE,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_pack_size_f(MPI_Fint *incount, MPI_Fint *datatype, MPI_Fint *comm, MPI_Fint *size, MPI_Fint *ierr)
|
||||
void mpi_pack_size_f(MPI_Fint *incount, MPI_Fint *datatype,
|
||||
MPI_Fint *comm, MPI_Fint *size, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Comm c_comm;
|
||||
MPI_Datatype c_type;
|
||||
OMPI_SINGLE_NAME_DECL(size);
|
||||
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
c_type = MPI_Type_f2c(*datatype);
|
||||
|
||||
*ierr = OMPI_FINT_2_INT(MPI_Pack_size(OMPI_FINT_2_INT(*incount),
|
||||
c_type, c_comm,
|
||||
OMPI_SINGLE_NAME_CONVERT(size)));
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(size);
|
||||
}
|
||||
|
@ -46,7 +46,13 @@ OMPI_GENERATE_F77_BINDINGS (MPI_PUBLISH_NAME,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_publish_name_f(char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr)
|
||||
void mpi_publish_name_f(char *service_name, MPI_Fint *info,
|
||||
char *port_name, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Info c_info;
|
||||
|
||||
c_info = MPI_Info_f2c(*info);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Publish_name(service_name, c_info,
|
||||
port_name));
|
||||
}
|
||||
|
@ -46,7 +46,21 @@ OMPI_GENERATE_F77_BINDINGS (MPI_REDUCE,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_reduce_f(char *sendbuf, char *recvbuf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *ierr)
|
||||
void mpi_reduce_f(char *sendbuf, char *recvbuf, MPI_Fint *count,
|
||||
MPI_Fint *datatype, MPI_Fint *op,
|
||||
MPI_Fint *root, MPI_Fint *comm, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Datatype c_type;
|
||||
MPI_Op c_op;
|
||||
MPI_Comm c_comm;
|
||||
|
||||
c_type = MPI_Type_f2c(*datatype);
|
||||
c_op = MPI_Op_f2c(*op);
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Reduce(sendbuf, recvbuf,
|
||||
OMPI_FINT_2_INT(*count),
|
||||
c_type, c_op,
|
||||
OMPI_FINT_2_INT(*root),
|
||||
c_comm));
|
||||
}
|
||||
|
@ -46,7 +46,24 @@ OMPI_GENERATE_F77_BINDINGS (MPI_REDUCE_SCATTER,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_reduce_scatter_f(char *sendbuf, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *comm, MPI_Fint *ierr)
|
||||
void mpi_reduce_scatter_f(char *sendbuf, char *recvbuf,
|
||||
MPI_Fint *recvcounts, 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;
|
||||
int size;
|
||||
OMPI_ARRAY_NAME_DECL(recvcounts);
|
||||
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
c_type = MPI_Type_f2c(*datatype);
|
||||
c_op = MPI_Op_f2c(*op);
|
||||
|
||||
MPI_Comm_size(c_comm, &size);
|
||||
OMPI_ARRAY_FINT_2_INT(recvcounts, size);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Reduce_scatter(sendbuf, recvbuf,
|
||||
OMPI_ARRAY_NAME_CONVERT(recvcounts),
|
||||
c_type, c_op, c_comm));
|
||||
}
|
||||
|
@ -46,7 +46,20 @@ OMPI_GENERATE_F77_BINDINGS (MPI_SCAN,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_scan_f(char *sendbuf, char *recvbuf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *comm, MPI_Fint *ierr)
|
||||
void mpi_scan_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_type = MPI_Type_f2c(*datatype);
|
||||
c_op = MPI_Op_f2c(*op);
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Scan(sendbuf, recvbuf,
|
||||
OMPI_FINT_2_INT(*count),
|
||||
c_type, c_op,
|
||||
c_comm));
|
||||
}
|
||||
|
@ -46,7 +46,20 @@ OMPI_GENERATE_F77_BINDINGS (MPI_SCATTER,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_scatter_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *ierr)
|
||||
void mpi_scatter_f(char *sendbuf, MPI_Fint *sendcount,
|
||||
MPI_Fint *sendtype, char *recvbuf,
|
||||
MPI_Fint *recvcount, MPI_Fint *recvtype,
|
||||
MPI_Fint *root, MPI_Fint *comm, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Datatype c_sendtype, c_recvtype;
|
||||
MPI_Comm c_comm;
|
||||
|
||||
c_sendtype = MPI_Type_f2c(*sendtype);
|
||||
c_recvtype = MPI_Type_f2c(*recvtype);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Scatter(sendbuf,OMPI_FINT_2_INT(*sendcount),
|
||||
c_sendtype, recvbuf,
|
||||
OMPI_FINT_2_INT(*recvcount),
|
||||
c_recvtype,
|
||||
OMPI_FINT_2_INT(*root), c_comm));
|
||||
}
|
||||
|
@ -46,7 +46,34 @@ OMPI_GENERATE_F77_BINDINGS (MPI_SCATTERV,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_scatterv_f(char *sendbuf, MPI_Fint *sendcounts, MPI_Fint *displs, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *ierr)
|
||||
void mpi_scatterv_f(char *sendbuf, MPI_Fint *sendcounts,
|
||||
MPI_Fint *displs, MPI_Fint *sendtype,
|
||||
char *recvbuf, MPI_Fint *recvcount,
|
||||
MPI_Fint *recvtype, MPI_Fint *root,
|
||||
MPI_Fint *comm, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Comm c_comm;
|
||||
MPI_Datatype c_sendtype, c_recvtype;
|
||||
int size;
|
||||
OMPI_ARRAY_NAME_DECL(sendcounts);
|
||||
OMPI_ARRAY_NAME_DECL(displs);
|
||||
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
c_sendtype = MPI_Type_f2c(*sendtype);
|
||||
c_recvtype = MPI_Type_f2c(*recvtype);
|
||||
|
||||
MPI_Comm_size(c_comm, &size);
|
||||
OMPI_ARRAY_FINT_2_INT(sendcounts, size);
|
||||
OMPI_ARRAY_FINT_2_INT(displs, size);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Scatterv(sendbuf,
|
||||
OMPI_ARRAY_NAME_CONVERT(sendcounts),
|
||||
OMPI_ARRAY_NAME_CONVERT(displs),
|
||||
c_sendtype, recvbuf,
|
||||
OMPI_FINT_2_INT(*recvcount),
|
||||
c_recvtype,
|
||||
OMPI_FINT_2_INT(*root), c_comm));
|
||||
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(sendcounts);
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(displs);
|
||||
}
|
||||
|
@ -48,5 +48,14 @@ OMPI_GENERATE_F77_BINDINGS (MPI_TOPO_TEST,
|
||||
|
||||
void mpi_topo_test_f(MPI_Fint *comm, MPI_Fint *status, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Comm c_comm;
|
||||
OMPI_SINGLE_NAME_DECL(status);
|
||||
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Topo_test(c_comm,
|
||||
OMPI_SINGLE_NAME_CONVERT(status)));
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(status);
|
||||
|
||||
}
|
||||
|
@ -48,5 +48,11 @@ OMPI_GENERATE_F77_BINDINGS (MPI_TYPE_FREE,
|
||||
|
||||
void mpi_type_free_f(MPI_Fint *type, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Datatype c_type;
|
||||
|
||||
c_type = MPI_Type_f2c(*type);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Type_free(&c_type));
|
||||
|
||||
*type = MPI_Type_c2f(c_type);
|
||||
}
|
||||
|
@ -48,5 +48,13 @@ OMPI_GENERATE_F77_BINDINGS (MPI_TYPE_FREE_KEYVAL,
|
||||
|
||||
void mpi_type_free_keyval_f(MPI_Fint *type_keyval, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
OMPI_SINGLE_NAME_DECL(type_keyval);
|
||||
|
||||
OMPI_SINGLE_FINT_2_INT(type_keyval);
|
||||
|
||||
*ierr =
|
||||
OMPI_INT_2_FINT(MPI_Type_free_keyval(OMPI_SINGLE_NAME_CONVERT(type_keyval)));
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(type_keyval);
|
||||
|
||||
}
|
||||
|
@ -46,7 +46,17 @@ OMPI_GENERATE_F77_BINDINGS (MPI_TYPE_HVECTOR,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_type_hvector_f(MPI_Fint *count, MPI_Fint *blocklength, MPI_Fint *stride, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr)
|
||||
void mpi_type_hvector_f(MPI_Fint *count, MPI_Fint *blocklength,
|
||||
MPI_Fint *stride, MPI_Fint *oldtype,
|
||||
MPI_Fint *newtype, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Datatype c_oldtype, c_newtype;
|
||||
|
||||
c_oldtype = MPI_Type_f2c(*oldtype);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Type_hvector(OMPI_FINT_2_INT(*count),
|
||||
OMPI_FINT_2_INT(*blocklength),
|
||||
(MPI_Aint) stride,
|
||||
c_oldtype, &c_newtype));
|
||||
*newtype = MPI_Type_c2f(c_newtype);
|
||||
}
|
||||
|
@ -48,5 +48,9 @@ OMPI_GENERATE_F77_BINDINGS (MPI_TYPE_SET_NAME,
|
||||
|
||||
void mpi_type_set_name_f(MPI_Fint *type, char *type_name, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Datatype c_type;
|
||||
|
||||
c_type = MPI_Type_f2c(*type);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Type_set_name(c_type, type_name));
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user