Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
IParallelReplication.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/* IParallelReplicationInfo.h (C) 2000-2025 */
9/* */
10/* Information on subdomain replication. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IPARALLELREPLICATION_H
13#define ARCANE_CORE_IPARALLELREPLICATION_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28/*!
29 * \ingroup Parallel
30 * \brief Brief information on parallel subdomain replication.
31 */
32class ARCANE_CORE_EXPORT IParallelReplication
33{
34 public:
35
36 virtual ~IParallelReplication() = default;
37
38 public:
39
40 //! Indicates if replication is active
41 virtual bool hasReplication() const = 0;
42
43 //! Number of replications
44 virtual Int32 nbReplication() const = 0;
45
46 //! Rank in the replication (from 0 to nbReplication()-1)
47 virtual Int32 replicationRank() const = 0;
48
49 /*!
50 * \brief Indicates if this replication rank is the master.
51 *
52 * This is useful for example for outputs, so that only one
53 * replica outputs the information.
54 */
55 virtual bool isMasterRank() const = 0;
56
57 //! Rank in the master replication.
58 virtual Int32 masterReplicationRank() const = 0;
59
60 /*!
61 * \brief Communicator associated with all replicas representing the same subdomain.
62 *
63 * Is 0 if there is no replication (hasReplication() is false).
64 */
65 virtual IParallelMng* replicaParallelMng() const = 0;
66};
67
68/*---------------------------------------------------------------------------*/
69/*---------------------------------------------------------------------------*/
70
71} // namespace Arcane
72
73/*---------------------------------------------------------------------------*/
74/*---------------------------------------------------------------------------*/
75
76#endif
Declarations of Arcane's general types.
Interface of the parallelism manager for a subdomain.
Brief information on parallel subdomain replication.
virtual bool hasReplication() const =0
Indicates if replication is active.
virtual IParallelMng * replicaParallelMng() const =0
Communicator associated with all replicas representing the same subdomain.
virtual Int32 masterReplicationRank() const =0
Rank in the master replication.
virtual Int32 replicationRank() const =0
Rank in the replication (from 0 to nbReplication()-1).
virtual Int32 nbReplication() const =0
Number of replications.
virtual bool isMasterRank() const =0
Indicates if this replication rank is the master.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int32_t Int32
Signed integer type of 32 bits.