Point-2-Point Communication

Located in file: MEL.hpp

void MEL::Send(const void *ptr, const int num, const Datatype &datatype, const int dst, const int tag, const Comm &comm)

Send num elements of a derived type from the given address.

See
MPI_Send
Parameters
  • ptr -

    Pointer to the memory to be sent

  • num -

    The number of elements to send

  • datatype -

    The derived datatype of the elements

  • dst -

    The rank of the process to send to

  • tag -

    A tag for the message

  • comm -

    The comm world to send within

void MEL::Bsend(const void *ptr, const int num, const Datatype &datatype, const int dst, const int tag, const Comm &comm)

Buffered send num elements of a derived type from the given address.

See
MPI_Bsend
Parameters
  • ptr -

    Pointer to the memory to be sent

  • num -

    The number of elements to send

  • datatype -

    The derived datatype of the elements

  • dst -

    The rank of the process to send to

  • tag -

    A tag for the message

  • comm -

    The comm world to send within

void MEL::Ssend(const void *ptr, const int num, const Datatype &datatype, const int dst, const int tag, const Comm &comm)

Synchronous send num elements of a derived type from the given address.

See
MPI_Ssend
Parameters
  • ptr -

    Pointer to the memory to be sent

  • num -

    The number of elements to send

  • datatype -

    The derived datatype of the elements

  • dst -

    The rank of the process to send to

  • tag -

    A tag for the message

  • comm -

    The comm world to send within

void MEL::Rsend(const void *ptr, const int num, const Datatype &datatype, const int dst, const int tag, const Comm &comm)

Ready send num elements of a derived type from the given address.

See
MPI_Rsend
Warning
Requires that the matching Recieve has already been posted! Programmer is responsible for making a correct program.
Parameters
  • ptr -

    Pointer to the memory to be sent

  • num -

    The number of elements to send

  • datatype -

    The derived datatype of the elements

  • dst -

    The rank of the process to send to

  • tag -

    A tag for the message

  • comm -

    The comm world to send within

void MEL::Isend(const void *ptr, const int num, const Datatype &datatype, const int dst, const int tag, const Comm &comm, Request &rq)

Non-Blocking.

Send num elements of a derived type from the given address

See
MPI_Isend
Parameters
  • ptr -

    Pointer to the memory to be sent

  • num -

    The number of elements to send

  • datatype -

    The derived datatype of the elements

  • dst -

    The rank of the process to send to

  • tag -

    A tag for the message

  • comm -

    The comm world to send within

  • rq -

    A request object

Request MEL::Isend(const void *ptr, const int num, const Datatype &datatype, const int dst, const int tag, const Comm &comm)

Non-Blocking.

Send num elements of a derived type from the given address

Return
Returns a request object
Parameters
  • ptr -

    Pointer to the memory to be sent

  • num -

    The number of elements to send

  • datatype -

    The derived datatype of the elements

  • dst -

    The rank of the process to send to

  • tag -

    A tag for the message

  • comm -

    The comm world to send within

void MEL::Ibsend(const void *ptr, const int num, const Datatype &datatype, const int dst, const int tag, const Comm &comm, Request &rq)

Non-Blocking.

Buffered send num elements of a derived type from the given address

See
MPI_Ibsend
Parameters
  • ptr -

    Pointer to the memory to be sent

  • num -

    The number of elements to send

  • datatype -

    The derived datatype of the elements

  • dst -

    The rank of the process to send to

  • tag -

    A tag for the message

  • comm -

    The comm world to send within

  • rq -

    A request object

Request MEL::Ibsend(const void *ptr, const int num, const Datatype &datatype, const int dst, const int tag, const Comm &comm)

Non-Blocking.

Buffered send num elements of a derived type from the given address

Return
Returns a request object
Parameters
  • ptr -

    Pointer to the memory to be sent

  • num -

    The number of elements to send

  • datatype -

    The derived datatype of the elements

  • dst -

    The rank of the process to send to

  • tag -

    A tag for the message

  • comm -

    The comm world to send within

void MEL::Issend(const void *ptr, const int num, const Datatype &datatype, const int dst, const int tag, const Comm &comm, Request &rq)

