#include <APPSPACK_Executor_MPI.hpp>
Inheritance diagram for APPSPACK::Executor::MPI:
MPI implementation of the Executor::Interface. Coordinates the workers. This includes keeping track of each worker's status (free or busy), sending messages to the workers with the points to be evaluated, and receiving messages with completed function evaluations from the workers.
Definition at line 58 of file APPSPACK_Executor_MPI.hpp.
Public Types | |
enum | MsgTags { Init, Feval, Terminate } |
Message codes exchanged with worker. More... | |
Public Member Functions | |
MPI () | |
constructor | |
virtual | ~MPI () |
Destructor. | |
virtual bool | isWaiting () const |
Return true if the executor is waiting for more points to be spawned. | |
virtual bool | spawn (const Vector &x_in, int tag_in) |
Start a function evaluation for the given point with the given integer tag. | |
virtual int | recv (int &tag_out, bool &isF_out, double &f_out, string &msg_out) |
Check to see if any function evaluations have finished and return the relevant information. | |
virtual void | print () const |
Optional print function to print out information about the executor. | |
Private Attributes | |
vector< int > | workertag |
Tag of current point, if any. |
|
Message codes exchanged with worker. Definition at line 63 of file APPSPACK_Executor_MPI.hpp. |
|
constructor Definition at line 41 of file APPSPACK_Executor_MPI.cpp. References APPSPACK::GCI::getNumProcs(), and workertag. |
|
Destructor. Definition at line 49 of file APPSPACK_Executor_MPI.cpp. |
|
Return true if the executor is waiting for more points to be spawned.
Implements APPSPACK::Executor::Interface. Definition at line 53 of file APPSPACK_Executor_MPI.cpp. References workertag. |
|
Start a function evaluation for the given point with the given integer tag. This function should not be called without checking isNotFull() first. However, if it is called but the executor is already full, this method will return false. Implements APPSPACK::Executor::Interface. Definition at line 62 of file APPSPACK_Executor_MPI.cpp. References Feval, APPSPACK::GCI::initSend(), APPSPACK::GCI::pack(), APPSPACK::GCI::send(), APPSPACK::Vector, and workertag. |
|
Check to see if any function evaluations have finished and return the relevant information. If a function evaluation has completed, fill in the references that are passed to the function as follows.
Implements APPSPACK::Executor::Interface. Definition at line 79 of file APPSPACK_Executor_MPI.cpp. References APPSPACK::GCI::bufinfo(), Feval, APPSPACK::GCI::probe(), APPSPACK::GCI::recv(), APPSPACK::GCI::unpack(), and workertag. |
|
Optional print function to print out information about the executor.
Reimplemented from APPSPACK::Executor::Interface. Definition at line 101 of file APPSPACK_Executor_MPI.cpp. References workertag. |
|
Tag of current point, if any. A tag of -1 indicates that the worker is free. Definition at line 91 of file APPSPACK_Executor_MPI.hpp. Referenced by isWaiting(), MPI(), print(), recv(), and spawn(). |
© Sandia Corporation | Site Contact | Privacy and Security
Generated on Wed Dec 14 18:41:05 2005 for APPSPACK 4.0.2 by
1.3.8 written by Dimitri van Heesch,
© 1997-2002