48 friend class std::auto_ptr<OpenMPI>;
98 void send(
int target,
int source,
double &v);
138 void sync(
double& v,
int master);
149 static std::auto_ptr< OpenMPI > m_ptr;
153 #define HEAD if(!mpi::OpenMPI::getInstance().getRank())
int getSize() const
returns the total number of nodes.
Definition: openmpi.h:61
int getRank() const
returns the rank of the node.
Definition: openmpi.h:54
void send(int target, int source, math::CFunction &f)
sends a copy of the math::CFunction from node source to node target.
Definition: openmpi.cpp:24
static OpenMPI & getInstance()
returns the only instance of the OpenMPI class.
Definition: openmpi.cpp:17
void combine(math::CFunction &f)
assembles the partial information of the individual compute nodes to a full copy on each one...
Definition: openmpi.cpp:61
The MPI singleton is responsible for data exchange between compute nodes via OpenMPI.
Definition: openmpi.h:35
void sync()
blocks until all nodes have reached this function call.
Definition: openmpi.cpp:45
Discretized complex-valued function for real arguments.
Definition: cfunction.h:34