Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::SequentialParallelSuperMng Class Reference

Sequential parallelism supervisor. More...

#include <arcane/impl/SequentialParallelSuperMng.h>

Inheritance diagram for Arcane::SequentialParallelSuperMng:
Collaboration diagram for Arcane::SequentialParallelSuperMng:

Public Member Functions

 SequentialParallelSuperMng (const ServiceBuildInfo &sbi)
 SequentialParallelSuperMng (const ServiceBuildInfo &sbi, Parallel::Communicator comm)
void build () override
 Build-level construction of the service.
void initialize () override
 Initializes the instance.
IApplicationapplication () const override
 Returns the main manager.
IThreadMngthreadMng () 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.
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.
Ref< IParallelMnginternalCreateWorldParallelMng (Int32 local_rank) override
 Creates a parallelism manager for all allocated cores.
void tryAbort () override
 Attempts to abort.
Public Member Functions inherited from Arcane::AbstractService
 ~AbstractService () override
 Destructor.
IServiceInfoserviceInfo () const override
 Access to service information. See IServiceInfo for details.
IBaseserviceParent () const override
 Access to the base interface of main Arcane objects.
IServiceserviceInterface () override
 Returns the low-level IService interface of the service.
Public Member Functions inherited from Arcane::TraceAccessor
 TraceAccessor (ITraceMng *m)
 Constructs an accessor via the trace manager m.
 TraceAccessor (const TraceAccessor &rhs)
 Copy constructor.
TraceAccessoroperator= (const TraceAccessor &rhs)
 Copy assignment operator.
virtual ~TraceAccessor ()
 Frees resources.
ITraceMngtraceMng () const
 Trace manager.
TraceMessage info () const
 Flow for an information message.
TraceMessage pinfo () const
 Flow for a parallel information message.
TraceMessage info (char category) const
 Flow for an information message of a given category.
TraceMessage pinfo (char category) const
 Flow for a parallel information message of a given category.
TraceMessage info (bool v) const
 Flow for an information message.
TraceMessage warning () const
 Flow for a warning message.
TraceMessage pwarning () const
TraceMessage error () const
 Flow for an error message.
TraceMessage perror () const
TraceMessage log () const
 Flow for a log message.
TraceMessage plog () const
 Flow for a log message.
TraceMessage logdate () const
 Flow for a log message preceded by the date.
TraceMessage fatal () const
 Flow for a fatal error message.
TraceMessage pfatal () const
 Flow for a parallel fatal error message.
TraceMessageDbg debug (Trace::eDebugLevel=Trace::Medium) const
 Flow for a debug message.
Trace::eDebugLevel configDbgLevel () const
 Debug level of the configuration file.
TraceMessage info (Int32 verbose_level) const
 Flow for an information message of a given level.
TraceMessage linfo () const
 Flow for an information message with the local information level of this instance.
TraceMessage linfo (Int32 relative_level) const
 Flow for an information message with the local information level of this instance.
void fatalMessage (const StandaloneTraceMessage &o) const
Public Member Functions inherited from Arcane::IService
virtual ~IService ()
 Releases 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.

Private Attributes

IApplicationm_application
 Associated supervisor.
IThreadMngm_thread_mng
ITimerMngm_timer_mng
ScopedPtrT< ITimerMngm_owned_timer_mng
MP::Communicator m_communicator

Additional Inherited Members

Public Types inherited from Arcane::IParallelSuperMng
typedef Parallel::Request Request
typedef Parallel::eReduceType eReduceType
Protected Member Functions inherited from Arcane::AbstractService
 AbstractService (const ServiceBuildInfo &)
 Constructor from a ServiceBuildInfo.
Protected Member Functions inherited from Arcane::TraceAccessor
void _setLocalVerboseLevel (Int32 v)
Int32 _localVerboseLevel () const
Protected Member Functions inherited from Arcane::IService
 IService ()
 Constructor.
Protected Member Functions inherited from Arcane::ParallelSuperMngDispatcher
void _setDispatchers (IParallelDispatchT< Byte > *b, IParallelDispatchT< Int32 > *i32, IParallelDispatchT< Int64 > *i64, IParallelDispatchT< Real > *r)
void _finalize ()

Detailed Description

Sequential parallelism supervisor.

In this mode, parallelism is not supported. This manager therefore does nothing.

Definition at line 37 of file SequentialParallelSuperMng.h.

Constructor & Destructor Documentation

◆ SequentialParallelSuperMng() [1/2]

Arcane::SequentialParallelSuperMng::SequentialParallelSuperMng ( const ServiceBuildInfo & sbi)
explicit

Definition at line 980 of file SequentialParallelMng.cc.

◆ SequentialParallelSuperMng() [2/2]

Arcane::SequentialParallelSuperMng::SequentialParallelSuperMng ( const ServiceBuildInfo & sbi,
Parallel::Communicator comm )

Definition at line 993 of file SequentialParallelMng.cc.

◆ ~SequentialParallelSuperMng()

Arcane::SequentialParallelSuperMng::~SequentialParallelSuperMng ( )
override

Definition at line 1007 of file SequentialParallelMng.cc.

Member Function Documentation

◆ application()

IApplication * Arcane::SequentialParallelSuperMng::application ( ) const
inlineoverridevirtual

Returns the main manager.

Implements Arcane::IParallelSuperMng.

Definition at line 50 of file SequentialParallelSuperMng.h.

References m_application.

Referenced by Arcane::MpiSequentialParallelSuperMng::build().

Here is the caller graph for this function:

