Only use >1 thread for the biggest FFTs

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4933 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville 2015-02-04 20:52:42 +00:00
parent 73a69499e4
commit 01626eeaa3
3 changed files with 5 additions and 1 deletions

View File

@ -41,7 +41,9 @@ subroutine downsam9(id2,npts8,nsps8,newdat,nspsd,fpk,c2,nz2)
! Plan the FFTs just once
!$omp critical(fftw) ! serialize non thread-safe FFTW3 calls
call fftwf_plan_with_nthreads(nthreads)
plan=fftwf_plan_dft_r2c_1d(nfft1,x1,c1,nflags)
call fftwf_plan_with_nthreads(1)
!$omp end critical(fftw)
first=.false.

View File

@ -41,7 +41,9 @@ subroutine filbig(dd,npts,f0,newdat,c4a,n4,sq0)
! Plan the FFTs just once
!$omp critical(fftw) ! serialize non thread-safe FFTW3 calls
call fftwf_plan_with_nthreads(nthreads)
plan1=fftwf_plan_dft_r2c_1d(nfft1,rca,ca,nflags)
call fftwf_plan_with_nthreads(1)
plan2=fftwf_plan_dft_1d(nfft2,c4a,c4a,-1,nflags)
plan3=fftwf_plan_dft_1d(nfft2,cfilt,cfilt,+1,nflags)
!$omp end critical(fftw)

View File

@ -79,7 +79,7 @@ program jt9
endif
iret=fftwf_init_threads() !Initialize FFTW threading
call fftwf_plan_with_nthreads(nthreads)
call fftwf_plan_with_nthreads(1) !Default to 1 thread but use nthreads for the big ones
! Import FFTW wisdom, if available
wisfile=trim(data_dir)//'/jt9_wisdom.dat'// C_NULL_CHAR
iret=fftwf_import_wisdom_from_filename(wisfile)