SIONlib  1.7.7
Scalable I/O library for parallel access to task-local files
sion_generic_internal.h
Go to the documentation of this file.
1 /****************************************************************************
2 ** SIONLIB http://www.fz-juelich.de/jsc/sionlib **
3 *****************************************************************************
4 ** Copyright (c) 2008-2019 **
5 ** Forschungszentrum Juelich, Juelich Supercomputing Centre **
6 ** **
7 ** See the file COPYRIGHT in the package base directory for details **
8 ****************************************************************************/
9 
14 #ifndef SION_SION_GENERIC_INTERNAL_H
15 #define SION_SION_GENERIC_INTERNAL_H
16 
17 #include "sion_const.h"
18 #include "sion_buddy_common.h"
19 #include "sion_datatypes.h"
20 #include "sion_filedesc.h"
21 #include "sion_flags.h"
22 #include "sion_generic_apidesc.h"
23 
24 #define _SION_INTERNAL_FLAG_NORMAL 1
25 #define _SION_INTERNAL_FLAG_BUDDY_NORMAL 2
26 #define _SION_INTERNAL_FLAG_BUDDY_SEND 4
27 #define _SION_INTERNAL_FLAG_BUDDY_COLL 8
28 #define _SION_INTERNAL_FLAG_BUDDY_READ 16
29 #define _SION_INTERNAL_FLAG_UNKNOWN 32
30 
31 /* internal interface routines, containing parallel functionality (e.g. meta data management) */
33  int sid,
34  char *fname,
35  _sion_flags_store *flags_store,
36  char *prefix,
37  int *numFiles,
38  int *filenumber,
39  sion_int64 *chunksize,
40  sion_int32 *fsblksize,
41  int rank,
42  int ntasks,
43  int *globalrank,
44  int flag,
45  FILE **fileptr,
46  _sion_generic_gendata *sion_gendata,
47  _sion_generic_buddy *buddy_info);
48 
49 int _sion_parclose_generic(int sid,
50  int rank,
51  int ntasks,
52  int mapping_size,
53  sion_int32 *mapping,
54  int flag,
55  _sion_generic_gendata *sion_gendata,
56  _sion_generic_buddy *buddy_info);
57 
59  int sid,
60  sion_int64 chunksize,
61  int rank,
62  int ntasks,
63  _sion_generic_gendata *sion_gendata);
64 
65 /* internal functions */
66 int _sion_generic_get_and_distribute_info_from_file( _sion_generic_gendata *sion_gendata, const char *fname);
67 int _sion_generic_collect_mapping( _sion_filedesc *sion_filedesc,
68  int *mapping_size,
69  sion_int32 **mapping );
71 int _sion_generic_is_candidate(_sion_generic_gendata *comm);
72 
73 #endif
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_info)
Internal function to close parallel opened SION 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_info)
Generic parallel open of one direct access file.
int _sion_generic_renumber_collmsa(_sion_generic_gendata *comm, _sion_flags_store *flags)
Splits a Communicator in numfiles different communicators.
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)
Sion File Descriptor Structure.
Definition: sion_filedesc.h:79