Utilizing more than one CPU/core in model calculation (multi-threading)

  Applies To 
  Product(s): HAMMER, WaterGEMS, WaterCAD, SewerGEMS, SewerCAD, StormCAD, CivilStorm, PondPack
  Version(s): 08.11.XX.XX and higher
  Area:  Modeling
  Original Author: Scott Kampa, Bentley Technical Support Group

Question:

Is it possible for Bentley OpenFlows product calculations to utilize more than one CPU/core on a machine with multiple CPUs/cores?

Are OpenFlows products multi-threaded?

Background Information:

When a program uses more than one CPU, this is called multi-threading. Basically, each CPU or CPU core performs a different task in parallel. So, it is like adding more lanes to a road, at the same speed limit. In other words, having more CPUs/cores doesn’t necessarily mean that a calculation will run that much faster, but rather that they have the potential to multi-task and get more calculations done at the same time.  

In general, the Bentley OpenFlows / Hydraulic and Hydrology products currently are not written to use multi-threading for the core hydraulic calculations, with the exception of automated fireflow in more recent versions (see below) and the EPA-SWMM numerical solver in SewerGEMS and CivilStorm. Multithreading may be added to certain aspects of the calculation process in future releases of the products. However, the products do still take advantage of multiple cores, by way of the .NET Framework architecture that it uses. Meaning, certain processes such as loading of the components that make up the application, background optimization of memory usage and other minor tasks that can run in parallel.

Considerations:

  • Multi-threading support covers multi-core as well as multi-processor (multiple CPUs, each of which may have multiple cores) Multi-processor typically only occurs on server computers.
  • Not every calculation process may be feasible with multi-threading. For instance, you will not be able to calculate multiple time steps in parallel through multi-threading (for example a transient simulation in HAMMER). This is because for many calculations of this type, the results from the previous time step are used in the calculation of the current time step. Because of that, it actually does not make sense to use multi-threading.

However, some types of calculations can benefit from multi-threading, particularly for larger models. For instance, multi-threading has been introduced for automated fire flow with the release of WaterGEMS and WaterCAD V8i SELECTseries 6. In a future release, Water Quality analysis may also benefit from multi-threading. In addition, the Darwin tools, like Darwin Calibrator and Darwin Designer, could benefit from parallelized computations.

Multi-threading - WaterGEMS / WaterCAD

Fire Flow: For more information on multi-threading with fire flow, see the "Calculation Performance" section in the article "What's new in WaterGEMS and WaterCAD V8i SELECTseries 6?".

Criticality - Multi-threading is now used for Criticality as of WaterGEMS and WaterCAD 2023 (version 23.00.00.16).

Water Quality (age, trace, constituent): As of August, 2023, multi-threading support for water quality is planned for a future version of WaterGEMS and WaterCAD (reference # 1272646)

Multi-threading - SewerGEMS / CivilStorm

In SewerGEMS and CivilStorm, multi-threading can be used by selecting the appropriate "Number of threads" in the calculation options. This is currently only supported when the active numerical solver is set to Explicit (SWMM) and only applies to the hydraulic calculations. (2D calculations will automatically use available cores/threads) Set the "Number of Threads" option to 4 if it is not already set, or try "automatic".

Multi-threading - HAMMER

HAMMER does not yet support multithreading. Most models are relatively small and do not take a long time to compute, as it is often best to focus the model on the area most likely to encounter damaging transients (see more on that here.)

If you are interested in multi-threading / parallelization of batch runs, consider using our Idea Portal. For example up-vote the idea posted here. This will help the Development team prioritize and enable you to track this and see related comments and status.

Recommended
Related