Parallel calculation options in DWSIM 3

From DWSIM - Chemical Process Simulator
Jump to: navigation, search

DWSIM 3 introduces a parallel calculation engine which runs on multicore processors and CUDA/OpenCL devices as well. It enables drammatic speed gains (40x) in certain cases, taking advantage of the raw processing power of modern PCs.

Parallel computing is a form of computation in which many calculations are carried out simultaneously, operating on the principle that large problems can often be divided into smaller ones, which are then solved concurrently ("in parallel"). There are several different forms of parallel computing: bit-level, instruction level, data, and task parallelism. As power consumption (and consequently heat generation) by computers has become a concern in recent years, parallel computing has become the dominant paradigm in computer architecture.

To view and edit the parallel calculation options in DWSIM, go to Settings > General Settings > Features.


CPU Parallel Processing

Enables CPU Parallel Processing. You can define the maximum degree of parallelism, that is, the maximum number of cores that will be used by DWSIM. The Default setting is equivalent to the total number of processor cores.


CPU parallelism is everywhere in DWSIM 3. Speed gains are more noticeable when the following calculations are requested:

  • Vapor-Liquid K-values (max. parallelism = 2)
  • Rigorous column solving models (max. parallelism = number of column stages)
  • Phase Envelope Utility (max. parallelism = 4)
  • Data Regression Utility (max. parallelism = number of data points)
  • PH-Flash algorithm temperature search code (max. parallelism = 2)
  • Non-linear equation solver (Newton method) (max. parallelism = 2)
  • Material Stream's Bubble and Dew point calculations (max. parallelism = 4)

GPU Parallel Processing

The GPU (Graphics Processing Unit) is a piece of hardware that is suitable for massively parallel, simple calculations. Taking this in consideration in the context of a GPU-enabled process simulator like DWSIM, the more compounds are present in a simulation, the higher the speed gains will be when comparing CPU vs. GPU calculation times.

DWSIM 3 has the capability of doing specific, heavily parallel calculations on a CUDA/OpenCL capable device. This includes UNIFAC activity coefficients, Lee-Kesler-Plöcker and Peng-Robinson fugacities. Calculation times are drammaticaly lowered even on simulations with a small number of compounds.

For instance, taking a very common example of a simulation involving an oil characterization where 50 pseudocomponents were generated, using the Lee-Kesler-Plöcker Property Package to calculate stream properties. In this case, a simple equilibrium calculation at 400 K and 1 atm takes almost 29 seconds on an AMD Phenom II X4 965 CPU to finish, while a GeForce GTX 550 Ti GPU takes only 6 seconds to do the same job, with only the fugacity calculation being done in the GPU in the latter case.


Enabling CUDA/OpenCL support

To enable GPU Processing in DWSIM, you must have a CUDA device with compute capability version 1.3, or an OpenCL 1.1 capable device at least.

For NVIDIA (CUDA/OpenCL) and AMD (OpenCL) GPUs, support should be available right away if you have the latest drivers installed in your computer. OpenCL support for CPUs can be enabled by installing the AMD APP SDK or the Intel OpenCL SDK.

Click here for a list of CUDA capable devices, and here for a list of OpenCL 1.1 capable devices.