Non-Blocking.

Synchronous send num elements of a derived type from the given address

See
MPI_Issend
Parameters
  • ptr -

    Pointer to the memory to be sent

  • num -

    The number of elements to send

  • datatype -

    The derived datatype of the elements

  • dst -

    The rank of the process to send to

  • tag -

    A tag for the message

  • comm -

    The comm world to send within

  • rq -

    A request object

Request MEL::Issend(const void *ptr, const int num, const Datatype &datatype, const int dst, const int tag, const Comm &comm)

Non-Blocking.

Synchronous send num elements of a derived type from the given address

Return
Returns a request object
Parameters
  • ptr -

    Pointer to the memory to be sent

  • num -

    The number of elements to send

  • datatype -

    The derived datatype of the elements

  • dst -

    The rank of the process to send to

  • tag -

    A tag for the message

  • comm -

    The comm world to send within

void MEL::Irsend(const void *ptr, const int num, const Datatype &datatype, const int dst, const int tag, const Comm &comm, Request &rq)

Non-Blocking.

Ready send num elements of a derived type from the given address

See
MPI_Irsend
Warning
Requires that the matching Recieve has already been posted!Programmer is responsible for making a correct program.
Parameters
  • ptr -

    Pointer to the memory to be sent

  • num -

    The number of elements to send

  • datatype -

    The derived datatype of the elements

  • dst -

    The rank of the process to send to

  • tag -

    A tag for the message

  • comm -

    The comm world to send within

  • rq -

    A request object

Request MEL::Irsend(const void *ptr, const int num, const Datatype &datatype, const int dst, const int tag, const Comm &comm)

Non-Blocking.

Ready send num elements of a derived type from the given address

Return
Returns a request object
Parameters
  • ptr -

    Pointer to the memory to be sent

  • num -

    The number of elements to send

  • datatype -

    The derived datatype of the elements

  • dst -

    The rank of the process to send to

  • tag -

    A tag for the message

  • comm -

    The comm world to send within

template <typename T>
void MEL::Send(const T *ptr, const int num, const int dst, const int tag, const Comm &comm)

Send num elements of a derived type from the given address.

Element size determined by template parameter

Parameters
  • ptr -

    Pointer to the memory to be sent

  • num -

    The number of elements to send

  • dst -

    The rank of the process to send to

  • tag -

    A tag for the message

  • comm -

    The comm world to send within

template <typename T>
void MEL::Bsend(const T *ptr, const int num, const int dst, const int tag, const Comm &comm)

Buffered send num elements of a derived type from the given address.

Element size determined by template parameter

Parameters
  • ptr -

    Pointer to the memory to be sent

  • num -

    The number of elements to send

  • dst -

    The rank of the process to send to

  • tag -

    A tag for the message

  • comm -

    The comm world to send within

template <typename T>
void MEL::Ssend(const T *ptr, const int num, const int dst, const int tag, const Comm &comm)

Synchronous send num elements of a derived type from the given address.

Element size determined by template parameter

Parameters
  • ptr -

    Pointer to the memory to be sent

  • num -

    The number of elements to send

  • dst -

    The rank of the process to send to

  • tag -

    A tag for the message

  • comm -

    The comm world to send within

template <typename T>
void MEL::Rsend(const T *ptr, const int num, const int dst, const int tag, const Comm &comm)

Ready send num elements of a derived type from the given address.

Element size determined by template parameter

Warning
Requires that the matching Recieve has already been posted! Programmer is responsible for making a correct program.
Parameters
  • ptr -

    Pointer to the memory to be sent

  • num -

    The number of elements to send

  • dst -

    The rank of the process to send to

  • tag -

    A tag for the message

  • comm -

    The comm world to send within

template <typename T>
void MEL::Isend(const T *ptr, const int num, const int dst, const int tag, const Comm &comm, Request &rq)

Non-Blocking.

Send num elements of a derived type from the given address. Element size determined by template parameter

Parameters
  • ptr -

    Pointer to the memory to be sent

  • num -

    The number of elements to send

  • dst -

    The rank of the process to send to

  • tag -

    A tag for the message

  • comm -

    The comm world to send within

  • rq -

    A request object

