diff --git a/filbig.f b/filbig.f index 21134ee73..da1fd570e 100644 --- a/filbig.f +++ b/filbig.f @@ -26,19 +26,23 @@ C Impulse response of filter (one side) if(nmax.lt.0) go to 900 if(first) then - npatience=FFTW_ESTIMATE -! npatience=FFTW_MEASURE + npatience=1 + nflags=FFTW_ESTIMATE + if(npatience.eq.1) nflags=FFTW_ESTIMATE_PATIENT + if(npatience.eq.2) nflags=FFTW_MEASURE + if(npatience.eq.3) nflags=FFTW_PATIENT + if(npatience.eq.4) nflags=FFTW_EXHAUSTIVE C Plan the FFTs just once call sfftw_plan_dft_1d_(plan1,NFFT1,ca,ca, - + FFTW_BACKWARD,npatience) + + FFTW_BACKWARD,nflags) call sfftw_plan_dft_1d_(plan2,NFFT1,cb,cb, - + FFTW_BACKWARD,npatience) + + FFTW_BACKWARD,nflags) call sfftw_plan_dft_1d_(plan3,NFFT2,c4a,c4a, - + FFTW_FORWARD,npatience) + + FFTW_FORWARD,nflags) call sfftw_plan_dft_1d_(plan4,NFFT2,c4b,c4b, - + FFTW_FORWARD,npatience) + + FFTW_FORWARD,nflags) call sfftw_plan_dft_1d_(plan5,NFFT2,cfilt,cfilt, - + FFTW_BACKWARD,npatience) + + FFTW_BACKWARD,nflags) C Convert impulse response to filter function do i=1,NFFT2 diff --git a/four2a.f b/four2a.f index 7e022a48e..df4c945be 100644 --- a/four2a.f +++ b/four2a.f @@ -20,12 +20,11 @@ C The transform will be real and returned to the input array. parameter (NPMAX=100) parameter (NSMALL=16384) complex a(nfft) - complex aa(32768) + complex aa(NSMALL) integer nn(NPMAX),ns(NPMAX),nf(NPMAX),nl(NPMAX) real*8 plan(NPMAX) !Actually should be i*8, but no matter data nplan/0/ include 'fftw3.f' - common/patience/npatience save plan,nplan,nn,ns,nf,nl if(nfft.lt.0) go to 999 @@ -46,12 +45,12 @@ C The transform will be real and returned to the input array. C Planning: FFTW_ESTIMATE, FFTW_ESTIMATE_PATIENT, FFTW_MEASURE, C FFTW_PATIENT, FFTW_EXHAUSTIVE C NB: "EXHAUSTIVE" takes more or less forever, for long transforms. - nspeed=FFTW_ESTIMATE - if(npatience.eq.1) nspeed=FFTW_ESTIMATE_PATIENT - if(npatience.eq.2) nspeed=FFTW_MEASURE - if(npatience.eq.3) nspeed=FFTW_PATIENT - if(npatience.eq.4) nspeed=FFTW_EXHAUSTIVE - nspeed=nspeed + FFTW_THREADSAFE+FFTW_USE_WISDOM + npatience=1 + nflags=FFTW_ESTIMATE + if(npatience.eq.1) nflags=FFTW_ESTIMATE_PATIENT + if(npatience.eq.2) nflags=FFTW_MEASURE + if(npatience.eq.3) nflags=FFTW_PATIENT + if(npatience.eq.4) nflags=FFTW_EXHAUSTIVE if(nfft.le.NSMALL) then jz=nfft if(iform.eq.0) jz=nfft/2 @@ -62,14 +61,14 @@ C NB: "EXHAUSTIVE" takes more or less forever, for long transforms. call sleep_msec(0) if(isign.eq.-1 .and. iform.eq.1) then call sfftw_plan_dft_1d_(plan(i),nfft,a,a, - + FFTW_FORWARD,nspeed) + + FFTW_FORWARD,nflags) else if(isign.eq.1 .and. iform.eq.1) then call sfftw_plan_dft_1d_(plan(i),nfft,a,a, - + FFTW_BACKWARD,nspeed) + + FFTW_BACKWARD,nflags) else if(isign.eq.-1 .and. iform.eq.0) then - call sfftw_plan_dft_r2c_1d_(plan(i),nfft,a,a,nspeed) + call sfftw_plan_dft_r2c_1d_(plan(i),nfft,a,a,nflags) else if(isign.eq.1 .and. iform.eq.-1) then - call sfftw_plan_dft_c2r_1d_(plan(i),nfft,a,a,nspeed) + call sfftw_plan_dft_c2r_1d_(plan(i),nfft,a,a,nflags) else stop 'Unsupported request in four2a' endif diff --git a/ftn_init.F90 b/ftn_init.F90 index a91f700e6..dd9c6d9ba 100644 --- a/ftn_init.F90 +++ b/ftn_init.F90 @@ -138,13 +138,12 @@ subroutine ftn_init share='denynone') #else open(27,file=appdir(:iz)//'/dphi.txt',status='unknown') -#endif - open(28,file='fftw_wisdom.dat',status='unknown') call import_wisdom_from_file(isuccess,28) close(28) if(isuccess.ne.0) write(*,1000) 1000 format('Using optimized FFTs.') +#endif #ifdef CVF open(29,file=appdir(:iz)//'/debug.txt',status='unknown', & diff --git a/map65.py b/map65.py index 49bb62390..86c8dd5f8 100644 --- a/map65.py +++ b/map65.py @@ -1,4 +1,4 @@ -#---------------------------------------------------------------------- MAP65 +#--------------------------------------------------------------------- MAP65 # $Date$ $Revision$ # from Tkinter import * diff --git a/rfile2.f b/rfile2.f deleted file mode 100644 index 58d21a060..000000000 --- a/rfile2.f +++ /dev/null @@ -1,26 +0,0 @@ - subroutine rfile2(fname,buf,n,nr) - -C Read data from disk. - - integer RMODE - parameter(RMODE=0) - integer*1 buf(n) - integer open,read,close - integer fd - character fname*(*) - data iz/0/ !Silence g77 warning - - do i=80,1,-1 - if(fname(i:i).ne.' ') then - iz=i - go to 10 - endif - enddo - - 10 fname=fname(1:iz)//char(0) - fd=open(fname,RMODE) !Open file for reading - nr=read(fd,buf,n) - i=close(fd) - - return - end