Changeset 805


Ignore:
Timestamp:
06/04/09 21:55:48 (16 years ago)
Author:
Eric.Larour
Message:

Some doc for qmu

Location:
issm/trunk/src/c
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/DakotaPlugin.cpp

    r803 r805  
    11/*!\file:  DakotaPlugin.cpp (see DakotaPlugin.h for explanations)
     2 * \brief  header file for derived DirectApplicInterface class.
     3 * \sa SpwanCore.cpp and \sa qmu.cpp
     4 *
     5 * This class needs to be understood simultaneously with qmu.cpp and SpwanCore.cpp.
     6 * This call is derived from the Dakota DirectApplicInterface class. This is the
     7 * only way to plug ISSM's own routines into the Dakota engine. The derived class
     8 * has one function called derived_map_ac, which is called by Dakota to drive the
     9 * entire snesitivity analysis.
     10 *
     11 * We use this routine (which gets variables, variable_descriptors from the Dakota
     12 * engine, and requests responses from the ISSM solution sequences), to call our
     13 * own solutoin cores. This routines calls the SpawnCore routine, which will drive
     14 * the entire computations.
    215 */
    316
  • issm/trunk/src/c/objects/DakotaPlugin.h

    r803 r805  
    11/*!\file:  DakotaPlugin.h:
    2  * \brief  header file for derived DirectApplicInterface class. This class
    3  * is used to plug our own functions into the Dakota interface.
    4  * This class is copied from the PluginSerialDirectApplicInterface.[C,H]
    5  * file in Dakota/src/
    62 */
    73
  • issm/trunk/src/c/parallel/SpawnCore.cpp

    r804 r805  
    11/*!\file:  SpawnCore.cpp
    2  * \brief: run core solution, according to analysis_type and sub_analysis_type
     2 * \brief: run core ISSM solution using Dakota inputs coming from CPU 0.
     3 * \sa qmu.cpp DakotaPlugin.cpp
     4 *
     5 * This routine needs to be understood simultaneously with qmu.cpp and DakotaPlugin.
     6 * SpawnCore is called by all CPUS, with CPU 0 holding Dakota variable values, along
     7 * with variable descriptors.
     8 *
     9 * SpawnCore takes care of broadcasting the variables and their descriptors across the MPI
     10 * ring. Once this is done, we use the variables to modify the inputs for the solution core.
     11 * For ex, if "rho_ice" is provided, for ex 920, we include "rho_ice" in the inputs, then
     12 * call the core with the modified inputs. This is the way we get Dakota to explore the parameter
     13 * spce of the core.
     14 *
     15 * Once the core is called, we process the results of the core, and using the processed results,
     16 * we compute response functions. The responses are computed on all CPUS, but they are targeted
     17 * for CPU 0, which will get these values back to the Dakota engine.
     18 *
    319 */
    420
  • issm/trunk/src/c/parallel/qmu.cpp

    r804 r805  
    11/*!\file:  qmu.cpp
    2  * \brief: run qmu capabilities using Dakota library
     2 * \brief: wrapper to the Dakota capabilities. qmu fires up Dakota, and registers a Dakota Pluggin
     3 * which will be in charge of running the solution sequences repeteadly, to garner statistics.
     4 *
     5 * This routine deals with running ISSM and Dakota in library mode. In library mode, Dakota does not
     6 * run as an execuatble. Its capabilities are linked into the ISSM software. ISSM calls dakota routines
     7 * directly from the dakota library. qmu.cpp is the code that is in charge of calling those routines.
     8 *
     9 * Dakota has its own way of running in parallel (for embarassingly parallel jobs). We do not want that,
     10 * as ISSM knows exactly how to run "really parallel" jobs that use all CPUS. To bypass Dakota's parallelism,
     11 * we overloaded the constructor for the parallel library (see the Dakota patch in the externalpackages/dakota
     12 * directory). This overloaded constructor fires up Dakota serially on CPU 0 only! We take care of broadcasting
     13 * to the other CPUS, hence ISSM is running in parallel, and Dakota serially on CPU0.
     14 *
     15 * Now, how does CPU 0 drive all other CPUS to carry out sensitivity analysese? By synchronizing its call to
     16 * our ISSM cores (diagnostic_core, thermal_core, transient_core, etc ...) on CPU 0 with all other CPUS.
     17 * This explains the structure of qmu.cpp, where cpu 0 runs Dakota, the Dakota pluggin fires up SpawnCore.cpp,
     18 * while the other CPUS are waiting for a broadcast from CPU0, once they get it, they also fire up
     19 * SpawnCore. In the end, SpawnCore is fired up on all CPUS, with CPU0 having Dakota inputs, that it will
     20 * broacast to other CPUS.
     21 *
     22 * Now, how does dakota call the SpawnCore routine? The SpawnCore is embedded into the DakotaPlugin object
     23 * which is derived from the Direct Interface Dakota objct. This is the only way to run Dakota in library
     24 * mode (see their developper guide for more info). Dakota registers the DakotaPlugin object into its own
     25 * database, and calls on the embedded SpawnCore from CPU0.
     26 *
    327 */
    428
Note: See TracChangeset for help on using the changeset viewer.