Formal establishment of Toolboxes

Description

Taken from Steve Quenette, Louis Moresi, P. D. Sunter, Bill F. Appelbe, Explaining StGermain: An aspect oriented environment for building extensible computational mechanics modeling software, Proceedings of the International Parallel and Distributed Processing Symposium HIPS workshop, 2006:

Plugins differ from toolboxes predominantly by the order they are loaded: the input file(s) is read, toolboxes are loaded (populating the StGermain factories), the input file components are instantiated, then the plugins are loaded and subsequent components instantiated. Plugins hence allow a modeler to leverage an existing model, isolating their desired changes into a small plugin (encapsulation), which then adds these artifacts to the StGermain factories. This helps prevent users from directly modifying the layers of utilized toolboxes.

The idea of toolboxes is to differentiate the plugins that are small and minorly adapt a system, to those that are relly more like libraries of features used to make systems. As far as StGermain is concerned, there is only one executable, StGermain, which has toolboxes loaded into it. Executables such as StgFEM exist purely for convenience and branding. Toolboxes have an Init and Finalise function that needs to be implemented. They should exist in two independent containers/managers.

At the same time, we should remove the implicit linking of Discretisation and rename the built library to Domain as desired by DiscretisationDomainRework?.

Tasks

1. Try existing code

  • Dig up my composer code, build against latest trunk.
    • Try what exits with StgFEM - 20070726
    • Try what exits with PICellerator - 20070726
    • Try what exits with Underworld - failed! 20070726
  • Repeat with StGermain executable
    • Try what exits with StgFEM - 20070726
    • Try what exits with PICellerator - 20070726
    • Try what exits with Underworld - 20070726

Note: StGermain seg faults on exit! - 20070726

Make existing toolboxes more of what I want...

  • Rename & move StgFEM_Application (StgFEM_Applicationmodule.so) to StgFEM (StgFEM_Toolboxmodule.so)
  • Rename & move PICellerator_Application (PICellerator_Applicationmodule.so) to PICellerator (PICellerator_Toolboxmodule.so)
  • Rename & move Underworld_Application (Underworld_Applicationmodule.so) to Underworld (Underworld_Toolboxmodule.so)
  • Rename application_plugins to toolbox`

This will give the command line look of:

> StGermain --toolboxes[]=StgFEM --toolboxes[]=PICellerator --toolboxes[]=Underworld

And the input file look of:

<list name="toolboxes">
   <param>StgFEM</param>
   <param>PICellerator</param>
   <param>Underworld</param>
</list>
...
<struct name="components" mergeType="merge">
    ...
</struct>
...

2. Separate toolboxes from plugins

  • A ToolboxesManager based on PluginsManager, but with
    • Submit takes Init and Finalise function pointers
    • Register function prototype includes argv and argc
  • Change the dictionary entry name from application_plugins to toolbox
  • Move the toolbox loading stuff from the context to the TM.

3. Fix up the Discretisation / Domain nomenclature

  • Remove Discretisation from libStGermain.so
  • Rename to Domain
  • Make a toolbox