MALOC  0.1
vcom.h
Go to the documentation of this file.
1 
38 #ifndef _VCOM_H_
39 #define _VCOM_H_
40 
41 #include <maloc/maloc_base.h>
42 
43 #include <maloc/vsys.h>
44 
46 #define VCOM_MPI_TAG 111
47 
48 /*
49  * ***************************************************************************
50  * Class Vcom: Parameters and datatypes
51  * ***************************************************************************
52  */
53 
60 struct sVcom {
61 
63  int mpi_rank;
65  int mpi_size;
66 
71  int type;
73  int error;
75  void *core;
76 
77 };
78 
85 typedef struct sVcom Vcom;
86 
87 /*
88  * ***************************************************************************
89  * Class Vcom: Inlineable methods (vcom.c)
90  * ***************************************************************************
91  */
92 
93 #if !defined(VINLINE_MALOC)
94 #else /* if defined(VINLINE_MALOC) */
95 #endif /* if !defined(VINLINE_MALOC) */
96 
97 
107 int Vcom_init(int *argc, char ***argv);
108 
116 int Vcom_finalize(void);
117 
127 Vcom* Vcom_ctor(int commtype);
128 
140 int Vcom_ctor2(Vcom* thee, int commtype);
141 
150 void Vcom_dtor(Vcom **thee);
151 
161 void Vcom_dtor2(Vcom *thee);
162 
177 int Vcom_send(Vcom *thee, int des, void *buf, int len, int type,
178  int block);
179 
197 int Vcom_recv(Vcom *thee, int src, void *buf, int len, int type,
198  int block);
199 
214 int Vcom_getCount(Vcom *thee, int src, int *length, int type);
215 
237 int Vcom_reduce(Vcom *thee, void *sendbuf, void *recvbuf, int length,
238  int type, int op);
239 
248 int Vcom_size(Vcom *thee);
249 
261 int Vcom_resize(Vcom *thee, int newsize);
262 
271 int Vcom_rank(Vcom *thee);
272 
281 int Vcom_barr(Vcom *thee);
282 
283 #endif /* _VCOM_H_ */
284 
The base (or foundation) header for MALOC.
The primary header for VSYS. (Virtual SYStem utilities library.)
int Vcom_rank(Vcom *thee)
Get the ID of the local PE
int Vcom_resize(Vcom *thee, int newsize)
Resize (shrink) the communications group to include only newsize number of processors....
int Vcom_ctor2(Vcom *thee, int commtype)
Construct the communications object. This routine sets up data members of class and initializes MPI....
int Vcom_size(Vcom *thee)
Get the number of PEs in communicator.
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 ...
int Vcom_init(int *argc, char ***argv)
The Vmp initializer.
int Vcom_finalize(void)
The Vmp finalizer.
int Vcom_barr(Vcom *thee)
Synchronization barrier.
void Vcom_dtor(Vcom **thee)
Destroy the communications object.
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 * Vcom_ctor(int commtype)
Construct the communications object. This routine sets up data members of class and initializes MPI.
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...
int Vcom_send(Vcom *thee, int des, void *buf, int len, int type, int block)
Send a buffer. Returns 1 on success.
void Vcom_dtor2(Vcom *thee)
Destroy the communications object. This is broken into two parts to be callable from FORTRAN.
Contains public data members for Vcom class.
Definition: vcom.h:60
int type
Communication type. 0 = not initialized 1 = Message Passing Interface 1.1.
Definition: vcom.h:71
int error
note if any error has occurred on this vcom device
Definition: vcom.h:73
int mpi_size
Total number of PEs in this communicator from MPI.
Definition: vcom.h:65
void * core
Private MPI core.
Definition: vcom.h:75
int mpi_rank
Local PE rank from MPI.
Definition: vcom.h:63