SIONlib  1.7.7
Scalable I/O library for parallel access to task-local files
Macros | Functions
sion_metadata.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <assert.h>
#include "sion.h"
#include "sion_debug.h"
#include "sion_error_handler.h"
#include "sion_printts.h"
#include "sion_internal.h"
#include "sion_file.h"
#include "sion_filedesc.h"
#include "sion_metadata.h"
Include dependency graph for sion_metadata.c:

Go to the source code of this file.

Macros

#define _XOPEN_SOURCE   700
 
#define DFUNCTION   "_sion_write_header"
 
#define DFUNCTION   "_sion_write_header_var_info"
 
#define DFUNCTION   "_sion_write_header_var_part_blocksizes"
 
#define DFUNCTION   "_sion_write_header_var_part_mapping"
 
#define DFUNCTION   "_sion_read_header_fix_part"
 
#define DFUNCTION   "_sion_read_header_var_part"
 
#define DFUNCTION   "_sion_rd_hdr_var_prt_blkcnt_to_field"
 
#define DFUNCTION   "_sion_rd_hdr_vr_prt_nxtblksizes_to_field"
 
#define DFUNCTION   "_sion_read_header_var_part_blocksizes"
 
#define DFUNCTION   "_sion_read_header_var_part_mapping"
 
#define DFUNCTION   "_sion_read_header_var_part_locations_rank"
 
#define DFUNCTION   "_sion_read_header_var_part_mapping_rank"
 
#define DFUNCTION   "_sion_wr_hdr_var_prt_blkcnt_from_field"
 
#define DFUNCTION   "_sion_wr_hdr_vr_prt_nxtblksizes_from_field"
 

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_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...
 
int _sion_read_header_var_part_blocksizes (_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_blocksizes_rank (_sion_filedesc *sion_filedesc)
 Read the 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...
 

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.