SIONlib  1.7.1
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-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_OMPI_INTERNAL_GEN
15 #define SION_SION_OMPI_INTERNAL_GEN
16 
17 #if defined(_BGL)
18 #include <rts.h>
19 #ifndef __USE_FILE_OFFSET64
20 #define __USE_FILE_OFFSET64
21 #endif
22 #endif
23 
24 #ifdef SION_OMPI
25 
26 struct __ompi_thread_sync_struct
27 {
28  int grank_master_mpi;
29  int grank_master_ompi;
30  int lrank_master_mpi;
31  int lrank_master_ompi;
32  int gsize_mpi;
33  int gsize_ompi;
34  int lsize_mpi;
35  int lsize_ompi;
36  int num_threads;
37  int numFiles;
38  int filenumber;
39 };
40 
41 typedef struct __ompi_thread_sync_struct __ompi_thread_sync;
42 
43 
44 int _sion_gen_info_from_gcomm_ompi(int numFiles, MPI_Comm gComm, int *filenumber, int *lrank, int *lsize);
45 int _sion_get_info_from_splitted_comm_ompi(MPI_Comm gComm, MPI_Comm lComm, int *numComm, int *CommNumber, int *lrank, int *lsize);
46 
47 int _sion_get_size_ompi(int ompi_rank, int num_threads);
48 int _sion_map_rank_mpi_to_ompi(int mpi_rank, int num_threads, int thread_num);
49 int _sion_map_rank_ompi_to_mpi(int ompi_rank, int num_threads);
50 int _sion_map_rank_ompi_to_thread_num(int ompi_rank, int num_threads);
51 
52 
53 int _sion_errorprint_ompi(int rc, int level, const char *format, ...);
54 
55 #endif
56 
57 #endif