SIONlib  1.7.0
Scalable I/O library for parallel access to task-local files
sion_omp_cb_gen.h
Go to the documentation of this file.
1 /****************************************************************************
2 ** SIONLIB http://www.fz-juelich.de/jsc/sionlib **
3 *****************************************************************************
4 ** Copyright (c) 2008-2016 **
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_OMP_CB
15 #define SION_SION_OMP_CB
16 
17 #ifdef SION_OMP
18 
19 typedef struct _omp_api_commdata_struct _omp_api_commdata;
20 struct _omp_api_commdata_struct {
21  int commset;
22  int thread_num;
23  int num_threads;
24 };
25 
26 int _sion_register_callbacks_omp();
27 
28 int _sion_omp_create_lcg_cb(void **local_commgroup, void *global_commgroup,
29  int grank, int gsize,
30  int lrank, int lsize,
31  int filenumber, int numfiles
32  );
33 int _sion_omp_free_lcg_cb(void *local_commgroup);
34 
35 
36 int _sion_omp_barrier_cb(void *commdata);
37 int _sion_omp_bcastr_cb(void *data, void *commdata, int dtype, int nelem, int root);
38 int _sion_omp_gatherr_cb(void *indata, void *outdata, void *commdata, int dtype, int nelem, int root);
39 int _sion_omp_scatterr_cb(void *indata, void *outdata, void *commdata, int dtype, int nelem, int root);
40 int _sion_omp_gathervr_cb(void *indata, void *outdata, void *commdata, int dtype, int *counts, int nelem, int root);
41 int _sion_omp_scattervr_cb(void *indata, void *outdata, void *commdata, int dtype, int *counts, int nelem, int root);
42 
43 /* collective gather/scatter & process operation: */
44 /* this function collects on tasks <collector> data from a number of
45  tasks (<range_start> to <range_end>) and calls for each tasks the process function.
46  Additionally to the binary data a spec vector has also to be collected.
47  the process function has two parameters: indata and spec (from each task)
48  spec[0] -> offset, spec[1] -> len
49  Constraints:
50  - process must be called in the order of the ranks from data is collected
51  - process can be called multiple times if data is split in multiple parts (because of buffer size)
52  spec[0] and spec[1] have to be adjusted in that case
53 */
54 
55 int _sion_omp_gather_process_cb(const void *indata, sion_int64 *spec, int spec_len, sion_int64 fsblksize,
56  void *commdata, int collector, int range_start, int range_end, int sid,
57  int process_cb(const void *,sion_int64 *, int ) );
58 
59 int _sion_omp_process_scatter_cb(void *outdata, sion_int64 *spec, int spec_len, sion_int64 fsblksize,
60  void *commdata, int collector, int range_start, int range_end, int sid,
61  int process_cb(void *,sion_int64 *, int ) );
62 
63 int _sion_omp_get_capability_cb(void *commdata );
64 
65 #endif
66 
67 #endif