SIONlib
1.7.7
Scalable I/O library for parallel access to task-local files
|
Fortran API. More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "mpi.h"
#include "sion.h"
#include "sion_debug.h"
#include "sion_fd.h"
#include "sion_filedesc.h"
#include "sion_ompi.h"
#include "sion_fortran_ompi.h"
Go to the source code of this file.
Macros | |
#define | _XOPEN_SOURCE 700 |
Functions | |
void | fsion_paropen_ompi_c (char *fname, char *file_mode, int *numFiles, MPI_Fint *fgComm, MPI_Fint *flComm, sion_int64 *chunksize, sion_int32 *fsblksize, int *globalrank, char *newfname, int *sid, int fname_len, int file_mode_len, int newfname_len) |
Fortran wrapper function that calls sion_paropen_mpi for 1 file. More... | |
void | fsion_paropen_multi_ompi_c (char *fname, char *file_mode, int *numFiles, MPI_Fint *fgComm, MPI_Fint *flComm, sion_int64 *chunksize, sion_int32 *fsblksize, int *globalrank, int *sid, char *newfname, int fname_len, int file_mode_len, int newfname_len) |
Fortran procedure to open multiple sion files in parallel. More... | |
void | fsion_parclose_ompi_c (int *sid, int *ierr) |
Fortran procedure to close a sion file opened in OpenMP/MPI in parallel. More... | |
Fortran API.
Definition in file sion_fortran_ompi.c.
void fsion_parclose_ompi_c | ( | int * | sid, |
int * | ierr | ||
) |
Fortran procedure to close a sion file opened in OpenMP/MPI in parallel.
This function closes the sion in parallel on all tasks included in comm. The communicator should be the same used in the parallel open statement.
[in] | sid | sion file handle |
ierr | 1 if close is ok |
Definition at line 195 of file sion_fortran_ompi.c.
void fsion_paropen_multi_ompi_c | ( | char * | fname, |
char * | file_mode, | ||
int * | numFiles, | ||
MPI_Fint * | fgComm, | ||
MPI_Fint * | flComm, | ||
sion_int64 * | chunksize, | ||
sion_int32 * | fsblksize, | ||
int * | globalrank, | ||
int * | sid, | ||
char * | newfname, | ||
int | fname_len, | ||
int | file_mode_len, | ||
int | newfname_len | ||
) |
Fortran procedure to open multiple sion files in parallel.
This function opens numFiles files in parallel. It has to be called from each processor at the same time (like a MPI collective operation).
[in] | fname | name of file, should equal on all tasks |
[in] | file_mode | like the type parameter of fopen ("rb", "wb") |
[in] | numFiles | number of files to open |
[in] | fgComm | global MPI communicator, which contains all tasks writing to the files typical: MPI_COMM_WORLD |
[in,out] | flComm | new local MPI communicator, which contains all tasks writing to the current file |
[in,out] | chunksize | chunksize for this task |
[in,out] | fsblksize | filesystem blocksize, must be equal on all processors |
[in,out] | globalrank | any global unique id for this task will be stored in sion file, usefull if comm is not MPI_COMM_WORLD typical: globalrank= rank in MPI_COMM_WORLD |
[in] | fname_len | (internal) length of the fname string * |
[in] | file_mode_len | (internal) length of the file_mode string |
[in] | newfname_len | (internal) length of the newfname string |
[out] | newfname | filename of the new file |
[out] | sid | sion file handle or -1 if error occured |
Definition at line 139 of file sion_fortran_ompi.c.
void fsion_paropen_ompi_c | ( | char * | fname, |
char * | file_mode, | ||
int * | numFiles, | ||
MPI_Fint * | fgComm, | ||
MPI_Fint * | flComm, | ||
sion_int64 * | chunksize, | ||
sion_int32 * | fsblksize, | ||
int * | globalrank, | ||
char * | newfname, | ||
int * | sid, | ||
int | fname_len, | ||
int | file_mode_len, | ||
int | newfname_len | ||
) |
Fortran wrapper function that calls sion_paropen_mpi for 1 file.
[in] | fname | name of file, should equal on all tasks |
[in] | file_mode | like the type parameter of fopen ("rb", "wb") |
[in] | numFiles | number of files to open |
[in] | fgComm | global MPI communicator, which contains all tasks writing to the files typical: MPI_COMM_WORLD |
[in,out] | flComm | new local MPI communicator, which contains all tasks writing to the current file |
[in,out] | chunksize | chunksize for this task |
[in,out] | fsblksize | filesystem blocksize, must be equal on all processors |
[in,out] | globalrank | any global unique id for this task will be stored in sion file, usefull if comm is not MPI_COMM_WORLD typical: globalrank= rank in MPI_COMM_WORLD |
[in] | fname_len | (internal) length of the fname string * |
[in] | file_mode_len | (internal) length of the file_mode string |
[in] | newfname_len | (internal) length of the newfname string |
[out] | newfname | filename of the new file |
[out] | sid | sion file handle or -1 if error occured |
Definition at line 55 of file sion_fortran_ompi.c.