SpM Handbook 1.2.4
Loading...
Searching...
No Matches
mpi.h
Go to the documentation of this file.
1/**
2 *
3 * @file spm/mpi.h
4 *
5 * @copyright 2013-2024 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
6 * Univ. Bordeaux. All rights reserved.
7 *
8 * Definition of the MPI interface for the SPM
9 *
10 * @version 1.2.4
11 * @author Mathieu Faverge
12 * @author Tony Delarue
13 * @author Pierre Ramet
14 * @author Alycia Lisito
15 * @date 2024-07-02
16 *
17 */
18#ifndef _spm_mpi_h_
19#define _spm_mpi_h_
20
21#ifndef DOXYGEN_SHOULD_SKIP_THIS
22
23#if defined(SPM_WITH_MPI)
24
25#include <mpi.h>
26
27#define SPM_MPI_COMPLEX64 MPI_C_DOUBLE_COMPLEX
28#define SPM_MPI_COMPLEX32 MPI_C_FLOAT_COMPLEX
29#define SPM_MPI_DOUBLE MPI_DOUBLE
30#define SPM_MPI_FLOAT MPI_FLOAT
31
32typedef MPI_Comm SPM_Comm;
33
34#else
35
36/* Define alternative Communicators for no MPI compilation */
37typedef int SPM_Comm;
38
39#ifndef MPI_COMM_WORLD
40#define MPI_COMM_WORLD 0
41#endif
42
43#ifndef MPI_COMM_SELF
44#define MPI_COMM_SELF 1
45#endif
46
47#ifndef MPI_Comm_f2c
48#define MPI_Comm_f2c( _comm_ ) (_comm_)
49#endif
50
51#endif /* defined(SPM_WITH_MPI) */
52
53#endif /* DOXYGEN_SHOULD_SKIP_THIS */
54
55#endif /* _spm_mpi_h_ */
56