Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
IParallelMng.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 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/* IParallelMng.h (C) 2000-2025 */
9/* */
10/* Interface of the parallelism manager on a subdomain. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IPARALLELMNG_H
13#define ARCANE_CORE_IPARALLELMNG_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
25namespace Arcane
26{
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30
31/*!
32 * \ingroup Parallel
33 * \brief Interface of the parallelism manager for a subdomain.
34 *
35 * This manager provides an interface to access
36 * all functionalities related to parallelism.
37 *
38 * Several possible implementations exist:
39 * - sequential mode.
40 * - parallel mode via MPI
41 * - parallel mode via threads.
42 * - mixed MPI/threads parallel mode.
43 * The choice of implementation is made when launching the application.
44 *
45 * When an operation is collective, all associated managers must
46 * participate.
47 *
48 * It is possible to create another manager from an instance
49 * containing a subset of ranks via createSubParallelMng().
50 *
51 */
52class ARCANE_CORE_EXPORT IParallelMng
53{
55 // Class to access _internalUtilsFactory()
56 friend class ParallelMngUtilsAccessor;
57
58 public:
59
60 // NOTE: Temporarily keeping this public destructor while
61 // createParallelMng() methods exist for compatibility with the existing code
62 virtual ~IParallelMng() = default; //!< Releases resources.
63
64 public:
65
66 typedef Parallel::Request Request;
67 using PointToPointMessageInfo = Parallel::PointToPointMessageInfo;
68 using MessageId = Parallel::MessageId;
69 using MessageSourceInfo = Parallel::MessageSourceInfo;
70 typedef Parallel::eReduceType eReduceType;
71 typedef Parallel::IStat IStat;
72
73 public:
74
75 //! Constructs the instance.
76 virtual void build() = 0;
77
78 public:
79
80 /*!
81 * \brief Returns true if the execution is parallel.
82 *
83 * The execution is parallel if the instance implements
84 * a message exchange mechanism such as MPI.
85 */
86 virtual bool isParallel() const = 0;
87
88 private:
89
90 // NOTE: Temporarily leaving these two methods to maintain binary compatibility.
91
92 //! Subdomain number associated with this manager.
93 virtual ARCANE_DEPRECATED Integer subDomainId() const final { return commRank(); }
94
95 //! Total number of subdomains.
96 virtual ARCANE_DEPRECATED Integer nbSubDomain() const final { return commSize(); }
97
98 public:
99
100 //! Rank of this instance in the communicator
101 virtual Int32 commRank() const = 0;
102
103 //! Number of instances in the communicator
104 virtual Int32 commSize() const = 0;
105
106 /*!
107 * \brief Address of the MPI communicator associated with this manager.
108 *
109 * The communicator is only valid if MPI is used. Otherwise, the returned address
110 * is 0. The returned value is of type (MPI_Comm*).
111 */
112 virtual void* getMPICommunicator() = 0;
113
114 /*!
115 * \brief Address of the MPI communicator associated with this manager.
116 *
117 * \deprecated Use getMPICommunicator() instead.
118 */
119 virtual ARCANE_DEPRECATED_120 void* mpiCommunicator();
120
121 /*!
122 * \brief MPI communicator associated with this manager
123 *
124 * The communicator is only valid if MPI is used. It is possible
125 * to test its validity by calling the Communicator::isValid() method.
126 * If it is valid, it is possible to retrieve its value via a cast:
127 * \code
128 * IParallelMng* pm = ...;
129 * MPI_Comm c = static_cast<MPI_Comm>(pm->communicator());
130 * \endcode
131 */
133
134 /**
135 * \brief MPI communicator derived from the communicator \a communicator()
136 * gathering all processes of the compute node.
137 *
138 * The communicator is only valid if MPI is used. It is possible
139 * to test its validity by calling the Communicator::isValid() method.
140 * If it is valid, it is possible to retrieve its value via a cast:
141 * \code
142 * IParallelMng* pm = ...;
143 * MPI_Comm mc = static_cast<MPI_Comm>(pm->machineCommunicator());
144 * \endcode
145 */
146 virtual Parallel::Communicator machineCommunicator() const { return {}; }
147
148 /*!
149 * \brief Indicates if the implementation uses threads.
150 *
151 * The implementation uses threads either in pure thread mode,
152 * or in mixed MPI/thread mode.
153 */
154 virtual bool isThreadImplementation() const = 0;
155
156 /*!
157 * \brief Indicates if the implementation uses hybrid mode.
158 *
159 * The implementation uses mixed MPI/thread mode.
160 */
161 virtual bool isHybridImplementation() const = 0;
162
163 //! Sets the statistics manager
164 virtual void setTimeStats(ITimeStats* time_stats) = 0;
165
166 //! Associated statistics manager (can be null)
167 virtual ITimeStats* timeStats() const = 0;
168
169 //! Trace manager
170 virtual ITraceMng* traceMng() const = 0;
171
172 //! Thread manager
173 virtual IThreadMng* threadMng() const = 0;
174
175 //! Timer manager
176 virtual ITimerMng* timerMng() const = 0;
177
178 //! I/O manager
179 virtual IIOMng* ioMng() const = 0;
180
181 //! Parallelism manager over all allocated resources
182 virtual IParallelMng* worldParallelMng() const = 0;
183
184 //! Initializes the parallelism manager
185 virtual void initialize() = 0;
186
187 //! Arccore temporal statistics collector (can be null)
188 virtual ITimeMetricCollector* timeMetricCollector() const = 0;
189
190 public:
191 public:
192
193 //! \a true if the instance is a master I/O manager.
194 virtual bool isMasterIO() const = 0;
195
196 /*!
197 \brief Rank of the instance managing I/O (for which isMasterIO() is true)
198 *
199 * In the current implementation, this is always the rank 0 processor.
200 */
201 virtual Integer masterIORank() const = 0;
202
203 //! @name allGather
204 //@{
205 /*!
206 * \brief Performs an all-gather operation across all processors.
207 * This is a collective operation. The array \a send_buf
208 * must have the same size, denoted \a n, for all processors, and
209 * the array \a recv_buf must have a size equal to the number
210 * of processors multiplied by \a n.
211 */
212 virtual void allGather(ConstArrayView<char> send_buf, ArrayView<char> recv_buf) = 0;
213 virtual void allGather(ConstArrayView<unsigned char> send_buf, ArrayView<unsigned char> recv_buf) = 0;
214 virtual void allGather(ConstArrayView<signed char> send_buf, ArrayView<signed char> recv_buf) = 0;
215 virtual void allGather(ConstArrayView<short> send_buf, ArrayView<short> recv_buf) = 0;
216 virtual void allGather(ConstArrayView<unsigned short> send_buf, ArrayView<unsigned short> recv_buf) = 0;
217 virtual void allGather(ConstArrayView<int> send_buf, ArrayView<int> recv_buf) = 0;
218 virtual void allGather(ConstArrayView<unsigned int> send_buf, ArrayView<unsigned int> recv_buf) = 0;
219 virtual void allGather(ConstArrayView<long> send_buf, ArrayView<long> recv_buf) = 0;
220 virtual void allGather(ConstArrayView<unsigned long> send_buf, ArrayView<unsigned long> recv_buf) = 0;
221 virtual void allGather(ConstArrayView<long long> send_buf, ArrayView<long long> recv_buf) = 0;
223 virtual void allGather(ConstArrayView<float> send_buf, ArrayView<float> recv_buf) = 0;
224 virtual void allGather(ConstArrayView<double> send_buf, ArrayView<double> recv_buf) = 0;
225 virtual void allGather(ConstArrayView<long double> send_buf, ArrayView<long double> recv_buf) = 0;
226 virtual void allGather(ConstArrayView<APReal> send_buf, ArrayView<APReal> recv_buf) = 0;
227 virtual void allGather(ConstArrayView<Real2> send_buf, ArrayView<Real2> recv_buf) = 0;
228 virtual void allGather(ConstArrayView<Real3> send_buf, ArrayView<Real3> recv_buf) = 0;
229 virtual void allGather(ConstArrayView<Real2x2> send_buf, ArrayView<Real2x2> recv_buf) = 0;
230 virtual void allGather(ConstArrayView<Real3x3> send_buf, ArrayView<Real3x3> recv_buf) = 0;
231 virtual void allGather(ConstArrayView<HPReal> send_buf, ArrayView<HPReal> recv_buf) = 0;
232 virtual void allGather(ISerializer* send_serializer, ISerializer* recv_serializer) = 0;
233 //@}
234
235 //! @name gather
236 //@{
237 /*!
238 * \brief Performs a gather operation onto a processor.
239 * This is a collective operation. The array \a send_buf
240 * must have the same size, denoted \a n, for all processors, and
241 * the array \a recv_buf for processor \a rank must have a size equal to the number
242 * of processors multiplied by \a n. This array \a recv_buf is unused for
243 * other ranks than \a rank.
244 */
245 virtual void gather(ConstArrayView<char> send_buf, ArrayView<char> recv_buf, Int32 rank) = 0;
246 virtual void gather(ConstArrayView<unsigned char> send_buf, ArrayView<unsigned char> recv_buf, Int32 rank) = 0;
247 virtual void gather(ConstArrayView<signed char> send_buf, ArrayView<signed char> recv_buf, Int32 rank) = 0;
248 virtual void gather(ConstArrayView<short> send_buf, ArrayView<short> recv_buf, Int32 rank) = 0;
249 virtual void gather(ConstArrayView<unsigned short> send_buf, ArrayView<unsigned short> recv_buf, Int32 rank) = 0;
250 virtual void gather(ConstArrayView<int> send_buf, ArrayView<int> recv_buf, Int32 rank) = 0;
251 virtual void gather(ConstArrayView<unsigned int> send_buf, ArrayView<unsigned int> recv_buf, Int32 rank) = 0;
252 virtual void gather(ConstArrayView<long> send_buf, ArrayView<long> recv_buf, Int32 rank) = 0;
253 virtual void gather(ConstArrayView<unsigned long> send_buf, ArrayView<unsigned long> recv_buf, Int32 rank) = 0;
254 virtual void gather(ConstArrayView<long long> send_buf, ArrayView<long long> recv_buf, Int32 rank) = 0;
255 virtual void gather(ConstArrayView<unsigned long long> send_buf, ArrayView<unsigned long long> recv_buf, Int32 rank) = 0;
256 virtual void gather(ConstArrayView<float> send_buf, ArrayView<float> recv_buf, Int32 rank) = 0;
257 virtual void gather(ConstArrayView<double> send_buf, ArrayView<double> recv_buf, Int32 rank) = 0;
258 virtual void gather(ConstArrayView<long double> send_buf, ArrayView<long double> recv_buf, Int32 rank) = 0;
259 virtual void gather(ConstArrayView<APReal> send_buf, ArrayView<APReal> recv_buf, Int32 rank) = 0;
260 virtual void gather(ConstArrayView<Real2> send_buf, ArrayView<Real2> recv_buf, Int32 rank) = 0;
261 virtual void gather(ConstArrayView<Real3> send_buf, ArrayView<Real3> recv_buf, Int32 rank) = 0;
262 virtual void gather(ConstArrayView<Real2x2> send_buf, ArrayView<Real2x2> recv_buf, Int32 rank) = 0;
263 virtual void gather(ConstArrayView<Real3x3> send_buf, ArrayView<Real3x3> recv_buf, Int32 rank) = 0;
264 virtual void gather(ConstArrayView<HPReal> send_buf, ArrayView<HPReal> recv_buf, Int32 rank) = 0;
265 //@}
266
267 //! @name allGather variable
268 //@{
269
270 /*!
271 * \brief Performs an all-gather operation across all processors.
272 *
273 * This is a collective operation. The number of elements in the array
274 * \a send_buf may be different for each processor. The array
275 * \a recv_buf contains the concatenation of the \a send_buf
276 * arrays from each processor. This array \a recv_buf may be resized
277 * for the processor of rank \a rank.
278 */
280 Array<char>& recv_buf, Int32 rank) = 0;
281 virtual void gatherVariable(ConstArrayView<signed char> send_buf,
282 Array<signed char>& recv_buf, Int32 rank) = 0;
283 virtual void gatherVariable(ConstArrayView<unsigned char> send_buf,
284 Array<unsigned char>& recv_buf, Int32 rank) = 0;
285 virtual void gatherVariable(ConstArrayView<short> send_buf,
286 Array<short>& recv_buf, Int32 rank) = 0;
288 Array<unsigned short>& recv_buf, Int32 rank) = 0;
289 virtual void gatherVariable(ConstArrayView<int> send_buf,
290 Array<int>& recv_buf, Int32 rank) = 0;
291 virtual void gatherVariable(ConstArrayView<unsigned int> send_buf,
292 Array<unsigned int>& recv_buf, Int32 rank) = 0;
293 virtual void gatherVariable(ConstArrayView<long> send_buf,
294 Array<long>& recv_buf, Int32 rank) = 0;
295 virtual void gatherVariable(ConstArrayView<unsigned long> send_buf,
296 Array<unsigned long>& recv_buf, Int32 rank) = 0;
297 virtual void gatherVariable(ConstArrayView<long long> send_buf,
298 Array<long long>& recv_buf, Int32 rank) = 0;
300 Array<unsigned long long>& recv_buf, Int32 rank) = 0;
301 virtual void gatherVariable(ConstArrayView<float> send_buf,
302 Array<float>& recv_buf, Int32 rank) = 0;
303 virtual void gatherVariable(ConstArrayView<double> send_buf,
304 Array<double>& recv_buf, Int32 rank) = 0;
305 virtual void gatherVariable(ConstArrayView<long double> send_buf,
306 Array<long double>& recv_buf, Int32 rank) = 0;
307 virtual void gatherVariable(ConstArrayView<APReal> send_buf,
308 Array<APReal>& recv_buf, Int32 rank) = 0;
309 virtual void gatherVariable(ConstArrayView<Real2> send_buf,
310 Array<Real2>& recv_buf, Int32 rank) = 0;
311 virtual void gatherVariable(ConstArrayView<Real3> send_buf,
312 Array<Real3>& recv_buf, Int32 rank) = 0;
313 virtual void gatherVariable(ConstArrayView<Real2x2> send_buf,
314 Array<Real2x2>& recv_buf, Int32 rank) = 0;
315 virtual void gatherVariable(ConstArrayView<Real3x3> send_buf,
316 Array<Real3x3>& recv_buf, Int32 rank) = 0;
317 virtual void gatherVariable(ConstArrayView<HPReal> send_buf,
318 Array<HPReal>& recv_buf, Int32 rank) = 0;
319 //@}
320
321 //! @name allGather variable
322 //@{
323
324 /*!
325 * \brief Performs an all-gather operation across all processors.
326 *
327 * This is a collective operation. The number of elements in the array
328 * \a send_buf may be different for each processor. The array
329 * \a recv_buf contains the concatenation of the \a send_buf
330 * arrays from each processor. This array \a recv_buf may be resized.
331 */
333 Array<char>& recv_buf) = 0;
335 Array<signed char>& recv_buf) = 0;
337 Array<unsigned char>& recv_buf) = 0;
338 virtual void allGatherVariable(ConstArrayView<short> send_buf,
339 Array<short>& recv_buf) = 0;
341 Array<unsigned short>& recv_buf) = 0;
342 virtual void allGatherVariable(ConstArrayView<int> send_buf,
343 Array<int>& recv_buf) = 0;
345 Array<unsigned int>& recv_buf) = 0;
346 virtual void allGatherVariable(ConstArrayView<long> send_buf,
347 Array<long>& recv_buf) = 0;
349 Array<unsigned long>& recv_buf) = 0;
350 virtual void allGatherVariable(ConstArrayView<long long> send_buf,
351 Array<long long>& recv_buf) = 0;
353 Array<unsigned long long>& recv_buf) = 0;
354 virtual void allGatherVariable(ConstArrayView<float> send_buf,
355 Array<float>& recv_buf) = 0;
356 virtual void allGatherVariable(ConstArrayView<double> send_buf,
357 Array<double>& recv_buf) = 0;
359 Array<long double>& recv_buf) = 0;
360 virtual void allGatherVariable(ConstArrayView<APReal> send_buf,
361 Array<APReal>& recv_buf) = 0;
362 virtual void allGatherVariable(ConstArrayView<Real2> send_buf,
363 Array<Real2>& recv_buf) = 0;
364 virtual void allGatherVariable(ConstArrayView<Real3> send_buf,
365 Array<Real3>& recv_buf) = 0;
366 virtual void allGatherVariable(ConstArrayView<Real2x2> send_buf,
367 Array<Real2x2>& recv_buf) = 0;
368 virtual void allGatherVariable(ConstArrayView<Real3x3> send_buf,
369 Array<Real3x3>& recv_buf) = 0;
370 virtual void allGatherVariable(ConstArrayView<HPReal> send_buf,
371 Array<HPReal>& recv_buf) = 0;
372 //@}
373
374 //! @name scalar reduction operations
375 //@{
376 /*!
377 * \brief Scatters an array across multiple processors.
378 */
380 ArrayView<char> recv_buf, Integer root) = 0;
381 virtual void scatterVariable(ConstArrayView<signed char> send_buf,
382 ArrayView<signed char> recv_buf, Integer root) = 0;
384 ArrayView<unsigned char> recv_buf, Integer root) = 0;
385 virtual void scatterVariable(ConstArrayView<short> send_buf,
386 ArrayView<short> recv_buf, Integer root) = 0;
388 ArrayView<unsigned short> recv_buf, Integer root) = 0;
389 virtual void scatterVariable(ConstArrayView<int> send_buf,
390 ArrayView<int> recv_buf, Integer root) = 0;
391 virtual void scatterVariable(ConstArrayView<unsigned int> send_buf,
392 ArrayView<unsigned int> recv_buf, Integer root) = 0;
393 virtual void scatterVariable(ConstArrayView<long> send_buf,
394 ArrayView<long> recv_buf, Integer root) = 0;
396 ArrayView<unsigned long> recv_buf, Integer root) = 0;
397 virtual void scatterVariable(ConstArrayView<long long> send_buf,
398 ArrayView<long long> recv_buf, Integer root) = 0;
400 ArrayView<unsigned long long> recv_buf, Integer root) = 0;
401 virtual void scatterVariable(ConstArrayView<float> send_buf,
402 ArrayView<float> recv_buf, Integer root) = 0;
403 virtual void scatterVariable(ConstArrayView<double> send_buf,
404 ArrayView<double> recv_buf, Integer root) = 0;
405 virtual void scatterVariable(ConstArrayView<long double> send_buf,
406 ArrayView<long double> recv_buf, Integer root) = 0;
407 virtual void scatterVariable(ConstArrayView<APReal> send_buf,
408 ArrayView<APReal> recv_buf, Integer root) = 0;
409 virtual void scatterVariable(ConstArrayView<Real2> send_buf,
410 ArrayView<Real2> recv_buf, Integer root) = 0;
411 virtual void scatterVariable(ConstArrayView<Real3> send_buf,
412 ArrayView<Real3> recv_buf, Integer root) = 0;
413 virtual void scatterVariable(ConstArrayView<Real2x2> send_buf,
414 ArrayView<Real2x2> recv_buf, Integer root) = 0;
415 virtual void scatterVariable(ConstArrayView<Real3x3> send_buf,
416 ArrayView<Real3x3> recv_buf, Integer root) = 0;
417 virtual void scatterVariable(ConstArrayView<HPReal> send_buf,
418 ArrayView<HPReal> recv_buf, Integer root) = 0;
419 //@}
420
421 //! @name scalar reduction operations
422 //@{
423 /*!
424 * \brief Performs a reduction of type \a rt on the real \a v and returns the value
425 */
426 virtual char reduce(eReduceType rt, char v) = 0;
427 virtual signed char reduce(eReduceType rt, signed char v) = 0;
428 virtual unsigned char reduce(eReduceType rt, unsigned char v) = 0;
429 virtual short reduce(eReduceType rt, short v) = 0;
430 virtual unsigned short reduce(eReduceType rt, unsigned short v) = 0;
431 virtual int reduce(eReduceType rt, int v) = 0;
432 virtual unsigned int reduce(eReduceType rt, unsigned int v) = 0;
433 virtual long reduce(eReduceType rt, long v) = 0;
434 virtual unsigned long reduce(eReduceType rt, unsigned long v) = 0;
435 virtual long long reduce(eReduceType rt, long long v) = 0;
436 virtual unsigned long long reduce(eReduceType rt, unsigned long long v) = 0;
437 virtual float reduce(eReduceType rt, float v) = 0;
438 virtual double reduce(eReduceType rt, double v) = 0;
439 virtual long double reduce(eReduceType rt, long double v) = 0;
440 virtual APReal reduce(eReduceType rt, APReal v) = 0;
441 virtual Real2 reduce(eReduceType rt, Real2 v) = 0;
442 virtual Real3 reduce(eReduceType rt, Real3 v) = 0;
443 virtual Real2x2 reduce(eReduceType rt, Real2x2 v) = 0;
444 virtual Real3x3 reduce(eReduceType rt, Real3x3 v) = 0;
445 virtual HPReal reduce(eReduceType rt, HPReal v) = 0;
446 //@}
447
448 //! @name scalar reduction operations
449 //@{
450 /*!
451 * \brief Calculates the sum, min, and max of a value in one operation.
452 *
453 * Calculates the minimum, maximum, and sum of the value \a val.
454 * \param val value used for the calculation
455 * \param[out] min_val minimum value
456 * \param[out] max_val maximum value
457 * \param[out] sum_val sum of values
458 * \param[out] min_rank rank of the processor having the minimum value
459 * \param[out] max_rank rank of the processor having the maximum value
460 */
461 virtual void computeMinMaxSum(char val, char& min_val,
462 char& max_val, char& sum_val,
463 Int32& min_rank, Int32& max_rank) = 0;
464 virtual void computeMinMaxSum(signed char val, signed char& min_val,
465 signed char& max_val, signed char& sum_val,
466 Int32& min_rank, Int32& max_rank) = 0;
467 virtual void computeMinMaxSum(unsigned char val, unsigned char& min_val,
468 unsigned char& max_val, unsigned char& sum_val,
469 Int32& min_rank, Int32& max_rank) = 0;
470 virtual void computeMinMaxSum(short val, short& min_val,
471 short& max_val, short& sum_val,
472 Int32& min_rank, Int32& max_rank) = 0;
473 virtual void computeMinMaxSum(unsigned short val, unsigned short& min_val,
474 unsigned short& max_val, unsigned short& sum_val,
475 Int32& min_rank, Int32& max_rank) = 0;
476 virtual void computeMinMaxSum(int val, int& min_val,
477 int& max_val, int& sum_val,
478 Int32& min_rank, Int32& max_rank) = 0;
479 virtual void computeMinMaxSum(unsigned int val, unsigned int& min_val,
480 unsigned int& max_val, unsigned int& sum_val,
481 Int32& min_rank, Int32& max_rank) = 0;
482 virtual void computeMinMaxSum(long val, long& min_val,
483 long& max_val, long& sum_val,
484 Int32& min_rank, Int32& max_rank) = 0;
485 virtual void computeMinMaxSum(unsigned long val, unsigned long& min_val,
486 unsigned long& max_val, unsigned long& sum_val,
487 Int32& min_rank, Int32& max_rank) = 0;
488 virtual void computeMinMaxSum(long long val, long long& min_val,
489 long long& max_val, long long& sum_val,
490 Int32& min_rank, Int32& max_rank) = 0;
491 virtual void computeMinMaxSum(unsigned long long val, unsigned long long& min_val,
492 unsigned long long& max_val, unsigned long long& sum_val,
493 Int32& min_rank, Int32& max_rank) = 0;
494 virtual void computeMinMaxSum(float val, float& min_val,
495 float& max_val, float& sum_val,
496 Int32& min_rank, Int32& max_rank) = 0;
497 virtual void computeMinMaxSum(double val, double& min_val,
498 double& max_val, double& sum_val,
499 Int32& min_rank, Int32& max_rank) = 0;
500 virtual void computeMinMaxSum(long double val, long double& min_val,
501 long double& max_val, long double& sum_val,
502 Int32& min_rank, Int32& max_rank) = 0;
503 virtual void computeMinMaxSum(APReal val, APReal& min_val,
504 APReal& max_val, APReal& sum_val,
505 Int32& min_rank, Int32& max_rank) = 0;
506 virtual void computeMinMaxSum(Real2 val, Real2& min_val,
507 Real2& max_val, Real2& sum_val,
508 Int32& min_rank, Int32& max_rank) = 0;
509 virtual void computeMinMaxSum(Real3 val, Real3& min_val,
510 Real3& max_val, Real3& sum_val,
511 Int32& min_rank, Int32& max_rank) = 0;
512 virtual void computeMinMaxSum(Real2x2 val, Real2x2& min_val,
513 Real2x2& max_val, Real2x2& sum_val,
514 Int32& min_rank, Int32& max_rank) = 0;
515 virtual void computeMinMaxSum(Real3x3 val, Real3x3& min_val,
516 Real3x3& max_val, Real3x3& sum_val,
517 Int32& min_rank, Int32& max_rank) = 0;
518 virtual void computeMinMaxSum(HPReal val, HPReal& min_val,
519 HPReal& max_val, HPReal& sum_val,
520 Int32& min_rank, Int32& max_rank) = 0;
521 //@}
522
523 //! @name vector reduction operations
524 //@{
525 /*!
526 * \brief Calculates the sum, min, and max of a value in one operation.
527 *
528 * Calculates the minimum, maximum, and sum of the value \a val.
529 * \param val value used for the calculation
530 * \param[out] min_val minimum value
531 * \param[out] max_val maximum value
532 * \param[out] sum_val sum of values
533 * \param[out] min_rank rank of the processor having the minimum value
534 * \param[out] max_rank rank of the processor having the maximum value
535 */
537 ArrayView<char> max_values, ArrayView<char> sum_values,
538 ArrayView<Int32> min_ranks, ArrayView<Int32> max_ranks) = 0;
540 ArrayView<signed char> max_values, ArrayView<signed char> sum_values,
541 ArrayView<Int32> min_ranks, ArrayView<Int32> max_ranks) = 0;
544 ArrayView<Int32> min_ranks, ArrayView<Int32> max_ranks) = 0;
545 virtual void computeMinMaxSum(ConstArrayView<short> values, ArrayView<short> min_values,
546 ArrayView<short> max_values, ArrayView<short> sum_values,
547 ArrayView<Int32> min_ranks, ArrayView<Int32> max_ranks) = 0;
550 ArrayView<Int32> min_ranks, ArrayView<Int32> max_ranks) = 0;
551 virtual void computeMinMaxSum(ConstArrayView<int> values, ArrayView<int> min_values,
552 ArrayView<int> max_values, ArrayView<int> sum_values,
553 ArrayView<Int32> min_ranks, ArrayView<Int32> max_ranks) = 0;
556 ArrayView<Int32> min_ranks, ArrayView<Int32> max_ranks) = 0;
557 virtual void computeMinMaxSum(ConstArrayView<long> values, ArrayView<long> min_values,
558 ArrayView<long> max_values, ArrayView<long> sum_values,
559 ArrayView<Int32> min_ranks, ArrayView<Int32> max_ranks) = 0;
562 ArrayView<Int32> min_ranks, ArrayView<Int32> max_ranks) = 0;
564 ArrayView<long long> max_values, ArrayView<long long> sum_values,
565 ArrayView<Int32> min_ranks, ArrayView<Int32> max_ranks) = 0;
568 ArrayView<Int32> min_ranks, ArrayView<Int32> max_ranks) = 0;
569 virtual void computeMinMaxSum(ConstArrayView<float> values, ArrayView<float> min_values,
570 ArrayView<float> max_values, ArrayView<float> sum_values,
571 ArrayView<Int32> min_ranks, ArrayView<Int32> max_ranks) = 0;
572 virtual void computeMinMaxSum(ConstArrayView<double> values, ArrayView<double> min_values,
573 ArrayView<double> max_values, ArrayView<double> sum_values,
574 ArrayView<Int32> min_ranks, ArrayView<Int32> max_ranks) = 0;
576 ArrayView<long double> max_values, ArrayView<long double> sum_values,
577 ArrayView<Int32> min_ranks, ArrayView<Int32> max_ranks) = 0;
578 virtual void computeMinMaxSum(ConstArrayView<APReal> values, ArrayView<APReal> min_values,
579 ArrayView<APReal> max_values, ArrayView<APReal> sum_values,
580 ArrayView<Int32> min_ranks, ArrayView<Int32> max_ranks) = 0;
581 virtual void computeMinMaxSum(ConstArrayView<Real2> values, ArrayView<Real2> min_values,
582 ArrayView<Real2> max_values, ArrayView<Real2> sum_values,
583 ArrayView<Int32> min_ranks, ArrayView<Int32> max_ranks) = 0;
584 virtual void computeMinMaxSum(ConstArrayView<Real3> values, ArrayView<Real3> min_values,
585 ArrayView<Real3> max_values, ArrayView<Real3> sum_values,
586 ArrayView<Int32> min_ranks, ArrayView<Int32> max_ranks) = 0;
587 virtual void computeMinMaxSum(ConstArrayView<Real2x2> values, ArrayView<Real2x2> min_values,
588 ArrayView<Real2x2> max_values, ArrayView<Real2x2> sum_values,
589 ArrayView<Int32> min_ranks, ArrayView<Int32> max_ranks) = 0;
590 virtual void computeMinMaxSum(ConstArrayView<Real3x3> values, ArrayView<Real3x3> min_values,
591 ArrayView<Real3x3> max_values, ArrayView<Real3x3> sum_values,
592 ArrayView<Int32> min_ranks, ArrayView<Int32> max_ranks) = 0;
593 virtual void computeMinMaxSum(ConstArrayView<HPReal> values, ArrayView<HPReal> min_values,
594 ArrayView<HPReal> max_values, ArrayView<HPReal> sum_values,
595 ArrayView<Int32> min_ranks, ArrayView<Int32> max_ranks) = 0;
596 //@}
597
598 //! @name array reduction operations
599 //@{
600 /*!
601 * \brief Performs the reduction of type \a rt on array \a v.
602 */
603 virtual void reduce(eReduceType rt, ArrayView<char> v) = 0;
604 virtual void reduce(eReduceType rt, ArrayView<signed char> v) = 0;
605 virtual void reduce(eReduceType rt, ArrayView<unsigned char> v) = 0;
606 virtual void reduce(eReduceType rt, ArrayView<short> v) = 0;
607 virtual void reduce(eReduceType rt, ArrayView<unsigned short> v) = 0;
608 virtual void reduce(eReduceType rt, ArrayView<int> v) = 0;
609 virtual void reduce(eReduceType rt, ArrayView<unsigned int> v) = 0;
610 virtual void reduce(eReduceType rt, ArrayView<long> v) = 0;
611 virtual void reduce(eReduceType rt, ArrayView<unsigned long> v) = 0;
612 virtual void reduce(eReduceType rt, ArrayView<long long> v) = 0;
613 virtual void reduce(eReduceType rt, ArrayView<unsigned long long> v) = 0;
614 virtual void reduce(eReduceType rt, ArrayView<float> v) = 0;
615 virtual void reduce(eReduceType rt, ArrayView<double> v) = 0;
616 virtual void reduce(eReduceType rt, ArrayView<long double> v) = 0;
617 virtual void reduce(eReduceType rt, ArrayView<APReal> v) = 0;
618 virtual void reduce(eReduceType rt, ArrayView<Real2> v) = 0;
619 virtual void reduce(eReduceType rt, ArrayView<Real3> v) = 0;
620 virtual void reduce(eReduceType rt, ArrayView<Real2x2> v) = 0;
621 virtual void reduce(eReduceType rt, ArrayView<Real3x3> v) = 0;
622 virtual void reduce(eReduceType rt, ArrayView<HPReal> v) = 0;
623 //@}
624
625 /*!
626 * @name broadcast operations
627 *
628 * \brief Sends an array of values to all subdomains.
629 *
630 * This operation sends the value array \a send_buf to all
631 * subdomains. The array used is the one whose rank (commRank) is \a rank.
632 * All participating subdomains must call this method with
633 * the same parameter \a rank and have an array \a send_buf
634 * containing the same number of elements.
635 */
636 //@{
637 virtual void broadcast(ArrayView<char> send_buf, Int32 rank) = 0;
638 virtual void broadcast(ArrayView<signed char> send_buf, Int32 rank) = 0;
639 virtual void broadcast(ArrayView<unsigned char> send_buf, Int32 rank) = 0;
640 virtual void broadcast(ArrayView<short> send_buf, Int32 rank) = 0;
641 virtual void broadcast(ArrayView<unsigned short> send_buf, Int32 rank) = 0;
642 virtual void broadcast(ArrayView<int> send_buf, Int32 rank) = 0;
643 virtual void broadcast(ArrayView<unsigned int> send_buf, Int32 rank) = 0;
644 virtual void broadcast(ArrayView<long> send_buf, Int32 rank) = 0;
645 virtual void broadcast(ArrayView<unsigned long> send_buf, Int32 rank) = 0;
646 virtual void broadcast(ArrayView<long long> send_buf, Int32 rank) = 0;
647 virtual void broadcast(ArrayView<unsigned long long> send_buf, Int32 rank) = 0;
648 virtual void broadcast(ArrayView<float> send_buf, Int32 rank) = 0;
649 virtual void broadcast(ArrayView<double> send_buf, Int32 rank) = 0;
650 virtual void broadcast(ArrayView<long double> send_buf, Int32 rank) = 0;
651 virtual void broadcast(ArrayView<APReal> send_buf, Int32 rank) = 0;
652 virtual void broadcast(ArrayView<Real2> send_buf, Int32 rank) = 0;
653 virtual void broadcast(ArrayView<Real3> send_buf, Int32 rank) = 0;
654 virtual void broadcast(ArrayView<Real2x2> send_buf, Int32 rank) = 0;
655 virtual void broadcast(ArrayView<Real3x3> send_buf, Int32 rank) = 0;
656 virtual void broadcast(ArrayView<HPReal> send_buf, Int32 rank) = 0;
657 virtual void broadcastString(String& str, Int32 rank) = 0;
658
659 virtual void broadcastSerializer(ISerializer* values, Int32 rank) = 0;
660 /*! \brief Performs a broadcast of a memory region.
661 *
662 * The processor performing the broadcast is given by \id. The array
663 * sent is then given by \a bytes. The processors receiving
664 * the array in \a bytes. This array is allocated automatically, the processors
665 * receiving do not need to know the number of bytes to be sent.
666 *
667 */
668 virtual void broadcastMemoryBuffer(ByteArray& bytes, Int32 rank) = 0;
669 //@}
670
671 /*!
672 * @name message sending operations
673 *
674 * \brief Blocking send of an array of values to a subdomain.
675 *
676 * Sends the values of array \a values to subdomain \a rank.
677 * The subdomain must perform a corresponding reception (the subdomain
678 * number must be that of this handler and the type and the
679 * size of the array must correspond) with the function recvValues().
680 * The send is blocking.
681 */
682 //@{
683 virtual void send(ConstArrayView<char> values, Int32 rank) = 0;
684 virtual void send(ConstArrayView<signed char> values, Int32 rank) = 0;
685 virtual void send(ConstArrayView<unsigned char> values, Int32 rank) = 0;
686 virtual void send(ConstArrayView<short> values, Int32 rank) = 0;
687 virtual void send(ConstArrayView<unsigned short> values, Int32 rank) = 0;
688 virtual void send(ConstArrayView<int> values, Int32 rank) = 0;
689 virtual void send(ConstArrayView<unsigned int> values, Int32 rank) = 0;
690 virtual void send(ConstArrayView<long> values, Int32 rank) = 0;
691 virtual void send(ConstArrayView<unsigned long> values, Int32 rank) = 0;
692 virtual void send(ConstArrayView<long long> values, Int32 rank) = 0;
693 virtual void send(ConstArrayView<unsigned long long> values, Int32 rank) = 0;
694 virtual void send(ConstArrayView<float> values, Int32 rank) = 0;
695 virtual void send(ConstArrayView<double> values, Int32 rank) = 0;
696 virtual void send(ConstArrayView<long double> values, Int32 rank) = 0;
697 virtual void send(ConstArrayView<APReal> values, Int32 rank) = 0;
698 virtual void send(ConstArrayView<Real2> values, Int32 rank) = 0;
699 virtual void send(ConstArrayView<Real3> values, Int32 rank) = 0;
700 virtual void send(ConstArrayView<Real2x2> values, Int32 rank) = 0;
701 virtual void send(ConstArrayView<Real3x3> values, Int32 rank) = 0;
702 virtual void send(ConstArrayView<HPReal> values, Int32 rank) = 0;
703
704 virtual void sendSerializer(ISerializer* values, Int32 rank) = 0;
705 /*!
706 * The returned request must be used in waitAllRequests() or
707 * freed by calling freeRequests().
708 */
709 ARCCORE_DEPRECATED_2019("Use createSendSerializer(Int32 rank) instead")
710 virtual Parallel::Request sendSerializer(ISerializer* values, Int32 rank, ByteArray& bytes) = 0;
711
712 /*!
713 * \brief Creates a non-blocking message to send serialized data to rank \a rank.
714 *
715 * The message is processed only when processMessages() is called.
716 */
718 //@}
719
720 //! @name message receiving operations.
721 //@{
722 /*! Receives array \a values from rank \a rank */
723 virtual void recv(ArrayView<char> values, Int32 rank) = 0;
724 virtual void recv(ArrayView<signed char> values, Int32 rank) = 0;
725 virtual void recv(ArrayView<unsigned char> values, Int32 rank) = 0;
726 virtual void recv(ArrayView<short> values, Int32 rank) = 0;
727 virtual void recv(ArrayView<unsigned short> values, Int32 rank) = 0;
728 virtual void recv(ArrayView<int> values, Int32 rank) = 0;
729 virtual void recv(ArrayView<unsigned int> values, Int32 rank) = 0;
730 virtual void recv(ArrayView<long> values, Int32 rank) = 0;
731 virtual void recv(ArrayView<unsigned long> values, Int32 rank) = 0;
732 virtual void recv(ArrayView<long long> values, Int32 rank) = 0;
733 virtual void recv(ArrayView<unsigned long long> values, Int32 rank) = 0;
734 virtual void recv(ArrayView<float> values, Int32 rank) = 0;
735 virtual void recv(ArrayView<double> values, Int32 rank) = 0;
736 virtual void recv(ArrayView<long double> values, Int32 rank) = 0;
737 virtual void recv(ArrayView<APReal> values, Int32 rank) = 0;
738 virtual void recv(ArrayView<Real2> values, Int32 rank) = 0;
739 virtual void recv(ArrayView<Real3> values, Int32 rank) = 0;
740 virtual void recv(ArrayView<Real2x2> values, Int32 rank) = 0;
741 virtual void recv(ArrayView<Real3x3> values, Int32 rank) = 0;
742 virtual void recv(ArrayView<HPReal> values, Int32 rank) = 0;
743 virtual void recvSerializer(ISerializer* values, Int32 rank) = 0;
744 //@}
745
746 /*!
747 * \brief Creates a non-blocking message to receive serialized data from rank \a rank.
748 *
749 * The message is processed only when processMessages() is called.
750 */
752
753 /*!
754 * \brief Executes the operations of messages \a messages
755 */
757
758 /*!
759 * \brief Executes the operations of messages \a messages
760 */
762
763 /*!
764 * \brief Frees the requests.
765 */
766 virtual void freeRequests(ArrayView<Parallel::Request> requests) = 0;
767
768 /*! @name non-blocking message sending operations
769 *
770 * \brief Sends an array of values to rank \a rank.
771 *
772 * Sends the values of array \a values to the instance of rank \a rank.
773 * The recipient must perform a corresponding reception (whose
774 * rank must be that of this handler and the type and the
775 * size of the array must correspond) with the function recvValues().
776 * The send is blocking if \a is_blocking is true, non-blocking if it is false.
777 * In the latter case, the returned request must be used in waitAllRequests()
778 * or freed by freeRequests().
779 */
780 //@{
781 virtual Request send(ConstArrayView<char> values, Int32 rank, bool is_blocking) = 0;
782 virtual Request send(ConstArrayView<signed char> values, Int32 rank, bool is_blocking) = 0;
783 virtual Request send(ConstArrayView<unsigned char> values, Int32 rank, bool is_blocking) = 0;
784 virtual Request send(ConstArrayView<short> values, Int32 rank, bool is_blocking) = 0;
785 virtual Request send(ConstArrayView<unsigned short> values, Int32 rank, bool is_blocking) = 0;
786 virtual Request send(ConstArrayView<int> values, Int32 rank, bool is_blocking) = 0;
787 virtual Request send(ConstArrayView<unsigned int> values, Int32 rank, bool is_blocking) = 0;
788 virtual Request send(ConstArrayView<long> values, Int32 rank, bool is_blocking) = 0;
789 virtual Request send(ConstArrayView<unsigned long> values, Int32 rank, bool is_blocking) = 0;
790 virtual Request send(ConstArrayView<long long> values, Int32 rank, bool is_blocking) = 0;
791 virtual Request send(ConstArrayView<unsigned long long> values, Int32 rank, bool is_blocking) = 0;
792 virtual Request send(ConstArrayView<float> values, Int32 rank, bool is_blocking) = 0;
793 virtual Request send(ConstArrayView<double> values, Int32 rank, bool is_blocking) = 0;
794 virtual Request send(ConstArrayView<long double> values, Int32 rank, bool is_blocking) = 0;
795 virtual Request send(ConstArrayView<APReal> values, Int32 rank, bool is_blocking) = 0;
796 virtual Request send(ConstArrayView<Real2> values, Int32 rank, bool is_blocking) = 0;
797 virtual Request send(ConstArrayView<Real3> values, Int32 rank, bool is_blocking) = 0;
798 virtual Request send(ConstArrayView<Real2x2> values, Int32 rank, bool is_blocking) = 0;
799 virtual Request send(ConstArrayView<Real3x3> values, Int32 rank, bool is_blocking) = 0;
800 virtual Request send(ConstArrayView<HPReal> values, Int32 rank, bool is_blocking) = 0;
801 //@}
802
803 //! @name non-blocking message receiving operations.
804 //@{
805 /*! Receives array \a values from subdomain \a rank */
806 virtual Request recv(ArrayView<char> values, Int32 rank, bool is_blocking) = 0;
807 virtual Request recv(ArrayView<signed char> values, Int32 rank, bool is_blocking) = 0;
808 virtual Request recv(ArrayView<unsigned char> values, Int32 rank, bool is_blocking) = 0;
809 virtual Request recv(ArrayView<short> values, Int32 rank, bool is_blocking) = 0;
810 virtual Request recv(ArrayView<unsigned short> values, Int32 rank, bool is_blocking) = 0;
811 virtual Request recv(ArrayView<int> values, Int32 rank, bool is_blocking) = 0;
812 virtual Request recv(ArrayView<unsigned int> values, Int32 rank, bool is_blocking) = 0;
813 virtual Request recv(ArrayView<long> values, Int32 rank, bool is_blocking) = 0;
814 virtual Request recv(ArrayView<unsigned long> values, Int32 rank, bool is_blocking) = 0;
815 virtual Request recv(ArrayView<long long> values, Int32 rank, bool is_blocking) = 0;
816 virtual Request recv(ArrayView<unsigned long long> values, Int32 rank, bool is_blocking) = 0;
817 virtual Request recv(ArrayView<float> values, Int32 rank, bool is_blocking) = 0;
818 virtual Request recv(ArrayView<double> values, Int32 rank, bool is_blocking) = 0;
819 virtual Request recv(ArrayView<long double> values, Int32 rank, bool is_blocking) = 0;
820 virtual Request recv(ArrayView<APReal> values, Int32 rank, bool is_blocking) = 0;
821 virtual Request recv(ArrayView<Real2> values, Int32 rank, bool is_blocking) = 0;
822 virtual Request recv(ArrayView<Real3> values, Int32 rank, bool is_blocking) = 0;
823 virtual Request recv(ArrayView<Real2x2> values, Int32 rank, bool is_blocking) = 0;
824 virtual Request recv(ArrayView<Real3x3> values, Int32 rank, bool is_blocking) = 0;
825 virtual Request recv(ArrayView<HPReal> values, Int32 rank, bool is_blocking) = 0;
826 //@}
827
828 //! @name generic message receiving operations
829 //@{
830 /*! Receives message \a message, array \a values */
831 virtual Request receive(Span<char> values, const PointToPointMessageInfo& message) = 0;
832 virtual Request receive(Span<signed char> values, const PointToPointMessageInfo& message) = 0;
833 virtual Request receive(Span<unsigned char> values, const PointToPointMessageInfo& message) = 0;
834 virtual Request receive(Span<short> values, const PointToPointMessageInfo& message) = 0;
835 virtual Request receive(Span<unsigned short> values, const PointToPointMessageInfo& message) = 0;
836 virtual Request receive(Span<int> values, const PointToPointMessageInfo& message) = 0;
837 virtual Request receive(Span<unsigned int> values, const PointToPointMessageInfo& message) = 0;
838 virtual Request receive(Span<long> values, const PointToPointMessageInfo& message) = 0;
839 virtual Request receive(Span<unsigned long> values, const PointToPointMessageInfo& message) = 0;
840 virtual Request receive(Span<long long> values, const PointToPointMessageInfo& message) = 0;
841 virtual Request receive(Span<unsigned long long> values, const PointToPointMessageInfo& message) = 0;
842 virtual Request receive(Span<float> values, const PointToPointMessageInfo& message) = 0;
843 virtual Request receive(Span<double> values, const PointToPointMessageInfo& message) = 0;
844 virtual Request receive(Span<long double> values, const PointToPointMessageInfo& message) = 0;
845 virtual Request receive(Span<APReal> values, const PointToPointMessageInfo& message) = 0;
846 virtual Request receive(Span<Real2> values, const PointToPointMessageInfo& message) = 0;
847 virtual Request receive(Span<Real3> values, const PointToPointMessageInfo& message) = 0;
848 virtual Request receive(Span<Real2x2> values, const PointToPointMessageInfo& message) = 0;
849 virtual Request receive(Span<Real3x3> values, const PointToPointMessageInfo& message) = 0;
850 virtual Request receive(Span<HPReal> values, const PointToPointMessageInfo& message) = 0;
851 virtual Request receiveSerializer(ISerializer* values, const PointToPointMessageInfo& message) = 0;
852 //@}
853
854 //! @name generic message sending operations
855 //@{
856 /*! Sends message \a message with the values of array \a values */
857 virtual Request send(Span<const char> values, const PointToPointMessageInfo& message) = 0;
858 virtual Request send(Span<const signed char> values, const PointToPointMessageInfo& message) = 0;
859 virtual Request send(Span<const unsigned char> values, const PointToPointMessageInfo& message) = 0;
860 virtual Request send(Span<const short> values, const PointToPointMessageInfo& message) = 0;
861 virtual Request send(Span<const unsigned short> values, const PointToPointMessageInfo& message) = 0;
862 virtual Request send(Span<const int> values, const PointToPointMessageInfo& message) = 0;
863 virtual Request send(Span<const unsigned int> values, const PointToPointMessageInfo& message) = 0;
864 virtual Request send(Span<const long> values, const PointToPointMessageInfo& message) = 0;
865 virtual Request send(Span<const unsigned long> values, const PointToPointMessageInfo& message) = 0;
866 virtual Request send(Span<const long long> values, const PointToPointMessageInfo& message) = 0;
867 virtual Request send(Span<const unsigned long long> values, const PointToPointMessageInfo& message) = 0;
868 virtual Request send(Span<const float> values, const PointToPointMessageInfo& message) = 0;
869 virtual Request send(Span<const double> values, const PointToPointMessageInfo& message) = 0;
870 virtual Request send(Span<const long double> values, const PointToPointMessageInfo& message) = 0;
871 virtual Request send(Span<const APReal> values, const PointToPointMessageInfo& message) = 0;
872 virtual Request send(Span<const Real2> values, const PointToPointMessageInfo& message) = 0;
873 virtual Request send(Span<const Real3> values, const PointToPointMessageInfo& message) = 0;
874 virtual Request send(Span<const Real2x2> values, const PointToPointMessageInfo& message) = 0;
875 virtual Request send(Span<const Real3x3> values, const PointToPointMessageInfo& message) = 0;
876 virtual Request send(Span<const HPReal> values, const PointToPointMessageInfo& message) = 0;
877 virtual Request sendSerializer(const ISerializer* values, const PointToPointMessageInfo& message) = 0;
878 //@}
879
880 /*!
881 * \brief Probes if messages are available.
882 *
883 * \sa Arccore::MessagePassing::mpProbe().
884 */
885 virtual MessageId probe(const PointToPointMessageInfo& message) = 0;
886
887 /*!
888 * \brief Probes if messages are available.
889 *
890 * \sa Arccore::MessagePassing::mpLegacyProbe().
891 */
892 virtual MessageSourceInfo legacyProbe(const PointToPointMessageInfo& message) = 0;
893
894 virtual void sendRecv(ConstArrayView<char> send_buf,
895 ArrayView<char> recv_buf, Int32 rank) = 0;
896 virtual void sendRecv(ConstArrayView<signed char> send_buf,
897 ArrayView<signed char> recv_buf, Int32 rank) = 0;
898 virtual void sendRecv(ConstArrayView<unsigned char> send_buf,
899 ArrayView<unsigned char> recv_buf, Int32 rank) = 0;
900 virtual void sendRecv(ConstArrayView<short> send_buf,
901 ArrayView<short> recv_buf, Int32 rank) = 0;
902 virtual void sendRecv(ConstArrayView<unsigned short> send_buf,
903 ArrayView<unsigned short> recv_buf, Int32 rank) = 0;
904 virtual void sendRecv(ConstArrayView<int> send_buf,
905 ArrayView<int> recv_buf, Int32 rank) = 0;
906 virtual void sendRecv(ConstArrayView<unsigned int> send_buf,
907 ArrayView<unsigned int> recv_buf, Int32 rank) = 0;
908 virtual void sendRecv(ConstArrayView<long> send_buf,
909 ArrayView<long> recv_buf, Int32 rank) = 0;
910 virtual void sendRecv(ConstArrayView<unsigned long> send_buf,
911 ArrayView<unsigned long> recv_buf, Int32 rank) = 0;
912 virtual void sendRecv(ConstArrayView<long long> send_buf,
913 ArrayView<long long> recv_buf, Int32 rank) = 0;
914 virtual void sendRecv(ConstArrayView<unsigned long long> send_buf,
915 ArrayView<unsigned long long> recv_buf, Int32 rank) = 0;
916 virtual void sendRecv(ConstArrayView<float> send_buf,
917 ArrayView<float> recv_buf, Int32 rank) = 0;
918 virtual void sendRecv(ConstArrayView<double> send_buf,
919 ArrayView<double> recv_buf, Int32 rank) = 0;
920 virtual void sendRecv(ConstArrayView<long double> send_buf,
921 ArrayView<long double> recv_buf, Int32 rank) = 0;
922 virtual void sendRecv(ConstArrayView<APReal> send_buf,
923 ArrayView<APReal> recv_buf, Int32 rank) = 0;
924 virtual void sendRecv(ConstArrayView<Real2> send_buf,
925 ArrayView<Real2> recv_buf, Int32 rank) = 0;
926 virtual void sendRecv(ConstArrayView<Real3> send_buf,
927 ArrayView<Real3> recv_buf, Int32 rank) = 0;
928 virtual void sendRecv(ConstArrayView<Real2x2> send_buf,
929 ArrayView<Real2x2> recv_buf, Int32 rank) = 0;
930 virtual void sendRecv(ConstArrayView<Real3x3> send_buf,
931 ArrayView<Real3x3> recv_buf, Int32 rank) = 0;
932 virtual void sendRecv(ConstArrayView<HPReal> send_buf,
933 ArrayView<HPReal> recv_buf, Int32 rank) = 0;
934
935 virtual void allToAll(ConstArrayView<char> send_buf, ArrayView<char> recv_buf,
936 Integer count) = 0;
937 virtual void allToAll(ConstArrayView<signed char> send_buf, ArrayView<signed char> recv_buf,
938 Integer count) = 0;
939 virtual void allToAll(ConstArrayView<unsigned char> send_buf, ArrayView<unsigned char> recv_buf,
940 Integer count) = 0;
941 virtual void allToAll(ConstArrayView<short> send_buf, ArrayView<short> recv_buf, Integer count) = 0;
942 virtual void allToAll(ConstArrayView<unsigned short> send_buf, ArrayView<unsigned short> recv_buf,
943 Integer count) = 0;
944 virtual void allToAll(ConstArrayView<int> send_buf, ArrayView<int> recv_buf, Integer count) = 0;
945 virtual void allToAll(ConstArrayView<unsigned int> send_buf, ArrayView<unsigned int> recv_buf,
946 Integer count) = 0;
947 virtual void allToAll(ConstArrayView<long> send_buf, ArrayView<long> recv_buf, Integer count) = 0;
948 virtual void allToAll(ConstArrayView<unsigned long> send_buf, ArrayView<unsigned long> recv_buf,
949 Integer count) = 0;
950 virtual void allToAll(ConstArrayView<long long> send_buf, ArrayView<long long> recv_buf,
951 Integer count) = 0;
952 virtual void allToAll(ConstArrayView<unsigned long long> send_buf,
953 ArrayView<unsigned long long> recv_buf, Integer count) = 0;
954 virtual void allToAll(ConstArrayView<float> send_buf, ArrayView<float> recv_buf,
955 Integer count) = 0;
956 virtual void allToAll(ConstArrayView<double> send_buf, ArrayView<double> recv_buf,
957 Integer count) = 0;
958 virtual void allToAll(ConstArrayView<long double> send_buf, ArrayView<long double> recv_buf,
959 Integer count) = 0;
960 virtual void allToAll(ConstArrayView<APReal> send_buf, ArrayView<APReal> recv_buf,
961 Integer count) = 0;
962 virtual void allToAll(ConstArrayView<Real2> send_buf, ArrayView<Real2> recv_buf,
963 Integer count) = 0;
964 virtual void allToAll(ConstArrayView<Real3> send_buf, ArrayView<Real3> recv_buf,
965 Integer count) = 0;
966 virtual void allToAll(ConstArrayView<Real2x2> send_buf, ArrayView<Real2x2> recv_buf,
967 Integer count) = 0;
968 virtual void allToAll(ConstArrayView<Real3x3> send_buf, ArrayView<Real3x3> recv_buf,
969 Integer count) = 0;
970 virtual void allToAll(ConstArrayView<HPReal> send_buf, ArrayView<HPReal> recv_buf,
971 Integer count) = 0;
972
973 /*! @name allToAll variable
974 *
975 * \brief Performs a variable allToAll operation
976 */
977 //@{
978 virtual void allToAllVariable(ConstArrayView<char> send_buf, Int32ConstArrayView send_count,
979 Int32ConstArrayView send_index, ArrayView<char> recv_buf,
980 Int32ConstArrayView recv_count, Int32ConstArrayView recv_index) = 0;
981 virtual void allToAllVariable(ConstArrayView<signed char> send_buf, Int32ConstArrayView send_count,
982 Int32ConstArrayView send_index, ArrayView<signed char> recv_buf,
983 Int32ConstArrayView recv_count, Int32ConstArrayView recv_index) = 0;
984 virtual void allToAllVariable(ConstArrayView<unsigned char> send_buf, Int32ConstArrayView send_count,
985 Int32ConstArrayView send_index, ArrayView<unsigned char> recv_buf,
986 Int32ConstArrayView recv_count, Int32ConstArrayView recv_index) = 0;
987 virtual void allToAllVariable(ConstArrayView<short> send_buf, Int32ConstArrayView send_count,
988 Int32ConstArrayView send_index, ArrayView<short> recv_buf,
989 Int32ConstArrayView recv_count, Int32ConstArrayView recv_index) = 0;
990 virtual void allToAllVariable(ConstArrayView<unsigned short> send_buf, Int32ConstArrayView send_count,
991 Int32ConstArrayView send_index, ArrayView<unsigned short> recv_buf,
992 Int32ConstArrayView recv_count, Int32ConstArrayView recv_index) = 0;
993 virtual void allToAllVariable(ConstArrayView<int> send_buf, Int32ConstArrayView send_count,
994 Int32ConstArrayView send_index, ArrayView<int> recv_buf,
995 Int32ConstArrayView recv_count, Int32ConstArrayView recv_index) = 0;
996 virtual void allToAllVariable(ConstArrayView<unsigned int> send_buf, Int32ConstArrayView send_count,
997 Int32ConstArrayView send_index, ArrayView<unsigned int> recv_buf,
998 Int32ConstArrayView recv_count, Int32ConstArrayView recv_index) = 0;
999 virtual void allToAllVariable(ConstArrayView<long> send_buf, Int32ConstArrayView send_count,
1000 Int32ConstArrayView send_index, ArrayView<long> recv_buf,
1001 Int32ConstArrayView recv_count, Int32ConstArrayView recv_index) = 0;
1002 virtual void allToAllVariable(ConstArrayView<unsigned long> send_buf, Int32ConstArrayView send_count,
1003 Int32ConstArrayView send_index, ArrayView<unsigned long> recv_buf,
1004 Int32ConstArrayView recv_count, Int32ConstArrayView recv_index) = 0;
1005 virtual void allToAllVariable(ConstArrayView<long long> send_buf, Int32ConstArrayView send_count,
1006 Int32ConstArrayView send_index, ArrayView<long long> recv_buf,
1007 Int32ConstArrayView recv_count, Int32ConstArrayView recv_index) = 0;
1008 virtual void allToAllVariable(ConstArrayView<unsigned long long> send_buf, Int32ConstArrayView send_count,
1009 Int32ConstArrayView send_index, ArrayView<unsigned long long> recv_buf,
1010 Int32ConstArrayView recv_count, Int32ConstArrayView recv_index) = 0;
1011 virtual void allToAllVariable(ConstArrayView<float> send_buf, Int32ConstArrayView send_count,
1012 Int32ConstArrayView send_index, ArrayView<float> recv_buf,
1013 Int32ConstArrayView recv_count, Int32ConstArrayView recv_index) = 0;
1014 virtual void allToAllVariable(ConstArrayView<double> send_buf, Int32ConstArrayView send_count,
1015 Int32ConstArrayView send_index, ArrayView<double> recv_buf,
1016 Int32ConstArrayView recv_count, Int32ConstArrayView recv_index) = 0;
1017 virtual void allToAllVariable(ConstArrayView<long double> send_buf, Int32ConstArrayView send_count,
1018 Int32ConstArrayView send_index, ArrayView<long double> recv_buf,
1019 Int32ConstArrayView recv_count, Int32ConstArrayView recv_index) = 0;
1020 virtual void allToAllVariable(ConstArrayView<APReal> send_buf, Int32ConstArrayView send_count,
1021 Int32ConstArrayView send_index, ArrayView<APReal> recv_buf,
1022 Int32ConstArrayView recv_count, Int32ConstArrayView recv_index) = 0;
1023 virtual void allToAllVariable(ConstArrayView<Real2> send_buf, Int32ConstArrayView send_count,
1024 Int32ConstArrayView send_index, ArrayView<Real2> recv_buf,
1025 Int32ConstArrayView recv_count, Int32ConstArrayView recv_index) = 0;
1026 virtual void allToAllVariable(ConstArrayView<Real3> send_buf, Int32ConstArrayView send_count,
1027 Int32ConstArrayView send_index, ArrayView<Real3> recv_buf,
1028 Int32ConstArrayView recv_count, Int32ConstArrayView recv_index) = 0;
1029 virtual void allToAllVariable(ConstArrayView<Real2x2> send_buf, Int32ConstArrayView send_count,
1030 Int32ConstArrayView send_index, ArrayView<Real2x2> recv_buf,
1031 Int32ConstArrayView recv_count, Int32ConstArrayView recv_index) = 0;
1032 virtual void allToAllVariable(ConstArrayView<Real3x3> send_buf, Int32ConstArrayView send_count,
1033 Int32ConstArrayView send_index, ArrayView<Real3x3> recv_buf,
1034 Int32ConstArrayView recv_count, Int32ConstArrayView recv_index) = 0;
1035 virtual void allToAllVariable(ConstArrayView<HPReal> send_buf, Int32ConstArrayView send_count,
1036 Int32ConstArrayView send_index, ArrayView<HPReal> recv_buf,
1037 Int32ConstArrayView recv_count, Int32ConstArrayView recv_index) = 0;
1038 //@}
1039
1040 /*! @name scan
1041 *
1042 * \brief Performs an algorithm equivalent to MPI_Scan in semantics
1043 */
1044 //@{
1045 //! Applies a prefix-sum algorithm on the values of \a v using the \a rt operation.
1046 virtual void scan(eReduceType rt, ArrayView<char> v) = 0;
1047 virtual void scan(eReduceType rt, ArrayView<signed char> v) = 0;
1048 virtual void scan(eReduceType rt, ArrayView<unsigned char> v) = 0;
1049 virtual void scan(eReduceType rt, ArrayView<short> v) = 0;
1050 virtual void scan(eReduceType rt, ArrayView<unsigned short> v) = 0;
1051 virtual void scan(eReduceType rt, ArrayView<int> v) = 0;
1052 virtual void scan(eReduceType rt, ArrayView<unsigned int> v) = 0;
1053 virtual void scan(eReduceType rt, ArrayView<long> v) = 0;
1054 virtual void scan(eReduceType rt, ArrayView<unsigned long> v) = 0;
1055 virtual void scan(eReduceType rt, ArrayView<long long> v) = 0;
1056 virtual void scan(eReduceType rt, ArrayView<unsigned long long> v) = 0;
1057 virtual void scan(eReduceType rt, ArrayView<float> v) = 0;
1058 virtual void scan(eReduceType rt, ArrayView<double> v) = 0;
1059 virtual void scan(eReduceType rt, ArrayView<long double> v) = 0;
1060 virtual void scan(eReduceType rt, ArrayView<APReal> v) = 0;
1061 virtual void scan(eReduceType rt, ArrayView<Real2> v) = 0;
1062 virtual void scan(eReduceType rt, ArrayView<Real3> v) = 0;
1063 virtual void scan(eReduceType rt, ArrayView<Real2x2> v) = 0;
1064 virtual void scan(eReduceType rt, ArrayView<Real3x3> v) = 0;
1065 virtual void scan(eReduceType rt, ArrayView<HPReal> v) = 0;
1066 //@}
1067
1068 /*!
1069 * \brief Creates a list to manage 'ISerializeMessage'.
1070 *
1071 * \deprecated Use createSerializeMessageListRef() instead.
1072 */
1073 ARCCORE_DEPRECATED_2020("Use createSerializeMessageListRef() instead")
1075
1076 //! Creates a list to manage 'ISerializeMessage'
1078
1079 //! @name synchronization operations and asynchronous operations
1080 //@{
1081 //! Performs a barrier
1082 virtual void barrier() = 0;
1083
1084 //! Blocks while waiting for the \a rvalues requests to complete
1085 virtual void waitAllRequests(ArrayView<Request> rvalues) = 0;
1086
1087 /*!
1088 * \brief Blocks while waiting for one of the \a rvalues requests to complete.
1089 *
1090 * Returns an array of indices of completed requests.
1091 */
1092 virtual UniqueArray<Integer> waitSomeRequests(ArrayView<Request> rvalues) = 0;
1093
1094 /*!
1095 * \brief Tests if one of the \a rvalues requests is complete.
1096 *
1097 * Returns an array of indices of completed requests.
1098 */
1099 virtual UniqueArray<Integer> testSomeRequests(ArrayView<Request> rvalues) = 0;
1100
1101 //@}
1102
1103 //! @name various operations
1104 //@{
1105
1106 /*!
1107 * \brief Returns a sequential parallelism manager.
1108 *
1109 * This instance retains ownership of the returned instance, which must not
1110 * be destroyed. The lifetime of the returned instance is
1111 * the same as this instance.
1112 */
1114 virtual Ref<IParallelMng> sequentialParallelMngRef() = 0;
1115
1116 //@}
1117
1118 /*!
1119 * \brief Returns an operation to retrieve the values of a variable
1120 * on the entities of another subdomain.
1121 *
1122 * The returned instance must be destroyed by the delete operator.
1123 */
1124 [[deprecated("Y2021: Use Arcane::ParallelMngUtils;:createGetVariablesValuesOperationRef() instead")]]
1126
1127 /*!
1128 * \brief Returns an operation to transfer values
1129 * between subdomains.
1130 *
1131 * The returned instance must be destroyed by the delete operator.
1132 */
1133 [[deprecated("Y2021: Use Arcane::ParallelMngUtils;:createTransferValuesOperationRef() instead")]]
1135
1136 /*!
1137 * \brief Returns an interface for transferring messages
1138 * between processors.
1139 *
1140 * The returned instance must be destroyed by the delete operator.
1141 */
1142 [[deprecated("Y2021: Use Arcane::ParallelMngUtils;:createExchangerRef() instead")]]
1144
1145 /*!
1146 * \brief Returns an interface for synchronizing
1147 * variables on the group of the \a family
1148 *
1149 * The returned instance must be destroyed by the delete operator.
1150 */
1151 [[deprecated("Y2021: Use Arcane::ParallelMngUtils;:createSynchronizerRef() instead")]]
1153
1154 /*!
1155 * \brief Returns an interface for synchronizing
1156 * variables on the \a group.
1157 *
1158 * The returned instance must be destroyed by the delete operator.
1159 */
1160 [[deprecated("Y2021: Use Arcane::ParallelMngUtils;:createSynchronizerRef() instead")]]
1162
1163 /*!
1164 * \brief Creates an instance containing information about the rank topology of this manager.
1165 *
1166 * This operation is collective.
1167 *
1168 * The returned instance must be destroyed by the delete operator.
1169 */
1170 [[deprecated("Y2021: Use Arcane::ParallelMngUtils;:createTopologyRef() instead")]]
1172
1173 /*!
1174 * \brief Replication information.
1175 *
1176 * The returned pointer is never null and remains the property of this
1177 * instance.
1178 */
1179 virtual IParallelReplication* replication() const = 0;
1180
1181 /*!
1182 * \internal
1183 * \brief Sets the Replication Information.
1184 *
1185 * This method is internal to Arcane and should only be called during initialization.
1186 */
1187 virtual void setReplication(IParallelReplication* v) = 0;
1188
1189 /*!
1190 * \brief Creates a new parallelism manager for a subset
1191 * of ranks.
1192 *
1193 * \deprecated Use createSubParallelMngRef() instead
1194 */
1195 ARCCORE_DEPRECATED_2020("Use createSubParallelMngRef() instead")
1197
1198 /*!
1199 * \brief Creates a new parallelism manager for a subset
1200 * of ranks.
1201 *
1202 * This operation is collective.
1203 *
1204 * This operation allows creating a new manager containing
1205 * only the \a kept_ranks of this manager.
1206 *
1207 * If the rank calling this operation is not in \a kept_ranks,
1208 * it returns 0.
1209 *
1210 * The returned instance must be destroyed by the delete operator.
1211 */
1213
1214 /*!
1215 * \brief Creates a request list for this manager.
1216 */
1218
1219 //! Statistics manager
1220 virtual IStat* stat() = 0;
1221
1222 //! Prints statistics related to this parallelism manager
1223 virtual void printStats() = 0;
1224
1225 //! Interface for non-blocking collective operations.
1227
1228 //! Associated %Arccore message passing manager
1230
1231 public:
1232
1233 //! Internal Arcane API
1234 virtual IParallelMngInternal* _internalApi() = 0;
1235
1236 private:
1237
1238 /*!
1239 * \internal
1240 * \brief Factory for utility functions.
1241 */
1242 virtual Ref<IParallelMngUtilsFactory> _internalUtilsFactory() const = 0;
1243};
1244
1245/*---------------------------------------------------------------------------*/
1246/*---------------------------------------------------------------------------*/
1247
1248/*!
1249 * \internal
1250 * \brief Interface for an 'IParallelMng' container.
1251 *
1252 * An IParallelMng container manages a set
1253 * of IParallelMng instances from the same communicator in shared memory mode.
1254 *
1255 * \note Do not use outside of Arcane. Unstabilized API.
1256 */
1257class ARCANE_CORE_EXPORT IParallelMngContainer
1258{
1260
1261 protected:
1262
1263 virtual ~IParallelMngContainer() = default;
1264
1265 public:
1266
1267 //! Creates the IParallelMng for the local rank \a local_rank
1269};
1270
1271/*---------------------------------------------------------------------------*/
1272/*---------------------------------------------------------------------------*/
1273
1274/*!
1275 * \internal
1276 * \brief Interface for an 'IParallelMng' container factory.
1277 * \note Do not use outside of Arcane. Unstabilized API.
1278 */
1279class ARCANE_CORE_EXPORT IParallelMngContainerFactory
1280{
1281 public:
1282
1283 virtual ~IParallelMngContainerFactory() = default;
1284
1285 public:
1286
1287 /*!
1288 * \brief Creates a container for \a nb_local_rank local ranks and
1289 * with \a communicator as the communicator.
1290 *
1291 * The MPI communicator \a communicator can be null in sequential or
1292 * shared memory mode. The number of local ranks is 1 in sequential or pure MPI mode.
1293 *
1294 * The second communicator \a machine_communicator is only useful in hybrid mode.
1295 * In other modes, it can be null.
1296 */
1299 Parallel::Communicator machine_communicator) = 0;
1300};
1301
1302/*---------------------------------------------------------------------------*/
1303/*---------------------------------------------------------------------------*/
1304
1305} // namespace Arcane
1306
1307/*---------------------------------------------------------------------------*/
1308/*---------------------------------------------------------------------------*/
1309
1310#endif
File containing declarations concerning the message passing model.
#define ARCCORE_DECLARE_REFERENCE_COUNTED_INCLASS_METHODS()
Macro to declare the virtual methods managing reference counters.
Declarations of types used in Arcane.
Emulation of real number in arbitrary precision.
Modifiable view of an array of type T.
Base class for 1D data vectors.
Constant view of an array of type T.
Class implementing a High-Precision real number.
Definition HPReal.h:159
Operations to access variable values from another subdomain.
Interface of the input/output manager.
Definition IIOMng.h:37
Interface of an entity family.
Definition IItemFamily.h:83
Information exchange between processors.
virtual Ref< IParallelMngContainer > _createParallelMngBuilder(Int32 nb_local_rank, Parallel::Communicator communicator, Parallel::Communicator machine_communicator)=0
Creates a container for nb_local_rank local ranks and with communicator as the communicator.
virtual Ref< IParallelMng > _createParallelMng(Int32 local_rank, ITraceMng *tm)=0
Creates the IParallelMng for the local rank local_rank.
Interface of the parallelism manager for a subdomain.
virtual void gatherVariable(ConstArrayView< char > send_buf, Array< char > &recv_buf, Int32 rank)=0
Performs an all-gather operation across all processors.
virtual bool isThreadImplementation() const =0
Indicates if the implementation uses threads.
virtual ITraceMng * traceMng() const =0
Trace manager.
virtual void printStats()=0
Prints statistics related to this parallelism manager.
virtual void computeMinMaxSum(char val, char &min_val, char &max_val, char &sum_val, Int32 &min_rank, Int32 &max_rank)=0
Calculates the sum, min, and max of a value in one operation.
virtual Int32 commRank() const =0
Rank of this instance in the communicator.
virtual Ref< Parallel::IRequestList > createRequestListRef()=0
Creates a request list for this manager.
virtual IParallelReplication * replication() const =0
Replication information.
virtual ISerializeMessage * createSendSerializer(Int32 rank)=0
Creates a non-blocking message to send serialized data to rank rank.
virtual void computeMinMaxSum(ConstArrayView< char > values, ArrayView< char > min_values, ArrayView< char > max_values, ArrayView< char > sum_values, ArrayView< Int32 > min_ranks, ArrayView< Int32 > max_ranks)=0
Calculates the sum, min, and max of a value in one operation.
virtual IParallelMng * sequentialParallelMng()=0
Returns a sequential parallelism manager.
virtual ITimeStats * timeStats() const =0
Associated statistics manager (can be null).
virtual ISerializeMessageList * createSerializeMessageList()=0
Creates a list to manage 'ISerializeMessage'.
virtual IStat * stat()=0
Statistics manager.
virtual MessageSourceInfo legacyProbe(const PointToPointMessageInfo &message)=0
Probes if messages are available.
virtual UniqueArray< Integer > waitSomeRequests(ArrayView< Request > rvalues)=0
Blocks while waiting for one of the rvalues requests to complete.
virtual ~IParallelMng()=default
Releases resources.
virtual ISerializeMessage * createReceiveSerializer(Int32 rank)=0
Creates a non-blocking message to receive serialized data from rank rank.
virtual void processMessages(ConstArrayView< ISerializeMessage * > messages)=0
Executes the operations of messages messages.
virtual void broadcastMemoryBuffer(ByteArray &bytes, Int32 rank)=0
Performs a broadcast of a memory region.
virtual Ref< ISerializeMessageList > createSerializeMessageListRef()=0
Creates a list to manage 'ISerializeMessage'.
virtual void reduce(eReduceType rt, ArrayView< char > v)=0
Performs the reduction of type rt on array v.
virtual ITimeMetricCollector * timeMetricCollector() const =0
Arccore temporal statistics collector (can be null).
virtual void recv(ArrayView< char > values, Int32 rank)=0
virtual void scan(eReduceType rt, ArrayView< char > v)=0
Applies a prefix-sum algorithm on the values of v using the rt operation.
virtual IParallelTopology * createTopology()=0
Creates an instance containing information about the rank topology of this manager.
virtual void allGatherVariable(ConstArrayView< char > send_buf, Array< char > &recv_buf)=0
Performs an all-gather operation across all processors.
virtual bool isMasterIO() const =0
true if the instance is a master I/O manager.
virtual Int32 commSize() const =0
Number of instances in the communicator.
virtual void scatterVariable(ConstArrayView< char > send_buf, ArrayView< char > recv_buf, Integer root)=0
Scatters an array across multiple processors.
virtual bool isHybridImplementation() const =0
Indicates if the implementation uses hybrid mode.
virtual void allGather(ConstArrayView< char > send_buf, ArrayView< char > recv_buf)=0
Performs an all-gather operation across all processors. This is a collective operation....
virtual IIOMng * ioMng() const =0
I/O manager.
virtual IVariableSynchronizer * createSynchronizer(IItemFamily *family)=0
Returns an interface for synchronizing variables on the group of the family.
virtual IThreadMng * threadMng() const =0
Thread manager.
virtual void waitAllRequests(ArrayView< Request > rvalues)=0
Blocks while waiting for the rvalues requests to complete.
virtual MessageId probe(const PointToPointMessageInfo &message)=0
Probes if messages are available.
virtual void build()=0
Constructs the instance.
virtual void initialize()=0
Initializes the parallelism manager.
virtual Parallel::Communicator communicator() const =0
MPI communicator associated with this manager.
virtual ITransferValuesParallelOperation * createTransferValuesOperation()=0
Returns an operation to transfer values between subdomains.
virtual IParallelMng * worldParallelMng() const =0
Parallelism manager over all allocated resources.
virtual void gather(ConstArrayView< char > send_buf, ArrayView< char > recv_buf, Int32 rank)=0
Performs a gather operation onto a processor. This is a collective operation. The array send_buf must...
virtual IParallelNonBlockingCollective * nonBlockingCollective() const =0
Interface for non-blocking collective operations.
virtual ITimerMng * timerMng() const =0
Timer manager.
virtual IParallelMng * createSubParallelMng(Int32ConstArrayView kept_ranks)=0
Creates a new parallelism manager for a subset of ranks.
virtual IMessagePassingMng * messagePassingMng() const =0
Associated Arccore message passing manager.
virtual IGetVariablesValuesParallelOperation * createGetVariablesValuesOperation()=0
Returns an operation to retrieve the values of a variable on the entities of another subdomain.
virtual Ref< IParallelMng > createSubParallelMngRef(Int32ConstArrayView kept_ranks)=0
Creates a new parallelism manager for a subset of ranks.
virtual UniqueArray< Integer > testSomeRequests(ArrayView< Request > rvalues)=0
Tests if one of the rvalues requests is complete.
virtual IParallelExchanger * createExchanger()=0
Returns an interface for transferring messages between processors.
virtual Integer masterIORank() const =0
Rank of the instance managing I/O (for which isMasterIO() is true).
virtual IParallelMngInternal * _internalApi()=0
Internal Arcane API.
virtual Request receive(Span< char > values, const PointToPointMessageInfo &message)=0
virtual Parallel::Communicator machineCommunicator() const
MPI communicator derived from the communicator communicator() gathering all processes of the compute ...
virtual ARCANE_DEPRECATED_120 void * mpiCommunicator()
Address of the MPI communicator associated with this manager.
Definition Parallel.cc:52
virtual bool isParallel() const =0
Returns true if the execution is parallel.
virtual void freeRequests(ArrayView< Parallel::Request > requests)=0
Frees the requests.
virtual void * getMPICommunicator()=0
Address of the MPI communicator associated with this manager.
virtual void setTimeStats(ITimeStats *time_stats)=0
Sets the statistics manager.
virtual char reduce(eReduceType rt, char v)=0
Performs a reduction of type rt on the real v and returns the value.
virtual void barrier()=0
Performs a barrier.
Interface for non-blocking collective parallel operations.
Brief information on parallel subdomain replication.
Information on the computing core allocation topology.
Interface of a thread manager.
Definition IThreadMng.h:32
Interface of a timer manager.
Definition ITimerMng.h:50
Sends values across different processors.
Interface of a variable synchronization service.
Mesh entity group.
Definition ItemGroup.h:51
Communicator for message exchange.
Interface of the message passing manager.
Information about the source of a message.
Information for sending/receiving a point-to-point message.
Class managing a 2-dimensional real vector.
Definition Real2.h:122
Class managing a 2x2 matrix of reals.
Definition Real2x2.h:55
Class managing a 3-dimensional real vector.
Definition Real3.h:132
Class managing a 3x3 real matrix.
Definition Real3x3.h:67
Reference to an instance.
View of an array of elements of type T.
Definition Span.h:635
1D data vector with value semantics (STL style).
eReduceType
Supported reduction types.
Concurrency implementation.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
Array< Byte > ByteArray
Dynamic one-dimensional array of characters.
Definition UtilsTypes.h:121
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
Definition UtilsTypes.h:482
std::int32_t Int32
Signed integer type of 32 bits.