Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
ParallelReplication.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/* ParallelReplication.h (C) 2000-2020 */
9/* */
10/* Information on subdomain replication. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_IMPL_PARALLELREPLICATION_H
13#define ARCANE_IMPL_PARALLELREPLICATION_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/Ref.h"
18
19#include "arcane/core/IParallelReplication.h"
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
25namespace Arcane
26{
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30
31class IParallelMng;
32
33/*---------------------------------------------------------------------------*/
34/*---------------------------------------------------------------------------*/
35
50class ARCANE_IMPL_EXPORT ParallelReplication
52{
53 public:
54
57
59 ParallelReplication(Int32 rank, Int32 nb_rank, Ref<IParallelMng> replica_pm);
60 virtual ~ParallelReplication();
61
62 public:
63
64 virtual bool hasReplication() const { return m_is_active; }
65 virtual Int32 nbReplication() const { return m_nb_replication; }
66 virtual Int32 replicationRank() const { return m_replication_rank; }
67 virtual bool isMasterRank() const { return m_is_master_rank; }
68 virtual Int32 masterReplicationRank() const { return m_master_replication_rank; }
69 virtual IParallelMng* replicaParallelMng() const { return m_replica_parallel_mng.get(); }
70
71 private:
72
73 bool m_is_active;
74 Int32 m_nb_replication;
75 Int32 m_replication_rank;
76 bool m_is_master_rank;
77 Int32 m_master_replication_rank;
78 Ref<IParallelMng> m_replica_parallel_mng;
79};
80
81/*---------------------------------------------------------------------------*/
82/*---------------------------------------------------------------------------*/
83
84} // End namespace Arcane
85
86/*---------------------------------------------------------------------------*/
87/*---------------------------------------------------------------------------*/
88
89#endif
File containing declarations concerning the message passing model.
Interface of the parallelism manager for a subdomain.
Brief information on parallel subdomain replication.
virtual bool isMasterRank() const
Indicates if this replication rank is the master.
ParallelReplication()
Constructor without replication.
virtual IParallelMng * replicaParallelMng() const
Communicator associated with all replicas representing the same subdomain.
virtual Int32 masterReplicationRank() const
Rank in the master replication.
virtual bool hasReplication() const
Indicates if replication is active.
virtual Int32 replicationRank() const
Rank in the replication (from 0 to nbReplication()-1).
virtual Int32 nbReplication() const
Number of replications.
Reference to an instance.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int32_t Int32
Signed integer type of 32 bits.