Reference documentation for deal.II version GIT f6a5d312c9 2023-10-04 08:50:02+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
mpi_stub.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2011 - 2023 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_mpi_stub_h
17 #define dealii_mpi_stub_h
18 
19 #include <deal.II/base/config.h>
20 
21 // If we have mpi.h then include it. Otherwise, define some common MPI data
22 // types and global constants for the no-MPI case. This way we can still use,
23 // e.g., MPI_Comm in the API.
24 
25 #if defined(DEAL_II_WITH_MPI)
26 # include <mpi.h>
27 #else
28 // without MPI, we would still like to use
29 // some constructs with MPI data
30 // types. Therefore, create some dummies
31 using MPI_Comm = int;
32 using MPI_Request = int;
33 using MPI_Datatype = int;
34 using MPI_Op = int;
35 # ifndef MPI_COMM_WORLD
36 # define MPI_COMM_WORLD 0
37 # endif
38 # ifndef MPI_COMM_SELF
39 # define MPI_COMM_SELF 0
40 # endif
41 # ifndef MPI_COMM_NULL
42 # define MPI_COMM_NULL 0
43 # endif
44 # ifndef MPI_REQUEST_NULL
45 # define MPI_REQUEST_NULL 0
46 # endif
47 # ifndef MPI_MIN
48 # define MPI_MIN 0
49 # endif
50 # ifndef MPI_MAX
51 # define MPI_MAX 0
52 # endif
53 # ifndef MPI_SUM
54 # define MPI_SUM 0
55 # endif
56 # ifndef MPI_LOR
57 # define MPI_LOR 0
58 # endif
59 #endif
60 
61 #endif