SCOREC core
Parallel unstructured mesh tools
PCU

PCU (the Parallel Control Utility) is a library for parallel computation based on MPI. PCU provides three things to users:

  1. A hybrid phased message passing system
  2. Hybrid collective operations
  3. Ability to have multiple PCU objects exist with different amounts of processors

Phased message passing is similar to Bulk Synchronous Parallel. All messages are exchanged in a phase, which is a collective operation involving all threads in the parallel program. During a phase, the following events happen in sequence:

  1. All threads send non-blocking messages to other threads
  2. All threads receive all messages sent to them during this phase PCU provides termination detection, which is the ability to detect when all messages have been received without prior knowledge of which threads are sending to which.

All mesh creation is tied to a PCU to operate on. Sample:

int main(int argc, char** argv){
const char* modelFile = argv[1];
const char* meshFile = argv[2];
MPI_Init(&argc,&argv);
pcu::PCU PCUObj = pcu::PCU(MPI_COMM_WORLD);
ma::Mesh* m = apf::loadMdsMesh(modelFile,meshFile,&PCUObj);
MPI_Finalize();
}
Extended mesh interface for modification.
Definition: apfMesh2.h:30
The Parallel Contrul Unit class encapsulates parallel communication.
Definition: PCU.h:26
void destroyMesh(Mesh *m)
Destroys an apf::Mesh.
Mesh2 * loadMdsMesh(const char *modelfile, const char *meshfile, pcu::PCU *PCUObj)
load an MDS mesh and model from file

The C++ API documentation is here: PCU.h