Escript  Revision_4320
Esys_MPI.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2013 by University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Open Software License version 3.0
9 * http://www.opensource.org/licenses/osl-3.0.php
10 *
11 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development since 2012 by School of Earth Sciences
13 *
14 *****************************************************************************/
15 
16 
17 #ifndef INC_ESYS_MPI
18 #define INC_ESYS_MPI
19 
20 #include "system_dep.h"
21 #include "types.h"
22 
23 #ifdef ESYS_MPI
24  #include "mpi_C.h"
25 #else
26  typedef int MPI_Comm;
27  typedef int MPI_Request;
28  #define MPI_INT 6
29  #define MPI_DOUBLE 11
30  #define MPI_COMM_WORLD 91
31 #endif
32 
33 typedef int Esys_MPI_rank;
34 
35 #define ESYS_MPI_TODO { fprintf( stdout, "\nTODO : %s:%d\n", __FILE__, __LINE__); MPI_Finalize(); exit(1); }
36 
37 /* Datatypes */
38 
40 struct Esys_MPIInfo {
42  int size;
46 };
47 
48 typedef struct Esys_MPIInfo Esys_MPIInfo;
49 
50 /* Function prototypes */
51 
54 
57 
60 
62 int Esys_MPIInfo_initialized( void );
63 
66 
68 dim_t Esys_MPIInfo_setDistribution(Esys_MPIInfo* in ,index_t min_id,index_t max_id,index_t* distribution);
69 
71 void Esys_MPIInfo_Split( Esys_MPIInfo *mpi_info, dim_t n, dim_t* local_N,index_t* offset);
72 
75 
77 char *Esys_MPI_appendRankToFileName(const char *, int, int);
78 
79 #endif /* INC_ESYS_MPI */