C++ mpi module for stochmagnet_main Package
Public Member Functions | Static Public Member Functions | List of all members
MPI_WorldToWorldMessage Class Reference

This class is a class to send / receive from all cores of a cores to all cores. More...

#include <MPI_WorldToWorldMessage.h>

Inheritance diagram for MPI_WorldToWorldMessage:
Inheritance graph
[legend]
Collaboration diagram for MPI_WorldToWorldMessage:
Collaboration graph
[legend]

Public Member Functions

 MPI_WorldToWorldMessage ()
 create
 
virtual ~MPI_WorldToWorldMessage (void)
 destroy
 
virtual tMemSize getMemorySize () const override
 return the memory size of the class and the memory size of all its attributes/associations More...
 
- Public Member Functions inherited from CORE_Object
template<class T >
std::shared_ptr< T > getSharedPointer ()
 return the shared pointer for this More...
 
template<class T >
std::shared_ptr< const T > getConstSharedPointer () const
 return a const shared pointer for this More...
 
virtual tMemSize getContentsMemorySize () const
 return nthe memory size of the included associations More...
 
template<class T >
tBoolean isInstanceOf () const
 test if the clas T is an instance of this class More...
 
tString getClassName () const
 return the name of the class More...
 
tString getPointerString () const
 retrun the pointer of the class as a string More...
 
tString getIdentityString () const
 retrun the string identification of the class More...
 
virtual tString toString () const
 return the string representation of the object node More...
 

Static Public Member Functions

static CORE_UniquePointer< SelfClassNew ()
 create an unique instance of the class This More...
 
template<typename T >
static tBoolean Send (const MPI_Environment &env, const tMPICoreId &srcCore, T *data, const tMPICount &nData)
 blocking send a data with flag to all cores of enviroments except the core with srcCore id More...
 
template<typename T >
static tBoolean BCast (const MPI_Environment &env, const tMPICoreId &srcCore, T *data, const tMPICount &nData, const tMPIType &dataType)
 blocking send a data with flag to all cores of enviroments except the core with srcCore id More...
 
template<typename T >
static tBoolean BCast (const MPI_Environment &env, const tMPICoreId &srcCore, std::valarray< T > &data)
 blocking send a data with flag to all cores of envirments except the core with srcCore id More...
 
template<typename T >
static tBoolean IBCast (const MPI_Environment &env, const tMPICoreId &srcCore, T *data, const tMPICount &nData, tMPIRequest &request)
 blocking send a data with flag to all cores of enviroments except the core with srcCore id More...
 
template<typename T >
static tBoolean IBCast (const MPI_Environment &env, const tMPICoreId &srcCore, T *data, const tMPICount &nData, const tMPIType &dataType, tMPIRequest &request)
 blocking send a data with flag to all cores of enviroments except the core with srcCore id More...
 
template<typename T >
static tBoolean IBCast (const MPI_Environment &env, const tMPICoreId &srcCore, std::valarray< T > &data, tMPIRequest &request)
 blocking send a data with flag to all cores of envirments except the core with srcCore id More...
 
template<typename T >
static tBoolean Scatter (const MPI_Environment &env, const tMPICoreId &srcCore, const std::valarray< T > &srcData, std::valarray< T > &dstData)
 blocking scattering a data to all cores of environment with srcCore id More...
 
template<typename T >
static tBoolean Scatter (const MPI_Environment &env, const tMPICoreId &srcCore, const T *srcData, const tMPICount &length, const tMPIType &srcDataType, T *dstData, const tMPICount &dstDataSize, const tMPIType &dstDataType)
 blocking scattering a data to all cores of environment with srcCore id More...
 
template<typename T >
static tBoolean Scatter (const MPI_Environment &env, const tMPICoreId &srcCore, const T *srcData, const std::valarray< tMPICount > &dataLengthPerCore, const std::valarray< tMPICount > &dataLengthPerCoreOffset, T *dstData, const tMPICount &dstDataSize)
 blocking scattering a data to all cores of environment with srcCore id More...
 
template<typename T >
static tBoolean Gather (const MPI_Environment &env, const tMPICoreId &dstCore, const T &srcData, std::valarray< T > &dstData)
 blocking gathering a data from all cores of enviroments to the dest core More...
 
template<typename T >
static tBoolean Gather (const MPI_Environment &env, const tMPICoreId &dstCore, const std::valarray< T > &srcData, std::valarray< T > &dstData)
 blocking gathering a data from all cores of enviroments to the dest core More...
 
template<typename T >
static tBoolean Gather (const MPI_Environment &env, const tMPICoreId &dstCore, const T *srcData, const tMPICount &srcDataSize, const tMPIType &srcDataType, T *dstData, const tMPICount &dstDataSize, const tMPIType &dstDataType)
 blocking gathering a data from all cores of enviroments dest core More...
 
template<typename T >
static tBoolean Gather (const MPI_Environment &env, const tMPICoreId &dstCore, const std::valarray< T > &srcData, std::valarray< T > &dstData, const std::valarray< tMPICount > &dataLengthPerCore, const std::valarray< tMPICount > &dataIndexPerCore)
 blocking gathering a data of diffzrent size from all cores of environments to dst core More...
 
template<typename T >
static tBoolean Gather (const MPI_Environment &env, const tMPICoreId &dstCore, const T *srcData, const tMPICount &srcDataSize, T *dstData, const std::valarray< tMPICount > &dataLengthPerCore, const std::valarray< tMPICount > &dataIndexPerCore)
 blocking gathering a data from all cores of enviroments dest core More...
 
template<typename T >
static tBoolean AllGather (const MPI_Environment &env, const T &srcData, std::valarray< T > &dstData)
 blocking gathering a data from all cores of enviroments to all cores More...
 
template<typename T >
static tBoolean AllGather (const MPI_Environment &env, const std::valarray< T > &srcData, std::valarray< T > &dstData)
 blocking gathering a data from all cores of enviroments to all cores More...
 
template<typename T >
static tBoolean AllGather (const MPI_Environment &env, const T *srcData, const tIndex &nSrcData, std::valarray< T > &dstData)
 blocking gathering a data from all cores of enviroments to all cores More...
 
static int BuildOffset (const std::valarray< tMPIIndex > &dataLength, std::valarray< tMPIIndex > &dataOffset)
 compute the displacement from the data length per core More...
 
template<typename T >
static tBoolean AllGather (const MPI_Environment &env, const std::valarray< T > &srcData, T *dstData, const std::valarray< tMPIIndex > &srcDataLength, const std::valarray< tMPIIndex > &displacement)
 blocking gathering a variable data lengthfrom all cores of enviroments to all cores More...
 
template<typename T >
static tBoolean AllGather (const MPI_Environment &env, const T *srcData, const tMPIIndex &nSrcData, T *dstData, const std::valarray< tMPIIndex > &srcDataLength, const std::valarray< tMPIIndex > &displacement)
 blocking gathering a variable data lengthfrom all cores of enviroments to all cores More...
 
template<typename T >
static tBoolean AllGather (const MPI_Environment &env, const std::valarray< T > &srcData, std::valarray< T > &dstData, const std::valarray< tMPIIndex > &srcDataLength, const std::valarray< tMPIIndex > &displacement)
 blocking gathering a variable data lengthfrom all cores of enviroments to all cores More...
 
template<typename T >
static tBoolean Transpose (const MPI_Environment &env, const std::valarray< T > &srcData, const tMPICount &packSize, std::valarray< T > &dstData)
 blocking transpose a data of diffrent size from all cores of enviroments to dst core with pack Size More...
 
template<typename T >
static tBoolean Reduce (const MPI_Environment &env, const tMPICoreId &dstCore, const T &srcData, T &dstData, const tMPIOperation &op)
 compute a data from data of others cores to data of dstCore More...
 
template<typename T >
static tBoolean Reduce (const MPI_Environment &env, const tMPICoreId &dstCore, T &data, const tMPIOperation &op)
 compute a data from data of others cores to data of dstCore More...
 
template<typename T >
static tBoolean Reduce (const MPI_Environment &env, const tMPICoreId &dstCore, const std::valarray< T > &srcData, std::valarray< T > &dstData, const tMPIOperation &op)
 compute a data from data of others cores to data of dstCore More...
 
template<typename T >
static tBoolean Reduce (const MPI_Environment &env, const tMPICoreId &dstCore, std::valarray< T > &data, const tMPIOperation &op)
 compute a data from data of others cores to data of dstCore More...
 
template<typename T >
static tBoolean Reduce (const MPI_Environment &env, const tMPICoreId &dstCore, T *data, const tMPIIndex &nData, const tMPIOperation &op)
 compute a data from data of others cores to data of dstCore More...
 
template<typename T >
static tBoolean AllReduce (const MPI_Environment &env, T &data, const tMPIOperation &op)
 compute a data from data of others cores and to data of core 0 and copy the values to all cores More...
 
template<typename T >
static tBoolean AllReduce (const MPI_Environment &env, const T &srcData, T &dstData, const tMPIOperation &op)
 compute a data from data of others cores and to data of core 0 and copy the values to all cores More...
 
template<typename T >
static tBoolean AllReduce (const MPI_Environment &env, T *data, const tMPIIndex &nData, const tMPIOperation &op)
 compute a data from data of others cores and to data of core 0 and copy the values to all cores More...
 
template<typename T >
static tBoolean AllReduce (const MPI_Environment &env, const std::valarray< T > &srcData, std::valarray< T > &dstData, const tMPIOperation &op)
 compute a data from data of others cores and to data of core 0 and copy the values to all cores More...
 
template<typename T , size_t N>
static tBoolean AllReduce (const MPI_Environment &env, const std::array< T, N > &srcData, std::array< T, N > &dstData, const tMPIOperation &op)
 compute a data from data of others cores and to data of core 0 and copy the values to all cores More...
 
template<typename T >
static tBoolean AllReduce (const MPI_Environment &env, std::valarray< T > &data, const tMPIOperation &op)
 compute a data from data of others cores and to data of core 0 and copy the values to all cores More...
 
template<typename T , size_t N>
static tBoolean AllReduce (const MPI_Environment &env, std::array< T, N > &data, const tMPIOperation &op)
 compute a data from data of others cores and to data of core 0 and copy the values to all cores More...
 
- Static Public Member Functions inherited from CORE_Object
static tBoolean EnableMemoryStack (const tBoolean &isMemoryChecked)
 enable the memory stack More...
 
static void EnableMemoryStack ()
 enable the memory stack
 
static void DisableMemoryStack ()
 disable the memory stack
 
static tBoolean IsMemoryStackEnabled ()
 return trur if the memory stack is enabled
 
static tString MemoryStackToString ()
 get the memory stack in string More...
 
static tIndex GetRegisteredClassesNumber ()
 get the memory stack in string More...
 

Additional Inherited Members

- Protected Member Functions inherited from MPI_Object
 MPI_Object (void)
 create
 
virtual ~MPI_Object (void)
 destroy
 
- Protected Member Functions inherited from CORE_Object
 CORE_Object ()
 build an instance of the object
 
virtual ~CORE_Object ()
 destroy the instance of object std

 

Detailed Description

This class is a class to send / receive from all cores of a cores to all cores.

There is 3 kinds of global messages:

The Mpi barrier: MPI_WorldToWorldMessage::Synchronize()

The send a message from one core to all cores : MPI_WorldToWorldMessage::Send() :

To send a slide of a message from one core to all cores : MPI_WorldToWorldMessage::Scatter() :

To collect a differents slides of same length of message for all cores to one core MPI_WorldToWorldMessage::Gather() :

รน To collect a differents slides of the different lengths of message for all cores to one core : MPI_WorldToWorldMessage::Gather()

To collect a differents slides of the same length of message for all cores to one core and to send it to all cores : MPI_WorldToWorldMessage::AllGather()

To transpose message MPI_WorldToWorldMessage::Transpose()

To make an arithmetic operations on one variable of all cores and to store the results into the variable on one core MPI_WorldToWorldMessage::Reduce()

To make an arithmetic operation on one variable of all cores and to store the results into the variable on all cores MPI_WorldToWorldMessage::AllReduce()

Author
Stephane Despreaux
Version
2.0

Member Function Documentation

◆ AllGather() [1/6]

template<typename T >
static tBoolean MPI_WorldToWorldMessage::AllGather ( const MPI_Environment env,
const std::valarray< T > &  srcData,
std::valarray< T > &  dstData 
)
inlinestatic

blocking gathering a data from all cores of enviroments to all cores

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
[in]srcDatadata to send
[out]dstDatadata to receive

◆ AllGather() [2/6]

template<typename T >
static tBoolean MPI_WorldToWorldMessage::AllGather ( const MPI_Environment env,
const std::valarray< T > &  srcData,
std::valarray< T > &  dstData,
const std::valarray< tMPIIndex > &  srcDataLength,
const std::valarray< tMPIIndex > &  displacement 
)
inlinestatic

blocking gathering a variable data lengthfrom all cores of enviroments to all cores

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
[in]srcDatadata to send
[out]dstDatadata to receive
[in]srcDataLength: size of each element to receive
[in]displacement: displacement number from dstData to receive the data

◆ AllGather() [3/6]

template<typename T >
static tBoolean MPI_WorldToWorldMessage::AllGather ( const MPI_Environment env,
const std::valarray< T > &  srcData,
T *  dstData,
const std::valarray< tMPIIndex > &  srcDataLength,
const std::valarray< tMPIIndex > &  displacement 
)
inlinestatic

blocking gathering a variable data lengthfrom all cores of enviroments to all cores

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
[in]srcDatadata to send
[out]dstDatadata to receive
[in]dstDataLengthof size nCores : dstDataLength[c] number of data received for core c
[in]displacement: work array to compute displacement for dstDataLength

◆ AllGather() [4/6]

template<typename T >
static tBoolean MPI_WorldToWorldMessage::AllGather ( const MPI_Environment env,
const T &  srcData,
std::valarray< T > &  dstData 
)
inlinestatic

blocking gathering a data from all cores of enviroments to all cores

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
[in]srcDatadata to send
[out]dstDatadata to receive

◆ AllGather() [5/6]

template<typename T >
static tBoolean MPI_WorldToWorldMessage::AllGather ( const MPI_Environment env,
const T *  srcData,
const tIndex &  nSrcData,
std::valarray< T > &  dstData 
)
inlinestatic

blocking gathering a data from all cores of enviroments to all cores

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
[in]srcDatadata to send
(in)nSrcData : number of elements to gather
[out]dstDatadata to receive

◆ AllGather() [6/6]

template<typename T >
static tBoolean MPI_WorldToWorldMessage::AllGather ( const MPI_Environment env,
const T *  srcData,
const tMPIIndex &  nSrcData,
T *  dstData,
const std::valarray< tMPIIndex > &  srcDataLength,
const std::valarray< tMPIIndex > &  displacement 
)
inlinestatic

blocking gathering a variable data lengthfrom all cores of enviroments to all cores

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
[in]srcDatadata to send
[in]nSrcData: number of element in source data
[in]srcDataLength: size of each element to receive
[in]displacement: displacement number from dstData to receive the data

◆ AllReduce() [1/7]

template<typename T , size_t N>
static tBoolean MPI_WorldToWorldMessage::AllReduce ( const MPI_Environment env,
const std::array< T, N > &  srcData,
std::array< T, N > &  dstData,
const tMPIOperation &  op 
)
inlinestatic

compute a data from data of others cores and to data of core 0 and copy the values to all cores

Template Parameters
T: type of elements
N: number of elements
Parameters
[in]envenvironment of the destination Core
[in,out]datadata to send
[in]opoperation to do in {MPI_SUM,MPI_PROD,MPI_MAX,MPI_MIN,MPI_MAXLOC,MPI_MINLOC,MPI_LAND,MPI_LOR,MPI_LXOR}

◆ AllReduce() [2/7]

template<typename T >
static tBoolean MPI_WorldToWorldMessage::AllReduce ( const MPI_Environment env,
const std::valarray< T > &  srcData,
std::valarray< T > &  dstData,
const tMPIOperation &  op 
)
inlinestatic

compute a data from data of others cores and to data of core 0 and copy the values to all cores

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
[in]srcDatadata to send
[out]dstDatadata to receive
[in]opoperation to do in {MPI_SUM,MPI_PROD,MPI_MAX,MPI_MIN,MPI_MAXLOC,MPI_MINLOC,MPI_LAND,MPI_LOR,MPI_LXOR}

◆ AllReduce() [3/7]

template<typename T >
static tBoolean MPI_WorldToWorldMessage::AllReduce ( const MPI_Environment env,
const T &  srcData,
T &  dstData,
const tMPIOperation &  op 
)
inlinestatic

compute a data from data of others cores and to data of core 0 and copy the values to all cores

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
[in]srcDatadata to send
[out]dstDatadata to receive
[in]opoperation to do in {MPI_SUM,MPI_PROD,MPI_MAX,MPI_MIN,MPI_MAXLOC,MPI_MINLOC,MPI_LAND,MPI_LOR,MPI_LXOR}

◆ AllReduce() [4/7]

template<typename T , size_t N>
static tBoolean MPI_WorldToWorldMessage::AllReduce ( const MPI_Environment env,
std::array< T, N > &  data,
const tMPIOperation &  op 
)
inlinestatic

compute a data from data of others cores and to data of core 0 and copy the values to all cores

Template Parameters
T: type of elements
N: number of elements
Parameters
[in]envenvironment of the destination Core
[in,out]datadata to send
[in]opoperation to do in {MPI_SUM,MPI_PROD,MPI_MAX,MPI_MIN,MPI_MAXLOC,MPI_MINLOC,MPI_LAND,MPI_LOR,MPI_LXOR}

◆ AllReduce() [5/7]

template<typename T >
static tBoolean MPI_WorldToWorldMessage::AllReduce ( const MPI_Environment env,
std::valarray< T > &  data,
const tMPIOperation &  op 
)
inlinestatic

compute a data from data of others cores and to data of core 0 and copy the values to all cores

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
[in,out]datadata to send
[in]opoperation to do in {MPI_SUM,MPI_PROD,MPI_MAX,MPI_MIN,MPI_MAXLOC,MPI_MINLOC,MPI_LAND,MPI_LOR,MPI_LXOR}

◆ AllReduce() [6/7]

template<typename T >
static tBoolean MPI_WorldToWorldMessage::AllReduce ( const MPI_Environment env,
T &  data,
const tMPIOperation &  op 
)
inlinestatic

compute a data from data of others cores and to data of core 0 and copy the values to all cores

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
[in,out]datadata to send
[in]opoperation to do in {MPI_SUM,MPI_PROD,MPI_MAX,MPI_MIN,MPI_MAXLOC,MPI_MINLOC,MPI_LAND,MPI_LOR,MPI_LXOR}

◆ AllReduce() [7/7]

template<typename T >
static tBoolean MPI_WorldToWorldMessage::AllReduce ( const MPI_Environment env,
T *  data,
const tMPIIndex &  nData,
const tMPIOperation &  op 
)
inlinestatic

compute a data from data of others cores and to data of core 0 and copy the values to all cores

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
[in,out]datadata to send
[in]nData: number of elements to send
[in]opoperation to do in {MPI_SUM,MPI_PROD,MPI_MAX,MPI_MIN,MPI_MAXLOC,MPI_MINLOC,MPI_LAND,MPI_LOR,MPI_LXOR}

◆ BCast() [1/2]

template<typename T >
static tBoolean MPI_WorldToWorldMessage::BCast ( const MPI_Environment env,
const tMPICoreId &  srcCore,
std::valarray< T > &  data 
)
inlinestatic

blocking send a data with flag to all cores of envirments except the core with srcCore id

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
[in]srcCoreid of the source core
[in,out]datadata to send as a val array

◆ BCast() [2/2]

template<typename T >
static tBoolean MPI_WorldToWorldMessage::BCast ( const MPI_Environment env,
const tMPICoreId &  srcCore,
T *  data,
const tMPICount &  nData,
const tMPIType &  dataType 
)
inlinestatic

blocking send a data with flag to all cores of enviroments except the core with srcCore id

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
[in]srcCoreid of the source core
[in,out]datapointer to the data to send & receive
[in]nDatanumber of elements of type dataType to send & receive
[in]dataType: type of element to send

◆ BuildOffset()

static int MPI_WorldToWorldMessage::BuildOffset ( const std::valarray< tMPIIndex > &  dataLength,
std::valarray< tMPIIndex > &  dataOffset 
)
inlinestatic

compute the displacement from the data length per core

Parameters
[in]dataLength: number of element sent per core
[out]dataOffset: displacement to receive the data per core from index 0
Returns
the number of of received elements

◆ Gather() [1/5]

template<typename T >
static tBoolean MPI_WorldToWorldMessage::Gather ( const MPI_Environment env,
const tMPICoreId &  dstCore,
const std::valarray< T > &  srcData,
std::valarray< T > &  dstData 
)
inlinestatic

blocking gathering a data from all cores of enviroments to the dest core

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
[in]dstCoreid of the destination core
[in]srcDatadata to send
[out]dstDatadata to receive of size srcData.size() x number of Cores

◆ Gather() [2/5]

template<typename T >
static tBoolean MPI_WorldToWorldMessage::Gather ( const MPI_Environment env,
const tMPICoreId &  dstCore,
const std::valarray< T > &  srcData,
std::valarray< T > &  dstData,
const std::valarray< tMPICount > &  dataLengthPerCore,
const std::valarray< tMPICount > &  dataIndexPerCore 
)
inlinestatic

blocking gathering a data of diffzrent size from all cores of environments to dst core

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
[in]dstCoredestination Core index
[in]srcDatadata to send
[out]dstDatadata to receive
[in]dataLengthPerCorecount of T of the srcData of the core at index i
[in]dataIndexPerCorecount index of T within the dstData of the srcData of the core at index i

◆ Gather() [3/5]

template<typename T >
static tBoolean MPI_WorldToWorldMessage::Gather ( const MPI_Environment env,
const tMPICoreId &  dstCore,
const T &  srcData,
std::valarray< T > &  dstData 
)
inlinestatic

blocking gathering a data from all cores of enviroments to the dest core

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
[in]dstCoreid of the destination core
[in]srcDatadata to send
[out]dstDatadata to receive of size number of cores

◆ Gather() [4/5]

template<typename T >
static tBoolean MPI_WorldToWorldMessage::Gather ( const MPI_Environment env,
const tMPICoreId &  dstCore,
const T *  srcData,
const tMPICount &  srcDataSize,
const tMPIType &  srcDataType,
T *  dstData,
const tMPICount &  dstDataSize,
const tMPIType &  dstDataType 
)
inlinestatic

blocking gathering a data from all cores of enviroments dest core

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
[in]dstCoredestination core whire gather the data
[in]srcDatadata to send
[in]srcDataSize: number of element of type srcDataType of srcData to send
[in]srcDataType: type of data to send
[out]dstDatadata to receive
[in]dstDataSize: number of element of type dstDataType of dstData to receive : srcDataSize x nCores
[in]dstDataType: type of data to receive

◆ Gather() [5/5]

template<typename T >
static tBoolean MPI_WorldToWorldMessage::Gather ( const MPI_Environment env,
const tMPICoreId &  dstCore,
const T *  srcData,
const tMPICount &  srcDataSize,
T *  dstData,
const std::valarray< tMPICount > &  dataLengthPerCore,
const std::valarray< tMPICount > &  dataIndexPerCore 
)
inlinestatic

blocking gathering a data from all cores of enviroments dest core

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
[in]dstCoredestination core whire gather the data
[in]srcDatadata to send
[in]srcDataSize: number of element of type srcDataType of srcData to send
[in]srcDataType: type of data to send
[out]dstDatadata to receive
[in]dataLengthPerCorenumber of elements of type dstDataType of dstData to receive
[in]dataIndexPerCore: index of elements to receive

◆ getMemorySize()

virtual tMemSize MPI_WorldToWorldMessage::getMemorySize ( ) const
inlineoverridevirtual

return the memory size of the class and the memory size of all its attributes/associations

Returns
the memory size of the class and the memory size of its attributes/associations in bytes The mamory size is :
  • the added size of the base classes which contains:
    • the primary attributes size depends on the order: (first delare the smallest attributes size
    • all virtual functions costs <pointer-size> (4 32xor 8 64x) bytes by virtual function
    • virtual inherihtance will increase of (4 or 8) bytes
  • we add the size of the contains values of the attributes : for example the size of a string is the length of the string 1 octet = 1 byte 1 Ko = 1024 bytes 1 Mo = 1024 Ko 1 Go = 1024 Mo

Reimplemented from CORE_Object.

◆ IBCast() [1/3]

template<typename T >
static tBoolean MPI_WorldToWorldMessage::IBCast ( const MPI_Environment env,
const tMPICoreId &  srcCore,
std::valarray< T > &  data,
tMPIRequest &  request 
)
inlinestatic

blocking send a data with flag to all cores of envirments except the core with srcCore id

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
[in]srcCoreid of the source core
[in,out]datadata to send as a val array
[out]request: request of the message

◆ IBCast() [2/3]

template<typename T >
static tBoolean MPI_WorldToWorldMessage::IBCast ( const MPI_Environment env,
const tMPICoreId &  srcCore,
T *  data,
const tMPICount &  nData,
const tMPIType &  dataType,
tMPIRequest &  request 
)
inlinestatic

blocking send a data with flag to all cores of enviroments except the core with srcCore id

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
[in]srcCoreid of the source core
[in,out]datapointer to the data to send & receive
[in]nDatanumber of elements of type dataType to send & receive
[in]dataType: type of element to send
[out]request: request of the message

◆ IBCast() [3/3]

template<typename T >
static tBoolean MPI_WorldToWorldMessage::IBCast ( const MPI_Environment env,
const tMPICoreId &  srcCore,
T *  data,
const tMPICount &  nData,
tMPIRequest &  request 
)
inlinestatic

blocking send a data with flag to all cores of enviroments except the core with srcCore id

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
[in]srcCoreid of the source core
[in,out]datapointer to the data to send & receive
[out]request: request of the message

◆ New()

static CORE_UniquePointer<SelfClass> MPI_WorldToWorldMessage::New ( )
inlinestatic

create an unique instance of the class This

Returns
a new unique instance of the class This

◆ Reduce() [1/5]

template<typename T >
static tBoolean MPI_WorldToWorldMessage::Reduce ( const MPI_Environment env,
const tMPICoreId &  dstCore,
const std::valarray< T > &  srcData,
std::valarray< T > &  dstData,
const tMPIOperation &  op 
)
inlinestatic

compute a data from data of others cores to data of dstCore

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
(in]dstCore: id of the destination core
[in]srcDatadata to send
[in]dstDatadata to receive
[in]opoperation to do in {MPI_SUM,MPI_PROD,MPI_MAX,MPI_MIN,MPI_MAXLOC,MPI_MINLOC,MPI_LAND,MPI_LOR,MPI_LXOR}

◆ Reduce() [2/5]

template<typename T >
static tBoolean MPI_WorldToWorldMessage::Reduce ( const MPI_Environment env,
const tMPICoreId &  dstCore,
const T &  srcData,
T &  dstData,
const tMPIOperation &  op 
)
inlinestatic

compute a data from data of others cores to data of dstCore

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
(in]dstCore: id of the destination core
[in]srcDatadata to send
[in]dstDatadata to receive
[in]opoperation to do in {MPI_SUM,MPI_PROD,MPI_MAX,MPI_MIN,MPI_MAXLOC,MPI_MINLOC,MPI_LAND,MPI_LOR,MPI_LXOR}

◆ Reduce() [3/5]

template<typename T >
static tBoolean MPI_WorldToWorldMessage::Reduce ( const MPI_Environment env,
const tMPICoreId &  dstCore,
std::valarray< T > &  data,
const tMPIOperation &  op 
)
inlinestatic

compute a data from data of others cores to data of dstCore

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
[in]dstCoreid of the destination core
[in,out]srcDatadata to send & receive
[in]opoperation to do in {MPI_SUM,MPI_PROD,MPI_MAX,MPI_MIN,MPI_MAXLOC,MPI_MINLOC,MPI_LAND,MPI_LOR,MPI_LXOR}

◆ Reduce() [4/5]

template<typename T >
static tBoolean MPI_WorldToWorldMessage::Reduce ( const MPI_Environment env,
const tMPICoreId &  dstCore,
T &  data,
const tMPIOperation &  op 
)
inlinestatic

compute a data from data of others cores to data of dstCore

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
[in]dstCoreid of the destination core
[in,out]srcDatadata to send & receive
[in]opoperation to do in {MPI_SUM,MPI_PROD,MPI_MAX,MPI_MIN,MPI_MAXLOC,MPI_MINLOC,MPI_LAND,MPI_LOR,MPI_LXOR}

◆ Reduce() [5/5]

template<typename T >
static tBoolean MPI_WorldToWorldMessage::Reduce ( const MPI_Environment env,
const tMPICoreId &  dstCore,
T *  data,
const tMPIIndex &  nData,
const tMPIOperation &  op 
)
inlinestatic

compute a data from data of others cores to data of dstCore

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
[in]dstCoreid of the destination core
[in,out]srcDatadata to send & receive
[in]opoperation to do in {MPI_SUM,MPI_PROD,MPI_MAX,MPI_MIN,MPI_MAXLOC,MPI_MINLOC,MPI_LAND,MPI_LOR,MPI_LXOR}

◆ Scatter() [1/3]

template<typename T >
static tBoolean MPI_WorldToWorldMessage::Scatter ( const MPI_Environment env,
const tMPICoreId &  srcCore,
const std::valarray< T > &  srcData,
std::valarray< T > &  dstData 
)
inlinestatic

blocking scattering a data to all cores of environment with srcCore id

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
[in]srcCoreid of the source core
[in]srcDatadata to send
[out]dstDatadata to receive

It sends a part of srcData of size dstData.size to dstData

◆ Scatter() [2/3]

template<typename T >
static tBoolean MPI_WorldToWorldMessage::Scatter ( const MPI_Environment env,
const tMPICoreId &  srcCore,
const T *  srcData,
const std::valarray< tMPICount > &  dataLengthPerCore,
const std::valarray< tMPICount > &  dataLengthPerCoreOffset,
T *  dstData,
const tMPICount &  dstDataSize 
)
inlinestatic

blocking scattering a data to all cores of environment with srcCore id

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
[in]srcCoreid of the source core
[in]srcDatadata to send
[in]dataLengthPerCore: length of the srcData of type srcDataType to send to each process
[in]dataLengthPerCoreOffset: offset of each element from begining of data to receie
[out]dstDatadata to receive
[in]dstDataSize: number of data to receive of type dstDataRType

◆ Scatter() [3/3]

template<typename T >
static tBoolean MPI_WorldToWorldMessage::Scatter ( const MPI_Environment env,
const tMPICoreId &  srcCore,
const T *  srcData,
const tMPICount &  length,
const tMPIType &  srcDataType,
T *  dstData,
const tMPICount &  dstDataSize,
const tMPIType &  dstDataType 
)
inlinestatic

blocking scattering a data to all cores of environment with srcCore id

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
[in]srcCoreid of the source core
[in]srcDatadata to send
[in]length: length of the srcData of type srcDataType to send to each process
[in]srcDataTypedataType of the srcdata to send
[out]dstDatadata to receive
[in]dstDataSize: number of data to receive of type dstDataRType
[in]dstDataType: dst data type

◆ Send()

template<typename T >
static tBoolean MPI_WorldToWorldMessage::Send ( const MPI_Environment env,
const tMPICoreId &  srcCore,
T *  data,
const tMPICount &  nData 
)
inlinestatic

blocking send a data with flag to all cores of enviroments except the core with srcCore id

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
[in]srcCoreid of the source core
[in,out]datapointer to the data to send & receive

◆ Transpose()

template<typename T >
static tBoolean MPI_WorldToWorldMessage::Transpose ( const MPI_Environment env,
const std::valarray< T > &  srcData,
const tMPICount &  packSize,
std::valarray< T > &  dstData 
)
inlinestatic

blocking transpose a data of diffrent size from all cores of enviroments to dst core with pack Size

Template Parameters
T: type of elements
Parameters
[in]envenvironment of the destination Core
[in]srcDatadata to send
[in]packSizecout of T of the size
[out]dstDatadata to receive

Core_i:

  • srcData={Pi.j} j={1,...n} i={1,...c}
  • dstData={P1.q(i-1),...P1.qi,P2.q(i-1),...,P2.qi,....,Pc.q(i-1),....,Pc.qi}

Size of

  • srcData : n >= q x c
  • dstData : c x q

dstData[i*packsize]=srcData[c][c*packSize]


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