![]() |
Ice Sheet System Model
4.18
Code documentation
|
: wrapper to the Dakota capabilities. qmu fires up Dakota, and registers a Dakota Plugin which will be in charge of running the solution sequences repeatedly, to garner statistics. More...
#include "./cores.h"
#include "../toolkits/toolkits.h"
#include "../shared/shared.h"
#include "../classes/classes.h"
#include "../modules/modules.h"
Go to the source code of this file.
Functions | |
void | dakota_core (FemModel *femmodel) |
: wrapper to the Dakota capabilities. qmu fires up Dakota, and registers a Dakota Plugin which will be in charge of running the solution sequences repeatedly, to garner statistics.
This routine deals with running ISSM and Dakota in library mode. In library mode, Dakota does not run as an executable. Its capabilities are linked into the ISSM software. ISSM calls Dakota routines directly from the Dakota library. qmu.cpp is the code that is in charge of calling those routines.
Dakota has its own way of running in parallel (for embarrassingly parallel jobs). We do not want that, as ISSM knows exactly how to run "really parallel" jobs that use all CPUS. To bypass Dakota's parallelism, we overloaded the constructor for the parallel library (see the Dakota patch in the externalpackages/dakota directory). This overloaded constructor fires up Dakota serially on CPU 0 only! We take care of broadcasting to the other CPUS, hence ISSM is running in parallel, and Dakota serially on CPU0.
Now, how does CPU 0 drive all other CPUS to carry out sensitivity analyses? By synchronizing its call to our ISSM cores (stressbalance_core, thermal_core, transient_core, etc ...) on CPU 0 with all other CPUS. This explains the structure of qmu.cpp, where cpu 0 runs Dakota, the Dakota pluggin fires up DakotaSpawnCore.cpp, while the other CPUS are waiting for a broadcast from CPU0, once they get it, they also fire up DakotaSpawnCore. In the end, DakotaSpawnCore is fired up on all CPUS, with CPU0 having Dakota inputs, that it will broadcast to other CPUS.
Now, how does Dakota call the DakotaSpawnCore routine? The DakotaSpawnCore is embedded into the DakotaPlugin object which is derived from the Direct Interface Dakota object. This is the only way to run Dakota in library mode (see their developer guide for more info). Dakota registers the DakotaPlugin object into its own database, and calls on the embedded DakotaSpawnCore from CPU0.
Definition in file dakota_core.cpp.
void dakota_core | ( | FemModel * | femmodel | ) |
Definition at line 313 of file dakota_core.cpp.