Arcane  4.2.3.0
User documentation
Loading...
Searching...
No Matches
StandaloneMpiMessagePassingMng.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/* StandaloneMpiMessagePassingMng.h (C) 2000-2026 */
9/* */
10/* Standalone version of MpiMessagePassingMng. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCCORE_MESSAGEPASSINGMPI_STANDALONEMPIMESSAGEPASSINGMNG_H
13#define ARCCORE_MESSAGEPASSINGMPI_STANDALONEMPIMESSAGEPASSINGMNG_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arccore/message_passing_mpi/MessagePassingMpiGlobal.h"
18#include "arccore/message_passing/IMessagePassingMng.h"
19
20#include "arccore/base/Ref.h"
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
25namespace Arcane::MessagePassing::Mpi
26{
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30/*!
31 * \brief Standalone version of IMessagePassingMng associated to a MPI Communicator
32 *
33 * Creation is done via the static method createRef() or deprecated
34 * method create().
35 *
36 * From the returned IMessagePassingMng, it is possible to retrieve
37 * the associated MPI_Comm using helper functions fillMpiCommunicatorIfValid()
38 * or toMpiCommunicator().
39 */
40class ARCCORE_MESSAGEPASSINGMPI_EXPORT StandaloneMpiMessagePassingMng
41{
42 public:
43
44 /*!
45 * \brief Creates a manager associated with the communicator \a comm.
46 *
47 * \deprecated Use createRef() instead because it has automatic memory
48 * management.
49 */
50 ARCCORE_DEPRECATED_REASON("Y2026: Use createRef() instead")
51 static IMessagePassingMng* create(MPI_Comm comm, bool clean_comm = false);
52
53 /*!
54 * \brief Creates a manager associated with the communicator \a comm.
55 *
56 * If \a clean_comm is true, MPI_Comm_free() is called on \a comm
57 * when the instance is destroyed.
58 */
59 static Ref<IMessagePassingMng> createRef(MPI_Comm comm, bool clean_comm = false);
60
61 /*!
62 * \brief Creates a manager associated with the MPI_WORLD_COMM communicator.
63 */
65};
66
67/*---------------------------------------------------------------------------*/
68/*---------------------------------------------------------------------------*/
69
70} // End namespace Arcane::MessagePassing::Mpi
71
72/*---------------------------------------------------------------------------*/
73/*---------------------------------------------------------------------------*/
74
75#endif
Management of references to a C++ class.
Interface of the message passing manager.
Standalone version of IMessagePassingMng associated to a MPI Communicator.
static Ref< IMessagePassingMng > createRef(MPI_Comm comm, bool clean_comm=false)
Creates a manager associated with the communicator comm.
static Ref< IMessagePassingMng > createWorldRef()
Creates a manager associated with the MPI_WORLD_COMM communicator.
static IMessagePassingMng * create(MPI_Comm comm, bool clean_comm=false)
Creates a manager associated with the communicator comm.
Reference to an instance.