12#ifndef ARCANE_CORE_IPARALLELMNG_H
13#define ARCANE_CORE_IPARALLELMNG_H
56 friend class ParallelMngUtilsAccessor;
93 virtual ARCANE_DEPRECATED
Integer subDomainId() const final {
return commRank(); }
96 virtual ARCANE_DEPRECATED
Integer nbSubDomain() const final {
return commSize(); }
426 virtual char reduce(eReduceType rt,
char v) = 0;
427 virtual signed char reduce(eReduceType rt,
signed char v) = 0;
428 virtual unsigned char reduce(eReduceType rt,
unsigned char v) = 0;
429 virtual short reduce(eReduceType rt,
short v) = 0;
430 virtual unsigned short reduce(eReduceType rt,
unsigned short v) = 0;
431 virtual int reduce(eReduceType rt,
int v) = 0;
432 virtual unsigned int reduce(eReduceType rt,
unsigned int v) = 0;
433 virtual long reduce(eReduceType rt,
long v) = 0;
434 virtual unsigned long reduce(eReduceType rt,
unsigned long v) = 0;
435 virtual long long reduce(eReduceType rt,
long long v) = 0;
436 virtual unsigned long long reduce(eReduceType rt,
unsigned long long v) = 0;
437 virtual float reduce(eReduceType rt,
float v) = 0;
438 virtual double reduce(eReduceType rt,
double v) = 0;
439 virtual long double reduce(eReduceType rt,
long double v) = 0;
462 char& max_val,
char& sum_val,
465 signed char& max_val,
signed char& sum_val,
468 unsigned char& max_val,
unsigned char& sum_val,
471 short& max_val,
short& sum_val,
474 unsigned short& max_val,
unsigned short& sum_val,
477 int& max_val,
int& sum_val,
480 unsigned int& max_val,
unsigned int& sum_val,
483 long& max_val,
long& sum_val,
486 unsigned long& max_val,
unsigned long& sum_val,
489 long long& max_val,
long long& sum_val,
491 virtual void computeMinMaxSum(
unsigned long long val,
unsigned long long& min_val,
492 unsigned long long& max_val,
unsigned long long& sum_val,
495 float& max_val,
float& sum_val,
498 double& max_val,
double& sum_val,
501 long double& max_val,
long double& sum_val,
657 virtual void broadcastString(
String& str,
Int32 rank) = 0;
709 ARCCORE_DEPRECATED_2019(
"Use createSendSerializer(Int32 rank) instead")
782 virtual Request send(
ConstArrayView<
signed char> values,
Int32 rank,
bool is_blocking) = 0;
783 virtual Request send(
ConstArrayView<
unsigned char> values,
Int32 rank,
bool is_blocking) = 0;
785 virtual Request send(
ConstArrayView<
unsigned short> values,
Int32 rank,
bool is_blocking) = 0;
787 virtual Request send(
ConstArrayView<
unsigned int> values,
Int32 rank,
bool is_blocking) = 0;
789 virtual Request send(
ConstArrayView<
unsigned long> values,
Int32 rank,
bool is_blocking) = 0;
791 virtual Request send(
ConstArrayView<
unsigned long long> values,
Int32 rank,
bool is_blocking) = 0;
794 virtual Request send(
ConstArrayView<
long double> values,
Int32 rank,
bool is_blocking) = 0;
807 virtual Request
recv(
ArrayView<
signed char> values,
Int32 rank,
bool is_blocking) = 0;
808 virtual Request
recv(
ArrayView<
unsigned char> values,
Int32 rank,
bool is_blocking) = 0;
810 virtual Request
recv(
ArrayView<
unsigned short> values,
Int32 rank,
bool is_blocking) = 0;
812 virtual Request
recv(
ArrayView<
unsigned int> values,
Int32 rank,
bool is_blocking) = 0;
814 virtual Request
recv(
ArrayView<
unsigned long> values,
Int32 rank,
bool is_blocking) = 0;
816 virtual Request
recv(
ArrayView<
unsigned long long> values,
Int32 rank,
bool is_blocking) = 0;
819 virtual Request
recv(
ArrayView<
long double> values,
Int32 rank,
bool is_blocking) = 0;
831 virtual Request
receive(
Span<
char> values, const PointToPointMessageInfo& message) = 0;
832 virtual Request
receive(
Span<
signed char> values, const PointToPointMessageInfo& message) = 0;
833 virtual Request
receive(
Span<
unsigned char> values, const PointToPointMessageInfo& message) = 0;
834 virtual Request
receive(
Span<
short> values, const PointToPointMessageInfo& message) = 0;
835 virtual Request
receive(
Span<
unsigned short> values, const PointToPointMessageInfo& message) = 0;
836 virtual Request
receive(
Span<
int> values, const PointToPointMessageInfo& message) = 0;
837 virtual Request
receive(
Span<
unsigned int> values, const PointToPointMessageInfo& message) = 0;
838 virtual Request
receive(
Span<
long> values, const PointToPointMessageInfo& message) = 0;
839 virtual Request
receive(
Span<
unsigned long> values, const PointToPointMessageInfo& message) = 0;
840 virtual Request
receive(
Span<
long long> values, const PointToPointMessageInfo& message) = 0;
841 virtual Request
receive(
Span<
unsigned long long> values, const PointToPointMessageInfo& message) = 0;
842 virtual Request
receive(
Span<
float> values, const PointToPointMessageInfo& message) = 0;
843 virtual Request
receive(
Span<
double> values, const PointToPointMessageInfo& message) = 0;
844 virtual Request
receive(
Span<
long double> values, const PointToPointMessageInfo& message) = 0;
845 virtual Request
receive(
Span<
APReal> values, const PointToPointMessageInfo& message) = 0;
846 virtual Request
receive(
Span<
Real2> values, const PointToPointMessageInfo& message) = 0;
847 virtual Request
receive(
Span<
Real3> values, const PointToPointMessageInfo& message) = 0;
848 virtual Request
receive(
Span<
Real2x2> values, const PointToPointMessageInfo& message) = 0;
849 virtual Request
receive(
Span<
Real3x3> values, const PointToPointMessageInfo& message) = 0;
850 virtual Request
receive(
Span<
HPReal> values, const PointToPointMessageInfo& message) = 0;
851 virtual Request receiveSerializer(
ISerializer* values, const PointToPointMessageInfo& message) = 0;
857 virtual Request send(
Span<const
char> values, const PointToPointMessageInfo& message) = 0;
858 virtual Request send(
Span<const
signed char> values, const PointToPointMessageInfo& message) = 0;
859 virtual Request send(
Span<const
unsigned char> values, const PointToPointMessageInfo& message) = 0;
860 virtual Request send(
Span<const
short> values, const PointToPointMessageInfo& message) = 0;
861 virtual Request send(
Span<const
unsigned short> values, const PointToPointMessageInfo& message) = 0;
862 virtual Request send(
Span<const
int> values, const PointToPointMessageInfo& message) = 0;
863 virtual Request send(
Span<const
unsigned int> values, const PointToPointMessageInfo& message) = 0;
864 virtual Request send(
Span<const
long> values, const PointToPointMessageInfo& message) = 0;
865 virtual Request send(
Span<const
unsigned long> values, const PointToPointMessageInfo& message) = 0;
866 virtual Request send(
Span<const
long long> values, const PointToPointMessageInfo& message) = 0;
867 virtual Request send(
Span<const
unsigned long long> values, const PointToPointMessageInfo& message) = 0;
868 virtual Request send(
Span<const
float> values, const PointToPointMessageInfo& message) = 0;
869 virtual Request send(
Span<const
double> values, const PointToPointMessageInfo& message) = 0;
870 virtual Request send(
Span<const
long double> values, const PointToPointMessageInfo& message) = 0;
871 virtual Request send(
Span<const
APReal> values, const PointToPointMessageInfo& message) = 0;
872 virtual Request send(
Span<const
Real2> values, const PointToPointMessageInfo& message) = 0;
873 virtual Request send(
Span<const
Real3> values, const PointToPointMessageInfo& message) = 0;
874 virtual Request send(
Span<const
Real2x2> values, const PointToPointMessageInfo& message) = 0;
875 virtual Request send(
Span<const
Real3x3> values, const PointToPointMessageInfo& message) = 0;
876 virtual Request send(
Span<const
HPReal> values, const PointToPointMessageInfo& message) = 0;
877 virtual Request sendSerializer(const
ISerializer* values, const PointToPointMessageInfo& message) = 0;
885 virtual MessageId
probe(const PointToPointMessageInfo& message) = 0;
892 virtual MessageSourceInfo
legacyProbe(const PointToPointMessageInfo& message) = 0;
914 virtual
void sendRecv(
ConstArrayView<
unsigned long long> send_buf,
952 virtual
void allToAll(
ConstArrayView<
unsigned long long> send_buf,
1047 virtual
void scan(eReduceType rt,
ArrayView<
signed char> v) = 0;
1048 virtual
void scan(eReduceType rt,
ArrayView<
unsigned char> v) = 0;
1050 virtual
void scan(eReduceType rt,
ArrayView<
unsigned short> v) = 0;
1052 virtual
void scan(eReduceType rt,
ArrayView<
unsigned int> v) = 0;
1054 virtual
void scan(eReduceType rt,
ArrayView<
unsigned long> v) = 0;
1055 virtual
void scan(eReduceType rt,
ArrayView<
long long> v) = 0;
1056 virtual
void scan(eReduceType rt,
ArrayView<
unsigned long long> v) = 0;
1059 virtual
void scan(eReduceType rt,
ArrayView<
long double> v) = 0;
1073 ARCCORE_DEPRECATED_2020(
"Use createSerializeMessageListRef() instead")
1124 [[deprecated(
"Y2021: Use Arcane::ParallelMngUtils;:createGetVariablesValuesOperationRef() instead")]]
1133 [[deprecated(
"Y2021: Use Arcane::ParallelMngUtils;:createTransferValuesOperationRef() instead")]]
1142 [[deprecated(
"Y2021: Use Arcane::ParallelMngUtils;:createExchangerRef() instead")]]
1151 [[deprecated(
"Y2021: Use Arcane::ParallelMngUtils;:createSynchronizerRef() instead")]]
1160 [[deprecated(
"Y2021: Use Arcane::ParallelMngUtils;:createSynchronizerRef() instead")]]
1170 [[deprecated(
"Y2021: Use Arcane::ParallelMngUtils;:createTopologyRef() instead")]]
1195 ARCCORE_DEPRECATED_2020(
"Use createSubParallelMngRef() instead")
1242 virtual
Ref<IParallelMngUtilsFactory> _internalUtilsFactory() const = 0;
File containing declarations concerning the message passing model.
#define ARCCORE_DECLARE_REFERENCE_COUNTED_INCLASS_METHODS()
Macro to declare the virtual methods managing reference counters.
Declarations of types used in Arcane.
Emulation of real number in arbitrary precision.
Modifiable view of an array of type T.
Base class for 1D data vectors.
Constant view of an array of type T.
Class implementing a High-Precision real number.
Operations to access variable values from another subdomain.
Interface of the input/output manager.
Interface of an entity family.
Information exchange between processors.
virtual Ref< IParallelMngContainer > _createParallelMngBuilder(Int32 nb_local_rank, Parallel::Communicator communicator, Parallel::Communicator machine_communicator)=0
Creates a container for nb_local_rank local ranks and with communicator as the communicator.
virtual Ref< IParallelMng > _createParallelMng(Int32 local_rank, ITraceMng *tm)=0
Creates the IParallelMng for the local rank local_rank.
Interface of the parallelism manager for a subdomain.
virtual void gatherVariable(ConstArrayView< char > send_buf, Array< char > &recv_buf, Int32 rank)=0
Performs an all-gather operation across all processors.
virtual bool isThreadImplementation() const =0
Indicates if the implementation uses threads.
virtual ITraceMng * traceMng() const =0
Trace manager.
virtual void printStats()=0
Prints statistics related to this parallelism manager.
virtual void computeMinMaxSum(char val, char &min_val, char &max_val, char &sum_val, Int32 &min_rank, Int32 &max_rank)=0
Calculates the sum, min, and max of a value in one operation.
virtual Int32 commRank() const =0
Rank of this instance in the communicator.
virtual Ref< Parallel::IRequestList > createRequestListRef()=0
Creates a request list for this manager.
virtual IParallelReplication * replication() const =0
Replication information.
virtual ISerializeMessage * createSendSerializer(Int32 rank)=0
Creates a non-blocking message to send serialized data to rank rank.
virtual void computeMinMaxSum(ConstArrayView< char > values, ArrayView< char > min_values, ArrayView< char > max_values, ArrayView< char > sum_values, ArrayView< Int32 > min_ranks, ArrayView< Int32 > max_ranks)=0
Calculates the sum, min, and max of a value in one operation.
virtual IParallelMng * sequentialParallelMng()=0
Returns a sequential parallelism manager.
virtual ITimeStats * timeStats() const =0
Associated statistics manager (can be null).
virtual ISerializeMessageList * createSerializeMessageList()=0
Creates a list to manage 'ISerializeMessage'.
virtual IStat * stat()=0
Statistics manager.
virtual MessageSourceInfo legacyProbe(const PointToPointMessageInfo &message)=0
Probes if messages are available.
virtual UniqueArray< Integer > waitSomeRequests(ArrayView< Request > rvalues)=0
Blocks while waiting for one of the rvalues requests to complete.
virtual ~IParallelMng()=default
Releases resources.
virtual ISerializeMessage * createReceiveSerializer(Int32 rank)=0
Creates a non-blocking message to receive serialized data from rank rank.
virtual void processMessages(ConstArrayView< ISerializeMessage * > messages)=0
Executes the operations of messages messages.
virtual void broadcastMemoryBuffer(ByteArray &bytes, Int32 rank)=0
Performs a broadcast of a memory region.
virtual Ref< ISerializeMessageList > createSerializeMessageListRef()=0
Creates a list to manage 'ISerializeMessage'.
virtual void reduce(eReduceType rt, ArrayView< char > v)=0
Performs the reduction of type rt on array v.
virtual ITimeMetricCollector * timeMetricCollector() const =0
Arccore temporal statistics collector (can be null).
virtual void recv(ArrayView< char > values, Int32 rank)=0
virtual void scan(eReduceType rt, ArrayView< char > v)=0
Applies a prefix-sum algorithm on the values of v using the rt operation.
virtual IParallelTopology * createTopology()=0
Creates an instance containing information about the rank topology of this manager.
virtual void allGatherVariable(ConstArrayView< char > send_buf, Array< char > &recv_buf)=0
Performs an all-gather operation across all processors.
virtual bool isMasterIO() const =0
true if the instance is a master I/O manager.
virtual Int32 commSize() const =0
Number of instances in the communicator.
virtual void scatterVariable(ConstArrayView< char > send_buf, ArrayView< char > recv_buf, Integer root)=0
Scatters an array across multiple processors.
virtual bool isHybridImplementation() const =0
Indicates if the implementation uses hybrid mode.
virtual void allGather(ConstArrayView< char > send_buf, ArrayView< char > recv_buf)=0
Performs an all-gather operation across all processors. This is a collective operation....
virtual IIOMng * ioMng() const =0
I/O manager.
virtual IVariableSynchronizer * createSynchronizer(IItemFamily *family)=0
Returns an interface for synchronizing variables on the group of the family.
virtual IThreadMng * threadMng() const =0
Thread manager.
virtual void waitAllRequests(ArrayView< Request > rvalues)=0
Blocks while waiting for the rvalues requests to complete.
virtual MessageId probe(const PointToPointMessageInfo &message)=0
Probes if messages are available.
virtual void build()=0
Constructs the instance.
virtual void initialize()=0
Initializes the parallelism manager.
virtual Parallel::Communicator communicator() const =0
MPI communicator associated with this manager.
virtual ITransferValuesParallelOperation * createTransferValuesOperation()=0
Returns an operation to transfer values between subdomains.
virtual IParallelMng * worldParallelMng() const =0
Parallelism manager over all allocated resources.
virtual void gather(ConstArrayView< char > send_buf, ArrayView< char > recv_buf, Int32 rank)=0
Performs a gather operation onto a processor. This is a collective operation. The array send_buf must...
virtual IParallelNonBlockingCollective * nonBlockingCollective() const =0
Interface for non-blocking collective operations.
virtual ITimerMng * timerMng() const =0
Timer manager.
virtual IParallelMng * createSubParallelMng(Int32ConstArrayView kept_ranks)=0
Creates a new parallelism manager for a subset of ranks.
virtual IMessagePassingMng * messagePassingMng() const =0
Associated Arccore message passing manager.
virtual IGetVariablesValuesParallelOperation * createGetVariablesValuesOperation()=0
Returns an operation to retrieve the values of a variable on the entities of another subdomain.
virtual Ref< IParallelMng > createSubParallelMngRef(Int32ConstArrayView kept_ranks)=0
Creates a new parallelism manager for a subset of ranks.
virtual UniqueArray< Integer > testSomeRequests(ArrayView< Request > rvalues)=0
Tests if one of the rvalues requests is complete.
virtual IParallelExchanger * createExchanger()=0
Returns an interface for transferring messages between processors.
virtual Integer masterIORank() const =0
Rank of the instance managing I/O (for which isMasterIO() is true).
virtual IParallelMngInternal * _internalApi()=0
Internal Arcane API.
virtual Request receive(Span< char > values, const PointToPointMessageInfo &message)=0
virtual Parallel::Communicator machineCommunicator() const
MPI communicator derived from the communicator communicator() gathering all processes of the compute ...
virtual ARCANE_DEPRECATED_120 void * mpiCommunicator()
Address of the MPI communicator associated with this manager.
virtual bool isParallel() const =0
Returns true if the execution is parallel.
virtual void freeRequests(ArrayView< Parallel::Request > requests)=0
Frees the requests.
virtual void * getMPICommunicator()=0
Address of the MPI communicator associated with this manager.
virtual void setTimeStats(ITimeStats *time_stats)=0
Sets the statistics manager.
virtual char reduce(eReduceType rt, char v)=0
Performs a reduction of type rt on the real v and returns the value.
virtual void barrier()=0
Performs a barrier.
Interface for non-blocking collective parallel operations.
Brief information on parallel subdomain replication.
Information on the computing core allocation topology.
Interface of a thread manager.
Interface of a timer manager.
Sends values across different processors.
Interface of a variable synchronization service.
Communicator for message exchange.
Interface of the message passing manager.
Interface for a serialization message list.
Information about the source of a message.
Information for sending/receiving a point-to-point message.
Statistics on parallelism.
Class managing a 2-dimensional real vector.
Class managing a 2x2 matrix of reals.
Class managing a 3-dimensional real vector.
Class managing a 3x3 real matrix.
Reference to an instance.
View of an array of elements of type T.
Unicode character string.
1D data vector with value semantics (STL style).
eReduceType
Supported reduction types.
Concurrency implementation.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
Array< Byte > ByteArray
Dynamic one-dimensional array of characters.
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
std::int32_t Int32
Signed integer type of 32 bits.