Hi, firstly I have to say this toolbox is very useful. However, I have a problem that has troubled me a lot.
The problem is about GPU memory used. The code is run on A100(40GB). It looked normal at first:
estimated simulation time 2hours 6min 29.7093s...
GPU memory used: 21.9727 GB (of 39.5871 GB)
simulation completed in 2hours 6min 36.3867s
It looked like it was over but next something happende:
{Error using gpuArray/ifft
Out of memory on device. MATLAB was unable to allocate sufficient resources on
the GPU to complete this operation. If the problem persists, reset the GPU by
calling 'gpuDevice(1)'.
Error in fourierShift (line 112)
data = real(ifft(bsxfun(@times, ifftshift( exp(1i .* k_vec .* shift) ),
fft(data, [], dim)), [], dim));
Error in kspaceFirstOrder_saveIntensity (line 46)
ux_sgt = fourierShift(sensor_data(sensor_mask_index).ux_non_staggered,
1/2);
Error in kspaceFirstOrderAS (line 1387)
kspaceFirstOrder_saveIntensity;
Error in code1 (line 169)
sensor_data = kspaceFirstOrderAS(kgrid, medium, source, sensor, ...
}
And I have another question about GPU memory used.
There is another case which can be run on A100 and the GPU memory used is 3.5964 GB (of 39.5871 GB). However, this case cannot not be run on a GPU of 6GB.
Could anybody tell me why?
Thanks in advance.