1 #include "pcCreationManager.h"
2 #include "paircalc/pcBuilder.h"
3 #include "orthog_ctrl/orthoBuilder.h"
5 #include "ortho.decl.h"
10 PCCreationManager::PCCreationManager(
const paircalc::pcConfig &_symmCfg,
const paircalc::pcConfig &_asymmCfg,
const ortho::orthoConfig &_orthoCfg):
11 symmCfg(_symmCfg), asymmCfg(_asymmCfg), orthoCfg(_orthoCfg)
13 if (symmCfg.orthoGrainSize != asymmCfg.orthoGrainSize)
14 CkAbort(
"Ortho grain size mismatch in supllied configs\n");
15 if (symmCfg.instanceIndex != asymmCfg.instanceIndex)
16 CkAbort(
"Cannot wire together two PCs from different instances!!");
22 void PCCreationManager::build(CkCallback cb,
const PCMapConfig &mapCfg)
26 msg->symmCfg = symmCfg;
27 msg->asymmCfg = asymmCfg;
30 CkPrintf(
"\n\nCreating the symmetric (psi) and asymmetric (lambda) paircalculators\n");
32 msg->symmIDs = symmBuilder.build (mapCfg);
33 msg->asymmIDs = asymmBuilder.
build(mapCfg);
36 CkPrintf(
"Creating the ortho array\n");
38 msg->orthoAID = orthoBuilder.
build(msg->asymmIDs, mapCfg);
41 CkPrintf(
"Setting up communication between gspace <--> paircalc <--> ortho\n");
42 CProxy_Ortho ortho = CProxy_Ortho(msg->orthoAID);
43 ortho.makeSections(symmCfg, asymmCfg, msg->symmIDs.
pcAID, msg->asymmIDs.
pcAID);
InstanceIDs build(const startup::PCMapConfig &mapCfg)
Trigger the creation of a pc array with the given configs, within the given pes/boxes etc...
CkArrayID build(cp::paircalc::InstanceIDs &asymmHandle, const startup::PCMapConfig mapCfg)
Construct an ortho world given the configs.
A container for assorted mapping inputs to pass around easily.
Author: Eric J Bohm Date Created: June 4th, 2006.
paircalc::CreationManager returns relevant chare array handles via this msg
A class that orchestrates the mapping and creation of one ortho array and accompanying chares like Or...
CkArrayID pcAID
The array IDs of the paircalc and its servant input handler arrays.
A class that orchestrates the mapping and creation of one paircalc array and accompanying chares like...