A week ago, I struggled to run the C++ version of k-Wave on the latest hardware. After spending some time and using existing resources from the forum, I was able to overcome the issue. So, I created this repository with a comprehensive guide for both Windows and Linux. I hope it helps others.
k-Wave
A MATLAB toolbox for the time-domain
simulation of acoustic wave fields
Comprehensive guide to run k-Wave on the latest hardware (GPU)
(3 posts) (3 voices)-
Posted 4 months ago #
-
@bob2024 Thanks very much for this helpful tutorial!
Posted 1 month ago # -
Thank you very much! I’ll review it and consider incorporating it into the official version. I also plan to update the manual to include a time comparison with newer GPUs. :)
Additionally, I noticed that GCC 13+ compilers have changed how infinity is handled. The following lines now cause the simulation to end with NaNs.
if (absorbNabla1[i] == std::numeric_limits<float>::infinity()) absorbNabla1[i] = 0.0f;
if (absorbNabla2[i] == std::numeric_limits<float>::infinity()) absorbNabla2[i] = 0.0f;a simple, however, not the best fix is:
// Comparison with infinity is not supported with --ffast-math enabled
if (absorbNabla1[i] >= std::numeric_limits<float>::max()) absorbNabla1[i] = 0.0f;
if (absorbNabla2[i] >= std::numeric_limits<float>::max()) absorbNabla2[i] = 0.0f;Posted 1 week ago #
Reply
You must log in to post.