MALOC  0.1
Classes | Macros | Typedefs | Functions
vcom.h File Reference

Class Vcom: virtual (currently just MPI) communications layer. More...

#include <maloc/maloc_base.h>
#include <maloc/vsys.h>
Include dependency graph for vcom.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  sVcom
 Contains public data members for Vcom class. More...
 

Macros

#define VCOM_MPI_TAG   111
 A base value for MPI tags. More...
 

Typedefs

typedef struct sVcom Vcom
 Declaration of the Vcom class as the Vcom structure
More...
 

Functions

int Vcom_init (int *argc, char ***argv)
 The Vmp initializer. More...
 
int Vcom_finalize (void)
 The Vmp finalizer. More...
 
VcomVcom_ctor (int commtype)
 Construct the communications object. This routine sets up data members of class and initializes MPI. More...
 
int Vcom_ctor2 (Vcom *thee, int commtype)
 Construct the communications object. This routine sets up data members of class and initializes MPI. This is broken into two parts to be callable from FORTRAN. More...
 
void Vcom_dtor (Vcom **thee)
 Destroy the communications object. More...
 
void Vcom_dtor2 (Vcom *thee)
 Destroy the communications object. This is broken into two parts to be callable from FORTRAN. More...
 
int Vcom_send (Vcom *thee, int des, void *buf, int len, int type, int block)
 Send a buffer. Returns 1 on success. More...
 
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 to be blocking. A non-blocking receive would be very ugly to implement (signals or something?). More...
 
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 message and place it in the
argument ``length". More...
 
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 identical to) MPI_Allreduce. Basically, the specified operations are appleed to each member of
the sendbuf across all processors and the results are written to recvbuf. More...
 
int Vcom_size (Vcom *thee)
 Get the number of PEs in communicator. More...
 
int Vcom_resize (Vcom *thee, int newsize)
 Resize (shrink) the communications group to include only newsize number of processors.
Obsolete processes are given rank of -1 and size of 0. More...
 
int Vcom_rank (Vcom *thee)
 Get the ID of the local PE
More...
 
int Vcom_barr (Vcom *thee)
 Synchronization barrier. More...
 

Detailed Description

Class Vcom: virtual (currently just MPI) communications layer.

Authors
Nathan Baker and Michael Holst
Note
None
Version
Id
vcom.h,v 1.38 2010/08/12 05:40:23 fetk Exp
Attention
*
* MALOC = < Minimal Abstraction Layer for Object-oriented C >
* Copyright (C) 1994-- Michael Holst
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* 
*  

Macro Definition Documentation

◆ VCOM_MPI_TAG

#define VCOM_MPI_TAG   111

A base value for MPI tags.