More f77 file bindings
This commit was SVN r2696.
Этот коммит содержится в:
родитель
eb4279559e
Коммит
3aa0b648e2
@ -46,7 +46,19 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FILE_IWRITE_AT,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_file_iwrite_at_f(MPI_Fint *fh, MPI_Fint *offset, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr)
|
||||
void mpi_file_iwrite_at_f(MPI_Fint *fh, MPI_Fint *offset, char *buf,
|
||||
MPI_Fint *count, MPI_Fint *datatype,
|
||||
MPI_Fint *request, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_File c_fh = MPI_File_f2c(*fh);
|
||||
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
|
||||
MPI_Request c_request;
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_File_iwrite_at(c_fh, (MPI_Offset) *offset,
|
||||
buf, OMPI_FINT_2_INT(*count),
|
||||
c_type,
|
||||
&c_request));
|
||||
if (MPI_SUCCESS == *ierr) {
|
||||
*request = MPI_Request_c2f(c_request);
|
||||
}
|
||||
}
|
||||
|
@ -48,5 +48,15 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FILE_IWRITE,
|
||||
|
||||
void mpi_file_iwrite_f(MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_File c_fh = MPI_File_f2c(*fh);
|
||||
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
|
||||
MPI_Request c_request;
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_File_iwrite(c_fh, buf,
|
||||
OMPI_FINT_2_INT(*count),
|
||||
c_type, &c_request));
|
||||
|
||||
if (MPI_SUCCESS == *ierr) {
|
||||
*request = MPI_Request_c2f(c_request);
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,21 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FILE_IWRITE_SHARED,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_file_iwrite_shared_f(MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr)
|
||||
void mpi_file_iwrite_shared_f(MPI_Fint *fh, char *buf, MPI_Fint *count,
|
||||
MPI_Fint *datatype, MPI_Fint *request,
|
||||
MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_File c_fh = MPI_File_f2c(*fh);
|
||||
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
|
||||
MPI_Request c_request;
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_File_iwrite_shared(c_fh,
|
||||
buf,
|
||||
OMPI_FINT_2_INT(*count),
|
||||
c_type,
|
||||
&c_request));
|
||||
if (MPI_SUCCESS == *ierr) {
|
||||
*request = MPI_Request_c2f(c_request);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -46,7 +46,16 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FILE_OPEN,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_file_open_f(MPI_Fint *comm, char *filename, MPI_Fint *amode, MPI_Fint *info, MPI_Fint *fh, MPI_Fint *ierr)
|
||||
void mpi_file_open_f(MPI_Fint *comm, char *filename, MPI_Fint *amode,
|
||||
MPI_Fint *info, MPI_Fint *fh, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Comm c_comm = MPI_Comm_f2c(*comm);
|
||||
MPI_Info c_info = MPI_Info_f2c(*info);
|
||||
MPI_File c_fh;
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_File_open(c_comm, filename,
|
||||
OMPI_FINT_2_INT(*amode),
|
||||
c_info, &c_fh));
|
||||
|
||||
*fh = MPI_File_c2f(c_fh);
|
||||
}
|
||||
|
@ -48,5 +48,7 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FILE_PREALLOCATE,
|
||||
|
||||
void mpi_file_preallocate_f(MPI_Fint *fh, MPI_Fint *size, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_File c_fh = MPI_File_f2c(*fh);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_File_preallocate(c_fh, (MPI_Offset) *size));
|
||||
}
|
||||
|
@ -46,7 +46,15 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FILE_READ_ALL_BEGIN,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_file_read_all_begin_f(MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *ierr)
|
||||
void mpi_file_read_all_begin_f(MPI_Fint *fh, char *buf,
|
||||
MPI_Fint *count, MPI_Fint *datatype,
|
||||
MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_File c_fh = MPI_File_f2c(*fh);
|
||||
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_File_read_all_begin(c_fh, buf,
|
||||
OMPI_FINT_2_INT(*count),
|
||||
c_type));
|
||||
|
||||
}
|
||||
|
@ -8,6 +8,9 @@
|
||||
|
||||
#include "mpi.h"
|
||||
#include "mpi/f77/bindings.h"
|
||||
#include "mpi/f77/constants.h"
|
||||
#include "errhandler/errhandler.h"
|
||||
#include "communicator/communicator.h"
|
||||
|
||||
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
#pragma weak PMPI_FILE_READ_ALL_END = mpi_file_read_all_end_f
|
||||
@ -46,7 +49,37 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FILE_READ_ALL_END,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_file_read_all_end_f(MPI_Fint *fh, char *buf, MPI_Fint *status, MPI_Fint *ierr)
|
||||
void mpi_file_read_all_end_f(MPI_Fint *fh, char *buf, MPI_Fint *status,
|
||||
MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_Status *c_status;
|
||||
#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT
|
||||
MPI_Status c_status2;
|
||||
#endif
|
||||
MPI_File c_fh = MPI_File_f2c(*fh);
|
||||
|
||||
/* See if we got MPI_STATUS_IGNORE */
|
||||
|
||||
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
|
||||
c_status = MPI_STATUS_IGNORE;
|
||||
} else {
|
||||
|
||||
/* If sizeof(int) == sizeof(INTEGER), then there's no
|
||||
translation necessary -- let the underlying functions write
|
||||
directly into the Fortran status */
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INT == SIZEOF_INT
|
||||
c_status = (MPI_Status *) status;
|
||||
#else
|
||||
c_status = &c_status2;
|
||||
#endif
|
||||
}
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_File_read_all_end(c_fh, buf, c_status));
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT
|
||||
if (MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -8,6 +8,9 @@
|
||||
|
||||
#include "mpi.h"
|
||||
#include "mpi/f77/bindings.h"
|
||||
#include "mpi/f77/constants.h"
|
||||
#include "errhandler/errhandler.h"
|
||||
#include "communicator/communicator.h"
|
||||
|
||||
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
#pragma weak PMPI_FILE_READ_ALL = mpi_file_read_all_f
|
||||
@ -46,7 +49,40 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FILE_READ_ALL,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_file_read_all_f(MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *status, MPI_Fint *ierr)
|
||||
void mpi_file_read_all_f(MPI_Fint *fh, char *buf, MPI_Fint *count,
|
||||
MPI_Fint *datatype, MPI_Fint *status, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_File c_fh = MPI_File_f2c(*fh);
|
||||
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
|
||||
MPI_Status *c_status;
|
||||
#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT
|
||||
MPI_Status c_status2;
|
||||
#endif
|
||||
|
||||
/* See if we got MPI_STATUS_IGNORE */
|
||||
|
||||
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
|
||||
c_status = MPI_STATUS_IGNORE;
|
||||
} else {
|
||||
|
||||
/* If sizeof(int) == sizeof(INTEGER), then there's no
|
||||
translation necessary -- let the underlying functions write
|
||||
directly into the Fortran status */
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INT == SIZEOF_INT
|
||||
c_status = (MPI_Status *) status;
|
||||
#else
|
||||
c_status = &c_status2;
|
||||
#endif
|
||||
}
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_File_read_all(c_fh, buf,
|
||||
OMPI_FINT_2_INT(*count),
|
||||
c_type, c_status));
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT
|
||||
if (MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -46,7 +46,16 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FILE_READ_AT_ALL_BEGIN,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_file_read_at_all_begin_f(MPI_Fint *fh, MPI_Fint *offset, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *ierr)
|
||||
void mpi_file_read_at_all_begin_f(MPI_Fint *fh, MPI_Fint *offset,
|
||||
char *buf, MPI_Fint *count,
|
||||
MPI_Fint *datatype, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_File c_fh = MPI_File_f2c(*fh);
|
||||
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
|
||||
|
||||
*ierr = OMPI_FINT_2_INT(MPI_File_read_at_all_begin(c_fh,
|
||||
(MPI_Offset) *offset,
|
||||
buf,
|
||||
OMPI_FINT_2_INT(*count),
|
||||
c_type));
|
||||
}
|
||||
|
@ -8,6 +8,9 @@
|
||||
|
||||
#include "mpi.h"
|
||||
#include "mpi/f77/bindings.h"
|
||||
#include "mpi/f77/constants.h"
|
||||
#include "errhandler/errhandler.h"
|
||||
#include "communicator/communicator.h"
|
||||
|
||||
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
|
||||
#pragma weak PMPI_FILE_READ_AT_ALL_END = mpi_file_read_at_all_end_f
|
||||
@ -46,7 +49,39 @@ OMPI_GENERATE_F77_BINDINGS (MPI_FILE_READ_AT_ALL_END,
|
||||
#include "mpi/f77/profile/defines.h"
|
||||
#endif
|
||||
|
||||
void mpi_file_read_at_all_end_f(MPI_Fint *fh, char *buf, MPI_Fint *status, MPI_Fint *ierr)
|
||||
void mpi_file_read_at_all_end_f(MPI_Fint *fh, char *buf,
|
||||
MPI_Fint *status, MPI_Fint *ierr)
|
||||
{
|
||||
/* This function not yet implemented */
|
||||
MPI_File c_fh = MPI_File_f2c(*fh);
|
||||
MPI_Status *c_status;
|
||||
#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT
|
||||
MPI_Status c_status2;
|
||||
#endif
|
||||
|
||||
/* See if we got MPI_STATUS_IGNORE */
|
||||
|
||||
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
|
||||
c_status = MPI_STATUS_IGNORE;
|
||||
} else {
|
||||
|
||||
/* If sizeof(int) == sizeof(INTEGER), then there's no
|
||||
translation necessary -- let the underlying functions write
|
||||
directly into the Fortran status */
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INT == SIZEOF_INT
|
||||
c_status = (MPI_Status *) status;
|
||||
#else
|
||||
c_status = &c_status2;
|
||||
#endif
|
||||
}
|
||||
|
||||
*ierr = OMPI_FINT_2_INT(MPI_File_read_at_all_end(c_fh, buf, c_status));
|
||||
|
||||
#if OMPI_SIZEOF_FORTRAN_INT != SIZEOF_INT
|
||||
if (MPI_STATUS_IGNORE != c_status) {
|
||||
MPI_Status_c2f(c_status, status);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user