Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
IParallelTopology.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/* IParallelTopology.h (C) 2000-20255 */
9/* */
10/* Information on the computing core allocation topology. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IPARALLELTOPOLOGY_H
13#define ARCANE_CORE_IPARALLELTOPOLOGY_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28/*!
29 * \ingroup Parallel
30 * \brief Information on the computing core allocation topology.
31 *
32 * An instance of this class is linked to an IParallelMng.
33 *
34 * It allows knowing how the ranks of this IParallelMng are allocated
35 * on the cluster and within the processes.
36 *
37 */
38class ARCANE_CORE_EXPORT IParallelTopology
39{
40 public:
41
42 virtual ~IParallelTopology() = default; //!< Frees resources.
43
44 public:
45
46 //! Associated parallelism manager
47 virtual IParallelMng* parallelMng() const = 0;
48
49 //! Indicates if this rank is the master rank for a machine (node)
50 virtual bool isMasterMachine() const = 0;
51
52 //! List of ranks that are on the same machine
53 virtual Int32ConstArrayView machineRanks() const = 0;
54
55 /*!
56 * \brief Rank of this instance in the list of machines (nodes).
57 *
58 * This rank is between 0 and masterMachineRanks().size().
59 */
60 virtual Int32 machineRank() const = 0;
61
62 /*!
63 * \brief List of master ranks for each machine (node).
64 *
65 * This list is the same for all ranks.
66 */
68
69 //! Indicates if this rank is the master within the ranks of this process.
70 virtual bool isMasterProcess() const = 0;
71
72 //! List of ranks that are in the same process (in multi-threading)
73 virtual Int32ConstArrayView processRanks() const = 0;
74
75 /*!
76 * \brief Rank of this instance in the list of processes.
77 *
78 * This rank is between 0 and masterProcessRanks().size().
79 */
80 virtual Int32 processRank() const = 0;
81
82 /*!
83 * \brief List of master ranks for each process.
84 *
85 * This list is the same for all ranks.
86 */
88};
89
90/*---------------------------------------------------------------------------*/
91/*---------------------------------------------------------------------------*/
92
93} // namespace Arcane
94
95/*---------------------------------------------------------------------------*/
96/*---------------------------------------------------------------------------*/
97
98#endif
Declarations of Arcane's general types.
Interface of the parallelism manager for a subdomain.
Information on the computing core allocation topology.
virtual IParallelMng * parallelMng() const =0
Associated parallelism manager.
virtual Int32ConstArrayView masterMachineRanks() const =0
List of master ranks for each machine (node).
virtual Int32ConstArrayView masterProcessRanks() const =0
List of master ranks for each process.
virtual bool isMasterMachine() const =0
Indicates if this rank is the master rank for a machine (node).
virtual Int32ConstArrayView processRanks() const =0
List of ranks that are in the same process (in multi-threading).
virtual ~IParallelTopology()=default
Frees resources.
virtual bool isMasterProcess() const =0
Indicates if this rank is the master within the ranks of this process.
virtual Int32 processRank() const =0
Rank of this instance in the list of processes.
virtual Int32ConstArrayView machineRanks() const =0
List of ranks that are on the same machine.
virtual Int32 machineRank() const =0
Rank of this instance in the list of machines (nodes).
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
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.