Sandia Home Sandia Home
Main Page | Publications | Downloads | Configuration | Running the Code | Solver Parameters | FAQ | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

APPSPACK::GCI Class Reference

#include <APPSPACK_GCI.hpp>

List of all members.


Detailed Description

APPS Communicator - An interface for both PVM and MPI commands.

Note:
Although GCI still supports PVM, it is no longer officially supported by APPSPACK. If you would like to use PVM, please contact Tamara G. Kolda.
Author:
MPI interface contributed by H. Alton Patrick, Summer 2000.

Definition at line 63 of file APPSPACK_GCI.hpp.

Static Public Member Functions

Initialization and exit
int init ()
 For PVM, returns PVM taskid. Otherwise, throws an error.
int init (int &argc, char **&argv)
 For PVM or MPI, returns process rank. Otherwise, throws an error.
void catchOutput (bool flag=true)
 For PVM, set this process to catch all the output. Otherwise, prints a warning.
int spawn (const string name, const string host, char *argv[]=NULL)
 For PVM, spawn a task. Otherwise, throws an error.
void kill (int tid)
 For PVM, kills the specified taskid. Otherwise, prints a warning.
void exit ()
 Exit the communications interface for both PVM and MPI. Otherwise, prints a warning.
Status and notify
int getMyTid ()
 Return PVM taskid or MPI rank.
int getNumProcs ()
 Return the number of processes.
bool isOrphan ()
 For PVM, returns true is the process was spawned from the command line or the PVM console. Otherwise, returns false if it was spawned from another PVM process.
int parent ()
 For PVM, returns the taskid of the parent. */.
int tidToHost (int tid)
 For PVM, returns the hostid of the given task. */.
void notify (int msgtag, int taskid)
 For PVM, sets notify to send a message with the given msgtag with the task specified by taskid exits. The body of the message will contain the taskid.
void notify (int msgtag)
 For PVM, sets notify to send a message with the given msgtag whenever any host dies. The body of the message will contain the hostid.
Send, Recv, and Related Commands
void initSend ()
 For PVM or MPI, initialize send (must be called before pack and send).
void send (int msgtag, int taskid)
 For PVM or MPI, send a message with the specified message tag to the specified task.
void broadcast (int msgtag, const vector< int > &taskid)
bool recv (int msgtag=-1, int taskid=-1)
 For PVM or MPI, blocking receive.
bool nrecv (int msgtag=-1, int taskid=-1)
 For PVM or MPI, non-blocking receive.
bool probe (int msgtag=-1, int taskid=-1)
 For PVM or MPI, non-blocking probe.
void bprobe (int msgtag=-1, int taskid=-1)
 For MPI, blocking probe.
void bufinfo (int &msgtag, int &taskid)
Pack and Unpack primitives.
void pack (int i)
 Pack an integer.
void pack (char i)
 Pack a char.
void pack (double d)
 Pack a double.
void pack (float f)
 Pack a float.
void pack (bool b)
 Pack a bool.
void pack (const string s)
 Pack a string.
void pack (const vector< int > &v)
 Pack integer vector.
void pack (const Vector &v)
 Pack double vector.
void pack (const vector< float > &v)
 Pack float vector.
void pack (const vector< Vector > &v)
 Pack a vector of vectors of doubles.
void pack (const vector< string > &v)
 Pack a vector of string.
void pack (const vector< bool > &v)
 Pack a vector of bools.
void pack (int length, const char *array)
 Pack a char array.
void pack (int length, const int *array)
 Pack an integer array.
void pack (int length, const double *array)
 Pack a double array.
void pack (int length, const float *array)
 Pack a float array.
void unpack (int &i)
 Unpack an integer.
void unpack (char &c)
 Unpack a char.
void unpack (double &d)
 Unpack a double.
void unpack (float &f)
 Unpack a float.
void unpack (bool &b)
 Unpack a book.
void unpack (string &s)
 Unpack a string.
void unpack (vector< int > &v)
 Unpack a vector of integers.
void unpack (Vector &v)
 Unpack a vector of doubles.