template <typename T>
Request MEL::Isend(const T *ptr, const int num, const int dst, const int tag, const Comm &comm)

Non-Blocking.

Send num elements of a derived type from the given address. Element size determined by template parameter

Return
Returns a request object
Parameters
  • ptr -

    Pointer to the memory to be sent

  • num -

    The number of elements to send

  • dst -

    The rank of the process to send to

  • tag -

    A tag for the message

  • comm -

    The comm world to send within

template <typename T>
void MEL::Ibsend(const T *ptr, const int num, const int dst, const int tag, const Comm &comm, Request &rq)

Non-Blocking.

Buffered send num elements of a derived type from the given address. Element size determined by template parameter

Parameters
  • ptr -

    Pointer to the memory to be sent

  • num -

    The number of elements to send

  • dst -

    The rank of the process to send to

  • tag -

    A tag for the message

  • comm -

    The comm world to send within

  • rq -

    A request object

template <typename T>
Request MEL::Ibsend(const T *ptr, const int num, const int dst, const int tag, const Comm &comm)

Non-Blocking.

Buffered end num elements of a derived type from the given address. Element size determined by template parameter

Return
Returns a request object
Parameters
  • ptr -

    Pointer to the memory to be sent

  • num -

    The number of elements to send

  • dst -

    The rank of the process to send to

  • tag -

    A tag for the message

  • comm -

    The comm world to send within

template <typename T>
void MEL::Issend(const T *ptr, const int num, const int dst, const int tag, const Comm &comm, Request &rq)

Non-Blocking.

Synchronous send num elements of a derived type from the given address. Element size determined by template parameter

Parameters
  • ptr -

    Pointer to the memory to be sent

  • num -

    The number of elements to send

  • dst -

    The rank of the process to send to

  • tag -

    A tag for the message

  • comm -

    The comm world to send within

  • rq -

    A request object

template <typename T>
Request MEL::Issend(const T *ptr, const int num, const int dst, const int tag, const Comm &comm)

Non-Blocking.

Synchronous end num elements of a derived type from the given address. Element size determined by template parameter

Return
Returns a request object
Parameters
  • ptr -

    Pointer to the memory to be sent

  • num -

    The number of elements to send

  • dst -

    The rank of the process to send to

  • tag -

    A tag for the message

  • comm -

    The comm world to send within

template <typename T>
void MEL::Irsend(const T *ptr, const int num, const int dst, const int tag, const Comm &comm, Request &rq)

Non-Blocking.

Ready send num elements of a derived type from the given address. Element size determined by template parameter

Warning
Requires that the matching Recieve has already been posted! Programmer is responsible for making a correct program.
Parameters
  • ptr -

    Pointer to the memory to be sent

  • num -

    The number of elements to send

  • dst -

    The rank of the process to send to

  • tag -

    A tag for the message

  • comm -

    The comm world to send within

  • rq -

    A request object

template <typename T>
Request MEL::Irsend(const T *ptr, const int num, const int dst, const int tag, const Comm &comm)

Non-Blocking.

Ready end num elements of a derived type from the given address. Element size determined by template parameter

Warning
Requires that the matching Recieve has already been posted! Programmer is responsible for making a correct program.
Return
Returns a request object
Parameters
  • ptr -

    Pointer to the memory to be sent

  • num -

    The number of elements to send

  • dst -

    The rank of the process to send to

  • tag -

    A tag for the message

  • comm -

    The comm world to send within

Status MEL::Probe(const int source, const int tag, const Comm &comm)

Probe an incoming message to predetermine its contents.

See
MPI_Probe
Return
Returns a status object
Parameters
  • source -

    The rank of the process to send to

  • tag -

    A tag for the message

  • comm -

    The comm world to send within

std::pair<bool, Status> MEL::Iprobe(const int source, const int tag, const Comm &comm)

Non-Blocking.

Probe an incoming message to predetermine its contents

See
MPI_Iprobe
Return
Returns a std::pair of a bool representing if a message was available and status object for that message
Parameters
  • source -

    The rank of the process to send to

  • tag -

    A tag for the message

  • comm -

    The comm world to send within

