Arcane  4.1.12.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-2025 */
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/MpiMessagePassingMng.h"
18
20
21/*---------------------------------------------------------------------------*/
22/*---------------------------------------------------------------------------*/
23
24namespace Arcane::MessagePassing::Mpi
25{
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
30/*!
31 * \brief Standalone version of MpiMessagePassingMng.
32 *
33 * Creation is done via the static method create() or createRef().
34 */
35class ARCCORE_MESSAGEPASSINGMPI_EXPORT StandaloneMpiMessagePassingMng
36: public MpiMessagePassingMng
37{
38 class Impl;
39
40 private:
41
42 StandaloneMpiMessagePassingMng(Impl* p);
43
44 public:
45
46 ~StandaloneMpiMessagePassingMng() override;
47
48 public:
49
50 //! Creates a manager associated with the communicator \a comm.
51 static MpiMessagePassingMng* 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 private:
62
63 Impl* m_p;
64};
65
66/*---------------------------------------------------------------------------*/
67/*---------------------------------------------------------------------------*/
68
69} // End namespace Arcane::MessagePassing::Mpi
70
71/*---------------------------------------------------------------------------*/
72/*---------------------------------------------------------------------------*/
73
74#endif
static Ref< IMessagePassingMng > createRef(MPI_Comm comm, bool clean_comm=false)
Creates a manager associated with the communicator comm.
static MpiMessagePassingMng * create(MPI_Comm comm, bool clean_comm=false)
Creates a manager associated with the communicator comm.
Reference to an instance.