SIONlib  1.7.7
Scalable I/O library for parallel access to task-local files
Macros | Functions
sion_generic_internal.c File Reference

Internal Functions(parallel) More...

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "sion.h"
#include "sion_debug.h"
#include "sion_error_handler.h"
#include "sion_file.h"
#include "sion_filedesc.h"
#include "sion_fd.h"
#include "sion_metadata.h"
#include "sion_internal.h"
#include "sion_printts.h"
#include "sion_keyvalue.h"
#include "sion_flags.h"
#include "sion_cache.h"
#include "sion_buffer.h"
#include "sion_hints.h"
#include "sion_generic_internal.h"
#include "sion_generic_collective.h"
#include "sion_generic_buddy.h"
#include "sion_internal_startptr.h"
Include dependency graph for sion_generic_internal.c:

Go to the source code of this file.

Macros

#define _XOPEN_SOURCE   700
 
#define BGFLUSH
 
#define DFUNCTION   "_sion_generic_collect_mapping"
 collect mapping information on rank 0 of first file, mapping=NULL for all others More...
 

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_data)
 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_data)
 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_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)
 

Detailed Description

Internal Functions(parallel)

Date
Sep 2, 2008
Author
gstu0808

Definition in file sion_generic_internal.c.

Macro Definition Documentation

◆ DFUNCTION

#define DFUNCTION   "_sion_generic_collect_mapping"

collect mapping information on rank 0 of first file, mapping=NULL for all others

Returns
1 if successful

Definition at line 1022 of file sion_generic_internal.c.

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.