Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
IParallelSuperMng.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/* IParallelSuperMng.h (C) 2000-2025 */
9/* */
10/* Parallelism supervisor interface. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IPARALLELSUPERMNG_H
13#define ARCANE_CORE_IPARALLELSUPERMNG_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
20
21/*---------------------------------------------------------------------------*/
22/*---------------------------------------------------------------------------*/
23
24namespace Arcane
25{
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
30class IApplication;
31class IParallelMng;
32class IThreadMng;
33
34/*---------------------------------------------------------------------------*/
35/*---------------------------------------------------------------------------*/
36
41class ARCANE_CORE_EXPORT IParallelSuperMng
42{
43 public:
44
45 typedef Parallel::Request Request;
46 typedef Parallel::eReduceType eReduceType;
47
48 public:
49
50 virtual ~IParallelSuperMng() {}
51
52 public:
53
62 virtual void build() = 0;
63
70 virtual void initialize() = 0;
71
72 public:
73
75 virtual IApplication* application() const = 0;
76
78 virtual IThreadMng* threadMng() const = 0;
79
81 virtual bool isParallel() const = 0;
82
84 virtual Int32 commRank() const = 0;
85
87 virtual Int32 commSize() const = 0;
88
90 virtual Int32 traceRank() const = 0;
91
98
99 virtual void* getMPICommunicator() = 0;
100
107
127
134 virtual Int32 nbLocalSubDomain() = 0;
135
143 virtual void tryAbort() = 0;
144
146 virtual bool isMasterIO() const = 0;
147
153 virtual Int32 masterIORank() const = 0;
154
158 //virtual IParallelMng* worldParallelMng() const =0;
159
161 virtual void barrier() = 0;
162
163 public:
164
166
167
176 virtual void broadcast(ByteArrayView send_buf, Integer process_id) = 0;
177 virtual void broadcast(Int32ArrayView send_buf, Integer process_id) = 0;
178 virtual void broadcast(Int64ArrayView send_buf, Integer process_id) = 0;
179 virtual void broadcast(RealArrayView send_buf, Integer process_id) = 0;
181};
182
183/*---------------------------------------------------------------------------*/
184/*---------------------------------------------------------------------------*/
185
186} // End namespace Arcane
187
188/*---------------------------------------------------------------------------*/
189/*---------------------------------------------------------------------------*/
190
191#endif
File containing declarations concerning the message passing model.
Declarations of types used in Arcane.
Application interface.
Interface of the parallelism manager for a subdomain.
Abstract class of the parallelism supervisor.
virtual void broadcast(ByteArrayView send_buf, Integer process_id)=0
Sends an array of values to all processes This operation synchronizes the value array send_buf across...
virtual void tryAbort()=0
Attempts to abort.
virtual ~IParallelSuperMng()
Frees resources.
virtual IThreadMng * threadMng() const =0
Thread manager.
virtual bool isMasterIO() const =0
Returns true if the instance is a master I/O manager.
virtual Int32 traceRank() const =0
Rank of this instance for traces.
virtual Int32 commRank() const =0
Returns the process number (between 0 and nbProcess()-1).
virtual void barrier()=0
Parallelism manager for all allocated resources.
virtual Parallel::Communicator communicator() const =0
MPI communicator associated with this manager.
virtual bool isParallel() const =0
Returns true if the execution is parallel.
virtual void * getMPICommunicator()=0
Address of the MPI communicator associated with this manager.
virtual IApplication * application() const =0
Returns the main manager.
virtual Int32 nbLocalSubDomain()=0
Number of subdomains to create locally.
virtual Ref< IParallelMng > internalCreateWorldParallelMng(Int32 local_rank)=0
Creates a parallelism manager for all allocated cores.
virtual void initialize()=0
Initializes the instance.
virtual Int32 masterIORank() const =0
Rank of the instance managing input/output (for which isMasterIO() is true).
virtual void build()=0
Constructs the instance members.
virtual Int32 commSize() const =0
Returns the total number of processes used.
Interface of a thread manager.
Definition IThreadMng.h:32
Communicator for message exchange.
Reference to an instance.
eReduceType
Supported reduction types.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
ArrayView< Int64 > Int64ArrayView
C equivalent of a 1D array of 64-bit integers.
Definition UtilsTypes.h:451
ArrayView< Byte > ByteArrayView
C equivalent of a 1D array of characters.
Definition UtilsTypes.h:447
Int32 Integer
Type representing an integer.
ArrayView< Int32 > Int32ArrayView
C equivalent of a 1D array of 32-bit integers.
Definition UtilsTypes.h:453
ArrayView< Real > RealArrayView
C equivalent of a 1D array of reals.
Definition UtilsTypes.h:459
std::int32_t Int32
Signed integer type of 32 bits.