MPI-based parallelism supervisor. More...
Public Member Functions | |
| MpiParallelSuperMng (const ServiceBuildInfo &sbi) | |
| void | initialize () override |
| Initializes the instance. | |
| void | build () override |
| Constructs the instance members. | |
| IApplication * | application () const override |
| Returns the main manager. | |
| IThreadMng * | threadMng () const override |
| Thread manager. | |
| bool | isParallel () const override |
| Returns true if the execution is parallel. | |
| Int32 | commRank () const override |
| Returns the process number (between 0 and nbProcess()-1). | |
| Int32 | commSize () const override |
| Returns the total number of processes used. | |
| Int32 | traceRank () const override |
| Rank of this instance for traces. | |
| void * | getMPICommunicator () override |
| Address of the MPI communicator associated with this manager. | |
| Parallel::Communicator | communicator () const override |
| MPI communicator associated with this manager. | |
| Ref< IParallelMng > | internalCreateWorldParallelMng (Int32 local_rank) override |
| Creates a parallelism manager for all allocated cores. | |
| void | tryAbort () override |
| Attempts to abort. | |
| bool | isMasterIO () const override |
| Returns true if the instance is a master I/O manager. | |
| Integer | masterIORank () const override |
| Rank of the instance managing input/output (for which isMasterIO() is true). | |
| Integer | nbLocalSubDomain () override |
| Number of subdomains to create locally. | |
| void | barrier () override |
| Parallelism manager for all allocated resources. | |
| Public Member Functions inherited from Arcane::ParallelSuperMngDispatcher | |
| virtual void | allGather (ByteConstArrayView send_buf, ByteArrayView recv_buf) |
| virtual void | allGather (Int32ConstArrayView send_buf, Int32ArrayView recv_buf) |
| virtual void | allGather (Int64ConstArrayView send_buf, Int64ArrayView recv_buf) |
| virtual void | allGather (RealConstArrayView send_buf, RealArrayView recv_buf) |
| virtual Int32 | reduce (eReduceType rt, Int32 v) |
| virtual Int64 | reduce (eReduceType rt, Int64 v) |
| virtual Real | reduce (eReduceType rt, Real v) |
| virtual void | reduce (eReduceType rt, Int32ArrayView v) |
| virtual void | reduce (eReduceType rt, Int64ArrayView v) |
| virtual void | reduce (eReduceType rt, RealArrayView v) |
| void | broadcast (ByteArrayView send_buf, Integer id) override |
| Sends an array of values to all processes This operation synchronizes the value array send_buf across all processes. The array used is that of the process whose identifier (processId()) is process_id. All processes must call this method with the same parameter process_id and have a send_buf array containing the same number of elements. | |
| void | broadcast (Int32ArrayView send_buf, Integer id) override |
| void | broadcast (Int64ArrayView send_buf, Integer id) override |
| void | broadcast (RealArrayView send_buf, Integer id) override |
| virtual void | send (ByteConstArrayView values, Integer id) |
| virtual void | send (Int32ConstArrayView values, Integer id) |
| virtual void | send (Int64ConstArrayView values, Integer id) |
| virtual void | send (RealConstArrayView values, Integer id) |
| virtual void | recv (ByteArrayView values, Integer id) |
| virtual void | recv (Int32ArrayView values, Integer id) |
| virtual void | recv (Int64ArrayView values, Integer id) |
| virtual void | recv (RealArrayView values, Integer id) |
| virtual Request | send (ByteConstArrayView values, Integer id, bool is_blocked) |
| virtual Request | send (Int32ConstArrayView values, Integer id, bool is_blocked) |
| virtual Request | send (Int64ConstArrayView values, Integer id, bool is_blocked) |
| virtual Request | send (RealConstArrayView values, Integer id, bool is_blocked) |
| virtual Request | recv (ByteArrayView values, Integer id, bool is_blocked) |
| virtual Request | recv (Int32ArrayView values, Integer id, bool is_blocked) |
| virtual Request | recv (Int64ArrayView values, Integer id, bool is_blocked) |
| virtual Request | recv (RealArrayView values, Integer id, bool is_blocked) |
| virtual void | sendRecv (ByteConstArrayView send_buf, ByteArrayView recv_buf, Integer id) |
| virtual void | sendRecv (Int32ConstArrayView send_buf, Int32ArrayView recv_buf, Integer id) |
| virtual void | sendRecv (Int64ConstArrayView send_buf, Int64ArrayView recv_buf, Integer id) |
| virtual void | sendRecv (RealConstArrayView send_buf, RealArrayView recv_buf, Integer id) |
| virtual void | allToAll (ByteConstArrayView send_buf, ByteArrayView recv_buf, Integer count) |
| virtual void | allToAll (Int32ConstArrayView send_buf, Int32ArrayView recv_buf, Integer count) |
| virtual void | allToAll (Int64ConstArrayView send_buf, Int64ArrayView recv_buf, Integer count) |
| virtual void | allToAll (RealConstArrayView send_buf, RealArrayView recv_buf, Integer count) |
| virtual Int32 | scan (eReduceType rt, Int32 v) |
| virtual Int64 | scan (eReduceType rt, Int64 v) |
| virtual Real | scan (eReduceType rt, Real v) |
| virtual void | scan (eReduceType rt, Int32ArrayView v) |
| virtual void | scan (eReduceType rt, Int64ArrayView v) |
| virtual void | scan (eReduceType rt, RealArrayView v) |
| Public Member Functions inherited from Arcane::IParallelSuperMng | |
| virtual | ~IParallelSuperMng () |
| Frees resources. | |
Static Public Member Functions | |
| static void | initMPI (IApplication *app) |
Public Attributes | |
| IApplication * | m_application |
| Main manager. | |
| IThreadMng * | m_thread_mng |
| Parallel::IStat * | m_stat |
| bool | m_is_parallel |
| Statistics. | |
| Int32 | m_rank |
| MPI rank in the global communicator of this process. | |
| Int32 | m_nb_rank |
| Number of MPI processes in the global communicator. | |
| Int32 | m_nb_local_sub_domain |
| Number of local sub-domains. | |
| MPI_Comm | m_mpi_main_communicator |
| MPI Communicator. | |
| MP::Communicator | m_main_communicator |
| MPI Communicator. | |
| MP::Communicator | m_machine_communicator |
| MPI Machine Communicator. | |
| MpiErrorHandler | m_error_handler |
| MpiAdapter * | m_adapter |
| MpiDatatypeList * | m_datatype_list |
Static Private Member Functions | |
| static void | _ErrorHandler (MPI_Comm *, int *,...) |
Additional Inherited Members | |
| Public Types inherited from Arcane::IParallelSuperMng | |
| typedef Parallel::Request | Request |
| typedef Parallel::eReduceType | eReduceType |
| Protected Member Functions inherited from Arcane::ParallelSuperMngDispatcher | |
| void | _setDispatchers (IParallelDispatchT< Byte > *b, IParallelDispatchT< Int32 > *i32, IParallelDispatchT< Int64 > *i64, IParallelDispatchT< Real > *r) |
| void | _finalize () |
MPI-based parallelism supervisor.
Definition at line 49 of file MpiParallelSuperMng.cc.
|
explicit |
Definition at line 104 of file MpiParallelSuperMng.cc.
|
override |
Definition at line 126 of file MpiParallelSuperMng.cc.
|
staticprivate |
Definition at line 203 of file MpiParallelSuperMng.cc.
|
inlineoverridevirtual |
Returns the main manager.
Implements Arcane::IParallelSuperMng.
Definition at line 60 of file MpiParallelSuperMng.cc.
References m_application.
|
overridevirtual |
Parallelism manager for all allocated resources.
Performs a barrier
Implements Arcane::IParallelSuperMng.
Definition at line 321 of file MpiParallelSuperMng.cc.
References m_main_communicator.
|
overridevirtual |
Constructs the instance members.
The instance is not usable until this method has been called. This method must be called before initialize().
Implements Arcane::IParallelSuperMng.
Definition at line 224 of file MpiParallelSuperMng.cc.
References Arcane::arcaneIsAcceleratorAwareMPI(), Arcane::platform::getRealTime(), Arcane::ITraceMng::info(), m_application, m_is_parallel, m_machine_communicator, m_main_communicator, m_mpi_main_communicator, m_nb_rank, and m_rank.
|
inlineoverridevirtual |
Returns the process number (between 0 and nbProcess()-1).
Implements Arcane::IParallelSuperMng.
Definition at line 63 of file MpiParallelSuperMng.cc.
References m_rank.
Referenced by isMasterIO().
|
inlineoverridevirtual |
Returns the total number of processes used.
Implements Arcane::IParallelSuperMng.
Definition at line 64 of file MpiParallelSuperMng.cc.
References m_nb_rank.
|
inlineoverridevirtual |
MPI communicator associated with this manager.
Implements Arcane::IParallelSuperMng.
Definition at line 67 of file MpiParallelSuperMng.cc.
References m_main_communicator.
|
inlineoverridevirtual |
Address of the MPI communicator associated with this manager.
The communicator is only valid if MPI is used. Otherwise, the returned address is 0. The returned value is of type (MPI_Comm*).
Implements Arcane::IParallelSuperMng.
Definition at line 66 of file MpiParallelSuperMng.cc.
References m_mpi_main_communicator.
|
overridevirtual |
Initializes the instance.
The instance is not usable until this method has been called.
Implements Arcane::IParallelSuperMng.
Definition at line 156 of file MpiParallelSuperMng.cc.
|
static |
Definition at line 164 of file MpiParallelSuperMng.cc.
|
overridevirtual |
Creates a parallelism manager for all allocated cores.
This operation is collective.
This method must only be called once during initialization.
local_rank is the local rank of the caller in the list of ranks. In pure MPI mode, this rank is always 0 because there is only one thread. In Thread or Thread/MPI mode, it is the rank of the thread used during creation.
The returned manager remains the property of this instance and must not be destroyed.
For internal use only.
Implements Arcane::IParallelSuperMng.
Definition at line 272 of file MpiParallelSuperMng.cc.
References ARCANE_THROW, Arcane::createRef(), Arcane::ITraceMng::debug(), m_application, m_machine_communicator, and m_main_communicator.
|
inlineoverridevirtual |
Returns true if the instance is a master I/O manager.
Implements Arcane::IParallelSuperMng.
Definition at line 70 of file MpiParallelSuperMng.cc.
References commRank().
|
inlineoverridevirtual |
Returns true if the execution is parallel.
Implements Arcane::IParallelSuperMng.
Definition at line 62 of file MpiParallelSuperMng.cc.
References m_is_parallel.
|
inlineoverridevirtual |
Rank of the instance managing input/output (for which isMasterIO() is true).
In the current implementation, this is always the rank 0 processor.
Implements Arcane::IParallelSuperMng.
Definition at line 71 of file MpiParallelSuperMng.cc.
|
inlineoverridevirtual |
Number of subdomains to create locally.
Implements Arcane::IParallelSuperMng.
Definition at line 72 of file MpiParallelSuperMng.cc.
References m_nb_local_sub_domain.
|
inlineoverridevirtual |
Thread manager.
Implements Arcane::IParallelSuperMng.
Definition at line 61 of file MpiParallelSuperMng.cc.
|
inlineoverridevirtual |
Rank of this instance for traces.
Implements Arcane::IParallelSuperMng.
Definition at line 65 of file MpiParallelSuperMng.cc.
References m_rank.
|
overridevirtual |
Attempts to abort.
This method is called when an exception has been generated and the current execution case must stop. It allows performing cleanup operations on the manager if necessary.
Implements Arcane::IParallelSuperMng.
Definition at line 310 of file MpiParallelSuperMng.cc.
References m_application, m_main_communicator, and m_rank.
| MpiAdapter* Arcane::MpiParallelSuperMng::m_adapter |
Definition at line 92 of file MpiParallelSuperMng.cc.
| IApplication* Arcane::MpiParallelSuperMng::m_application |
Main manager.
Definition at line 81 of file MpiParallelSuperMng.cc.
Referenced by application(), build(), internalCreateWorldParallelMng(), and tryAbort().
| MpiDatatypeList* Arcane::MpiParallelSuperMng::m_datatype_list |
Definition at line 93 of file MpiParallelSuperMng.cc.
| MpiErrorHandler Arcane::MpiParallelSuperMng::m_error_handler |
Definition at line 91 of file MpiParallelSuperMng.cc.
| bool Arcane::MpiParallelSuperMng::m_is_parallel |
Statistics.
true if running in parallel mode
Definition at line 84 of file MpiParallelSuperMng.cc.
Referenced by build(), and isParallel().
| MP::Communicator Arcane::MpiParallelSuperMng::m_machine_communicator |
MPI Machine Communicator.
Definition at line 90 of file MpiParallelSuperMng.cc.
Referenced by build(), and internalCreateWorldParallelMng().
| MP::Communicator Arcane::MpiParallelSuperMng::m_main_communicator |
MPI Communicator.
Definition at line 89 of file MpiParallelSuperMng.cc.
Referenced by barrier(), build(), communicator(), internalCreateWorldParallelMng(), and tryAbort().
| MPI_Comm Arcane::MpiParallelSuperMng::m_mpi_main_communicator |
MPI Communicator.
Definition at line 88 of file MpiParallelSuperMng.cc.
Referenced by build(), and getMPICommunicator().
| Int32 Arcane::MpiParallelSuperMng::m_nb_local_sub_domain |
Number of local sub-domains.
Definition at line 87 of file MpiParallelSuperMng.cc.
Referenced by nbLocalSubDomain().
| Int32 Arcane::MpiParallelSuperMng::m_nb_rank |
Number of MPI processes in the global communicator.
Definition at line 86 of file MpiParallelSuperMng.cc.
Referenced by build(), and commSize().
| Int32 Arcane::MpiParallelSuperMng::m_rank |
MPI rank in the global communicator of this process.
Definition at line 85 of file MpiParallelSuperMng.cc.
Referenced by build(), commRank(), traceRank(), and tryAbort().
| Parallel::IStat* Arcane::MpiParallelSuperMng::m_stat |
Definition at line 83 of file MpiParallelSuperMng.cc.
| IThreadMng* Arcane::MpiParallelSuperMng::m_thread_mng |
Definition at line 82 of file MpiParallelSuperMng.cc.