GPU compute

What uses the GPU

Only the flow solver can use the graphics processor (GPU). The structural and thermal solvers use the CPU. All solvers use all the threads of the computer.

The CPU is the reference. It gives the same result bits on each run.

What you need

The flow solver uses OpenCL from the system graphics driver. You do not install an extra package. OpenCL is available on most discrete GPUs (NVIDIA, AMD) and on most integrated GPUs (Intel, AMD APU) with the vendor driver or the Mesa Rusticl driver. Meridian does not use OpenCL CPU devices.

Meridian selects the discrete GPU with the most memory. If there is no discrete GPU, it selects the integrated GPU with the most memory.

Settings

  1. On the Tools tab, click Preferences.
  2. Go to General > Simulation compute.
  3. Set Flow solver device and GPU precision.
Setting Values Default
Flow solver device Automatic (GPU for large flow grids), GPU when available, CPU only Automatic
GPU precision 32-bit (fastest), 64-bit (same as the CPU) 32-bit

Precision

Each GPU setting gives the same result on each run on one device.

Environment variables

These variables have priority over the preferences. They also apply to the command line and to the MCP server.

Variable Values
MERIDIAN_COMPUTE cpu, gpu, auto
MERIDIAN_GPU_PRECISION single (or fp32), double (or fp64)
MERIDIAN_GPU_DEVICE The device number, or a part of the device name, for example Intel

When the solver uses the CPU

The solver uses the CPU, and the result tells the reason, when:

If the GPU has no 64-bit arithmetic, a 64-bit setting uses 32-bit, and the result has a note.

If the GPU fails during a run, the solver runs the study again on the CPU from the start. It gives a warning.

See which device runs the study

The study progress text names the device. For example: "Flow step 1200 of 4000 on NVIDIA A2 (GPU, OpenCL 3.0 CUDA, 14.6 GB), 32-bit."

The Study Results panel (Compute device and Compute note), the report and the JSON result of the command line also show the device.

The viewport GPU

The 3D view also uses the graphics processor. That is a different setting. Refer to The interface.