SIONlib  1.7.7
Scalable I/O library for parallel access to task-local files
Macros | Functions
sion_generic_internal.h File Reference
#include "sion_const.h"
#include "sion_buddy_common.h"
#include "sion_datatypes.h"
#include "sion_filedesc.h"
#include "sion_flags.h"
#include "sion_generic_apidesc.h"
Include dependency graph for sion_generic_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _SION_INTERNAL_FLAG_NORMAL   1
 
#define _SION_INTERNAL_FLAG_BUDDY_NORMAL   2
 
#define _SION_INTERNAL_FLAG_BUDDY_SEND   4
 
#define _SION_INTERNAL_FLAG_BUDDY_COLL   8
 
#define _SION_INTERNAL_FLAG_BUDDY_READ   16
 
#define _SION_INTERNAL_FLAG_UNKNOWN   32
 

Functions

int _sion_paropen_generic_one_file (int sid, char *fname, _sion_flags_store *flags_store, char *prefix, int *numFiles, int *filenumber, sion_int64 *chunksize, sion_int32 *fsblksize, int rank, int ntasks, int *globalrank, int flag, FILE **fileptr, _sion_generic_gendata *sion_gendata, _sion_generic_buddy *buddy_info)
 Generic parallel open of one direct access file. More...
 
int _sion_parclose_generic (int sid, int rank, int ntasks, int mapping_size, sion_int32 *mapping, int flag, _sion_generic_gendata *sion_gendata, _sion_generic_buddy *buddy_info)
 Internal function to close parallel opened SION file. More...
 
int _sion_parreinit_generic (int sid, sion_int64 chunksize, int rank, int ntasks, _sion_generic_gendata *sion_gendata)
 change chunksize for an already opened SION file (write) More...
 
int _sion_generic_get_and_distribute_info_from_file (_sion_generic_gendata *sion_gendata, const char *fname)
 
int _sion_generic_collect_mapping (_sion_filedesc *sion_filedesc, int *mapping_size, sion_int32 **mapping)
 
int _sion_generic_renumber_collmsa (_sion_generic_gendata *comm, _sion_flags_store *flags)
 Splits a Communicator in numfiles different communicators. More...
 
int _sion_generic_is_candidate (_sion_generic_gendata *comm)
 

Function Documentation

◆ _sion_generic_renumber_collmsa()

int _sion_generic_renumber_collmsa ( _sion_generic_gendata comm,
_sion_flags_store flags 
)

Splits a Communicator in numfiles different communicators.

Parameters
[in,out]commcommunication context to be renumbered
[in]flagsfile open flags

Definition at line 1093 of file sion_generic_internal.c.

◆ _sion_parclose_generic()

int _sion_parclose_generic ( int  sid,
int  rank,
int  ntasks,
int  mapping_size,
sion_int32 *  mapping,
int  flag,
_sion_generic_gendata sion_gendata,
_sion_generic_buddy buddy_data 
)

Internal function to close parallel opened SION file.

Parameters
sidreference to file description struct (_sion_filedesc)
rankrank
ntasksnumber of tasks
mapping_sizenumber of global tasks
mappingmapping
flagflag describing the role if the process in buddy checkpointing
sion_gendatageneric data struct
buddy_datadata describing the buddy checkpointing
Returns
SION_SUCCESS if successful

Definition at line 710 of file sion_generic_internal.c.

◆ _sion_paropen_generic_one_file()

int _sion_paropen_generic_one_file ( int  sid,
char *  fname,
_sion_flags_store flags_store,
char *  prefix,
int *  numFiles,
int *  filenumber,
sion_int64 *  chunksize,
sion_int32 *  fsblksize,
int  rank,
int  ntasks,
int *  globalrank,
int  flag,
FILE **  fileptr,
_sion_generic_gendata sion_gendata,
_sion_generic_buddy buddy_data 
)

Generic parallel open of one direct access file.

Parameters
sidsion file handle
fnamefilename to use
flags_storeflags from already parsed file_mode (see also sion_internal.h)
prefixprefix to be used in case of multiple files
numFilesNumber of files to open
filenumberfile number
chunksizechunksize on this task
fsblksizeblocksize of filesystem (must be equal on all processors)
rankrank of the current process
ntasksnumber of processes
globalrankany 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
flagsion options flag
fileptrfilepointer for this task
sion_gendatastructure, containing references to commgroups and callbacks
buddy_datadata describing the buddy checkpointing
Returns
sion file handle -1 if error occured

Definition at line 76 of file sion_generic_internal.c.

◆ _sion_parreinit_generic()

int _sion_parreinit_generic ( int  sid,
sion_int64  chunksize,
int  rank,
int  ntasks,
_sion_generic_gendata sion_gendata 
)

change chunksize for an already opened SION file (write)

Returns
1 if successful

Definition at line 886 of file sion_generic_internal.c.