void unpack (vector< Vector > &v)
 Unpack a vector of a vector of doubles.
void unpack (vector< string > &v)
 Unpack a vector of strings.
void unpack (vector< bool > &v)
 Unpack a vector of bools.
void unpack (int &length, char *&array)
 Unpack a char array.
void unpack (int &length, int *&array)
 Unpack an integer array.
void unpack (int &length, double *&array)
 Unpack a double array.
void unpack (int &length, float *&array)
 Unpack a float array.
Host Information
int resetHostInfo ()
 For PVM, reset host information by asking PVM to update hostp - the data structure that contains the host information. Return the number of hosts.
int getHostTid (int i)
 For PVM. get the hostid of the i-th host.
int getHostSpeed (int i)
 For PVM,get the speed of the i-th host.
char * getHostName (int i)
 For PVM, get a pointer to name of the i-th host.


Member Function Documentation

int GCI::init  )  [static]
 

For PVM, returns PVM taskid. Otherwise, throws an error.

Definition at line 73 of file APPSPACK_GCI.cpp.

Referenced by main().

int GCI::init int &  argc,
char **&  argv
[static]
 

For PVM or MPI, returns process rank. Otherwise, throws an error.

Definition at line 80 of file APPSPACK_GCI.cpp.

void GCI::catchOutput bool  flag = true  )  [static]
 

For PVM, set this process to catch all the output. Otherwise, prints a warning.

Definition at line 171 of file APPSPACK_GCI.cpp.

int GCI::spawn const string  name,
const string  host,
char *  argv[] = NULL
[static]
 

For PVM, spawn a task. Otherwise, throws an error.

Definition at line 196 of file APPSPACK_GCI.cpp.

void GCI::kill int  tid  )  [static]
 

For PVM, kills the specified taskid. Otherwise, prints a warning.

Definition at line 270 of file APPSPACK_GCI.cpp.

void GCI::exit  )  [static]
 

Exit the communications interface for both PVM and MPI. Otherwise, prints a warning.

Definition at line 300 of file APPSPACK_GCI.cpp.

Referenced by main().

int GCI::getMyTid  )  [static]
 

Return PVM taskid or MPI rank.

Definition at line 354 of file APPSPACK_GCI.cpp.

int GCI::getNumProcs  )  [static]
 

Return the number of processes.

Definition at line 395 of file APPSPACK_GCI.cpp.

Referenced by main().

bool GCI::isOrphan  )  [static]
 

For PVM, returns true is the process was spawned from the command line or the PVM console. Otherwise, returns false if it was spawned from another PVM process.

Definition at line 420 of file APPSPACK_GCI.cpp.

int GCI::parent  )  [static]
 

For PVM, returns the taskid of the parent. */.

Definition at line 450 of file APPSPACK_GCI.cpp.

int GCI::tidToHost int  tid  )  [static]
 

For PVM, returns the hostid of the given task. */.

Definition at line 486 of file APPSPACK_GCI.cpp.

void GCI::notify int  msgtag,
int  taskid
[static]
 

For PVM, sets notify to send a message with the given msgtag with the task specified by taskid exits. The body of the message will contain the taskid.

Definition at line 515 of file APPSPACK_GCI.cpp.

void GCI::notify int  msgtag  )  [static]
 

For PVM, sets notify to send a message with the given msgtag whenever any host dies. The body of the message will contain the hostid.

Definition at line 546 of file APPSPACK_GCI.cpp.

void GCI::initSend  )  [static]
 

For PVM or MPI, initialize send (must be called before pack and send).

Definition at line 582 of file APPSPACK_GCI.cpp.

Referenced by main().

void GCI::send int  msgtag,
int  taskid
[static]
 

For PVM or MPI, send a message with the specified message tag to the specified task.

Definition at line 621 of file APPSPACK_GCI.cpp.

Referenced by main().

void GCI::broadcast int  msgtag,
const vector< int > &  taskid
[static]
 

For PVM or MPI, broadcast message in buffer using tag msgtag to the n tasks listed in the taskid array.

Definition at line 668 of file APPSPACK_GCI.cpp.

bool GCI::recv int  msgtag = -1,
int  taskid = -1
[static]
 

For PVM or MPI, blocking receive.

Blocking receive for a message with the given tag and task id. The inputs msgtag and msgtid default to -1 (wildcard). Returns the buffer id of the message (PVM) or 1 (MPI), if any, and 0 otherwise.

Definition at line 716 of file APPSPACK_GCI.cpp.

Referenced by main().

bool GCI::nrecv int  msgtag = -1,
int  taskid = -1
[static]
 

For PVM or MPI, non-blocking receive.

Non-blocking receive for a message with the given tag and task id. The inputs msgtag and msgtid default to -1 (wildcard). Returns the buffer id of the message, if any, and 0 otherwise.

Definition at line 787 of file APPSPACK_GCI.cpp.

bool GCI::probe int  msgtag = -1,
int  taskid = -1
[static]
 

For PVM or MPI, non-blocking probe.

Non-blocking probe for a message with the specified message tag and task id. Returns the buffer id of the message for PVM or 1 for MPI, if any, and 0 otherwise. The inputs msgtag and msgtid default to -1 (wildcard).

Definition at line 824 of file APPSPACK_GCI.cpp.

void GCI::bprobe int  msgtag = -1,
int  taskid = -1
[static]
 

For MPI, blocking probe.

Do a blocking probe for a message with tag msgtag and from process msgtid. The default values of msgtag and msgtid are both -1.

Definition at line 882 of file APPSPACK_GCI.cpp.

void GCI::bufinfo int &  msgtag,
int &  taskid
[static]
 

For PVM or MPI, determine the msgtag and msgtid for the most recently probed or received message.

Definition at line 910 of file APPSPACK_GCI.cpp.

Referenced by main().

void GCI::pack int  i  )  [static]
 

Pack an integer.

Definition at line 959 of file APPSPACK_GCI.cpp.

Referenced by main(), and pack().

void GCI::pack char  i  )  [static]
 

Pack a char.

Definition at line 986 of file APPSPACK_GCI.cpp.

void GCI::pack double  d  )  [static]
 

Pack a double.

Definition at line 1013 of file APPSPACK_GCI.cpp.

void GCI::pack float  f  )  [static]
 

Pack a float.

Definition at line 1040 of file APPSPACK_GCI.cpp.

void GCI::pack bool  b  )  [static]
 

Pack a bool.

Definition at line 1105 of file APPSPACK_GCI.cpp.

References pack().

void GCI::pack const string  s  )  [static]
 

Pack a string.

Definition at line 1128 of file APPSPACK_GCI.cpp.

References pack().

void GCI::pack const vector< int > &  v  )  [static]
 

Pack integer vector.

Definition at line 1145 of file APPSPACK_GCI.cpp.

References pack().

void GCI::pack const Vector v  )  [static]
 

Pack double vector.

Definition at line 1153 of file APPSPACK_GCI.cpp.

References pack(), and APPSPACK::Vector::size().

void APPSPACK::GCI::pack const vector< float > &  v  )  [static]
 

Pack float vector.

void GCI::pack const vector< Vector > &  v  )  [static]
 

Pack a vector of vectors of doubles.

Definition at line 1161 of file APPSPACK_GCI.cpp.

References pack(), and APPSPACK::Vector::size().

void GCI::pack const vector< string > &  v  )  [static]
 

Pack a vector of string.

Definition at line 1169 of file APPSPACK_GCI.cpp.

References pack(), and APPSPACK::Vector::size().

void GCI::pack const vector< bool > &  v  )  [static]
 

Pack a vector of bools.

Definition at line 1177 of file APPSPACK_GCI.cpp.

References pack(), and APPSPACK::Vector::size().

void GCI::pack int  length,
const char *  array
[static]
 

Pack a char array.

Definition at line 1191 of file APPSPACK_GCI.cpp.

References pack().

void GCI::pack int  length,
const int *  array
[static]
 

Pack an integer array.

Definition at line 1224 of file APPSPACK_GCI.cpp.

References pack().

void GCI::pack int  length,
const double *  array
[static]
 

Pack a double array.

Definition at line 1257 of file APPSPACK_GCI.cpp.

References pack().

void GCI::pack int  length,
const float *  array
[static]
 

Pack a float array.

Definition at line 1291 of file APPSPACK_GCI.cpp.

References pack().

void GCI::unpack int &  i  )  [static]
 

Unpack an integer.

Definition at line 1324 of file APPSPACK_GCI.cpp.

Referenced by main(), and unpack().

void GCI::unpack char &  c  )  [static]
 

Unpack a char.

Definition at line 1349 of file APPSPACK_GCI.cpp.

void GCI::unpack double &  d  )  [static]
 

Unpack a double.

Definition at line 1374 of file APPSPACK_GCI.cpp.

void GCI::unpack float &  f  )  [static]
 

Unpack a float.

Definition at line 1399 of file APPSPACK_GCI.cpp.

void GCI::unpack bool &  b  )  [static]
 

Unpack a book.

Definition at line 1463 of file APPSPACK_GCI.cpp.

void GCI::unpack string &  s  )  [static]
 

Unpack a string.

Definition at line 1493 of file APPSPACK_GCI.cpp.

References unpack().

void GCI::unpack vector< int > &  v  )  [static]
 

Unpack a vector of integers.

Definition at line 1536 of file APPSPACK_GCI.cpp.

References APPSPACK::Vector::resize(), and unpack().

void GCI::unpack Vector v  )  [static]
 

Unpack a vector of doubles.

Definition at line 1545 of file APPSPACK_GCI.cpp.

References APPSPACK::Vector::resize(), and unpack().

void GCI::unpack vector< Vector > &  v  )  [static]
 

Unpack a vector of a vector of doubles.

Definition at line 1554 of file APPSPACK_GCI.cpp.

References APPSPACK::Vector::resize(), and unpack().

void GCI::unpack vector< string > &  v  )  [static]
 

Unpack a vector of strings.

Definition at line 1563 of file APPSPACK_GCI.cpp.

References APPSPACK::Vector::resize(), and unpack().

void GCI::unpack vector< bool > &  v  )  [static]
 

Unpack a vector of bools.

Definition at line 1573 of file APPSPACK_GCI.cpp.

References APPSPACK::Vector::resize(), and unpack().

void GCI::unpack int &  length,
char *&  array
[static]
 

Unpack a char array.

Definition at line 1588 of file APPSPACK_GCI.cpp.

References unpack().

void GCI::unpack int &  length,
int *&  array
[static]
 

Unpack an integer array.

Definition at line 1617 of file APPSPACK_GCI.cpp.

References unpack().

void GCI::unpack int &  length,
double *&  array
[static]
 

Unpack a double array.

Definition at line 1646 of file APPSPACK_GCI.cpp.

References unpack().

void GCI::unpack int &  length,
float *&  array
[static]
 

Unpack a float array.

Definition at line 1675 of file APPSPACK_GCI.cpp.

References unpack().

int GCI::resetHostInfo  )  [static]
 

For PVM, reset host information by asking PVM to update hostp - the data structure that contains the host information. Return the number of hosts.

Definition at line 1708 of file APPSPACK_GCI.cpp.

int GCI::getHostTid int  i  )  [static]
 

For PVM. get the hostid of the i-th host.

Definition at line 1734 of file APPSPACK_GCI.cpp.

int GCI::getHostSpeed int  i  )  [static]
 

For PVM,get the speed of the i-th host.

Definition at line 1750 of file APPSPACK_GCI.cpp.

char * GCI::getHostName int  i  )  [static]
 

For PVM, get a pointer to name of the i-th host.

Definition at line 1766 of file APPSPACK_GCI.cpp.


The documentation for this class was generated from the following files:

 

© Sandia Corporation | Site Contact | Privacy and Security

Generated on Fri Feb 16 10:33:36 2007 for APPSPACK 5.0.1 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2002