Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
ParallelMngUtils.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/* ParallelMngUtils.h (C) 2000-2026 */
9/* */
10/* Utility functions associated with 'IParallelMng'. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_PARALLELMNGUTILS_H
13#define ARCANE_CORE_PARALLELMNGUTILS_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
25/*!
26 * \brief Utility functions associated with IParallelMng.
27 */
29{
30
31/*!
32 * \brief Returns an operation to retrieve the values of a variable
33 * on the entities of another subdomain.
34 */
35extern "C++" ARCANE_CORE_EXPORT Ref<IGetVariablesValuesParallelOperation>
37
38//! Returns an operation to transfer values between ranks.
39extern "C++" ARCANE_CORE_EXPORT Ref<ITransferValuesParallelOperation>
40createTransferValuesOperationRef(IParallelMng* pm);
41
42//! Returns an interface to transfer messages between ranks
43extern "C++" ARCANE_CORE_EXPORT Ref<IParallelExchanger>
44createExchangerRef(IParallelMng* pm);
45
46/*!
47 * \brief Returns an interface to synchronize
48 * variables on the group of the family \a family
49 */
50extern "C++" ARCANE_CORE_EXPORT Ref<IVariableSynchronizer>
51createSynchronizerRef(IParallelMng* pm, IItemFamily* family);
52
53/*!
54 * \brief Returns an interface to synchronize
55 * variables on the group \a group.
56 */
57extern "C++" ARCANE_CORE_EXPORT Ref<IVariableSynchronizer>
58createSynchronizerRef(IParallelMng* pm, const ItemGroup& group);
59
60/*!
61 * \brief Creates an instance containing information about the rank topology of this manager.
62 *
63 * This operation is collective.
64 */
65extern "C++" ARCANE_CORE_EXPORT Ref<IParallelTopology>
66createTopologyRef(IParallelMng* pm);
67
68/*!
69 * \brief Creates a new parallelism manager for a subset
70 * of ranks.
71 *
72 * This operation is collective and is equivalent to MPI_Comm_split.
73 *
74 * Ranks whose \a color has the same value will be in the same communicator.
75 * \a key allows ordering the ranks in the created sub-communicator. If it equals
76 * pm->commRank(), then the ranks in the sub-communicator will have the same order
77 * as in \a pm.
78 *
79 * * If \a color is negative, then the current rank will not be associated with any
80 * communicator and the returned value will be null.
81 */
82extern "C++" ARCANE_CORE_EXPORT Ref<IParallelMng>
83createSubParallelMngRef(IParallelMng* pm, Int32 color, Int32 key);
84
85/*!
86 * \brief Creates a non-blocking serialization message for sending to rank \a rank.
87 *
88 * The message is processed only when IParallelMng::processMessages() is called.
89 */
90extern "C++" ARCANE_CORE_EXPORT Ref<ISerializeMessage>
92
93/*!
94 * \brief Creates a non-blocking serialization message for receiving from rank \a rank.
95 *
96 * The message is processed only when IParallelMng::processMessages() is called.
97 */
98extern "C++" ARCANE_CORE_EXPORT Ref<ISerializeMessage>
100
101/*!
102 * \brief Function to determine if shared memory window mode
103 * is supported and if its use is possible.
104 *
105 * Collective call.
106 *
107 * This function can be useful for using the classes:
108 * - MachineShMemWin(Base)
109 * - ContigMachineShMemWin(Base)
110 * - MachineShMemWinVariable...
111 *
112 * \return true if the classes above can be used.
113 */
114extern "C++" ARCANE_CORE_EXPORT bool
116
117/*---------------------------------------------------------------------------*/
118/*---------------------------------------------------------------------------*/
119
120} // End namespace Arcane::ParallelMngUtils
121
122/*---------------------------------------------------------------------------*/
123/*---------------------------------------------------------------------------*/
124
125#endif
Declarations of Arcane's general types.
File containing declarations concerning the message passing model.
Declarations of types used in Arcane.
Interface of the parallelism manager for a subdomain.
Reference to an instance.
Utility functions associated with IParallelMng.
Ref< ISerializeMessage > createSendSerializeMessageRef(IParallelMng *pm, Int32 rank)
Creates a non-blocking serialization message for sending to rank rank.
Ref< IParallelMng > createSubParallelMngRef(IParallelMng *pm, Int32 color, Int32 key)
Creates a new parallelism manager for a subset of ranks.
Ref< IParallelExchanger > createExchangerRef(IParallelMng *pm)
Returns an interface to transfer messages between ranks.
Ref< IGetVariablesValuesParallelOperation > createGetVariablesValuesOperationRef(IParallelMng *pm)
Returns an operation to retrieve the values of a variable on the entities of another subdomain.
Ref< ITransferValuesParallelOperation > createTransferValuesOperationRef(IParallelMng *pm)
Returns an operation to transfer values between ranks.
Ref< IParallelTopology > createTopologyRef(IParallelMng *pm)
Creates an instance containing information about the rank topology of this manager.
bool isMachineShMemWinAvailable(IParallelMng *pm)
Function to determine if shared memory window mode is supported and if its use is possible.
Ref< ISerializeMessage > createReceiveSerializeMessageRef(IParallelMng *pm, Int32 rank)
Creates a non-blocking serialization message for receiving from rank rank.
Ref< IVariableSynchronizer > createSynchronizerRef(IParallelMng *pm, IItemFamily *family)
Returns an interface to synchronize variables on the group of the family family.
std::int32_t Int32
Signed integer type of 32 bits.