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
- On the Tools tab, click Preferences.
- Go to General > Simulation compute.
- 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 |
- Automatic uses the GPU when the grid has 200,000 cells or more (all refinement levels). A smaller grid runs faster on the CPU.
- GPU when available uses the GPU for each flow study that it can run.
- 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 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:
- 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 of the flow box, a start velocity field or a rotor zone.
- The GPU memory is too small (the solver uses at most 90 % of it), or one buffer is larger than the limit of the device.
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.