template <typename T>
int MEL::ProbeGetCount(const MPI_Status &status)

Probe the length of an incoming message.

Element type is determined from the template parameter

See
MPI_Get_count
Return
Returns the number of elements in the message
Parameters
  • status -

    A status object containing the rank and tag for the message

int MEL::ProbeGetCount(const Datatype &datatype, const Status &status)

Probe the length of an incoming message.

See
MPI_Get_count
Return
Returns the number of elements in the message
Parameters
  • datatype -

    The derived datatype of the elements

  • status -

    A status object containing the rank and tag for the message

template <typename T>
int MEL::ProbeGetCount(const int src, const int tag, const Comm &comm)

Probe the length of an incoming message.

Element type is determined from the template parameter

Return
Returns the number of elements in the message
Parameters
  • src -

    The rank of the process to send to

  • tag -

    A tag for the message

  • comm -

    The comm world to send within

int MEL::ProbeGetCount(const Datatype &datatype, const int src, const int tag, const Comm &comm)

Probe the length of an incoming message.

Return
Returns the number of elements in the message
Parameters
  • datatype -

    The derived datatype of the elements

  • src -

    The rank of the process to probe from

  • tag -

    A tag for the message

  • comm -

    The comm world to receive within

Status MEL::Recv(void *ptr, const int num, const Datatype &datatype, const int src, const int tag, const Comm &comm)

Recieve a message of known length into the given pointer.

See
MPI_Recv
Return
Returns a status object
Parameters
  • ptr -

    Pointer to the memory receive into

  • num -

    The number of elements to receive

  • datatype -

    The derived datatype of the elements

  • src -

    The rank of the process to receive from

  • tag -

    A tag for the message

  • comm -

    The comm world to receive within

void MEL::Irecv(void *ptr, const int num, const Datatype &datatype, const int src, const int tag, const Comm &comm, Request &rq)

Non-Blocking.

Recieve a message of known length into the given pointer

See
MPI_Irecv
Parameters
  • ptr -

    Pointer to the memory receive into

  • num -

    The number of elements to receive

  • datatype -

    The derived datatype of the elements

  • src -

    The rank of the process to receive from

  • tag -

    A tag for the message

  • comm -

    The comm world to receive within

  • rq -

    A request object

Request MEL::Irecv(void *ptr, const int num, const Datatype &datatype, const int src, const int tag, const Comm &comm)

Non-Blocking.

Recieve a message of known length into the given pointer

Return
Returns a request object
Parameters
  • ptr -

    Pointer to the memory receive into

  • num -

    The number of elements to receive

  • datatype -

    The derived datatype of the elements

  • src -

    The rank of the process to receive from

  • tag -

    A tag for the message

  • comm -

    The comm world to receive within

template <typename T>
Status MEL::Recv(T *ptr, const int num, const int src, const int tag, const Comm &comm)

Recieve a message of known length into the given pointer.

Element size is determined from the template parameter

Return
Returns a status object
Parameters
  • ptr -

    Pointer to the memory receive into

  • num -

    The number of elements to receive

  • src -

    The rank of the process to receive from

  • tag -

    A tag for the message

  • comm -

    The comm world to receive within

template <typename T>
void MEL::Irecv(T *ptr, const int num, const int src, const int tag, const Comm &comm, Request &rq)

Non-Blocking.

Recieve a message of known length into the given pointer. Element size is determined from the template parameter

Parameters
  • ptr -

    Pointer to the memory receive into

  • num -

    The number of elements to receive

  • src -

    The rank of the process to receive from

  • tag -

    A tag for the message

  • comm -

    The comm world to receive within

  • rq -

    A request object

template <typename T>
Request MEL::Irecv(T *ptr, const int num, const int src, const int tag, const Comm &comm)

Non-Blocking.

Recieve a message of known length into the given pointer. Element size is determined from the template parameter

Return
Returns a request object
Parameters
  • ptr -

    Pointer to the memory receive into

  • num -

    The number of elements to receive

  • src -

    The rank of the process to receive from

  • tag -

    A tag for the message

  • comm -

    The comm world to receive within