1
1

Add int<-->Fint macros while debugging some fortran gorp

This commit was SVN r2506.
Этот коммит содержится в:
Jeff Squyres 2004-09-04 10:40:43 +00:00
родитель 2adafa8f53
Коммит 46361c67d5
7 изменённых файлов: 28 добавлений и 18 удалений

Просмотреть файл

@ -48,5 +48,5 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FINALIZE,
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)
{
*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;
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;
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)
{
*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"
#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_Datatype c_type = MPI_Type_f2c(*datatype);
MPI_Comm c_comm = MPI_Comm_f2c(OMPI_FINT_2_INT(*comm));
MPI_Datatype c_type = MPI_Type_f2c(OMPI_FINT_2_INT(*datatype));
c_comm = MPI_Comm_f2c (*comm);
*ierr = MPI_Recv( buf, *count, c_type, *source, *tag, c_comm,
(MPI_Status*)status );
*ierr = OMPI_INT_2_FINT(MPI_Recv( buf, OMPI_FINT_2_INT(*count), c_type,
OMPI_FINT_2_INT(*source),
OMPI_FINT_2_INT(*tag), c_comm,
(MPI_Status*) status));
}

Просмотреть файл

@ -46,12 +46,13 @@ OMPI_GENERATE_F77_BINDINGS (MPI_SEND,
#include "mpi/f77/profile/defines.h"
#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_Datatype c_type = MPI_Type_f2c(*datatype);
MPI_Comm c_comm = MPI_Comm_f2c(OMPI_FINT_2_INT(*comm));
MPI_Datatype c_type = MPI_Type_f2c(OMPI_FINT_2_INT(*datatype));
c_comm = MPI_Comm_f2c (*comm);
*ierr = MPI_Send(buf, *count, c_type, *dest, *tag, c_comm);
*ierr = OMPI_INT_2_FINT(MPI_Send(buf, OMPI_FINT_2_INT(*count),
c_type, OMPI_FINT_2_INT(*dest),
OMPI_FINT_2_INT(*tag), c_comm));
}