SIONlib  1.7.0
Scalable I/O library for parallel access to task-local files
sion_mpi_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_MPI_INTERNAL
15 #define SION_SION_MPI_INTERNAL
16 
17 
18 #define USE_PMPIno
19 #ifdef USE_PMPI
20 #define MPI_Comm_rank PMPI_Comm_rank
21 #define MPI_Comm_size PMPI_Comm_size
22 #define MPI_Gather PMPI_Gather
23 #define MPI_Scatter PMPI_Scatter
24 #define MPI_Bcast PMPI_Bcast
25 #define MPI_Barrier PMPI_Barrier
26 #define MPI_Comm_split PMPI_Comm_split
27 #define MPI_Send PMPI_Send
28 #define MPI_Recv PMPI_Recv
29 #endif
30 
31 #if defined(_BGL)
32 #include <rts.h>
33 #ifndef __USE_FILE_OFFSET64
34 #define __USE_FILE_OFFSET64
35 #endif
36 #endif
37 
38 #ifdef SION_MPI
39 
41  MPI_Comm gComm;
42  MPI_Comm lComm;
43  double ts;
44  int blocksize;
45  int step;
46 };
48 
49 int _sion_gen_info_from_gcomm_mpi(int numFiles, MPI_Comm gComm, int *filenumber, int *lrank, int *lsize);
50 int _sion_get_info_from_splitted_comm_mpi(MPI_Comm gComm, MPI_Comm lComm, int *numComm, int *CommNumber, int *lrank, int *lsize);
51 
52 int _sion_get_numfiles_from_file_mpi(char *fname);
53 int _sion_get_filenumber_from_files_mpi(char *fname, MPI_Comm gComm, int *numfiles, int *filenumber, int *lRank);
54 int _sion_errorprint_mpi(int rc, int level, const char *format, ...);
55 
56 #endif
57 
58 #endif
int _sion_gen_info_from_gcomm_mpi(int numFiles, MPI_Comm gComm, int *filenumber, int *lrank, int *lsize)
Splits a Communicator in numfiles different communicators.