Add decoder statistics to timer.out.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4958 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2015-02-13 14:22:54 +00:00
parent 3327625346
commit 0e5c5a6bfc
5 changed files with 29 additions and 7 deletions

View File

@ -10,6 +10,7 @@ subroutine decjt9(ss,id2,nutc,nfqso,newdat,npts8,nfa,nfsplit,nfb,ntol, &
logical done(NSMAX) logical done(NSMAX)
integer*2 id2(NTMAX*12000) integer*2 id2(NTMAX*12000)
integer*1 i1SoftSymbols(207) integer*1 i1SoftSymbols(207)
common/decstats/num65,numbm,numkv,num9,numfano
save ccfred,red2 save ccfred,red2
nsynced=0 nsynced=0
@ -106,8 +107,10 @@ subroutine decjt9(ss,id2,nutc,nfqso,newdat,npts8,nfa,nfsplit,nfb,ntol, &
if(nsync.gt.10) nsync=10 if(nsync.gt.10) nsync=10
nsnr=nint(snrdb) nsnr=nint(snrdb)
ndrift=nint(drift/df3) ndrift=nint(drift/df3)
num9=num9+1
if(msg.ne.' ') then if(msg.ne.' ') then
numfano=numfano+1
if(nqd.eq.0) ndecodes0=ndecodes0+1 if(nqd.eq.0) ndecodes0=ndecodes0+1
if(nqd.eq.1) ndecodes1=ndecodes1+1 if(nqd.eq.1) ndecodes1=ndecodes1+1

View File

@ -19,6 +19,7 @@ subroutine extract(s3,nadd,nqd,ncount,nhist,decoded,ltext,nbmkv)
integer dat4(12) integer dat4(12)
integer mrsym(63),mr2sym(63),mrprob(63),mr2prob(63) integer mrsym(63),mr2sym(63),mrprob(63),mr2prob(63)
logical nokv,ltext logical nokv,ltext
common/decstats/num65,numbm,numkv,num9,numfano
data nokv/.false./,nsec1/0/ data nokv/.false./,nsec1/0/
save save
@ -57,6 +58,7 @@ subroutine extract(s3,nadd,nqd,ncount,nhist,decoded,ltext,nbmkv)
call graycode65(mrsym,63,-1) !Remove gray code and interleaving call graycode65(mrsym,63,-1) !Remove gray code and interleaving
call interleave63(mrsym,-1) !from most reliable symbols call interleave63(mrsym,-1) !from most reliable symbols
call interleave63(mrprob,-1) call interleave63(mrprob,-1)
num65=num65+1
! Decode using Berlekamp-Massey algorithm ! Decode using Berlekamp-Massey algorithm
call timer('rs_decod',0) call timer('rs_decod',0)
@ -112,5 +114,9 @@ subroutine extract(s3,nadd,nqd,ncount,nhist,decoded,ltext,nbmkv)
nbmkv=2 nbmkv=2
endif endif
900 return 900 continue
if(nbmkv.eq.1) numbm=numbm+1
if(nbmkv.eq.2) numkv=numkv+1
return
end subroutine extract end subroutine extract

View File

@ -28,7 +28,7 @@ subroutine flat4(s,npts,nflatten)
call pctile(s(ia),ib-ia+1,npct,base) !Find lowest npct of points in segment call pctile(s(ia),ib-ia+1,npct,base) !Find lowest npct of points in segment
do i=ia,ib do i=ia,ib
if(s(i).le.base) then if(s(i).le.base) then
k=k+1 !Save thesde "lower envelope" points k=k+1 !Save these "lower envelope" points
x(k)=i-i0 x(k)=i-i0
y(k)=s(i) y(k)=s(i)
endif endif

View File

@ -39,6 +39,7 @@ program jt9
mousefqso,newdat,nfa,nfsplit,nfb,ntol,kin,nzhsym,nsynced,ndecoded mousefqso,newdat,nfa,nfsplit,nfb,ntol,kin,nzhsym,nsynced,ndecoded
common/tracer/limtrace,lu common/tracer/limtrace,lu
common/patience/npatience,nthreads common/patience/npatience,nthreads
common/decstats/num65,numbm,numkv,num9,numfano
data npatience/1/,nthreads/1/ data npatience/1/,nthreads/1/
do do
@ -131,6 +132,12 @@ program jt9
wisfile=trim(data_dir)//'/jt9_wisdom.dat'// C_NULL_CHAR wisfile=trim(data_dir)//'/jt9_wisdom.dat'// C_NULL_CHAR
iret=fftwf_import_wisdom_from_filename(wisfile) iret=fftwf_import_wisdom_from_filename(wisfile)
num65=0
numbm=0
numkv=0
num9=0
numfano=0
if (shmem) then if (shmem) then
call jt9a() call jt9a()
go to 999 go to 999
@ -211,7 +218,13 @@ program jt9
print*,infile print*,infile
999 continue 999 continue
!Save wisdom and free memory ! Output decoder statistics
write(12,1100) numbm,numkv,num65
1100 format(/'JT65: ',i6,' BM and',i7,' KV in',i7,' attempts')
write(12,1110) numfano,num9
1110 format('JT9: ',i6,' Fano in',12x,i7,' attempts')
! Save wisdom and free memory
iret=fftwf_export_wisdom_to_filename(wisfile) iret=fftwf_export_wisdom_to_filename(wisfile)
call four2a(a,-1,1,1,1) call four2a(a,-1,1,1,1)
call filbig(a,-1,1,0.0,0,0,0,0,0) !used for FFT plans call filbig(a,-1,1,0.0,0,0,0,0,0) !used for FFT plans

View File

@ -105,8 +105,8 @@ subroutine timer(dname,k)
! Write out the timer statistics ! Write out the timer statistics
40 write(lu,1040) 40 write(lu,1040)
1040 format(/' name time frac dtime', & 1040 format(/' Name Time Frac dTime', &
' dfrac calls'/56('-')) ' dFrac Calls'/58('-'))
!$ !walk backwards through the database rolling up thread data by call chain !$ !walk backwards through the database rolling up thread data by call chain
!$ do i=nmax,1,-1 !$ do i=nmax,1,-1
@ -145,7 +145,7 @@ subroutine timer(dname,k)
i=1 i=1
call print_root(i) call print_root(i)
write(lu,1070) sum,sumf write(lu,1070) sum,sumf
1070 format(/32x,f10.3,f6.2) 1070 format(58('-')/32x,f10.3,f6.2)
nmax=0 nmax=0
eps=0.000001 eps=0.000001
ntrace=0 ntrace=0
@ -187,11 +187,11 @@ recursive subroutine print_root(i)
kk=nlevel(i) kk=nlevel(i)
sname=space(1:kk)//name(i)//space(1:8-kk) sname=space(1:kk)//name(i)//space(1:8-kk)
write(lu,2000) sname,ut(i),utf,dut,dutf,ncall(i) write(lu,2000) sname,ut(i),utf,dut,dutf,ncall(i)
2000 format(a16,2(f10.3,f6.2),i9)
do j=i,nmax do j=i,nmax
if(nparent(j).eq.i) call print_root(j) if(nparent(j).eq.i) call print_root(j)
enddo enddo
end if end if
end if end if
2000 format(a16,2(f10.3,f6.2),i7,i5)
return return
end subroutine print_root end subroutine print_root