Reference documentation for deal.II version GIT defb42778c 2022-12-05 01:15: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 - 2022 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) || defined(DEAL_II_WITH_PETSC)
27 # include <mpi.h>
29 #else
30 // without MPI, we would still like to use
31 // some constructs with MPI data
32 // types. Therefore, create some dummies
33 using MPI_Comm = int;
34 using MPI_Request = int;
35 using MPI_Datatype = int;
36 using MPI_Op = int;
37 # ifndef MPI_COMM_WORLD
38 # define MPI_COMM_WORLD 0
39 # endif
40 # ifndef MPI_COMM_SELF
41 # define MPI_COMM_SELF 0
42 # endif
43 # ifndef MPI_COMM_NULL
44 # define MPI_COMM_NULL 0
45 # endif
46 # ifndef MPI_REQUEST_NULL
47 # define MPI_REQUEST_NULL 0
48 # endif
49 # ifndef MPI_MIN
50 # define MPI_MIN 0
51 # endif
52 # ifndef MPI_MAX
53 # define MPI_MAX 0
54 # endif
55 # ifndef MPI_SUM
56 # define MPI_SUM 0
57 # endif
58 # ifndef MPI_LOR
59 # define MPI_LOR 0
60 # endif
61 #endif
62 
63 #endif
#define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
Definition: config.h:472
#define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
Definition: config.h:512