SIONlib
1.7.7
Scalable I/O library for parallel access to task-local files
|
Functions | |
int | sion_get_locations (int sid, int *ntasks, int *maxchunks, sion_int64 *globalskip, sion_int64 *start_of_varheader, sion_int64 **sion_chunksizes, sion_int64 **sion_globalranks, sion_int64 **sion_blockcount, sion_int64 **sion_blocksizes) |
Returns pointers to internal fields. More... | |
int | sion_get_current_location (int sid, int *currentchunknr, sion_int64 *currentpos, int *maxchunks, sion_int64 **chunksizes) |
Returns current position in file and pointer fiels containing chunk sizes. More... | |
int | sion_get_mapping (int sid, int *mapping_size, sion_int32 **mapping, int *numfiles) |
Returns pointers to the internal field mapping. More... | |
int | sion_get_file_endianness (int sid) |
Returns edianness of data in file sid. More... | |
int | sion_endianness_swap_needed (int sid) |
Returns whether or not byte swapping is needed for sid. More... | |
int | sion_get_current_locations (int sid, int *ntasks, sion_int64 **sion_currentpos, sion_int64 **sion_currentblocknr) |
Returns current position in file and pointer fiels containing chunk sizes. More... | |
size_t | sion_fwrite (const void *data, size_t size, size_t nitems, int sid) |
Write data to sion file. More... | |
size_t | sion_fread (void *data, size_t size, size_t nitems, int sid) |
Read data from sion file. More... | |
Common functions of the SIONlib API
int sion_endianness_swap_needed | ( | int | sid | ) |
Returns whether or not byte swapping is needed for sid.
[in] | sid | sion file handle |
Definition at line 277 of file sion_common.c.
Referenced by fsion_endianness_swap_needed_c().
size_t sion_fread | ( | void * | data, |
size_t | size, | ||
size_t | nitems, | ||
int | sid | ||
) |
Read data from sion file.
This is the basic function for reading data from the underlying storage.
[out] | data | pointer to data to be written |
[in] | size | size of a single item |
[in] | nitems | number of items to be written |
[in] | sid | sion file id to be written to |
Definition at line 609 of file sion_common.c.
References _sion_vcdtovcon(), _sion_vcdtype(), and SION_FILEDESCRIPTOR.
size_t sion_fwrite | ( | const void * | data, |
size_t | size, | ||
size_t | nitems, | ||
int | sid | ||
) |
Write data to sion file.
[in] | data | pointer to data to be written |
[in] | size | size of a single item |
[in] | nitems | number of items to be written |
[in] | sid | sion file id to be written to |
Definition at line 470 of file sion_common.c.
int sion_get_current_location | ( | int | sid, |
int * | currentchunknr, | ||
sion_int64 * | currentpos, | ||
int * | maxchunks, | ||
sion_int64 ** | chunksizes | ||
) |
Returns current position in file and pointer fiels containing chunk sizes.
Returns current position in file and pointer fiels containing chunk sizes. This function is only needed if the sion file was opened for reading in parallel mode (sion_paropen..., sion_open_rank).
[in] | sid | sion file handle |
[out] | currentchunknr | number of current block in the file |
[out] | currentpos | position in current block in the file |
[out] | maxchunks | number of last block in the file |
[out] | chunksizes | field containing chunk size of each task |
Definition at line 185 of file sion_common.c.
int sion_get_current_locations | ( | int | sid, |
int * | ntasks, | ||
sion_int64 ** | sion_currentpos, | ||
sion_int64 ** | sion_currentblocknr | ||
) |
Returns current position in file and pointer fiels containing chunk sizes.
Returns current position in file and pointer fiels containing chunk sizes. This function is only needed if the sion file was opened for reading in parallel mode (sion_paropen..., sion_open_rank).
[in] | sid | sion file handle |
[out] | ntasks | number of tasks |
[out] | sion_currentpos | current positions for all ranks |
[out] | sion_currentblocknr | current block number for all ranks |
Definition at line 307 of file sion_common.c.
int sion_get_file_endianness | ( | int | sid | ) |
Returns edianness of data in file sid.
[in] | sid | sion file handle |
Definition at line 253 of file sion_common.c.
Referenced by fsion_get_file_endianness_c().
int sion_get_locations | ( | int | sid, |
int * | ntasks, | ||
int * | maxchunks, | ||
sion_int64 * | globalskip, | ||
sion_int64 * | start_of_varheader, | ||
sion_int64 ** | sion_chunksizes, | ||
sion_int64 ** | sion_globalranks, | ||
sion_int64 ** | sion_blockcount, | ||
sion_int64 ** | sion_blocksizes | ||
) |
Returns pointers to internal fields.
See sion_get_locations_description .
[in] | sid | sion file handle |
[out] | ntasks | number of tasks which wrote to the sion file |
[out] | maxchunks | maximum number of blocks in the file |
[out] | globalskip | distance in bytes between the first bytes of two subsequent chunks of a task |
[out] | start_of_varheader | start position of the meta data block at the end of sion file |
[out] | sion_chunksizes | field containing requested chunk size of each task access: sion_chunksizes[size*chunknr+rank] |
[out] | sion_globalranks | field containing global unique id of each task |
[out] | sion_blockcount | field containing number of blocks used by each task |
[out] | sion_blocksizes | field containing for each task and block the number of bytes used in this chunk e.g. access: sion_blocksizes[size*blocknr+rank] |
Definition at line 84 of file sion_common.c.
Referenced by fsion_get_locations_c().
int sion_get_mapping | ( | int | sid, |
int * | mapping_size, | ||
sion_int32 ** | mapping, | ||
int * | numfiles | ||
) |
Returns pointers to the internal field mapping.
This function is only needed if the sion file was opened for reading in serial mode.
[in] | sid | sion file handle |
[out] | mapping_size | size of mapping vector |
[out] | mapping | pointer to mapping vector |
[out] | numfiles | pointer to mapping vector |
Definition at line 219 of file sion_common.c.