14 #ifndef SION_SION_FILEDESC_H
15 #define SION_SION_FILEDESC_H
21 #define _SION_FLAG1_NONE 0
22 #define _SION_FLAG2_NONE 0
24 #define _SION_FLAG1_USECACHE 2
27 #define SION_FILESTATE_UNKNOWN -1
28 #define SION_FILESTATE_PAROPEN 0
29 #define SION_FILESTATE_SEROPEN 1
30 #define SION_FILESTATE_SEROPENRANK 2
31 #define SION_FILESTATE_SEROPENMASTER 3
32 #define SION_FILESTATE_PAROPENMAPPEDMASTER 4
33 #define SION_FILESTATE_PAROPENMAPPEDMANAGED 5
34 #define SION_FILESTATE_PAROPENMAPPED 6
35 #define SION_FILESTATE_CLOSE 10
36 #define SION_FILEMODE_UNKNOWN -20
37 #define SION_FILEMODE_READ 20
38 #define SION_FILEMODE_WRITE 30
40 #define SION_CACHE_TODISK 40
41 #define SION_CACHE_TOMEM 41
42 #define SION_CACHE_UNKNOWN 42
43 #define SION_CACHE_FNLEN 16
45 #define SION_DESCSTATE_ORIG 200
46 #define SION_DESCSTATE_DUP 201
47 #define SION_DESCSTATE_DUP_SEL_RANK 202
48 #define SION_DESCSTATE_DUP_SEL_RANK_KEY 203
50 #define SION_HINTS_TYPE_UNKNOWN 160
51 #define SION_HINTS_TYPE_LINUX 161
52 #define SION_HINTS_TYPE_GPFS 162
54 #define SION_CAPABILITY_FULL 50
55 #define SION_CAPABILITY_ONLY_SENDER 51
56 #define SION_CAPABILITY_NONE 52
58 #define _SION_DEBUG_PRINT_ALL 1
59 #define _SION_DEBUG_PRINT_RECURSIVE 2
209 int _sion_alloc_filedesc_all_chunksizes(
_sion_filedesc *sion_filedesc);
210 int _sion_alloc_filedesc_all_startpointers(
_sion_filedesc *sion_filedesc);
211 int _sion_alloc_filedesc_all_globalranks(
_sion_filedesc *sion_filedesc);
212 int _sion_alloc_filedesc_all_localranks(
_sion_filedesc *sion_filedesc);
214 int _sion_alloc_filedesc_all_keyvalptr(
_sion_filedesc *sion_filedesc);
217 int _sion_free_filedesc_all_chunksizes(
_sion_filedesc *sion_filedesc);
218 int _sion_free_filedesc_all_globalranks(
_sion_filedesc *sion_filedesc);
219 int _sion_free_filedesc_all_startpointers(
_sion_filedesc *sion_filedesc);
220 int _sion_free_filedesc_all_localranks(
_sion_filedesc *sion_filedesc);
221 int _sion_free_filedesc_all_keyvalptr(
_sion_filedesc *sion_filedesc);
231 int _sion_alloc_filedesc_arrays_mapped(
_sion_filedesc *sion_filedesc);
232 int _sion_alloc_filedesc_block_arrays_mapped(
_sion_filedesc *sion_filedesc);
int _sion_alloc_filedesc_block_arrays_only(_sion_filedesc *sion_filedesc)
Allocate memory for the internal sion structure, fields for all chunksizes of all tasks.
int _sion_print_filedesc(_sion_filedesc *sion_filedesc, int level, char *desc, int all)
Print the initialized sion file description.
int _sion_init_filedesc(_sion_filedesc *sion_filedesc)
Initialize the sion file description.
int _sion_realloc_filedesc_blocklist(_sion_filedesc *sion_filedesc, sion_int32 maxchunks)
Increase the memory used by the internal sion structure for the blocklist.
int _sion_alloc_filedesc_coll_arrays(_sion_filedesc *sion_filedesc)
Allocate memory for the internal sion arrays.
int _sion_get_size_of_filedesc(_sion_filedesc *sion_filedesc, int *numbytes, int *numfds)
get size of internal data structure sion_filedesc
int _sion_alloc_filedesc_arrays(_sion_filedesc *sion_filedesc)
Allocate memory for the internal sion arrays.
char * _sion_fileptrflags_to_str(unsigned int flag)
_sion_filedesc * _sion_dup_filedesc(_sion_filedesc *sion_filedesc)
duplicates a filedesc data structure, not copying/reopen active file pointers
int _sion_free_filedesc_arrays(_sion_filedesc *sion_filedesc)
free memory for the internal sion arrays
_sion_filedesc * _sion_alloc_filedesc(void)
Allocates memory for internal sion structure.
int _sion_free_filedesc_coll_arrays(_sion_filedesc *sion_filedesc)
free memory for the internal sion arrays
int _sion_alloc_filedesc_block_arrays(_sion_filedesc *sion_filedesc)
Allocate memory for the internal sion structure, fields for all chunksizes of all tasks.
Sion File Descriptor Structure.
sion_int64 * all_localranks
sion_int64 * all_blocksizes
char cachefn[SION_CACHE_FNLEN]
sion_int32 * all_coll_collsize
sion_int32 * all_coll_collector
sion_int32 filesionversion
sion_int32 nlocaltasksinfile
sion_int64 start_of_varheader
sion_int32 filesionpatchlevel
sion_int64 * all_chunksizes
sion_int64 * all_currentpos
sion_int32 filemanagedbytask
sion_int64 * all_currentblocknr
sion_int32 fileptr_exported
_sion_filedesc ** multifiles
sion_int64 * all_globalranks
sion_int32 ntotaltasksinfile
sion_int32 currentblocknr
sion_int32 * all_coll_capability
sion_int32 coll_capability
sion_int64 * all_startpointers
sion_int64 * all_blockcount