SIONlib  2.0.0-rc.1
Scalable I/O library for parallel access to task-local files
Data Structures | Typedefs | Enumerations | Functions
MPI Parallel API

Open (and close) SIONlib files from multiple MPI processes in parallel. More...

Data Structures

union  _sion_mpi_multifile_data
 
struct  sion_mpi_options
 

Typedefs

typedef struct _sion_file_check_par_args_mpi_struct sion_file_check_par_args_mpi
 

Enumerations

enum  _sion_mpi_multifile_mode { _SION_MULTIFILE_SINGLE, _SION_MULTIFILE_NUMBER, _SION_MULTIFILE_COMMUNICATOR }
 

Functions

int sion_paropen_mpi (const char *fname, const char *file_mode, int *numFiles, MPI_Comm gComm, const MPI_Comm *lComm, int64_t *chunksize, int32_t *fsblksize, int *globalrank, FILE **fileptr, char **newfname)
 Open a sion file using MPI. More...
 
int sion_parclose_mpi (int sid)
 Close a sion file using MPI. More...
 
int sion_parreinit_mpi (int sid, int64_t chunksize)
 
int sion_paropen_mapped_mpi (char *fname, const char *file_mode, int *numFiles, MPI_Comm gComm, int *nlocaltasks, int **globalranks, int64_t **chunksizes, int **mapping_filenrs, int **mapping_lranks, int32_t *fsblksize, FILE **fileptr)
 
int sion_parclose_mapped_mpi (int sid)
 
int sion_startof_transaction_mpi (int sid)
 
int sion_endof_transaction_mpi (int sid)
 
size_t sion_coll_fwrite_mpi (const void *data, size_t size, size_t nitems, int sid)
 
size_t sion_coll_fread_mpi (void *data, size_t size, size_t nitems, int sid)
 
int sion_paropen_comms_mpi (char *fname, const char *file_mode, int *numFiles, MPI_Comm gComm, MPI_Comm lComm, int64_t *chunksize, int32_t *fsblksize, int *globalrank, FILE **fileptr, char *newfname)
 
int sion_paropen_multi_mpi (char *fname, const char *file_mode, int *numFiles, MPI_Comm gComm, MPI_Comm *lComm, int64_t *chunksize, int32_t *fsblksize, int *globalrank, FILE **fileptr, char *newfname)
 
sion_file_check_par_args_mpision_file_check_par_args_init_mpi (const char *file_mode, MPI_Comm gComm, int numfiles, MPI_Comm lComm)
 
int sion_file_check_par_args_free_mpi (sion_file_check_par_args_mpi *args)
 
int sion_file_check_par_cb_mpi (char *fname, void *args)
 
sion_mpi_options sion_mpi_options_new ()
 
void sion_mpi_options_set_chunksize (sion_mpi_options *options, int64_t chunksize)
 
void sion_mpi_options_set_fsblksize (sion_mpi_options *options, int32_t fsblksize)
 
void sion_mpi_options_set_multifile_number (sion_mpi_options *options, int multifile_number)
 
void sion_mpi_options_set_multifile_communicator (sion_mpi_options *options, MPI_Comm multifile_communicator)
 
void sion_mpi_options_set_keyval_mode (sion_mpi_options *options, sion_keyval_mode keyval_mode)
 
void sion_mpi_options_set_buddy (sion_mpi_options *options)
 
void sion_mpi_options_set_buddylevel (sion_mpi_options *options, int32_t buddylevel)
 
void sion_mpi_options_set_collective (sion_mpi_options *options)
 
void sion_mpi_options_set_collective_size (sion_mpi_options *options, int32_t size)
 
void sion_mpi_options_set_collective_merge (sion_mpi_options *options)
 
int sion_paropen_mpi_with_options (const char *filename, sion_open_mode mode, MPI_Comm communicator, const sion_mpi_options *options)
 

Detailed Description

Open (and close) SIONlib files from multiple MPI processes in parallel.

See also
API Overview

Function Documentation

◆ sion_parclose_mpi()

int sion_parclose_mpi ( int  sid)

Close a sion file using MPI.

For more description please see the description of sion_parclose_mpi.

Parameters
[in]sidsion file handle
Return values
successvalue (SION_SUCCESS or SION_NOT_SUCCESS)
Examples
simple/sionpar.c.

Definition at line 162 of file sion_mpi_gen.c.

◆ sion_paropen_mpi()

int sion_paropen_mpi ( const char *  fname,
const char *  file_mode,
int *  numFiles,
MPI_Comm  gComm,
const MPI_Comm *  lComm,
int64_t *  chunksize,
int32_t *  fsblksize,
int *  globalrank,
FILE **  fileptr,
char **  newfname 
)

Open a sion file using MPI.

This function opens a sion file using MPI. It processes the MPI specific parts and then passes its arguments on to sion_generic_paropen().

For more description please see the description of sion_paropen_mpi.

Parameters
[in]fnamename of file, should be equal on all tasks
[in]file_modelike the type parameter of fopen. See file mode description for details
[in,out]numFilesnumber of multi files to use (-1 for automatic choosing from local communicator)
[in]gCommglobal MPI communicator (typically MPI_COMM_WORLD)
[in]lCommlocal MPI communicator (= gComm if no adaption to I/O nodes is needed) lComm should be a partition of gComm, i.e. a disjoint cover
[in,out]chunksizemaximum size to be written with single write call
[in,out]fsblksizefile system block size. Must be equal on all processes (-1 for automatic)
[in,out]globalrankglobal rank of process any globally unique id for current task. It will be stored in sion file. Useful if comm is not MPI_COMM_WORLD (typically: globalrank = rank in MPI_COMM_WORLD)
[out]fileptrfile pointer (NULL for not using an external which allows for more optimisation)
[out]newfnamereturn value for actual file name if using multi files. NULL does not return the name. If passed non NULL pointer the memory needs to be freed by the user.
Return values
sidsion file handle or -1 if error occurred
Examples
simple/sionpar.c.

Definition at line 35 of file sion_mpi_gen.c.