vcom.h
Go to the documentation of this file.
#ifndef _VCOM_H_
#define _VCOM_H_
#include <maloc/maloc_base.h>
#include <maloc/vsys.h>
#define VCOM_MPI_TAG 111
/*
* ***************************************************************************
* Class Vcom: Parameters and datatypes
* ***************************************************************************
*/
struct sVcom {
int mpi_rank;
int mpi_size;
int type;
int error;
void *core;
};
typedef struct sVcom Vcom;
/*
* ***************************************************************************
* Class Vcom: Inlineable methods (vcom.c)
* ***************************************************************************
*/
#if !defined(VINLINE_MALOC)
#else /* if defined(VINLINE_MALOC) */
#endif /* if !defined(VINLINE_MALOC) */
int Vcom_init(int *argc, char ***argv);
int Vcom_finalize(void);
Vcom* Vcom_ctor(int commtype);
int Vcom_ctor2(Vcom* thee, int commtype);
void Vcom_dtor(Vcom **thee);
void Vcom_dtor2(Vcom *thee);
int Vcom_send(Vcom *thee, int des, void *buf, int len, int type,
int block);
int Vcom_recv(Vcom *thee, int src, void *buf, int len, int type,
int block);
int Vcom_getCount(Vcom *thee, int src, int *length, int type);
int Vcom_reduce(Vcom *thee, void *sendbuf, void *recvbuf, int length,
int type, int op);
int Vcom_size(Vcom *thee);
int Vcom_resize(Vcom *thee, int newsize);
int Vcom_rank(Vcom *thee);
int Vcom_barr(Vcom *thee);
#endif /* _VCOM_H_ */
maloc_base.h
The base (or foundation) header for MALOC.
vsys.h
The primary header for VSYS. (Virtual SYStem utilities library.)
Vcom_rank
int Vcom_rank(Vcom *thee)
Get the ID of the local PE
Vcom_resize
int Vcom_resize(Vcom *thee, int newsize)
Resize (shrink) the communications group to include only newsize number of processors....
Vcom_ctor2
int Vcom_ctor2(Vcom *thee, int commtype)
Construct the communications object. This routine sets up data members of class and initializes MPI....
Vcom_size
int Vcom_size(Vcom *thee)
Get the number of PEs in communicator.
Vcom_reduce
int Vcom_reduce(Vcom *thee, void *sendbuf, void *recvbuf, int length, int type, int op)
Perform a reduction of the data across all processors. This is equivalent (and in the case of MPI is ...
Vcom_ctor
Vcom * Vcom_ctor(int commtype)
Construct the communications object. This routine sets up data members of class and initializes MPI.
Vcom_init
int Vcom_init(int *argc, char ***argv)
The Vmp initializer.
Vcom_finalize
int Vcom_finalize(void)
The Vmp finalizer.
Vcom_barr
int Vcom_barr(Vcom *thee)
Synchronization barrier.
Vcom_dtor
void Vcom_dtor(Vcom **thee)
Destroy the communications object.
Vcom_recv
int Vcom_recv(Vcom *thee, int src, void *buf, int len, int type, int block)
Receive a (character) buffer. The blocking flag is present, but not used. All receives are assumed ...
Vcom_getCount
int Vcom_getCount(Vcom *thee, int src, int *length, int type)
Perform a blocking probe to get the length (in number of items of specified type) of an incoming mess...
Vcom_send
int Vcom_send(Vcom *thee, int des, void *buf, int len, int type, int block)
Send a buffer. Returns 1 on success.
Vcom_dtor2
void Vcom_dtor2(Vcom *thee)
Destroy the communications object. This is broken into two parts to be callable from FORTRAN.
sVcom
Contains public data members for Vcom class.
Definition: vcom.h:60
sVcom::type
int type
Communication type. 0 = not initialized 1 = Message Passing Interface 1.1.
Definition: vcom.h:71
sVcom::error
int error
note if any error has occurred on this vcom device
Definition: vcom.h:73
sVcom::mpi_size
int mpi_size
Total number of PEs in this communicator from MPI.
Definition: vcom.h:65
sVcom::core
void * core
Private MPI core.
Definition: vcom.h:75
sVcom::mpi_rank
int mpi_rank
Local PE rank from MPI.
Definition: vcom.h:63