mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-10-01 09:36:44 -04:00
MAP65 now imports FFT wisdom from fftw_wisdom.dat, if available.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@1534 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
af4ba0ca6c
commit
7768aec058
@ -32,9 +32,8 @@ SRCF77 = indexx.f gen65.f chkmsg.f \
|
|||||||
unpackmsg.f unpacktext.f astro.f azdist.f coord.f dcoord.f \
|
unpackmsg.f unpacktext.f astro.f azdist.f coord.f dcoord.f \
|
||||||
deg2grid.f dot.f ftsky.f geocentric.f GeoDist.f grid2deg.f \
|
deg2grid.f dot.f ftsky.f geocentric.f GeoDist.f grid2deg.f \
|
||||||
moon2.f MoonDop.f sun.f toxyz.f pfxdump.f \
|
moon2.f MoonDop.f sun.f toxyz.f pfxdump.f \
|
||||||
ccf65.f trimlist.f chkhist.f decode1a.f \
|
ccf65.f trimlist.f chkhist.f decode1a.f f77_wisdom.f \
|
||||||
fil6521.f twkfreq.f decode65b.f \
|
fil6521.f twkfreq.f decode65b.f afc65b.f fchisq.f ccf2.f
|
||||||
afc65b.f fchisq.f ccf2.f
|
|
||||||
|
|
||||||
SRC2F77 = four2a.f filbig.f
|
SRC2F77 = four2a.f filbig.f
|
||||||
|
|
||||||
|
34
four2a.f
34
four2a.f
@ -1,4 +1,4 @@
|
|||||||
SUBROUTINE FOUR2a (a,nfft,NDIM,ISIGN,IFORM)
|
subroutine four2a(a,nfft,ndim,isign,iform)
|
||||||
|
|
||||||
C IFORM = 1, 0 or -1, as data is
|
C IFORM = 1, 0 or -1, as data is
|
||||||
C complex, real, or the first half of a complex array. Transform
|
C complex, real, or the first half of a complex array. Transform
|
||||||
@ -18,13 +18,15 @@ C to -1. In the N array, N(1) must be the true N(1), not N(1)/2+1.
|
|||||||
C The transform will be real and returned to the input array.
|
C The transform will be real and returned to the input array.
|
||||||
|
|
||||||
parameter (NPMAX=100)
|
parameter (NPMAX=100)
|
||||||
|
parameter (NSMALL=16384)
|
||||||
complex a(nfft)
|
complex a(nfft)
|
||||||
complex aa(32768)
|
complex aa(32768)
|
||||||
integer nn(NPMAX),ns(NPMAX),nf(NPMAX),nl(NPMAX)
|
integer nn(NPMAX),ns(NPMAX),nf(NPMAX),nl(NPMAX)
|
||||||
real*8 plan(NPMAX) !Should be i*8
|
real*8 plan(NPMAX) !Actually should be i*8, but no matter
|
||||||
data nplan/0/
|
data nplan/0/
|
||||||
include 'fftw3.f'
|
include 'fftw3.f'
|
||||||
save
|
common/patience/npatience
|
||||||
|
save plan,nplan,nn,ns,nf,nl
|
||||||
|
|
||||||
if(nfft.lt.0) go to 999
|
if(nfft.lt.0) go to 999
|
||||||
|
|
||||||
@ -41,12 +43,19 @@ C The transform will be real and returned to the input array.
|
|||||||
nf(i)=iform
|
nf(i)=iform
|
||||||
nl(i)=nloc
|
nl(i)=nloc
|
||||||
|
|
||||||
C Planning: FFTW_ESTIMATE, FFTW_MEASURE, FFTW_PATIENT, FFTW_EXHAUSTIVE
|
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
|
nspeed=FFTW_ESTIMATE
|
||||||
if(nfft.le.16384) nspeed=FFTW_MEASURE
|
if(npatience.eq.1) nspeed=FFTW_ESTIMATE_PATIENT
|
||||||
nspeed=FFTW_MEASURE
|
if(npatience.eq.2) nspeed=FFTW_MEASURE
|
||||||
if(nfft.le.32768) then
|
if(npatience.eq.3) nspeed=FFTW_PATIENT
|
||||||
do j=1,nfft
|
if(npatience.eq.4) nspeed=FFTW_EXHAUSTIVE
|
||||||
|
nspeed=nspeed + FFTW_THREADSAFE+FFTW_USE_WISDOM
|
||||||
|
if(nfft.le.NSMALL) then
|
||||||
|
jz=nfft
|
||||||
|
if(iform.eq.0) jz=nfft/2
|
||||||
|
do j=1,jz
|
||||||
aa(j)=a(j)
|
aa(j)=a(j)
|
||||||
enddo
|
enddo
|
||||||
endif
|
endif
|
||||||
@ -66,13 +75,16 @@ C Planning: FFTW_ESTIMATE, FFTW_MEASURE, FFTW_PATIENT, FFTW_EXHAUSTIVE
|
|||||||
endif
|
endif
|
||||||
call sleep_msec(0)
|
call sleep_msec(0)
|
||||||
i=nplan
|
i=nplan
|
||||||
if(nfft.le.32768) then
|
if(nfft.le.NSMALL) then
|
||||||
do j=1,nfft
|
jz=nfft
|
||||||
|
if(iform.eq.0) jz=nfft/2
|
||||||
|
do j=1,jz
|
||||||
a(j)=aa(j)
|
a(j)=aa(j)
|
||||||
enddo
|
enddo
|
||||||
endif
|
endif
|
||||||
|
|
||||||
10 call sleep_msec(0)
|
10 continue
|
||||||
|
call sleep_msec(0)
|
||||||
call sfftw_execute_(plan(i))
|
call sfftw_execute_(plan(i))
|
||||||
call sleep_msec(0)
|
call sleep_msec(0)
|
||||||
return
|
return
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
! 25 meas25.dat
|
! 25 meas25.dat
|
||||||
! 26 tmp26.txt
|
! 26 tmp26.txt
|
||||||
! 27 dphi.txt
|
! 27 dphi.txt
|
||||||
! 28
|
! 28 fftw_wisdom.dat
|
||||||
! 29 debug.txt
|
! 29 debug.txt
|
||||||
!------------------------------------------------ ftn_init
|
!------------------------------------------------ ftn_init
|
||||||
subroutine ftn_init
|
subroutine ftn_init
|
||||||
@ -140,6 +140,12 @@ subroutine ftn_init
|
|||||||
open(27,file=appdir(:iz)//'/dphi.txt',status='unknown')
|
open(27,file=appdir(:iz)//'/dphi.txt',status='unknown')
|
||||||
#endif
|
#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.')
|
||||||
|
|
||||||
#ifdef CVF
|
#ifdef CVF
|
||||||
open(29,file=appdir(:iz)//'/debug.txt',status='unknown', &
|
open(29,file=appdir(:iz)//'/debug.txt',status='unknown', &
|
||||||
share='denynone')
|
share='denynone')
|
||||||
|
BIN
libfftw3f.a
BIN
libfftw3f.a
Binary file not shown.
Loading…
Reference in New Issue
Block a user