Arcane
v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
MessagePassingMpiGlobal.h
1
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2
//-----------------------------------------------------------------------------
3
// Copyright 2000-2022 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4
// See the top-level COPYRIGHT file for details.
5
// SPDX-License-Identifier: Apache-2.0
6
//-----------------------------------------------------------------------------
7
/*---------------------------------------------------------------------------*/
8
/* MessagePassingMpiGlobal.h (C) 2000-2019 */
9
/* */
10
/* Définitions globales de la composante 'MessagePassingMpi' de 'Arccore'. */
11
/*---------------------------------------------------------------------------*/
12
#ifndef ARCCORE_MESSAGEPASSINGMPI_MESSAGEPASSINGMPIGLOBAL_H
13
#define ARCCORE_MESSAGEPASSINGMPI_MESSAGEPASSINGMPIGLOBAL_H
14
/*---------------------------------------------------------------------------*/
15
/*---------------------------------------------------------------------------*/
16
17
#include "
arccore/message_passing/MessagePassingGlobal.h
"
18
19
/*---------------------------------------------------------------------------*/
20
/*---------------------------------------------------------------------------*/
21
22
// Ces deux macros permettent de s'assurer qu'on ne compile avec le support
23
// de MpiC++ qui est obsolète
24
#ifndef MPICH_SKIP_MPICXX
25
#define MPICH_SKIP_MPICXX
26
#endif
27
#ifndef OMPI_SKIP_MPICXX
28
#define OMPI_SKIP_MPICXX
29
#endif
30
#include <mpi.h>
31
32
// Vérifie la version de MPI minimale. Normalement, on ne devrait pas avoir
33
// de problèmes car cela est vérifié lors de la configuration mais on ne
34
// sait jamais.
35
#if !defined(ARCCORE_OS_WIN32)
36
#if MPI_VERSION < 3 || (MPI_VERSION==3 && MPI_SUBVERSION<1)
37
#error "MPI_VERSION 3.1 is required. Please disable MPI".
38
#endif
39
#endif
40
41
#if defined(ARCCORE_OS_WIN32)
42
// La version de mpi est celle de microsoft. Le proto de MPI_Op doit
43
// avoir la déclaration __stdcall.
44
// TODO: verifier avec d'autres MPI sous Windows.
45
#define ARCCORE_MPIOP_CALL __stdcall
46
#endif
47
48
#ifndef ARCCORE_MPIOP_CALL
49
#define ARCCORE_MPIOP_CALL
50
#endif
51
52
/*---------------------------------------------------------------------------*/
53
/*---------------------------------------------------------------------------*/
54
55
#if defined(ARCCORE_COMPONENT_arccore_message_passing_mpi)
56
#define ARCCORE_MESSAGEPASSINGMPI_EXPORT ARCCORE_EXPORT
57
#define ARCCORE_MESSAGEPASSINGMPI_EXTERN_TPL
58
#else
59
#define ARCCORE_MESSAGEPASSINGMPI_EXPORT ARCCORE_IMPORT
60
#define ARCCORE_MESSAGEPASSINGMPI_EXTERN_TPL extern
61
#endif
62
63
/*---------------------------------------------------------------------------*/
64
/*---------------------------------------------------------------------------*/
65
66
namespace
Arccore::MessagePassing::Mpi
67
{
68
class
MpiRequest;
69
class
MpiAdapter;
70
class
MpiLock;
71
class
IMpiReduceOperator;
72
class
MpiDatatype;
73
class
MpiMessagePassingMng;
74
class
MpiSerializeMessageList;
75
class
MpiSerializeDispatcher;
76
template
<
typename
DataType>
77
class
StdMpiReduceOperator;
78
79
/*---------------------------------------------------------------------------*/
80
/*---------------------------------------------------------------------------*/
81
82
namespace
MpiBuiltIn
83
{
84
85
/*---------------------------------------------------------------------------*/
86
/*---------------------------------------------------------------------------*/
87
88
inline
MPI_Datatype
89
datatype(
char
)
90
{
return
MPI_CHAR; }
91
inline
MPI_Datatype
92
datatype(
unsigned
char
)
93
{
return
MPI_CHAR; }
94
inline
MPI_Datatype
95
datatype(
signed
char
)
96
{
return
MPI_CHAR; }
97
inline
MPI_Datatype
98
datatype(
short
)
99
{
return
MPI_SHORT; }
100
inline
MPI_Datatype
101
datatype(
int
)
102
{
return
MPI_INT; }
103
inline
MPI_Datatype
104
datatype(
float
)
105
{
return
MPI_FLOAT; }
106
inline
MPI_Datatype
107
datatype(
double
)
108
{
return
MPI_DOUBLE; }
109
inline
MPI_Datatype
110
datatype(
long
double
)
111
{
return
MPI_LONG_DOUBLE; }
112
inline
MPI_Datatype
113
datatype(
long
int
)
114
{
return
MPI_LONG; }
115
inline
MPI_Datatype
116
datatype(
unsigned
short
)
117
{
return
MPI_UNSIGNED_SHORT; }
118
inline
MPI_Datatype
119
datatype(
unsigned
int
)
120
{
return
MPI_UNSIGNED; }
121
inline
MPI_Datatype
122
datatype(
unsigned
long
)
123
{
return
MPI_UNSIGNED_LONG; }
124
inline
MPI_Datatype
125
datatype(
long
long
)
126
{
return
MPI_LONG_LONG; }
127
inline
MPI_Datatype
128
datatype(
unsigned
long
long
)
129
{
return
MPI_LONG_LONG; }
130
}
131
132
/*---------------------------------------------------------------------------*/
133
/*---------------------------------------------------------------------------*/
134
135
}
// End namespace Arccore::MessagePassing::Mpi
136
137
/*---------------------------------------------------------------------------*/
138
/*---------------------------------------------------------------------------*/
139
140
#endif
141
MessagePassingGlobal.h
Déclarations générales de la composante 'message_passing'.
arccore
src
message_passing_mpi
arccore
message_passing_mpi
MessagePassingMpiGlobal.h
Généré le Lundi 18 Novembre 2024 03:03:16 pour Arcane par
1.9.8