SIONlib  1.7.7
Scalable I/O library for parallel access to task-local files
sion_ompi_internal_gen.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_OMPI_INTERNAL_GEN_H
15 #define SION_SION_OMPI_INTERNAL_GEN_H
16 
17 #ifdef SION_OMPI
18 
19 #include "mpi.h"
20 
21 #include "sion_const.h"
22 
23 struct __ompi_thread_sync_struct
24 {
25  int grank_master_mpi;
26  int grank_master_ompi;
27  int lrank_master_mpi;
28  int lrank_master_ompi;
29  int gsize_mpi;
30  int gsize_ompi;
31  int lsize_mpi;
32  int lsize_ompi;
33  int num_threads;
34  int numFiles;
35  int filenumber;
36 };
37 
38 typedef struct __ompi_thread_sync_struct __ompi_thread_sync;
39 
40 
41 int _sion_gen_info_from_gcomm_ompi(int numFiles, MPI_Comm gComm, int *filenumber, int *lrank, int *lsize);
42 int _sion_get_info_from_splitted_comm_ompi(MPI_Comm gComm, MPI_Comm lComm, int *numComm, int *CommNumber, int *lrank, int *lsize);
43 
44 int _sion_get_size_ompi(int ompi_rank, int num_threads);
45 int _sion_map_rank_mpi_to_ompi(int mpi_rank, int num_threads, int thread_num);
46 int _sion_map_rank_ompi_to_mpi(int ompi_rank, int num_threads);
47 int _sion_map_rank_ompi_to_thread_num(int ompi_rank, int num_threads);
48 
49 
50 int _sion_errorprint_ompi(int rc, int level, const char *format, ...);
51 
52 #endif
53 
54 #endif