Vmpi class

A Virtual MPI communication lawyer object. More...

## Files

file | vmpi.h
| Class Vmpi: a Virtual MPI communication layer object.

## Classes

struct | sVmpi
| Class Vmpi: Definition. More...

## Typedefs

typedef struct sVmpi | Vmpi
| Declaration of the Vmpi class as the Vmpi structure. More...

## Functions

int | Vmpi_init (int *argc, char ***argv)
| The Vmp initializer. More...
int | Vmpi_finalize (void)
| The Vmp finalizer. More...
Vmpi * | Vmpi_ctor (void)
| The Vmpi constructor. More...
void | Vmpi_dtor (Vmpi **thee)
| The Vmpi destructor. More...
int | Vmpi_rank (Vmpi *thee)
| Return my processor ID. More...
int | Vmpi_size (Vmpi *thee)
| Return the number of processors involved. More...
int | Vmpi_barr (Vmpi *thee)
| An MPI barrier. More...
int | Vmpi_send (Vmpi *thee, int des, char *buf, int bufsize)
| An MPI blocking send. More...
int | Vmpi_recv (Vmpi *thee, int src, char *buf, int bufsize)
| An MPI blocking receive. More...
int | Vmpi_bcast (Vmpi *thee, char *buf, int bufsize)
| An MPI broadcast. More...
int | Vmpi_reduce (Vmpi *thee, char *sbuf, char *rbuf, int bufsize)
| An MPI reduce. More...
int | Vmpi_isend (Vmpi *thee, int des, char *buf, int bufsize)
| An MPI non-blocking send. More...

## Detailed Description

A Virtual MPI communication lawyer object.

## Typedef Documentation

## Vmpi

typedef struct sVmpi Vmpi

Declaration of the Vmpi class as the Vmpi structure.

Author
  Michael Holst

## Function Documentation

## Vmpi_barr()

int Vmpi_barr | ( | Vmpi * | thee | ) |

An MPI barrier.

Author
  Michael Holst

Note
  Class Vmpi: Non-inlineable method (vmpi.c)

Returns
  Success enumeration

Parameters

  thee | Pointer to the Vmpi object

## Vmpi_bcast()

int Vmpi_bcast | ( | Vmpi * | thee,
|  | char * | buf,
|  | int | bufsize
| ) |  |

An MPI broadcast.

Author
  Michael Holst

Note
  Class Vmpi: Non-inlineable method (vmpi.c)

Returns
  Success enumeration

Parameters

  thee | Pointer to the Vmpi object
  buf | buffer containing message
  bufsize | number of items (of declared type) in buffer

## Vmpi_ctor()

Vmpi * Vmpi_ctor | ( | void |  | ) |

The Vmpi constructor.

Author
  Michael Holst

Note
  Class Vmpi: Non-inlineable method (vmpi.c)

Returns
  Success enumeration

## Vmpi_dtor()

void Vmpi_dtor | ( | Vmpi ** | thee | ) |

The Vmpi destructor.

Author
  Michael Holst

Note
  Class Vmpi: Non-inlineable method (vmpi.c)

Returns
  None

Parameters

  thee | Pointer to pointer of the Vmpi object

## Vmpi_finalize()

int Vmpi_finalize | ( | void |  | ) |

The Vmp finalizer.

Author
  Michael Holst

Note
  Class Vmpi: Non-inlineable method (vmpi.c)

Returns
  Success enumeration

## Vmpi_init()

int Vmpi_init | ( | int * | argc,
|  | char *** | argv
| ) |  |

The Vmp initializer.

Author
  Michael Holst

Note
  Class Vmpi: Non-inlineable method (vmpi.c)

Returns
  Success enumeration

Parameters

  argc | number of the command line arguments
  argv | the command line arguments

## Vmpi_isend()

int Vmpi_isend | ( | Vmpi * | thee,
|  | int | des,
|  | char * | buf,
|  | int | bufsize
| ) |  |

An MPI non-blocking send.

Author
  Michael Holst

Note
  Class Vmpi: Non-inlineable method (vmpi.c)

Returns
  Success enumeration

Parameters

  thee | Pointer to the Vmpi object
  des | rank of receiving processor
  buf | buffer containing message
  bufsize | number of items (of declared type) in buffer

## Vmpi_rank()

int Vmpi_rank | ( | Vmpi * | thee | ) |

Return my processor ID.

Author
  Michael Holst

Note
  Class Vmpi: Non-inlineable method (vmpi.c)

Returns
  Success enumeration

Parameters

  thee | Pointer to the Vmpi object

## Vmpi_recv()

int Vmpi_recv | ( | Vmpi * | thee,
|  | int | src,
|  | char * | buf,
|  | int | bufsize
| ) |  |

An MPI blocking receive.

Author
  Michael Holst

Note
  Class Vmpi: Non-inlineable method (vmpi.c)

Returns
  Success enumeration

Parameters

  thee | Pointer to the Vmpi object
  src | rank of receiving processor
  buf | buffer containing message
  bufsize | number of items (of declared type) in buffer

## Vmpi_reduce()

int Vmpi_reduce | ( | Vmpi * | thee,
|  | char * | sbuf,
|  | char * | rbuf,
|  | int | bufsize
| ) |  |

An MPI reduce.

Author
  Michael Holst

Note
  Class Vmpi: Non-inlineable method (vmpi.c)

Returns
  Success enumeration

Parameters

  thee | Pointer to the Vmpi object
  sbuf | address of send buffer (choice)
  rbuf | address of receiving buffer (choice)
  bufsize | number of items (of declared type) in buffer

## Vmpi_send()

int Vmpi_send | ( | Vmpi * | thee,
|  | int | des,
|  | char * | buf,
|  | int | bufsize
| ) |  |

An MPI blocking send.

Author
  Michael Holst

Note
  Class Vmpi: Non-inlineable method (vmpi.c)

Returns
  Success enumeration

Parameters

  thee | Pointer to the Vmpi object
  des | rank of receiving processor
  buf | buffer containing message
  bufsize | number of items (of declared type) in buffer

## Vmpi_size()

int Vmpi_size | ( | Vmpi * | thee | ) |

Return the number of processors involved.

Author
  Michael Holst

Note
  Class Vmpi: Non-inlineable method (vmpi.c)

Returns
  Success enumeration

Parameters

  thee | Pointer to the Vmpi object