Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
SequentialParallelMng.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/* SequentialParallelMng.h (C) 2000-2020 */
9/* */
10/* Parallelism management in the sequential case. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_IMPL_SEQUENTIALPARALLELMNG_H
13#define ARCANE_IMPL_SEQUENTIALPARALLELMNG_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
29class ITimeMng;
30class IThreadMng;
31class IParallelMng;
32
33/*---------------------------------------------------------------------------*/
34/*---------------------------------------------------------------------------*/
35
42struct SequentialParallelMngBuildInfo
43{
44 public:
45
46 SequentialParallelMngBuildInfo()
47 : m_trace_mng(nullptr)
48 , m_timer_mng(nullptr)
49 , m_thread_mng(nullptr)
50 {
51 }
52 SequentialParallelMngBuildInfo(ITimerMng* timer_mng, IParallelMng* world_pm)
53 : m_trace_mng(nullptr)
54 , m_timer_mng(timer_mng)
55 , m_thread_mng(nullptr)
56 , m_world_parallel_mng(world_pm)
57 {
58 }
59
60 public:
61
62 ITraceMng* traceMng() const { return m_trace_mng; }
63 void setTraceMng(ITraceMng* tm)
64 {
65 m_trace_mng = tm;
66 }
67
68 Parallel::Communicator communicator() const { return m_mpi_comm; }
69 void setCommunicator(Parallel::Communicator v) { m_mpi_comm = v; }
70
71 IThreadMng* threadMng() const { return m_thread_mng; }
72 void setThreadMng(IThreadMng* tm) { m_thread_mng = tm; }
73
74 private:
75
76 ITraceMng* m_trace_mng;
77
78 public:
79
80 ITimerMng* m_timer_mng;
81
82 private:
83
84 IThreadMng* m_thread_mng;
85
86 public:
87
88 IParallelMng* m_world_parallel_mng = nullptr;
89
90 private:
91
92 Parallel::Communicator m_mpi_comm;
93};
94
95/*---------------------------------------------------------------------------*/
96/*---------------------------------------------------------------------------*/
97
98extern "C++" ARCCORE_DEPRECATED_2020("Use arcaneCreateSequentialParallelMngRef() instead")
99ARCANE_IMPL_EXPORT IParallelMng* arcaneCreateSequentialParallelMng(const SequentialParallelMngBuildInfo& bi);
100extern "C++" ARCANE_IMPL_EXPORT Ref<IParallelMng>
101arcaneCreateSequentialParallelMngRef(const SequentialParallelMngBuildInfo& bi);
102
103/*---------------------------------------------------------------------------*/
104/*---------------------------------------------------------------------------*/
105
106} // End namespace Arcane
107
108/*---------------------------------------------------------------------------*/
109/*---------------------------------------------------------------------------*/
110
111#endif
Arcane configuration file.
File containing declarations concerning the message passing model.
Interface of the parallelism manager for a subdomain.
Interface of a thread manager.
Definition IThreadMng.h:32
Interface of a timer manager.
Definition ITimerMng.h:50
Communicator for message exchange.
Reference to an instance.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Information to construct a SequentialParallelMng.