GPU compute
What uses the GPU
Only the flow solver can use the graphics processor (GPU). All other solvers use the CPU. They 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 selects the discrete GPU with the most memory. If there is no discrete GPU, it selects the integrated GPU with the most memory.
Settings
Go to Tools > Preferences > General > Simulation compute.
| Setting | Values | Default |
|---|---|---|
| Flow solver device | Automatic, GPU when available, CPU only | Automatic |
| GPU precision | 32-bit (fastest), 64-bit (same as the CPU) | 32-bit |
- Automatic uses the GPU when the grid has 200,000 cells or more (all refinement levels). A smaller grid runs faster on the CPU.
- CPU only always uses the CPU.
Precision
- 64-bit gives the same result bits as the CPU.
- 32-bit stays within 0.001 (relative) of the CPU drag, and within 0.001 of the largest speed in each cell.
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 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:
- The setting is CPU only, or the setting is Automatic and the grid is small.
- There is no GPU or no OpenCL driver.
- The setup has a wall model, a moving wall face or a start velocity field.
- The GPU memory is too small.
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 results panel and the report also show the device.
The viewport GPU
The 3D view also uses the graphics processor. That is a different setting. Refer to The interface.