Supervisor of parallelism using MPI and Threads. More...
Public Member Functions | |
| HybridParallelSuperMng (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. | |
| MP::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. | |
Public Attributes | |
| HybridParallelMngContainer * | m_container = nullptr |
| Ref< IParallelMngContainerFactory > | m_builder_factory |
| Ref< IParallelMngContainer > | m_main_builder |
| IApplication * | m_application |
| Main manager. | |
| Parallel::IStat * | m_stat |
| Int32 | m_mpi_comm_rank = -1 |
| Statistics. | |
| Int32 | m_mpi_comm_size = -1 |
| Number of processors. | |
| MPI_Comm | m_mpi_communicator |
| MP::Communicator | m_communicator |
| MP::Communicator | m_machine_communicator |
| Int32 | m_local_nb_rank = A_NULL_RANK |
| MpiLock * | m_mpi_lock |
| MpiAdapter * | m_mpi_adapter |
| MpiDatatypeList * | m_datatype_list |
| MpiErrorHandler | m_error_handler |
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 () |
Supervisor of parallelism using MPI and Threads.
Definition at line 302 of file HybridParallelSuperMng.cc.
|
explicit |
Definition at line 351 of file HybridParallelSuperMng.cc.
|
override |
Definition at line 368 of file HybridParallelSuperMng.cc.
|
inlineoverridevirtual |
Returns the main manager.
Implements Arcane::IParallelSuperMng.
Definition at line 313 of file HybridParallelSuperMng.cc.
References m_application.
|
overridevirtual |
Parallelism manager for all allocated resources.
Performs a barrier
Implements Arcane::IParallelSuperMng.
Definition at line 550 of file HybridParallelSuperMng.cc.
|
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 396 of file HybridParallelSuperMng.cc.
References Arcane::IApplication::applicationBuildInfo(), ARCANE_CHECK_POINTER, ARCANE_FATAL, Arcane::arcaneHasThread(), Arcane::arcaneInitializeMPI(), Arcane::arcaneIsCudaAwareMPI(), Arcane::ApplicationInfo::commandLineArguments(), Arcane::ServiceBuilder< InterfaceType >::createReference(), Arcane::RefImpl< InstanceType, RefClassType, ImplTagId >::get(), Arcane::platform::getRealTime(), Arcane::ITraceMng::info(), m_application, m_mpi_comm_rank, m_mpi_comm_size, and Arcane::IBase::traceMng().
|
inlineoverridevirtual |
Returns the process number (between 0 and nbProcess()-1).
Implements Arcane::IParallelSuperMng.
Definition at line 316 of file HybridParallelSuperMng.cc.
References m_mpi_comm_rank.
Referenced by internalCreateWorldParallelMng(), and isMasterIO().
|
inlineoverridevirtual |
Returns the total number of processes used.
Implements Arcane::IParallelSuperMng.
Definition at line 317 of file HybridParallelSuperMng.cc.
References m_mpi_comm_size.
|
inlineoverridevirtual |
MPI communicator associated with this manager.
Implements Arcane::IParallelSuperMng.
Definition at line 320 of file HybridParallelSuperMng.cc.
|
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 319 of file HybridParallelSuperMng.cc.
|
overridevirtual |
Initializes the instance.
The instance is not usable until this method has been called.
Implements Arcane::IParallelSuperMng.
Definition at line 388 of file HybridParallelSuperMng.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 514 of file HybridParallelSuperMng.cc.
References commRank(), Arcane::ITraceMng::info(), and m_application.
|
inlineoverridevirtual |
Returns true if the instance is a master I/O manager.
Implements Arcane::IParallelSuperMng.
Definition at line 323 of file HybridParallelSuperMng.cc.
References commRank().
|
inlineoverridevirtual |
Returns true if the execution is parallel.
Implements Arcane::IParallelSuperMng.
Definition at line 315 of file HybridParallelSuperMng.cc.
|
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 324 of file HybridParallelSuperMng.cc.
|
inlineoverridevirtual |
Number of subdomains to create locally.
Implements Arcane::IParallelSuperMng.
Definition at line 325 of file HybridParallelSuperMng.cc.
|
inlineoverridevirtual |
Thread manager.
Implements Arcane::IParallelSuperMng.
Definition at line 314 of file HybridParallelSuperMng.cc.
|
inlineoverridevirtual |
Rank of this instance for traces.
Implements Arcane::IParallelSuperMng.
Definition at line 318 of file HybridParallelSuperMng.cc.
References m_mpi_comm_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 540 of file HybridParallelSuperMng.cc.
References m_application.
| IApplication* Arcane::MessagePassing::HybridParallelSuperMng::m_application |
Main manager.
Definition at line 334 of file HybridParallelSuperMng.cc.
Referenced by application(), build(), internalCreateWorldParallelMng(), and tryAbort().
| Ref<IParallelMngContainerFactory> Arcane::MessagePassing::HybridParallelSuperMng::m_builder_factory |
Definition at line 331 of file HybridParallelSuperMng.cc.
| MP::Communicator Arcane::MessagePassing::HybridParallelSuperMng::m_communicator |
Definition at line 339 of file HybridParallelSuperMng.cc.
| HybridParallelMngContainer* Arcane::MessagePassing::HybridParallelSuperMng::m_container = nullptr |
Definition at line 330 of file HybridParallelSuperMng.cc.
| MpiDatatypeList* Arcane::MessagePassing::HybridParallelSuperMng::m_datatype_list |
Definition at line 344 of file HybridParallelSuperMng.cc.
| MpiErrorHandler Arcane::MessagePassing::HybridParallelSuperMng::m_error_handler |
Definition at line 345 of file HybridParallelSuperMng.cc.
| Int32 Arcane::MessagePassing::HybridParallelSuperMng::m_local_nb_rank = A_NULL_RANK |
Definition at line 341 of file HybridParallelSuperMng.cc.
| MP::Communicator Arcane::MessagePassing::HybridParallelSuperMng::m_machine_communicator |
Definition at line 340 of file HybridParallelSuperMng.cc.
| Ref<IParallelMngContainer> Arcane::MessagePassing::HybridParallelSuperMng::m_main_builder |
Definition at line 332 of file HybridParallelSuperMng.cc.
| MpiAdapter* Arcane::MessagePassing::HybridParallelSuperMng::m_mpi_adapter |
Definition at line 343 of file HybridParallelSuperMng.cc.
| Int32 Arcane::MessagePassing::HybridParallelSuperMng::m_mpi_comm_rank = -1 |
Statistics.
Current processor number
Definition at line 336 of file HybridParallelSuperMng.cc.
Referenced by build(), commRank(), and traceRank().
| Int32 Arcane::MessagePassing::HybridParallelSuperMng::m_mpi_comm_size = -1 |
Number of processors.
Definition at line 337 of file HybridParallelSuperMng.cc.
Referenced by build(), and commSize().
| MPI_Comm Arcane::MessagePassing::HybridParallelSuperMng::m_mpi_communicator |
Definition at line 338 of file HybridParallelSuperMng.cc.
| MpiLock* Arcane::MessagePassing::HybridParallelSuperMng::m_mpi_lock |
Definition at line 342 of file HybridParallelSuperMng.cc.
| Parallel::IStat* Arcane::MessagePassing::HybridParallelSuperMng::m_stat |
Definition at line 335 of file HybridParallelSuperMng.cc.