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

Go to the source code of this file.

Macros

#define SION_ID   "sion"
 

Functions

int _sion_write_header (_sion_filedesc *sion_filedesc)
 Write the SION Meta Block 1. More...
 
int _sion_write_header_var_info (_sion_filedesc *sion_filedesc)
 Write the SION Meta Block 1. More...
 
int _sion_write_header_var_part_blocksizes (_sion_filedesc *sion_filedesc)
 Write the SION Meta Block 2. More...
 
int _sion_write_header_var_part_mapping (_sion_filedesc *sion_filedesc, sion_int32 mapping_size, sion_int32 *mapping)
 Write mapping into the SION Meta Block 2. More...
 
int _sion_read_header_fix_part (_sion_filedesc *sion_filedesc)
 Read part of the SION Meta Block 1. More...
 
int _sion_read_header_var_part (_sion_filedesc *sion_filedesc)
 Read the second part of SION Meta Block 1. More...
 
int _sion_read_header_var_part_blocksizes (_sion_filedesc *sion_filedesc)
 Read the SION Meta Block 2. More...
 
int _sion_read_header_var_part_blocksizes_rank (_sion_filedesc *sion_filedesc)
 Read the SION Meta Block 2. More...
 
int _sion_read_header_var_part_mapping (_sion_filedesc *sion_filedesc)
 Read the mapping data at end of SION Meta Block 2. More...
 
int _sion_read_header_var_part_mapping_rank (_sion_filedesc *sion_filedesc)
 Read the mapping data at end of SION Meta Block 2. More...
 
int _sion_write_header_var_part_blockcount_from_field (_sion_filedesc *sion_filedesc, int field_size, sion_int64 *field)
 Write the block sizes from Meta Block 2. More...
 
int _sion_write_header_var_part_nextblocksizes_from_field (_sion_filedesc *sion_filedesc, int field_size, sion_int64 *field)
 Write the next set of blocksizes from Meta Block 2 Assuming that filepointer is at the correct position. More...
 
int _sion_read_header_var_part_blockcount_to_field (_sion_filedesc *sion_filedesc, int field_size, sion_int64 *field)
 Read the block sizes from Meta Block 2. More...
 
int _sion_read_header_var_part_nextblocksizes_to_field (_sion_filedesc *sion_filedesc, int field_size, sion_int64 *field)
 Read the next set of blocksizes from Meta Block 2 Assuming that filepointer is at the correct position. More...
 

Detailed Description

example meta data format

Metadata 1:
M11: SIONSTR 4 bytes
endianness sion_uint32
sion_version sion_int32 (not in data structure)
sion_version_patchlevel sion_int32 (not in data structure)
sion_fileformat_version sion_int32
fsblksize sion_int32
ntasks sion_int32
nfiles sion_int32
filenumber sion_int32
flag1 sion_int64
flag2 sion_int64
prefix SION_FILENAME_LENGTH
M12: globalranks(ntasks) ntasks*sion_int64
chunksizes(ntasks) ntasks*sion_int64
M13: maxusedchunks sion_int32
start_of_varheader sion_int64
Metadata 2: (starts at sion_filedesc->start_of_varheader)
M21: all_blockcount ntasks*sion_int64
all_blocksizes ntasks*maxusedchunks*sion_int64
M22: mapping_size sion_int32
mapping mapping_size*2**sion_int32

Definition in file sion_metadata.h.

Macro Definition Documentation

◆ SION_ID

#define SION_ID   "sion"

Sion identification string (offset: 0x00)

Definition at line 14 of file sion_metadata.h.

Function Documentation

◆ _sion_read_header_fix_part()

int _sion_read_header_fix_part ( _sion_filedesc sion_filedesc)

Read part of the SION Meta Block 1.

Parameters
*sion_filedescpointer to internal data structure, contaiing all meta data
Return values
SION_SUCESSif okay

Definition at line 317 of file sion_metadata.c.

◆ _sion_read_header_var_part()

int _sion_read_header_var_part ( _sion_filedesc sion_filedesc)

Read the second part of SION Meta Block 1.

Parameters
*sion_filedescpointer to internal data structure, containing all meta data
Return values
SION_SUCESSif okay

Definition at line 503 of file sion_metadata.c.

◆ _sion_read_header_var_part_blockcount_to_field()

int _sion_read_header_var_part_blockcount_to_field ( _sion_filedesc sion_filedesc,
int  field_size,
sion_int64 *  field 
)

Read the block sizes from Meta Block 2.

Parameters
*sion_filedescpointer to internal data structure, contaiing all meta data
field_sizesize of field
fieldfield where blocksizes will be stored
Return values
SION_SUCESSif okay

