Block-Structured AMR Software Framework
 
Loading...
Searching...
No Matches
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
44namespace amrex::mpidatatypes {}
45
46#else
47
49
50using MPI_Op = int;
51using MPI_Comm = int;
52using MPI_Group = int;
53using MPI_Datatype = int;
54using MPI_Request = int;
55struct MPI_Status {};
56static constexpr int MPI_DATATYPE_NULL = 0;
57static constexpr int MPI_REQUEST_NULL = 0;
58static constexpr int MPI_COMM_WORLD = 0;
59static constexpr int MPI_COMM_NULL = 0;
60static constexpr int MPI_GROUP_NULL = 0;
61static constexpr int MPI_PROC_NULL = 0;
62static constexpr int MPI_MAX_PROCESSOR_NAME = 64;
63
64static constexpr int MPI_MINLOC = 0;
65static constexpr int MPI_MAXLOC = 0;
66
67}
68
69namespace amrex {
70 using namespace mpidatatypes;
71}
72
74{
75 template <class T>
78 {
80 };
81}
82
83#endif /*BL_USE_MPI*/
84
85#endif
Parallel frontend that abstracts functionalities needed to spawn processes and handle communication.
Definition AMReX_ccse-mpi.H:74
Definition AMReX_ccse-mpi.H:48
static constexpr int MPI_DATATYPE_NULL
Definition AMReX_ccse-mpi.H:56
static constexpr int MPI_GROUP_NULL
Definition AMReX_ccse-mpi.H:60
static constexpr int MPI_PROC_NULL
Definition AMReX_ccse-mpi.H:61
int MPI_Comm
Definition AMReX_ccse-mpi.H:51
static constexpr int MPI_COMM_WORLD
Definition AMReX_ccse-mpi.H:58
int MPI_Group
Definition AMReX_ccse-mpi.H:52
int MPI_Op
Definition AMReX_ccse-mpi.H:50
int MPI_Request
Definition AMReX_ccse-mpi.H:54
static constexpr int MPI_COMM_NULL
Definition AMReX_ccse-mpi.H:59
static constexpr int MPI_REQUEST_NULL
Definition AMReX_ccse-mpi.H:57
static constexpr int MPI_MAXLOC
Definition AMReX_ccse-mpi.H:65
static constexpr int MPI_MINLOC
Definition AMReX_ccse-mpi.H:64
int MPI_Datatype
Definition AMReX_ccse-mpi.H:53
static constexpr int MPI_MAX_PROCESSOR_NAME
Definition AMReX_ccse-mpi.H:62
Definition AMReX_Amr.cpp:49
Communication datatype (note: this structure also works without MPI)
Definition AMReX_ccse-mpi.H:78
Definition AMReX_ccse-mpi.H:55