[Opm] Run OPM-flow simulation model on GPU

Markus Blatt markus.blatt at opm-op.com
Wed Aug 24 06:29:15 UTC 2022


Hi Ahmed,

Am Tue, Aug 23, 2022 at 01:24:25PM +0300 schrieb Ahmed Saied:
>Is there possibility to run the OPM flow model on computer GPU instead of the CPU ?
>

If you compiled flow from source and had opencl and/or cuda installed at the time it is possible
to solve the linear systems using the GPU. Please not that the rest of the simulation will still
use the CPU, though. Depending on your hardware the performance improvements might vary.

You tell flow to use the GPU via command line options:

flow --accelerator-mode=opencl MODEL.DATA

This will use opencl. You can use other modes, e.g. cusparseSolver for CUDA.

Excerpt from flow --help

    --accelerator-mode=STRING                     Use GPU (cusparseSolver or openclSolver) or FPGA (fpgaSolver) as the linear solver, usage: '--accelerator-mode=[none|cusparse|opencl|fpga|amgcl]'. Default: "none"
    --bda-device-id=INTEGER                       Choose device ID for cusparseSolver or openclSolver, use 'nvidia-smi' or 'clinfo' to determine valid IDs. Default: 0

HTH

>What will be the workflow to do the same in case of running the model through Windows and through Ubuntu.
>

The above is for Linux, e.g. Debian/Ubuntu.
I am the wrong person to answer Windows questions, sorry. There is no direct support for it. Only via the Windows
for Linux subsystem. See e.g. https://pkirkham.github.io/analysis/running-opm-flow-on-windows-subsystem-for-linux/
As you starting from the command line there, too, the workflow should be exactly the same.

Cheers,

Markus


More information about the Opm mailing list