SIONlib
1.7.7
Scalable I/O library for parallel access to task-local files
|
#include <stdio.h>
#include "sion_const.h"
#include "sion_common.h"
#include "sion_datatypes.h"
#include "sion_filedesc.h"
Go to the source code of this file.
Functions | |
int | _sion_open (const char *fname, const char *file_mode, int *ntasks, int *nfiles, sion_int64 **chunksizes, sion_int32 *fsblksize, int **globalranks, FILE **fileptr) |
int | _sion_open_rank (const char *fname, const char *file_mode, sion_int64 *chunksize, sion_int32 *fsblksize, int *rank, FILE **fileptr) |
int | _sion_open_write (const char *fname, sion_int64 file_mode_flags, int *ntasks, int *nfiles, sion_int64 **chunksizes, sion_int32 *fsblksize, int **globalranks, FILE **fileptr) |
internal sion serial open function for writing on one file More... | |
int | _sion_open_read (const char *fname, sion_int64 file_mode_flags, int read_all, int *ntasks, int *nfiles, sion_int64 **chunksizes, sion_int32 *fsblksize, int **globalranks, FILE **fileptr) |
internal sion serial open function for reading on one or more files More... | |
int | _sion_open_read_single (const char *fname, sion_int64 file_mode_flags, int *ntasks, int *nfiles, sion_int64 **chunksizes, sion_int32 *fsblksize, int **globalranks, FILE **fileptr, _sion_filedesc *sion_filedesc) |
int | _sion_open_read_master (const char *fname, sion_int64 file_mode_flags, int *ntasks, int *nfiles, sion_int64 **chunksizes, sion_int32 *fsblksize, int **globalranks, FILE **fileptr, _sion_filedesc *sion_filedesc) |
int | _sion_close (_sion_filedesc *sion_filedesc) |
int | _sion_create_new_block (_sion_filedesc *sion_filedesc) |
Create a new block for the internal data structure. More... | |
int | _sion_flush_block (_sion_filedesc *sion_filedesc) |
Update the internal data structure. More... | |
int | _sion_update_fileposition (_sion_filedesc *sion_filedesc) |
Update the internal data structure (check fileposition) More... | |
int | _sion_check_on_collective_mode (_sion_filedesc *sion_filedesc) |
check if a collective operation are already called, More... | |
char * | _sion_get_multi_filename (const char *fname, int filenumber) |
generates the multi filename More... | |
sion_int32 | _sion_get_endianness_with_flags (sion_int64 flags) |
Return endianness including possible choice via flags. More... | |
char * | _sion_getenv (const char *name) |
sion_io_stat_t * | _sion_alloc_io_info (int nfiles) |
allocates an io_info data structure for nfiles files More... | |
int | _sion_free_io_info (sion_io_stat_t *p) |
frees an io_info data structure More... | |
sion_io_stat_t* _sion_alloc_io_info | ( | int | p_nf | ) |
allocates an io_info data structure for nfiles files
return flags
Definition at line 1211 of file sion_internal.c.
int _sion_check_on_collective_mode | ( | _sion_filedesc * | sion_filedesc | ) |
check if a collective operation are already called,
*sion_filedesc | sion file description struct (_sion_filedesc) |
SION_SUCCESS | if OK |
Definition at line 1017 of file sion_internal.c.
int _sion_create_new_block | ( | _sion_filedesc * | sion_filedesc | ) |
Create a new block for the internal data structure.
sion_filedesc | sion file handle |
SION_SUCCESS | if OK |
Definition at line 1089 of file sion_internal.c.
int _sion_flush_block | ( | _sion_filedesc * | sion_filedesc | ) |
Update the internal data structure.
*sion_filedesc | sion file description struct (_sion_filedesc) |
1 | if OK |
Definition at line 1050 of file sion_internal.c.
int _sion_free_io_info | ( | sion_io_stat_t * | p | ) |
sion_int32 _sion_get_endianness_with_flags | ( | sion_int64 | flags | ) |
Return endianness including possible choice via flags.
return endianness
Definition at line 1158 of file sion_internal.c.
char* _sion_get_multi_filename | ( | const char * | fname, |
int | filenumber | ||
) |
generates the multi filename
fname | file name |
filenumber | file number |
pointer | to new filename |
Definition at line 929 of file sion_internal.c.
char* _sion_getenv | ( | const char * | name | ) |
encapsulate getenv
Definition at line 1187 of file sion_internal.c.
int _sion_open_read | ( | const char * | fname, |
sion_int64 | file_mode_flags, | ||
int | read_all, | ||
int * | ntasks, | ||
int * | nfiles, | ||
sion_int64 ** | chunksizes, | ||
sion_int32 * | fsblksize, | ||
int ** | globalranks, | ||
FILE ** | fileptr | ||
) |
internal sion serial open function for reading on one or more files
[in] | fname | name of file, should equal on all tasks |
[in,out] | file_mode_flags | like the type parameter of fopen (currently recognized options: "rb", "wb") |
[in,out] | read_all | 1 all files of a multi-file will be read, 0 only the master will read, incl. mapping |
[in,out] | ntasks | number of tasks used to write this file |
[in,out] | nfiles | number of physical files |
[in,out] | chunksizes | chunksize for each task |
[in,out] | fsblksize | blocksize of filesystem, must be equal on all processors |
[in] | globalranks | rank numbers for which the file should be open; will be stored in sion file, useful if comm is not MPI_COMM_WORLD typical: globalrank= rank in MPI_COMM_WORLD |
[out] | fileptr | filepointer for this task |
Definition at line 266 of file sion_internal.c.
References _sion_alloc_filedesc().
int _sion_open_write | ( | const char * | fname, |
sion_int64 | file_mode_flags, | ||
int * | ntasks, | ||
int * | nfiles, | ||
sion_int64 ** | chunksizes, | ||
sion_int32 * | fsblksize, | ||
int ** | globalranks, | ||
FILE ** | fileptr | ||
) |
internal sion serial open function for writing on one file
[in] | fname | name of file, should equal on all tasks |
[in,out] | file_mode_flags | like the type parameter of fopen (currently recognized options: "rb", "wb") |
[in,out] | ntasks | number of tasks used to write this file |
[in,out] | nfiles | number of physical files |
[in,out] | chunksizes | chunksize for each task |
[in,out] | fsblksize | blocksize of filesystem, must be equal on all processors |
[in] | globalranks | rank numbers for which the file should be open; will be stored in sion file, useful if comm is not MPI_COMM_WORLD typical: globalrank= rank in MPI_COMM_WORLD |
[out] | fileptr | filepointer for this task |
sid | sion file handle or -1 if error occured |
Definition at line 106 of file sion_internal.c.
int _sion_update_fileposition | ( | _sion_filedesc * | sion_filedesc | ) |
Update the internal data structure (check fileposition)
Update is only performed if file pointer is exported. The body of the function is skipped otherwise.
*sion_filedesc | sion file description struct (_sion_filedesc) |
SION_SUCCESS | if OK |
Definition at line 984 of file sion_internal.c.