Hi everyone,
We are trying to access MATLAB (k-Wave) GPU code on Ubuntu 24. Our system configuration is as follows: CUDA Device: NVIDIA RTX A4000
CUDA Toolkit Version: 12.2.0
NVIDIA-SMI: 535.230.02
Driver Version: 535.230.02
CUDA Version: 12.2
MATLAB Version: R2024b
k-Wave Toolbox Version: 1.4
k-Wave Toolbox Version (CUDA): 1.3 (CPP Linux Binaries)
When we run the following command in MATLAB: sensor_data = kspaceFirstOrder2DG(kgrid, medium, source, sensor, input_args{:}, 'RecordMovie', false, 'DataCast', 'single');
We encounter the following error message:
┌───────────────────────────────────────────────────────────────┐
│ kspaceFirstOrder-CUDA v1.3 │
├───────────────────────────────────────────────────────────────┤
│ Reading simulation configuration: Done │
│ Selected GPU device id: Failed │
└───────────────────────────────────────────────────────────────┘
┌───────────────────────────────────────────────────────────────┐
│ !!! K-Wave experienced a fatal error !!! │
├───────────────────────────────────────────────────────────────┤
│ Error: All CUDA-capable devices are busy or unavailable. │
├───────────────────────────────────────────────────────────────┤
│ Execution terminated │
└───────────────────────────────────────────────────────────────┘
Error using h5readc
Unable to open '/tmp/kwave_output_data05-Apr-2025-16-29-44.h5'. File or folder not found.
Error in h5read (line 95)
[data,var_class] = h5readc(Filename,Dataset,start,count,stride);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in kspaceFirstOrder3DC (line 569)
Nx = h5read(output_filename, '/Nx');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in kspaceFirstOrder2DG (line 76)
sensor_data = kspaceFirstOrder3DC(varargin{:});
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in untitled (line 51)
sensor_data = kspaceFirstOrder2DG(kgrid, medium, source, sensor, input_args{:}, 'RecordMovie', false, 'DataCast', 'single');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Is it not possible to run the k-Wave binaries (related to the Linux version) with CUDA support? If so, how can we resolve this issue?
Thank you for your help!