Block-Structured AMR Software Framework
AMReX_ccse-mpi.H
Go to the documentation of this file.
1 
2 #ifndef BL_CCSE_MPI_H_
3 #define BL_CCSE_MPI_H_
4 #include <AMReX_Config.H>
5 
6 //
7 // This header encapsulates the MPI header.
8 //
9 // By placing <mpi.h> here we make it easier to recompile with or w/o MPI.
10 //
11 
12 #ifdef BL_USE_MPI
13 
14 #include <mpi.h>
15 
17 {
18  using lull_t = unsigned long long[8];
19 
20  template <class T>
22  struct Mpi_typemap
23  {
24  static MPI_Datatype type();
25  };
26  //
27  // Template functions to return MPI_Datatype depending on argument type.
28  //
42 }
43 
44 #else
45 
46 using MPI_Op = int;
47 using MPI_Comm = int;
48 using MPI_Group = int;
49 using MPI_Datatype = int;
50 using MPI_Request = int;
51 struct MPI_Status {};
52 static constexpr int MPI_DATATYPE_NULL = 0;
53 static constexpr int MPI_REQUEST_NULL = 0;
54 static constexpr int MPI_COMM_WORLD = 0;
55 static constexpr int MPI_COMM_NULL = 0;
56 static constexpr int MPI_GROUP_NULL = 0;
57 static constexpr int MPI_PROC_NULL = 0;
58 static constexpr int MPI_MAX_PROCESSOR_NAME = 64;
59 
60 static constexpr int MPI_MINLOC = 0;
61 static constexpr int MPI_MAXLOC = 0;
62 
64 {
65  template <class T>
67  struct Mpi_typemap
68  {
69  static MPI_Datatype type();
70  };
71 }
72 
73 #endif /*BL_USE_MPI*/
74 
75 #endif
static constexpr int MPI_GROUP_NULL
Definition: AMReX_ccse-mpi.H:56
int MPI_Comm
Definition: AMReX_ccse-mpi.H:47
int MPI_Request
Definition: AMReX_ccse-mpi.H:50
int MPI_Group
Definition: AMReX_ccse-mpi.H:48
int MPI_Op
Definition: AMReX_ccse-mpi.H:46
static constexpr int MPI_COMM_WORLD
Definition: AMReX_ccse-mpi.H:54
static constexpr int MPI_PROC_NULL
Definition: AMReX_ccse-mpi.H:57
static constexpr int MPI_COMM_NULL
Definition: AMReX_ccse-mpi.H:55
static constexpr int MPI_MAXLOC
Definition: AMReX_ccse-mpi.H:61
static constexpr int MPI_MAX_PROCESSOR_NAME
Definition: AMReX_ccse-mpi.H:58
static constexpr int MPI_DATATYPE_NULL
Definition: AMReX_ccse-mpi.H:52
int MPI_Datatype
Definition: AMReX_ccse-mpi.H:49
static constexpr int MPI_REQUEST_NULL
Definition: AMReX_ccse-mpi.H:53
static constexpr int MPI_MINLOC
Definition: AMReX_ccse-mpi.H:60
Parallel frontend that abstracts functionalities needed to spawn processes and handle communication.
Definition: AMReX_ccse-mpi.H:64
const int[]
Definition: AMReX_BLProfiler.cpp:1664
Definition: AMReX_ccse-mpi.H:51
Communication datatype (note: this structure also works without MPI)
Definition: AMReX_ccse-mpi.H:68