Benchmarking for cuFINUFFT library
- CUNFFT: https://github.com/sukunis/CUNFFT
- cuFINUFFT: https://github.com/flatironinstitute/cufinufft
- gpuNUFFT: https://github.com/andyschwarzl/gpuNUFFT
module load cuda/10.0.130_410.48
module load gcc/7.4.0
make lib
module load cuda/10.0.130_410.48
module load gcc/7.4.0
make lib
module load cuda/10.0.130_410.48
module load gcc/7.4.0
cd CUNFFT
cd build/
make distclean
cmake .. -DCUT_OFF=3 -DCUNFFT_DOUBLE_PRECISION=OFF -DMILLI_SEC=ON \
-DMEASURED_TIMES=ON -DCUDA_CUDA_LIBRARY=/usr/lib64/libcuda.so -DPRINT_CONFIG=OFF
make
make install
cmake FLAG setting
- -DCUT_OFF (the spreading width is
FILTER_SIZE = (2*CUT_OFF+2)
, defined incunfft_typedefs.h
) - -DCUNFFT_DOUBLE_PRECISION
- -DMEASURED_TIMES
- -DCUDA_CUDA_LIBRARY
- -DMILLI_SEC
Note: gpuNUFFT uses single precision by default.
module load cuda/10.0.130_410.48
module load gcc/7.4.0
module load matlab
cd gpuNUFFT
cd CUDA
mkdir -p build
cd build
cmake .. -DMATLAB_ROOT_DIR=/cm/shared/sw/pkg/vendor/matlab/R2020a
make
- [Step 1] Install all the libraries
- [Step 2] Add shared libraries path to LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/finufft/lib:~/CUNFFT/lib:~/cuFINUFFT/lib
- [Step 3] Execute python scripts
python nuffttype1.py
- FINUFFT/cuFINUFFT:
Input:
x
: a sizeM
float array of x coordinates ofM
source pointsy
: a sizeM
float array of y coordinates ofM
source pointsz
: a sizeM
float array of z coordinates ofM
source points, orNULL
c
: a sizeM
complex float array ofM
strengthseps
: relative l2 tolerance, i.e. . The spreading width is-log_10 (eps/10)
Output:
f_k
: a sizeN1xN2x...xNd
complex float array ofN1xN2x...xNd
output modes. The modes are ordered from-N/2
toN/2-1
in each dimension and are ordered first in dimensionx
, then iny
and last inz
, i.e. in 3D,f_k[k1+k2*N1+k3*N1*N2]
approximates .
- CUNFFT
Input:
x
: a sizedM
float array of coordinates ofM
source points, thet
-th coordinate of thej
-th source point is thed*j+t
entry ofx
.c
: a complex float array ofM
strengths
Output:
f_k
= a sizeN1xN2x...xNd
complex float array ofN1xN2x...xNd
modes. The modes are ordered from-N/2
toN/2-1
in each dimension. Modes are ordered first in dimensionz
, then iny
and last inx
, i.e. in 3D,f_k[k_3+k_2*N3+k_1*N3*N2]
is the Fourier coefficient approximates .
- gpuNUFFT
Input:
k
: a sized
byM
float matrix of coordinates ofM
source points, thet
-th coordinate of thej
-th source point is the(t,j)
entry ofk
.c
: a complex float array ofM
strengths.
Output: