Version: 6.3.1
Data Structures | Public Member Functions | Protected Member Functions | Private Attributes

ParaMEDMEM.MPIAccessDEC Class Reference

#include <MPIAccessDEC.hxx>

Data Structures

struct  SendBuffStruct

Public Member Functions

 MPIAccessDEC (const ProcessorGroup &local_group, const ProcessorGroup &distant_group, bool Asynchronous=true)
virtual ~MPIAccessDEC ()
MPIAccessgetMPIAccess ()
const MPI_Comm * getComm ()
void asynchronous (bool Asynchronous=true)
void setTimeInterpolator (TimeInterpolationMethod anInterp, double InterpPrecision=0, int n_step_before=1, int nStepAfter=1)
void setTime (double t)
void setTime (double t, double dt)
bool outOfTime (int target)
int send (void *sendbuf, int sendcount, MPI_Datatype sendtype, int target)
int recv (void *recvbuf, int recvcount, MPI_Datatype recvtype, int target)
int recv (void *recvbuf, int recvcount, MPI_Datatype recvtype, int target, int &RecvRequestId, bool Asynchronous=false)
int sendRecv (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int target)
int allToAll (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype)
int allToAllv (void *sendbuf, int *sendcounts, int *sdispls, MPI_Datatype sendtype, void *recvbuf, int *recvcounts, int *rdispls, MPI_Datatype recvtype)
int allToAllTime (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype)
int allToAllvTime (void *sendbuf, int *sendcounts, int *sdispls, MPI_Datatype sendtype, void *recvbuf, int *recvcounts, int *rdispls, MPI_Datatype recvtype)
int checkTime (int recvcount, MPI_Datatype recvtype, int target, bool UntilEnd)
int checkSent (bool WithWait=false)
int checkFinalSent ()
int checkFinalRecv ()

Protected Member Functions

int send (void *sendbuf, int sendcount, int sendoffset, MPI_Datatype sendtype, int target, int &SendRequestId)
int recv (void *recvbuf, int recvcount, int recvoffset, MPI_Datatype recvtype, int target, int &RecvRequestId)
int sendRecv (void *sendbuf, int sendcount, int sendoffset, MPI_Datatype sendtype, void *recvbuf, int recvcount, int recvoffset, MPI_Datatype recvtype, int target, int &SendRequestId, int &RecvRequestId)

Private Attributes

bool _asynchronous
MPIProcessorGroup_MPI_union_group
TimeInterpolator_time_interpolator
int _n_step_before
int _n_step_after
int _my_rank
int _group_size
MPIAccess_MPI_access
double _t
double _dt
std::vector< std::vector
< TimeMessage > > * 
_time_messages
std::vector< bool > * _out_of_time
std::vector< int > * _data_messages_recv_count
std::vector< MPI_Datatype > * _data_messages_type
std::vector< std::vector< void * > > * _data_messages
std::map< int, SendBuffStruct * > * _map_of_send_buffers

Constructor & Destructor Documentation

ParaMEDMEM.MPIAccessDEC::MPIAccessDEC ( const ProcessorGroup source_group,
const ProcessorGroup target_group,
bool  Asynchronous = true 
)

This constructor creates an MPIAccessDEC which has source_group as a working side and target_group as an idle side. The constructor must be called synchronously on all processors of both processor groups.

Parameters:
source_groupworking side ProcessorGroup
target_grouplazy side ProcessorGroup
AsynchronousCommunication mode (default asynchronous)
nStepBeforeNumber of Time step needed for the interpolation before current time
nStepAfterNumber of Time step needed for the interpolation after current time

References ParaMEDMEM.ProcessorGroup.fuse(), ParaMEDMEM.ProcessorGroup.getCommInterface(), ParaMEDMEM.MPIProcessorGroup.getWorldComm(), ParaMEDMEM.ProcessorGroup.myRank(), and ParaMEDMEM.ProcessorGroup.size().

ParaMEDMEM.MPIAccessDEC::~MPIAccessDEC ( ) [virtual]

Member Function Documentation

MPIAccess* ParaMEDMEM.MPIAccessDEC.getMPIAccess ( )
const MPI_Comm* ParaMEDMEM.MPIAccessDEC.getComm ( )
void ParaMEDMEM.MPIAccessDEC.asynchronous ( bool  Asynchronous = true)
void ParaMEDMEM.MPIAccessDEC::setTimeInterpolator ( TimeInterpolationMethod  anInterp,
double  InterpPrecision = 0,
int  n_step_before = 1,
int  nStepAfter = 1 
)
void ParaMEDMEM.MPIAccessDEC.setTime ( double  t)
void ParaMEDMEM.MPIAccessDEC.setTime ( double  t,
double  dt 
)
bool ParaMEDMEM.MPIAccessDEC.outOfTime ( int  target)
int ParaMEDMEM.MPIAccessDEC::send ( void *  sendbuf,
int  sendcount,
MPI_Datatype  sendtype,
int  target 
)
int ParaMEDMEM.MPIAccessDEC::recv ( void *  recvbuf,
int  recvcount,
MPI_Datatype  recvtype,
int  target 
)
int ParaMEDMEM.MPIAccessDEC::recv ( void *  recvbuf,
int  recvcount,
MPI_Datatype  recvtype,
int  target,
int RecvRequestId,
bool  Asynchronous = false 
)
int ParaMEDMEM.MPIAccessDEC::sendRecv ( void *  sendbuf,
int  sendcount,
MPI_Datatype  sendtype,
void *  recvbuf,
int  recvcount,
MPI_Datatype  recvtype,
int  target 
)
int ParaMEDMEM.MPIAccessDEC::allToAll ( void *  sendbuf,
int  sendcount,
MPI_Datatype  sendtype,
void *  recvbuf,
int  recvcount,
MPI_Datatype  recvtype 
)

Send sendcount datas from sendbuf[offset] with type sendtype to all targets of IntraCommunicator Receive recvcount datas to recvbuf[offset] with type recvtype from all targets of IntraCommunicator

References ParaMEDMEM.MPIAccessDEC.SendBuffStruct.Counter, ParaMEDMEM.MPIAccessDEC.SendBuffStruct.DataType, and ParaMEDMEM.MPIAccessDEC.SendBuffStruct.SendBuffer.

int ParaMEDMEM.MPIAccessDEC::allToAllv ( void *  sendbuf,
int sendcounts,
int sdispls,
MPI_Datatype  sendtype,
void *  recvbuf,
int recvcounts,
int rdispls,
MPI_Datatype  recvtype 
)

Send sendcounts[target] datas from sendbuf[sdispls[target]] with type sendtype to all targets of IntraCommunicator Receive recvcounts[target] datas to recvbuf[rdispls[target]] with type recvtype from all targets of IntraCommunicator

References ParaMEDMEM.MPIAccessDEC.SendBuffStruct.Counter, ParaMEDMEM.MPIAccessDEC.SendBuffStruct.DataType, and ParaMEDMEM.MPIAccessDEC.SendBuffStruct.SendBuffer.

int ParaMEDMEM.MPIAccessDEC::allToAllTime ( void *  sendbuf,
int  sendcount,
MPI_Datatype  sendtype,
void *  recvbuf,
int  recvcount,
MPI_Datatype  recvtype 
)

Send a TimeMessage to all targets of IntraCommunicator Receive the TimeMessages from targets of IntraCommunicator if necessary.

Send sendcount datas from sendbuf[offset] with type sendtype to all targets of IntraCommunicator Returns recvcount datas to recvbuf[offset] with type recvtype after an interpolation with datas received from all targets of IntraCommunicator.

References ParaMEDMEM.MPIAccessDEC.SendBuffStruct.Counter, ParaMEDMEM.MPIAccessDEC.SendBuffStruct.DataType, ParaMEDMEM.TimeMessage.deltatime, ParaMEDMEM.MPIAccessDEC.SendBuffStruct.SendBuffer, medClient_test.time, and ParaMEDMEM.TimeMessage.time.

int ParaMEDMEM.MPIAccessDEC::allToAllvTime ( void *  sendbuf,
int sendcounts,
int sdispls,
MPI_Datatype  sendtype,
void *  recvbuf,
int recvcounts,
int rdispls,
MPI_Datatype  recvtype 
)
int ParaMEDMEM.MPIAccessDEC::checkTime ( int  recvcount,
MPI_Datatype  recvtype,
int  target,
bool  UntilEnd 
)

References medClient_test.time.

int ParaMEDMEM.MPIAccessDEC::checkSent ( bool  WithWait = false)
int ParaMEDMEM.MPIAccessDEC.checkFinalSent ( )
int ParaMEDMEM.MPIAccessDEC::checkFinalRecv ( )
int ParaMEDMEM.MPIAccessDEC::send ( void *  sendbuf,
int  sendcount,
int  offset,
MPI_Datatype  sendtype,
int  target,
int SendRequestId 
) [protected]

Send sendcount datas from sendbuf[offset] with type sendtype to target of IntraCommunicator (Internal Protected method)

Returns the request identifier SendRequestId

int ParaMEDMEM.MPIAccessDEC::recv ( void *  recvbuf,
int  recvcount,
int  offset,
MPI_Datatype  recvtype,
int  target,
int RecvRequestId 
) [protected]

Receive recvcount datas to recvbuf[offset] with type recvtype from target of IntraCommunicator (Internal Protected method)

Returns the request identifier RecvRequestId

int ParaMEDMEM.MPIAccessDEC::sendRecv ( void *  sendbuf,
int  sendcount,
int  sendoffset,
MPI_Datatype  sendtype,
void *  recvbuf,
int  recvcount,
int  recvoffset,
MPI_Datatype  recvtype,
int  target,
int SendRequestId,
int RecvRequestId 
) [protected]

Send sendcount datas from sendbuf[offset] with type sendtype to target of IntraCommunicator Receive recvcount datas to recvbuf[offset] with type recvtype from target of IntraCommunicator (Internal Protected method)

Returns the request identifier SendRequestId Returns the request identifier RecvRequestId


Field Documentation

std::vector< std::vector< TimeMessage > >* ParaMEDMEM.MPIAccessDEC._time_messages [private]
std::vector< bool >* ParaMEDMEM.MPIAccessDEC._out_of_time [private]
std::vector< MPI_Datatype >* ParaMEDMEM.MPIAccessDEC._data_messages_type [private]
std::vector< std::vector< void * > >* ParaMEDMEM.MPIAccessDEC._data_messages [private]
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS