Reply To: Choose between CPU and GPU
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Choose between CPU and GPU › Reply To: Choose between CPU and GPU
Ok, so MPI is detected correctly.
What do you mean by “it still does not work”?
If you compiled with GPU support (i.e. GPU_CUDA
is set in the PLATFORMS
array of your config) then a simple mpirun -np $whatwever ./case
will use the first GPU for all 32 processes which almost certainly is not what you want. You will need to specify the CUDA_VISIBLE_DEVICES
properly to select one GPU per process (and you probably don’t have 32 GPUs in this system so you will need to reduce the number of processes accordingly, there is documentation on this e.g. in the GPU example configs).
If you just want to disable GPU usage all you need to do is not enable it – i.e. just remove the GPU_CUDA
entry from PLATFORMS
and recompile.