Arcane
v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
MpiParallelNonBlockingCollective.cc
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
/* MpiParallelNonBlockingCollective.cc (C) 2000-2016 */
9
/* */
10
/* Implémentation des collectives non bloquantes avec MPI. */
11
/*---------------------------------------------------------------------------*/
12
/*---------------------------------------------------------------------------*/
13
14
#include "arcane/utils/ArcanePrecomp.h"
15
16
#include "arcane/parallel/mpi/MpiParallelMng.h"
17
#include "arcane/parallel/mpi/MpiParallelNonBlockingCollectiveDispatch.h"
18
#include "arcane/parallel/mpi/MpiParallelNonBlockingCollective.h"
19
#include "arcane/parallel/mpi/MpiAdapter.h"
20
21
/*---------------------------------------------------------------------------*/
22
/*---------------------------------------------------------------------------*/
23
24
ARCANE_BEGIN_NAMESPACE
25
26
/*---------------------------------------------------------------------------*/
27
/*---------------------------------------------------------------------------*/
28
29
MpiParallelNonBlockingCollective::
30
MpiParallelNonBlockingCollective(ITraceMng* tm,IParallelMng* pm,MpiAdapter* adapter)
31
: ParallelNonBlockingCollectiveDispatcher(pm)
32
, m_trace_mng(tm)
33
, m_adapter(adapter)
34
{
35
}
36
37
/*---------------------------------------------------------------------------*/
38
/*---------------------------------------------------------------------------*/
39
40
MpiParallelNonBlockingCollective::
41
~MpiParallelNonBlockingCollective()
42
{
43
}
44
45
/*---------------------------------------------------------------------------*/
46
/*---------------------------------------------------------------------------*/
47
48
void
MpiParallelNonBlockingCollective::
49
build()
50
{
51
MpiAdapter
* adapter = m_adapter;
52
ITraceMng
*
tm
= m_trace_mng;
53
auto
c
=
new
MpiParallelNonBlockingCollectiveDispatchT<char>
(
tm
,
this
,adapter);
54
auto
sc
=
new
MpiParallelNonBlockingCollectiveDispatchT<signed char>
(
tm
,
this
,adapter);
55
auto
uc
=
new
MpiParallelNonBlockingCollectiveDispatchT<unsigned char>
(
tm
,
this
,adapter);
56
auto
s =
new
MpiParallelNonBlockingCollectiveDispatchT<short>
(
tm
,
this
,adapter);
57
auto
us
=
new
MpiParallelNonBlockingCollectiveDispatchT<unsigned short>
(
tm
,
this
,adapter);
58
auto
i =
new
MpiParallelNonBlockingCollectiveDispatchT<int>
(
tm
,
this
,adapter);
59
auto
ui
=
new
MpiParallelNonBlockingCollectiveDispatchT<unsigned int>
(
tm
,
this
,adapter);
60
auto
l =
new
MpiParallelNonBlockingCollectiveDispatchT<long>
(
tm
,
this
,adapter);
61
auto
ul
=
new
MpiParallelNonBlockingCollectiveDispatchT<unsigned long>
(
tm
,
this
,adapter);
62
auto
ll
=
new
MpiParallelNonBlockingCollectiveDispatchT<long long>
(
tm
,
this
,adapter);
63
auto
ull
=
new
MpiParallelNonBlockingCollectiveDispatchT<unsigned long long>
(
tm
,
this
,adapter);
64
auto
f =
new
MpiParallelNonBlockingCollectiveDispatchT<float>
(
tm
,
this
,adapter);
65
auto
d =
new
MpiParallelNonBlockingCollectiveDispatchT<double>
(
tm
,
this
,adapter);
66
auto
ld
=
new
MpiParallelNonBlockingCollectiveDispatchT<long double>
(
tm
,
this
,adapter);
67
auto
r2
=
new
MpiParallelNonBlockingCollectiveDispatchT<Real2>
(
tm
,
this
,adapter);
68
auto
r3
=
new
MpiParallelNonBlockingCollectiveDispatchT<Real3>
(
tm
,
this
,adapter);
69
auto
r22
=
new
MpiParallelNonBlockingCollectiveDispatchT<Real2x2>
(
tm
,
this
,adapter);
70
auto
r33
=
new
MpiParallelNonBlockingCollectiveDispatchT<Real3x3>
(
tm
,
this
,adapter);
71
auto
hpr
=
new
MpiParallelNonBlockingCollectiveDispatchT<HPReal>
(
tm
,
this
,adapter);
72
_setDispatchers(
c
,
sc
,
uc
,s,
us
,i,
ui
,l,
ul
,
ll
,
ull
,
73
f,d,
ld
,
r2
,
r3
,
r22
,
r33
,
hpr
);
74
}
75
76
/*---------------------------------------------------------------------------*/
77
/*---------------------------------------------------------------------------*/
78
79
Parallel::Request
MpiParallelNonBlockingCollective::
80
barrier()
81
{
82
return
m_adapter->nonBlockingBarrier();
83
}
84
85
/*---------------------------------------------------------------------------*/
86
/*---------------------------------------------------------------------------*/
87
88
bool
MpiParallelNonBlockingCollective::
89
hasValidReduceForDerivedType()
const
90
{
91
bool
is_valid
=
true
;
92
93
#if defined(OMPI_MAJOR_VERSION) && defined(OMPI_MINOR_VERSION) && defined(OMPI_RELEASE_VERSION)
94
// Pour l'instant toutes les versions connues de OpenMPI (jusqu'à la 1.8.4)
95
// ont un bug pour les reduce sur les types dérivés.
96
is_valid
=
false
;
97
#endif
98
99
return
is_valid
;
100
}
101
102
/*---------------------------------------------------------------------------*/
103
/*---------------------------------------------------------------------------*/
104
105
ARCANE_END_NAMESPACE
106
107
/*---------------------------------------------------------------------------*/
108
/*---------------------------------------------------------------------------*/
Arcane::LimaWrapper
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition
Lima.cc:120
Arccore::ITraceMng
Interface du gestionnaire de traces.
Definition
arccore/src/trace/arccore/trace/ITraceMng.h:156
Arccore::MessagePassing::Mpi::MpiAdapter
Adapteur pour MPI.
Definition
arccore/src/message_passing_mpi/arccore/message_passing_mpi/MpiAdapter.h:50
Arccore::MessagePassing::Request
Requête d'un message.
Definition
Request.h:77
arcane
parallel
mpi
MpiParallelNonBlockingCollective.cc
Généré le Lundi 18 Novembre 2024 03:01:41 pour Arcane par
1.9.8