Skip to content

Switch to scipy.irfftn

Mads M. Pedersen requested to merge crop_random_numbers into master

This merge request consist of six commits:

Time and memory usage of test_time_and_memory (8192x64x64) with and without high frequency compensation

id time [s] memory [MB] max abs diff hfc=0 max abs diff hfc=1 description
Master 33.9 6405
pre_irfft_updates 35.6 6918 0 0 Move scaling and vectorize. Changes without impact on result (slightly slower and more memory consuming - this will change when switching to from numpy.fft to scipy.fft)
scipy_fft 30.2 4998 2.85e-06 3.13e-06 Switch from numpy.fft to scipy.fft which allows single precision and parallel execution
reverse_fft_order 27.1 4991 3.81e-06 3.81e-06 reverse fft order such that real fft can be made on x dimension which is typically the larger. Furthermore, cropping in x dimension is simpler.
crop_spectral_tensor 17.2 2709 2.86e-06 2.86e-06 Switch to irfft and crop unnecessary part of spectral tensor, i.e. reduce from (3,3,Nx,Ny,Nz) to (3,3,Nx//2+1,Ny,Nz).
crop_random_numbers 15.8 2709 13.21 14.08 Only generate necessary random numbers. This change results a completely different box due to different random numbers
complex64 to float32 15.3 2114 0 0 Store SqrtPhi as float32 instead of complex64 until multiplied with complex numbers
Edited by Mads M. Pedersen

Merge request reports