Function: | runInLoopParallelProcessorCount, set the amount of cores available to Delft-FEWS when running workflow portions in parallel in one forecasting shell instance |
|---|
Module Name: | runInLoopParallelProcessorCount |
|---|---|
Where to Use? | global properties file |
Why to Use? | to speed-up ensemble runs on multi core machines |
Description: | The runInLoopParallelProcessorCount entry in the global properties files indicated the number of cores Delft-FEWS may use when running ensemble members or locations in a loop |
Preconditions: | 2009-02 release, multi core cpu or multi cpu computer |
Outcome(s): | speed-up of the computations |
Scheendump(s): | link to attached screendump(s) for displays only |
Remark(s): | The speedup that may be obtained is highly dependent on the type of module you are running It is not possible yet to combine this feature with the downloadMissingDataFromArchive option in the workflow configuration. |
Available since: | DelftFEWS200902 |
Contents
Overview
Delft-FEWS can, within one Forecasting Shell instance, split ensemble workflows (that have the runInLoop element set to true) over multiple cores. Based on the available number of cores a number of queues is made, one for each core. When running the activity, the different ensemble members are added to the different queues. Since FEWS 2017.01 it is optionally possible to run parallel activities on multiple forecasting shells. This can also apply for ensemble workflows as is explained in section 'parallel' on page 06 WorkFlow Configuration.
To split an ensemble activity over multiple cores within one Forecasting Shell instance, use runInLoop=true in the workflow file (see example below) in combination with the global property definition as explained below the xmlblock:
<activity> <runIndependent>true</runIndependent> <moduleInstanceId>MOGREPS_Spatial_Interpolation</moduleInstanceId> <ensemble> <ensembleId>MOGREPS</ensembleId> <runInLoop>true</runInLoop> </ensemble> </activity>
By default the General Adapter runs are performed in the %TEMP_DIR% directory. The %TEMP_DIR% variable is an internal variable which points to a unique temporary directory which is created in the $REGION_HOME$/Temp and which will be removed afterwards.
Checkout How to run ensembles in parallel if you want to run ensembles over multiple FSS-instances
Configuration
By default Delft-FEWS will only use one core and all tasks are run one after another. To enable the parallel running of ensemble members or locations the runInLoopParallelProcessorCount entry must be set in the global properties file. Here you either specify the number of cores to use or specify 100 to use all available cores.
In the global properties
Config Example | # to use all available cores/cpu's: runInLoopParallelProcessorCount=100 |
|---|
rootDir in GeneralAdapter
Please note that it is essential to change the configuration of the <rootDir> in the GeneralAdapter. A rootDir needs to be configured per ensembleMember. This can be done in two ways:
- %TEMP_DIR%
- %ENSEMBLE_MEMBER_DIR%
The latter gives you more control (e.g. in a stand-alone environment), because all folders remain after the run. Obvious downside is that this option takes up more storage.
<general> <rootDir>%TEMP_DIR%</rootDir> <workDir>%ROOT_DIR%/work</workDir> ... </general>
<general> <rootDir>$REGION_HOME$/Modules/$Model$/%ENSEMBLE_MEMBER_ID%</rootDir> <workDir>%ROOT_DIR%/work</workDir> ... </general>