FFTW / fftw3

DO NOT CHECK OUT THESE FILES FROM GITHUB UNLESS YOU KNOW WHAT YOU ARE DOING. (See below.)
GNU General Public License v2.0
2.66k stars 651 forks source link

support 64-bit sizes in libbench #318

Open zhuohoudeputao opened 1 year ago

zhuohoudeputao commented 1 year ago

It caused a segmentation fault problem when I tried to test some large stride cases, for example, icf31600:126400:126400v4:31600:31600. Any solution to deal with it?

stevengj commented 1 year ago

Is it possible that you are simply running out of memory? The problem you mention requires an array holding 31600*126400 + 3*31600 == 3994334800 complex numbers, corresponding to 3994334800 * 16 bytes ≈ 64 GB (in addition to any other memory that is allocated in the course of benchmarking/validation).

If you want to check that it is allocating the correct size of array for testing, the memory allocation for the test problems is done in libbench2/allocate.c based on bounds calculations in libbench2/tensor.c.

zhuohoudeputao commented 1 year ago

My machine has almost 500GB memory so it's not possible to run out of memory. The key is that some copy functions in libench2/verify-dft.c worked not properly (some data type is int and the case somehow out of its range).

stevengj commented 1 year ago

Oh, right — FFTW is 64-bit safe, but the test/benchmark framework (libbench2) uses int everywhere so it only works with sizes up to 2^31-1.