Definition at line 566 of file sion_metadata.c.

◆ _sion_read_header_var_part_blocksizes()

int _sion_read_header_var_part_blocksizes ( _sion_filedesc sion_filedesc)

Read the SION Meta Block 2.

Parameters
*sion_filedescpointer to internal data structure, contaiing all meta data
Return values
SION_SUCESSif okay

Definition at line 641 of file sion_metadata.c.

◆ _sion_read_header_var_part_blocksizes_rank()

int _sion_read_header_var_part_blocksizes_rank ( _sion_filedesc sion_filedesc)

Read the SION Meta Block 2.

Parameters
*sion_filedescpointer to internal data structure, contaiing all meta data
Return values
SION_SUCESSif okay

Definition at line 743 of file sion_metadata.c.

◆ _sion_read_header_var_part_mapping()

int _sion_read_header_var_part_mapping ( _sion_filedesc sion_filedesc)

Read the mapping data at end of SION Meta Block 2.

Parameters
*sion_filedescpointer to internal data structure, contaiing all meta data

file pointer will be set to the correct position

Return values
SION_SUCESSif okay

Definition at line 689 of file sion_metadata.c.

◆ _sion_read_header_var_part_mapping_rank()

int _sion_read_header_var_part_mapping_rank ( _sion_filedesc sion_filedesc)

Read the mapping data at end of SION Meta Block 2.

Parameters
*sion_filedescpointer to internal data structure, contaiing all meta data

file pointer will be set to the correct position

Return values
SION_SUCESSif okay

Definition at line 801 of file sion_metadata.c.

◆ _sion_read_header_var_part_nextblocksizes_to_field()

int _sion_read_header_var_part_nextblocksizes_to_field ( _sion_filedesc sion_filedesc,
int  field_size,
sion_int64 *  field 
)

Read the next set of blocksizes from Meta Block 2 Assuming that filepointer is at the correct position.

Parameters
*sion_filedescpointer to internal data structure, contaiing all meta data
field_sizesize of field
fieldfield where blocksizes will be stored
Return values
SION_SUCESSif okay

Definition at line 607 of file sion_metadata.c.

◆ _sion_write_header()

int _sion_write_header ( _sion_filedesc sion_filedesc)

Write the SION Meta Block 1.

Parameters
*sion_filedescpointer to internal data structure, contaiing all meta data
Return values
SION_SUCESSif okay

Definition at line 38 of file sion_metadata.c.

◆ _sion_write_header_var_info()

int _sion_write_header_var_info ( _sion_filedesc sion_filedesc)

Write the SION Meta Block 1.

Parameters
*sion_filedescpointer to internal data structure, containing all meta data
Return values
SION_SUCESSif okay

Definition at line 184 of file sion_metadata.c.

◆ _sion_write_header_var_part_blockcount_from_field()

int _sion_write_header_var_part_blockcount_from_field ( _sion_filedesc sion_filedesc,
int  field_size,
sion_int64 *  field 
)

Write the block sizes from Meta Block 2.

Parameters
*sion_filedescpointer to internal data structure, contaiing all meta data
field_sizesize of field
fieldfield where blocksizes will be stored
Return values
SION_SUCESSif okay

Definition at line 876 of file sion_metadata.c.

◆ _sion_write_header_var_part_blocksizes()

int _sion_write_header_var_part_blocksizes ( _sion_filedesc sion_filedesc)

Write the SION Meta Block 2.

Parameters
*sion_filedescpointer to internal data structure, containing all meta data
Return values
SION_SUCESSif okay

Definition at line 223 of file sion_metadata.c.

◆ _sion_write_header_var_part_mapping()

int _sion_write_header_var_part_mapping ( _sion_filedesc sion_filedesc,
sion_int32  mapping_size,
sion_int32 *  mapping 
)

Write mapping into the SION Meta Block 2.

Parameters
*sion_filedescpointer to internal data structure, containing all meta data
*mapping_sizenumber of tasks in map
*mappingpointer to map
Return values
SION_SUCESSif okay

Definition at line 264 of file sion_metadata.c.

◆ _sion_write_header_var_part_nextblocksizes_from_field()

int _sion_write_header_var_part_nextblocksizes_from_field ( _sion_filedesc sion_filedesc,
int  field_size,
sion_int64 *  field 
)

Write the next set of blocksizes from Meta Block 2 Assuming that filepointer is at the correct position.

Parameters
*sion_filedescpointer to internal data structure, contaiing all meta data
field_sizesize of field
fieldfield where blocksizes will be stored
Return values
SION_SUCESSif okay

Definition at line 916 of file sion_metadata.c.