◆ barrier()

void Arcane::SequentialParallelSuperMng::barrier ( )
inlineoverridevirtual

Parallelism manager for all allocated resources.

Performs a barrier

Implements Arcane::IParallelSuperMng.

Definition at line 61 of file SequentialParallelSuperMng.h.

◆ build()

void Arcane::SequentialParallelSuperMng::build ( void )
overridevirtual

Build-level construction of the service.

This method is called right after the constructor.

Reimplemented from Arcane::AbstractService.

Definition at line 1031 of file SequentialParallelMng.cc.

References Arcane::TraceAccessor::traceMng().

Referenced by Arcane::MpiSequentialParallelSuperMng::build().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ commRank()

Int32 Arcane::SequentialParallelSuperMng::commRank ( ) const
inlineoverridevirtual

Returns the process number (between 0 and nbProcess()-1).

Implements Arcane::IParallelSuperMng.

Definition at line 53 of file SequentialParallelSuperMng.h.

◆ commSize()

Int32 Arcane::SequentialParallelSuperMng::commSize ( ) const
inlineoverridevirtual

Returns the total number of processes used.

Implements Arcane::IParallelSuperMng.

Definition at line 54 of file SequentialParallelSuperMng.h.

◆ communicator()

MP::Communicator Arcane::SequentialParallelSuperMng::communicator ( ) const
inlineoverridevirtual

MPI communicator associated with this manager.

See also
IParallelMng::communicator()

Implements Arcane::IParallelSuperMng.

Definition at line 57 of file SequentialParallelSuperMng.h.

Referenced by internalCreateWorldParallelMng().

Here is the caller graph for this function:

◆ getMPICommunicator()

void * Arcane::SequentialParallelSuperMng::getMPICommunicator ( )
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 56 of file SequentialParallelSuperMng.h.

◆ initialize()

void Arcane::SequentialParallelSuperMng::initialize ( )
overridevirtual

Initializes the instance.

The instance is not usable until this method has been called.

Warning
This method must only be called once.

Implements Arcane::IParallelSuperMng.

Definition at line 1016 of file SequentialParallelMng.cc.

References m_application, and Arcane::IBase::traceMng().

Here is the call graph for this function:

◆ internalCreateWorldParallelMng()

Ref< IParallelMng > Arcane::SequentialParallelSuperMng::internalCreateWorldParallelMng ( Int32 local_rank)
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 1043 of file SequentialParallelMng.cc.

References ARCANE_THROW, communicator(), threadMng(), and Arcane::TraceAccessor::traceMng().

Here is the call graph for this function:

◆ isMasterIO()

bool Arcane::SequentialParallelSuperMng::isMasterIO ( ) const
inlineoverridevirtual

Returns true if the instance is a master I/O manager.

Implements Arcane::IParallelSuperMng.

Definition at line 58 of file SequentialParallelSuperMng.h.

◆ isParallel()

bool Arcane::SequentialParallelSuperMng::isParallel ( ) const
inlineoverridevirtual

Returns true if the execution is parallel.

Implements Arcane::IParallelSuperMng.

Definition at line 52 of file SequentialParallelSuperMng.h.

◆ masterIORank()

Integer Arcane::SequentialParallelSuperMng::masterIORank ( ) const
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 59 of file SequentialParallelSuperMng.h.

◆ nbLocalSubDomain()

Integer Arcane::SequentialParallelSuperMng::nbLocalSubDomain ( )
inlineoverridevirtual

Number of subdomains to create locally.

  • 1 if sequential.
  • 1 if pure MPI
  • n if THREAD or THREAD/MPI

Implements Arcane::IParallelSuperMng.

Definition at line 60 of file SequentialParallelSuperMng.h.

◆ threadMng()

IThreadMng * Arcane::SequentialParallelSuperMng::threadMng ( ) const
inlineoverridevirtual

Thread manager.

Implements Arcane::IParallelSuperMng.

Definition at line 51 of file SequentialParallelSuperMng.h.

Referenced by internalCreateWorldParallelMng().

Here is the caller graph for this function:

◆ traceRank()

Int32 Arcane::SequentialParallelSuperMng::traceRank ( ) const
inlineoverridevirtual

Rank of this instance for traces.

Implements Arcane::IParallelSuperMng.

Definition at line 55 of file SequentialParallelSuperMng.h.

◆ tryAbort()

void Arcane::SequentialParallelSuperMng::tryAbort ( )
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 1059 of file SequentialParallelMng.cc.

Member Data Documentation

◆ m_application

IApplication* Arcane::SequentialParallelSuperMng::m_application
private

Associated supervisor.

Definition at line 68 of file SequentialParallelSuperMng.h.

Referenced by application(), and initialize().

◆ m_communicator

MP::Communicator Arcane::SequentialParallelSuperMng::m_communicator
private

Definition at line 72 of file SequentialParallelSuperMng.h.

◆ m_owned_timer_mng

ScopedPtrT<ITimerMng> Arcane::SequentialParallelSuperMng::m_owned_timer_mng
private

Definition at line 71 of file SequentialParallelSuperMng.h.

◆ m_thread_mng

IThreadMng* Arcane::SequentialParallelSuperMng::m_thread_mng
private

Definition at line 69 of file SequentialParallelSuperMng.h.

◆ m_timer_mng

ITimerMng* Arcane::SequentialParallelSuperMng::m_timer_mng
private

Definition at line 70 of file SequentialParallelSuperMng.h.


The documentation for this class was generated from the following files: