More bindings
This commit was SVN r2640.
Этот коммит содержится в:
родитель
4c122c6649
Коммит
164293313b
@ -46,11 +46,16 @@ OMPI_GENERATE_F77_BINDINGS (MPI_PACK_EXTERNAL,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_pack_external_f(char *datarep, char *inbuf, MPI_Fint *incount, MPI_Fint *datatype, char *outbuf, MPI_Fint *outsize, MPI_Fint *position, MPI_Fint *ierr)
|
||||
void mpi_pack_external_f(char *datarep, char *inbuf, MPI_Fint *incount,
|
||||
MPI_Fint *datatype, char *outbuf,
|
||||
MPI_Fint *outsize, MPI_Fint *position,
|
||||
MPI_Fint *ierr)
|
||||
{
|
||||
MPI_Datatype type = MPI_Type_f2c(*datatype);
|
||||
|
||||
*ierr = MPI_Pack_external(datarep, inbuf, *incount,
|
||||
type, outbuf,
|
||||
(MPI_Aint) *outsize, (MPI_Aint *)position);
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Pack_external(datarep, inbuf,
|
||||
OMPI_FINT_2_INT(*incount),
|
||||
type, outbuf,
|
||||
(MPI_Aint) *outsize,
|
||||
(MPI_Aint *)position));
|
||||
}
|
||||
|
@ -46,11 +46,14 @@ OMPI_GENERATE_F77_BINDINGS (MPI_PACK_EXTERNAL_SIZE,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_pack_external_size_f(char *datarep, MPI_Fint *incount, MPI_Fint *datatype, MPI_Fint *size, MPI_Fint *ierr)
|
||||
void mpi_pack_external_size_f(char *datarep, MPI_Fint *incount,
|
||||
MPI_Fint *datatype, MPI_Fint *size,
|
||||
MPI_Fint *ierr)
|
||||
{
|
||||
MPI_Datatype type = MPI_Type_f2c(*datatype);
|
||||
|
||||
*ierr = MPI_Pack_external_size (datarep, *incount,
|
||||
type, (MPI_Aint *)size);
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Pack_external_size(datarep,
|
||||
OMPI_FINT_2_INT(*incount),
|
||||
type, (MPI_Aint *)size));
|
||||
|
||||
}
|
||||
|
@ -48,5 +48,5 @@ OMPI_GENERATE_F77_BINDINGS (MPI_PCONTROL,
|
||||
|
||||
void mpi_pcontrol_f(MPI_Fint *level)
|
||||
{
|
||||
MPI_Pcontrol( *level );
|
||||
MPI_Pcontrol(OMPI_FINT_2_INT(*level));
|
||||
}
|
||||
|
@ -48,5 +48,8 @@ OMPI_GENERATE_F77_BINDINGS (MPI_QUERY_THREAD,
|
||||
|
||||
void mpi_query_thread_f(MPI_Fint *provided, MPI_Fint *ierr)
|
||||
{
|
||||
*ierr = MPI_Query_thread(provided);
|
||||
OMPI_SINGLE_NAME_DECL(provided);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Query_thread(OMPI_SINGLE_NAME_CONVERT(provided)));
|
||||
OMPI_SINGLE_INT_2_FINT(provided);
|
||||
}
|
||||
|
@ -46,7 +46,9 @@ OMPI_GENERATE_F77_BINDINGS (MPI_RECV_INIT,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_recv_init_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr)
|
||||
void mpi_recv_init_f(char *buf, MPI_Fint *count, MPI_Fint *datatype,
|
||||
MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm,
|
||||
MPI_Fint *request, MPI_Fint *ierr)
|
||||
{
|
||||
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
|
||||
MPI_Request c_req;
|
||||
@ -54,7 +56,10 @@ void mpi_recv_init_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *s
|
||||
|
||||
c_comm = MPI_Comm_f2c (*comm);
|
||||
|
||||
*ierr = MPI_Recv_init(buf, *count, c_type, *source, *tag, c_comm, &c_req);
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Recv_init(buf, OMPI_FINT_2_INT(*count),
|
||||
c_type, OMPI_FINT_2_INT(*source),
|
||||
OMPI_INT_2_FINT(*tag), c_comm,
|
||||
&c_req));
|
||||
|
||||
if (MPI_SUCCESS == *ierr) {
|
||||
*request = MPI_Request_c2f(c_req);
|
||||
|
@ -49,7 +49,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_REQUEST_FREE,
|
||||
void mpi_request_free_f(MPI_Fint *request, MPI_Fint *ierr)
|
||||
{
|
||||
MPI_Request c_req = MPI_Request_f2c( *request );
|
||||
*ierr = MPI_Request_free( &c_req );
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Request_free( &c_req ));
|
||||
|
||||
/* This value comes from the MPI_REQUEST_NULL value in mpif.h.
|
||||
Do not change without consulting mpif.h! */
|
||||
|
@ -46,12 +46,17 @@ OMPI_GENERATE_F77_BINDINGS (MPI_REQUEST_GET_STATUS,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_request_get_status_f(MPI_Fint *request, MPI_Fint *flag, MPI_Fint *status, MPI_Fint *ierr)
|
||||
void mpi_request_get_status_f(MPI_Fint *request, MPI_Fint *flag,
|
||||
MPI_Fint *status, MPI_Fint *ierr)
|
||||
{
|
||||
MPI_Status c_status;
|
||||
MPI_Request c_req = MPI_Request_f2c( *request );
|
||||
OMPI_SINGLE_NAME_DECL(flag);
|
||||
|
||||
*ierr = MPI_Request_get_status( c_req, flag, &c_status );
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Request_get_status(c_req,
|
||||
OMPI_SINGLE_NAME_CONVERT(flag),
|
||||
&c_status));
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(flag);
|
||||
MPI_Status_c2f( &c_status, status );
|
||||
}
|
||||
|
@ -46,12 +46,15 @@ OMPI_GENERATE_F77_BINDINGS (MPI_RSEND,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_rsend_f(char *ibuf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *ierr)
|
||||
void mpi_rsend_f(char *ibuf, MPI_Fint *count, MPI_Fint *datatype,
|
||||
MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *ierr)
|
||||
{
|
||||
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
|
||||
MPI_Comm c_comm;
|
||||
|
||||
c_comm = MPI_Comm_f2c (*comm);
|
||||
|
||||
*ierr = MPI_Rsend(ibuf, *count, c_type, *dest, *tag, c_comm);
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Rsend(ibuf, OMPI_FINT_2_INT(*count),
|
||||
c_type, OMPI_FINT_2_INT(*dest),
|
||||
OMPI_FINT_2_INT(*tag), c_comm));
|
||||
}
|
||||
|
@ -46,7 +46,10 @@ OMPI_GENERATE_F77_BINDINGS (MPI_RSEND_INIT,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_rsend_init_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_rsend_init_f(char *buf, MPI_Fint *count,
|
||||
MPI_Fint *datatype, MPI_Fint *dest,
|
||||
MPI_Fint *tag, MPI_Fint *comm,
|
||||
MPI_Fint *request, MPI_Fint *ierr)
|
||||
{
|
||||
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
|
||||
MPI_Request c_req;
|
||||
@ -54,7 +57,10 @@ void mpi_rsend_init_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *
|
||||
|
||||
c_comm = MPI_Comm_f2c (*comm);
|
||||
|
||||
*ierr = MPI_Rsend_init(buf, *count, c_type, *dest, *tag, c_comm, &c_req);
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Rsend_init(buf, OMPI_FINT_2_INT(*count),
|
||||
c_type, OMPI_FINT_2_INT(*dest),
|
||||
OMPI_FINT_2_INT(*tag),
|
||||
c_comm, &c_req));
|
||||
|
||||
if (MPI_SUCCESS == *ierr) {
|
||||
*request = MPI_Request_c2f(c_req);
|
||||
|
@ -46,7 +46,9 @@ OMPI_GENERATE_F77_BINDINGS (MPI_SEND_INIT,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_send_init_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_send_init_f(char *buf, MPI_Fint *count, MPI_Fint *datatype,
|
||||
MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm,
|
||||
MPI_Fint *request, MPI_Fint *ierr)
|
||||
{
|
||||
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
|
||||
MPI_Request c_req;
|
||||
@ -54,7 +56,10 @@ void mpi_send_init_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *d
|
||||
|
||||
c_comm = MPI_Comm_f2c (*comm);
|
||||
|
||||
*ierr = MPI_Send_init(buf, *count, c_type, *dest, *tag, c_comm, &c_req);
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Send_init(buf, OMPI_FINT_2_INT(*count),
|
||||
c_type, OMPI_FINT_2_INT(*dest),
|
||||
OMPI_FINT_2_INT(*tag),
|
||||
c_comm, &c_req));
|
||||
|
||||
if (MPI_SUCCESS == *ierr) {
|
||||
*request = MPI_Request_c2f(c_req);
|
||||
|
@ -46,7 +46,11 @@ OMPI_GENERATE_F77_BINDINGS (MPI_SENDRECV,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_sendrecv_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, MPI_Fint *dest, MPI_Fint *sendtag, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *source, MPI_Fint *recvtag, MPI_Fint *comm, MPI_Fint *status, MPI_Fint *ierr)
|
||||
void mpi_sendrecv_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype,
|
||||
MPI_Fint *dest, MPI_Fint *sendtag, char *recvbuf,
|
||||
MPI_Fint *recvcount, MPI_Fint *recvtype,
|
||||
MPI_Fint *source, MPI_Fint *recvtag, MPI_Fint *comm,
|
||||
MPI_Fint *status, MPI_Fint *ierr)
|
||||
{
|
||||
MPI_Comm c_comm;
|
||||
MPI_Datatype c_sendtype = MPI_Type_f2c(*sendtype);
|
||||
@ -54,8 +58,12 @@ void mpi_sendrecv_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, MPI_
|
||||
|
||||
c_comm = MPI_Comm_f2c (*comm);
|
||||
|
||||
*ierr = MPI_Sendrecv(sendbuf, *sendcount, c_sendtype,
|
||||
*dest, *sendtag, recvbuf, *recvcount,
|
||||
c_recvtype, *source, *recvtag, c_comm,
|
||||
(MPI_Status*)status);
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Sendrecv(sendbuf, OMPI_FINT_2_INT(*sendcount),
|
||||
c_sendtype,
|
||||
OMPI_FINT_2_INT(*dest),
|
||||
OMPI_FINT_2_INT(*sendtag),
|
||||
recvbuf, *recvcount,
|
||||
c_recvtype, OMPI_FINT_2_INT(*source),
|
||||
OMPI_FINT_2_INT(*recvtag),
|
||||
c_comm, (MPI_Status*)status));
|
||||
}
|
||||
|
@ -46,14 +46,22 @@ OMPI_GENERATE_F77_BINDINGS (MPI_SENDRECV_REPLACE,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_sendrecv_replace_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *sendtag, MPI_Fint *source, MPI_Fint *recvtag, MPI_Fint *comm, MPI_Fint *status, MPI_Fint *ierr)
|
||||
void mpi_sendrecv_replace_f(char *buf, MPI_Fint *count, MPI_Fint *datatype,
|
||||
MPI_Fint *dest, MPI_Fint *sendtag,
|
||||
MPI_Fint *source, MPI_Fint *recvtag,
|
||||
MPI_Fint *comm, MPI_Fint *status, MPI_Fint *ierr)
|
||||
{
|
||||
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
|
||||
MPI_Comm c_comm;
|
||||
|
||||
c_comm = MPI_Comm_f2c (*comm);
|
||||
|
||||
*ierr = MPI_Sendrecv_replace(buf, *count, c_type, *dest,
|
||||
*sendtag, *source, *recvtag, c_comm,
|
||||
(MPI_Status*)status);
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Sendrecv_replace(buf,
|
||||
OMPI_FINT_2_INT(*count),
|
||||
c_type,
|
||||
OMPI_FINT_2_INT(*dest),
|
||||
OMPI_FINT_2_INT(*sendtag),
|
||||
OMPI_FINT_2_INT(*source),
|
||||
OMPI_FINT_2_INT(*recvtag),
|
||||
c_comm, (MPI_Status*)status));
|
||||
}
|
||||
|
@ -46,12 +46,16 @@ OMPI_GENERATE_F77_BINDINGS (MPI_SSEND,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_ssend_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *ierr)
|
||||
void mpi_ssend_f(char *buf, MPI_Fint *count, MPI_Fint *datatype,
|
||||
MPI_Fint *dest, MPI_Fint *tag,
|
||||
MPI_Fint *comm, MPI_Fint *ierr)
|
||||
{
|
||||
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
|
||||
MPI_Comm c_comm;
|
||||
|
||||
c_comm = MPI_Comm_f2c (*comm);
|
||||
|
||||
*ierr = MPI_Ssend(buf, *count, c_type, *dest, *tag, c_comm);
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Ssend(buf, OMPI_FINT_2_INT(*count),
|
||||
c_type, OMPI_FINT_2_INT(*dest),
|
||||
OMPI_FINT_2_INT(*tag), c_comm));
|
||||
}
|
||||
|
@ -46,7 +46,9 @@ OMPI_GENERATE_F77_BINDINGS (MPI_SSEND_INIT,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_ssend_init_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_ssend_init_f(char *buf, MPI_Fint *count, MPI_Fint *datatype,
|
||||
MPI_Fint *dest, MPI_Fint *tag,
|
||||
MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr)
|
||||
{
|
||||
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
|
||||
MPI_Request c_req;
|
||||
@ -54,7 +56,10 @@ void mpi_ssend_init_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *
|
||||
|
||||
c_comm = MPI_Comm_f2c (*comm);
|
||||
|
||||
*ierr = MPI_Ssend_init(buf, *count, c_type, *dest, *tag, c_comm, &c_req);
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Ssend_init(buf, OMPI_FINT_2_INT(*count),
|
||||
c_type, OMPI_FINT_2_INT(*dest),
|
||||
OMPI_FINT_2_INT(*tag),
|
||||
c_comm, &c_req));
|
||||
|
||||
if (MPI_SUCCESS == *ierr) {
|
||||
*request = MPI_Request_c2f(c_req);
|
||||
|
@ -51,7 +51,7 @@ void mpi_start_f(MPI_Fint *request, MPI_Fint *ierr)
|
||||
MPI_Request c_req = MPI_Request_f2c(*request);
|
||||
MPI_Request tmp_req = c_req;
|
||||
|
||||
*ierr = MPI_Start(&c_req);
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Start(&c_req));
|
||||
|
||||
if (MPI_SUCCESS == *ierr) {
|
||||
/* For a persistent request, the underlying request descriptor could
|
||||
|
@ -52,7 +52,8 @@ OMPI_GENERATE_F77_BINDINGS (MPI_STARTALL,
|
||||
static const char FUNC_NAME[] = "MPI_STARTALL";
|
||||
|
||||
|
||||
void mpi_startall_f(MPI_Fint *count, MPI_Fint *array_of_requests, MPI_Fint *ierr)
|
||||
void mpi_startall_f(MPI_Fint *count, MPI_Fint *array_of_requests,
|
||||
MPI_Fint *ierr)
|
||||
{
|
||||
MPI_Request *c_req;
|
||||
int i;
|
||||
@ -68,7 +69,6 @@ void mpi_startall_f(MPI_Fint *count, MPI_Fint *array_of_requests, MPI_Fint *ierr
|
||||
c_req[i] = MPI_Request_f2c(array_of_requests[i]);
|
||||
}
|
||||
|
||||
*ierr = MPI_Startall(*count, c_req);
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Startall(OMPI_FINT_2_INT(*count), c_req));
|
||||
free(c_req);
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,8 @@ void mpi_status_set_cancelled_f(MPI_Fint *status, MPI_Fint *flag, MPI_Fint *ierr
|
||||
|
||||
MPI_Status_f2c( status, &c_status );
|
||||
|
||||
*ierr = MPI_Status_set_cancelled(&c_status, *flag);
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Status_set_cancelled(&c_status,
|
||||
OMPI_FINT_2_INT(*flag)));
|
||||
|
||||
if (MPI_SUCCESS == *ierr) {
|
||||
MPI_Status_c2f(&c_status, status);
|
||||
|
@ -46,14 +46,16 @@ OMPI_GENERATE_F77_BINDINGS (MPI_STATUS_SET_ELEMENTS,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_status_set_elements_f(MPI_Fint *status, MPI_Fint *datatype, MPI_Fint *count, MPI_Fint *ierr)
|
||||
void mpi_status_set_elements_f(MPI_Fint *status, MPI_Fint *datatype,
|
||||
MPI_Fint *count, MPI_Fint *ierr)
|
||||
{
|
||||
MPI_Datatype c_type;
|
||||
MPI_Status c_status;
|
||||
|
||||
MPI_Status_f2c( status, &c_status );
|
||||
|
||||
*ierr = MPI_Status_set_elements(&c_status, c_type, *count);
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Status_set_elements(&c_status, c_type,
|
||||
OMPI_FINT_2_INT(*count)));
|
||||
|
||||
/* If datatype is really being set, then that needs to be converted.... */
|
||||
if (MPI_SUCCESS == *ierr) {
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user