Add int<-->Fint macros while debugging some fortran gorp
This commit was SVN r2506.
Этот коммит содержится в:
родитель
2adafa8f53
Коммит
46361c67d5
@ -48,5 +48,5 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FINALIZE,
|
|||||||
|
|
||||||
void mpi_finalize_f(MPI_Fint *ierr)
|
void mpi_finalize_f(MPI_Fint *ierr)
|
||||||
{
|
{
|
||||||
*ierr = MPI_Finalize();
|
*ierr = OMPI_INT_2_FINT(MPI_Finalize());
|
||||||
}
|
}
|
||||||
|
@ -48,5 +48,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FINALIZED,
|
|||||||
|
|
||||||
void mpi_finalized_f(MPI_Fint *flag, MPI_Fint *ierr)
|
void mpi_finalized_f(MPI_Fint *flag, MPI_Fint *ierr)
|
||||||
{
|
{
|
||||||
*ierr = MPI_Finalized(flag);
|
OMPI_SINGLE_NAME_DECL(flag);
|
||||||
|
*ierr = OMPI_INT_2_FINT(MPI_Finalized(OMPI_SINGLE_NAME_CONVERT(flag)));
|
||||||
|
OMPI_SINGLE_INT_2_FINT(flag);
|
||||||
}
|
}
|
||||||
|
@ -50,5 +50,6 @@ void mpi_init_f( MPI_Fint *ierr )
|
|||||||
{
|
{
|
||||||
int argc = 0;
|
int argc = 0;
|
||||||
char **argv = NULL;
|
char **argv = NULL;
|
||||||
*ierr = MPI_Init( &argc, &argv );
|
|
||||||
|
*ierr = OMPI_INT_2_FINT(MPI_Init( &argc, &argv ));
|
||||||
}
|
}
|
||||||
|
@ -50,5 +50,7 @@ void mpi_init_thread_f( MPI_Fint *required, MPI_Fint *provided, MPI_Fint *ierr )
|
|||||||
{
|
{
|
||||||
int argc = 0;
|
int argc = 0;
|
||||||
char** argv = NULL;
|
char** argv = NULL;
|
||||||
*ierr = MPI_Init_thread( &argc, &argv, *required, provided );
|
|
||||||
|
*ierr = OMPI_INT_2_FINT(MPI_Init_thread( &argc, &argv,
|
||||||
|
*required, provided ));
|
||||||
}
|
}
|
||||||
|
@ -48,5 +48,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_INITIALIZED,
|
|||||||
|
|
||||||
void mpi_initialized_f(MPI_Fint *flag, MPI_Fint *ierr)
|
void mpi_initialized_f(MPI_Fint *flag, MPI_Fint *ierr)
|
||||||
{
|
{
|
||||||
*ierr = MPI_Initialized(flag);
|
OMPI_SINGLE_NAME_DECL(flag);
|
||||||
|
*ierr = OMPI_INT_2_FINT(MPI_Initialized(OMPI_SINGLE_NAME_CONVERT(flag)));
|
||||||
|
OMPI_SINGLE_INT_2_FINT(flag);
|
||||||
}
|
}
|
||||||
|
@ -46,13 +46,15 @@ OMPI_GENERATE_F77_BINDINGS (MPI_RECV,
|
|||||||
#include "mpi/f77/profile/defines.h"
|
#include "mpi/f77/profile/defines.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void mpi_recv_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *status, MPI_Fint *ierr)
|
void mpi_recv_f(char *buf, MPI_Fint *count, MPI_Fint *datatype,
|
||||||
|
MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm,
|
||||||
|
MPI_Fint *status, MPI_Fint *ierr)
|
||||||
{
|
{
|
||||||
MPI_Comm c_comm;
|
MPI_Comm c_comm = MPI_Comm_f2c(OMPI_FINT_2_INT(*comm));
|
||||||
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
|
MPI_Datatype c_type = MPI_Type_f2c(OMPI_FINT_2_INT(*datatype));
|
||||||
|
|
||||||
c_comm = MPI_Comm_f2c (*comm);
|
*ierr = OMPI_INT_2_FINT(MPI_Recv( buf, OMPI_FINT_2_INT(*count), c_type,
|
||||||
|
OMPI_FINT_2_INT(*source),
|
||||||
*ierr = MPI_Recv( buf, *count, c_type, *source, *tag, c_comm,
|
OMPI_FINT_2_INT(*tag), c_comm,
|
||||||
(MPI_Status*)status );
|
(MPI_Status*) status));
|
||||||
}
|
}
|
||||||
|
@ -46,12 +46,13 @@ OMPI_GENERATE_F77_BINDINGS (MPI_SEND,
|
|||||||
#include "mpi/f77/profile/defines.h"
|
#include "mpi/f77/profile/defines.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void mpi_send_f(char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *ierr)
|
void mpi_send_f(char *buf, MPI_Fint *count, MPI_Fint *datatype,
|
||||||
|
MPI_Fint *dest, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *ierr)
|
||||||
{
|
{
|
||||||
MPI_Comm c_comm;
|
MPI_Comm c_comm = MPI_Comm_f2c(OMPI_FINT_2_INT(*comm));
|
||||||
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
|
MPI_Datatype c_type = MPI_Type_f2c(OMPI_FINT_2_INT(*datatype));
|
||||||
|
|
||||||
c_comm = MPI_Comm_f2c (*comm);
|
*ierr = OMPI_INT_2_FINT(MPI_Send(buf, OMPI_FINT_2_INT(*count),
|
||||||
|
c_type, OMPI_FINT_2_INT(*dest),
|
||||||
*ierr = MPI_Send(buf, *count, c_type, *dest, *tag, c_comm);
|
OMPI_FINT_2_INT(*tag), c_comm));
|
||||||
}
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user