More cleanup...

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2636 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2012-10-03 14:50:57 +00:00
parent 7369062c4a
commit 9bd06ee8e5
7 changed files with 38 additions and 289 deletions

View File

@ -1,4 +1,7 @@
# Makefile for MinGW on Windows
# Windows re-direct:
# C> make > junk1 2>&1
CC = gcc
FC = g95
@ -17,58 +20,52 @@ CFLAGS = -I. -fbounds-check -mno-stack-arg-probe
%.o: %.F90
${FC} ${FFLAGS} -c $<
all: libm65.a jt9sim.exe jt9.exe
#all: libm65.a jt9.exe
all: libjt9.a jt9sim.exe jt9.exe
OBJS1 = trimlist.o display.o getdphi.o pctile.o ccf65.o \
decode1a.o sort.o filbig.o fil6521.o afc65b.o \
twkfreq.o decode65b.o indexx.o ssort.o fchisq.o setup65.o \
extract.o deep65.o ccf2.o demod64a.o chkhist.o graycode.o \
interleave63.o unpackmsg.o encode65.o igray.o set.o unpackcall.o \
unpackgrid.o grid2k.o unpacktext.o getpfx2.o packmsg.o \
deg2grid.o packtext.o getpfx1.o packcall.o k2grid.o packgrid.o \
wrapkarn.o nchar.o init_rs.o encode_rs.o decode_rs.o \
four2a.o rfile3a.o grid2deg.o pfxdump.o dpol.o \
astro.o tm2.o sun.o moondop.o coord.o tmoonsub.o \
geocentric.o moon2.o toxyz.o dot.o dcoord.o f77_wisdom.o \
gen65.o chkmsg.o ptt.o astrosub.o astro0.o recvpkt.o symspecx.o \
iqcal.o iqfix.o timf2.o s3avg.o genjtms3.o analytic.o \
db.o specjtms.o genmsk.o mskdf.o tweak1.o syncmsk.o \
lenmsk.o decodemsk.o ping.o makepings.o alignmsg.o match.o \
rtping.o jtmsk.o hipass.o setupmsk.o foldmsk.o genjt9.o \
packbits.o unpackbits.o encode232.o interleave9.o entail.o \
fano232.o spec9.o decode9.o
OBJS1 = trimlist.o pctile.o sort.o indexx.o ssort.o graycode.o \
unpackmsg.o igray.o set.o unpackcall.o unpackgrid.o \
grid2k.o unpacktext.o getpfx2.o packmsg.o deg2grid.o \
packtext.o getpfx1.o packcall.o k2grid.o packgrid.o \
nchar.o four2a.o grid2deg.o pfxdump.o f77_wisdom.o \
symspecx.o timf2x.o analytic.o db.o genjt9.o ptt.o \
packbits.o unpackbits.o encode232.o interleave9.o \
entail.o fano232.o gran.o spec9.o decode9.o
libm65.a: $(OBJS1)
ar cr libm65.a $(OBJS1)
ranlib libm65.a
libjt9.a: $(OBJS1)
ar cr libjt9.a $(OBJS1)
ranlib libjt9.a
OBJS3 = jt9sim.o gran.o
jt9sim.exe: $(OBJS3) libm65.a
$(FC) -o jt9sim.exe $(OBJS3) libm65.a
OBJS2 = jt9.o symspec.o timf2x.o sync9.o
jt9.exe: $(OBJS2) libjt9.a
$(FC) -o jt9.exe $(OBJS2) libjt9.a ../libfftw3f_win.a
OBJS2 = jt9.o symspec.o timf2x.o timer.o sync9.o
jt9.exe: $(OBJS2) libm65.a
$(FC) -o jt9.exe $(OBJS2) libm65.a ../libfftw3f_win.a
OBJS3 = jt9sim.o
jt9sim.exe: $(OBJS3) libjt9.a
$(FC) -o jt9sim.exe $(OBJS3) libjt9.a
OBJS4 = t1.o
t1.exe: $(OBJS4) libjt9.a
$(FC) -o t1.exe $(OBJS4) libjt9.a ../libfftw3f_win.a
OBJS5 = t2.o
t2.exe: $(OBJS5) libjt9.a
$(FC) -o t2.exe $(OBJS5) libjt9.a ../libfftw3f_win.a
INCPATH = -I'c:/QtSDK/Desktop/Qt/4.7.4/mingw/include/QtCore' \
-I'c:/QtSDK/Desktop/Qt/4.7.4/mingw/include' \
-I'c:/QtSDK/Desktop/Qt/4.7.4/mingw/include/ActiveQt' \
-I'release' -I'.' -I'c:/QtSDK/Desktop/Qt/4.7.4/mingw/mkspecs/win32-g++'
#jt9.o: jt9.f90
# $(FC) -O0 -c jt9.f90
ipcomm.o: ipcomm.cpp
g++ -c $(INCPATH) ipcomm.cpp
sec_midn.o: sec_midn.f90
$(FC) -c -fno-second-underscore sec_midn.f90
#symspec.o: ../symspec.f90
# $(FC) -c $(FFLAGS) -o symspec.o ../symspec.f90
OBJS5 = t1.o
t1.exe: $(OBJS5) libm65.a
$(FC) -o t1.exe $(OBJS5) libm65.a ../libfftw3f_win.a
.PHONY : clean
clean:
rm -f *.o libm65.a wsjtx.exe jt9sim.exe jt9.exe
rm -f *.o libjt9.a wsjtx.exe jt9sim.exe jt9.exe t1.exe t2.exe

View File

@ -1,64 +0,0 @@
subroutine decode0(dd,ss,savg,nstandalone)
parameter (NSMAX=60*96000)
parameter (NFFT=32768)
real*4 dd(4,NSMAX),ss(4,322,NFFT),savg(4,NFFT)
real*8 fcenter
integer hist(0:32768)
character mycall*12,hiscall*12,mygrid*6,hisgrid*6,datetime*20
character mycall0*12,hiscall0*12,hisgrid0*6
common/npar/fcenter,nutc,idphi,mousedf,mousefqso,nagain, &
ndepth,ndiskdat,neme,newdat,nfa,nfb,nfcal,nfshift, &
mcall3,nkeep,ntol,nxant,nrxlog,nfsample,nxpol,mode65, &
mycall,mygrid,hiscall,hisgrid,datetime
common/tracer/ limtrace,lu
data neme0/-99/,mcall3b/1/
save
call timer('decode0 ',0)
if(newdat.ne.0) then
nz=52*96000
hist=0
do i=1,nz
j1=min(abs(dd(1,i)),32768.0)
hist(j1)=hist(j1)+1
j2=min(abs(dd(2,i)),32768.0)
hist(j2)=hist(j2)+1
j3=min(abs(dd(3,i)),32768.0)
hist(j3)=hist(j3)+1
j4=min(abs(dd(4,i)),32768.0)
hist(j4)=hist(j4)+1
enddo
m=0
do i=0,32768
m=m+hist(i)
if(m.ge.2*nz) go to 10
enddo
10 rmsdd=1.5*i
endif
nhsym=279
ndphi=0
if(iand(nrxlog,8).ne.0) ndphi=1
if(mycall.ne.mycall0 .or. hiscall.ne.hiscall0 .or. &
hisgrid.ne.hisgrid0 .or. mcall3.ne.0 .or. neme.ne.neme0) mcall3b=1
mycall0=mycall
hiscall0=hiscall
hisgrid0=hisgrid
neme0=neme
call timer('map65a ',0)
call map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
mousedf,mousefqso,nagain,ndecdone,ndiskdat,nfshift,ndphi, &
nfcal,nkeep,mcall3b,nsave,nxant,rmsdd,mycall,mygrid, &
neme,ndepth,hiscall,hisgrid,nhsym,nfsample,nxpol,mode65)
call timer('map65a ',1)
call timer('decode0 ',1)
if(nstandalone.eq.0) call timer('decode0 ',101)
return
end subroutine decode0

View File

@ -1,63 +0,0 @@
! Fortran logical units used in WSJT6
!
! 10 binary input data, *.tf2 files
! 11 prefixes.txt
! 12 timer.out
! 13 map65.log
! 14
! 15
! 16
! 17 saved *.tf2 files
! 18 test file to be transmitted (wsjtgen.f90)
! 19 livecq.txt
! 20
! 21 map65_rx.log
! 22 kvasd.dat
! 23 CALL3.TXT
! 24
! 25
! 26 tmp26.txt
! 27
! 28 fftw_wisdom.dat
!------------------------------------------------ ftn_init
subroutine ftninit(appd)
character*(*) appd
character cjunk*1,firstline*30
character addpfx*8
integer junk(256)
common/pfxcom/addpfx
addpfx=' '
call pfxdump(appd//'/prefixes.txt')
open(12,file=appd//'/timer.out',status='unknown',err=920)
open(13,file=appd//'/map65.log',status='unknown')
open(19,file=appd//'/livecq.txt',status='unknown')
open(21,file=appd//'/map65_rx.log',status='unknown',access='append',err=950)
open(22,file=appd//'/kvasd.dat',access='direct',recl=1024,status='unknown')
read(22,rec=2,err=12) junk
go to 18
12 junk=0
write(22,rec=1) junk
write(22,rec=2) junk
18 open(26,file=appd//'/tmp26.txt',status='unknown')
! Import FFTW wisdom, if available:
open(28,file=appd//'/fftwf_wisdom.dat',status='old',err=30)
read(28,1000,err=30,end=30) firstline
1000 format(a30)
rewind 28
call import_wisdom_from_file(isuccess,28)
close(28)
if(isuccess.ne.0) write(13,1010) firstline
1010 format('Imported FFTW wisdom: ',a30)
30 return
920 write(0,*) '!Error opening timer.out'
stop
950 write(0,*) '!Error opening ALL65.TXT'
stop
end subroutine ftninit

View File

@ -18,7 +18,6 @@ program jt9
complex c0
common/jt8com/id2(NMAX),ss(184,NSMAX),savg(NSMAX),c0(NDMAX), &
nutc,npts8,junk(20)
common/tracer/limtrace,lu
nargs=iargc()
if(nargs.lt.1) then
@ -38,9 +37,6 @@ program jt9
read(arg,*) ntrperiod
ifile1=2
limtrace=0
lu=12
call timer('jt9 ',0) !###
nfa=1000
nfb=2000
@ -74,24 +70,19 @@ program jt9
k=0
nhsym0=-999
npts=(60*ntrperiod-6)*12000
call timer('read_wav',0)
read(10) id2(1:npts)
call timer('read_wav',1)
! do i=1,npts
! id2(i)=100.0*sin(6.283185307*1046.875*i/12000.0)
! enddo
! if(ifile.eq.ifile1) call timer('jt9 ',0)
do iblk=1,npts/kstep
k=iblk*kstep
nhsym=(k-2048)/kstep
if(nhsym.ge.1 .and. nhsym.ne.nhsym0) then
! Emit signal readyForFFT
call timer('symspec ',0)
call symspecx(k,ntrperiod,nsps,ndiskdat,nb,nbslider,pxdb, &
s,f0a,df3,ihsym,nzap,slimit,lstrong)
call timer('symspec ',1)
nhsym0=nhsym
if(ihsym.ge.184) go to 10
endif
@ -115,12 +106,11 @@ program jt9
call sync9(ss,tstep,f0a,df3,lagpk,fpk)
call spec9(c0,npts8,nsps,f0a,lagpk,fpk,i1SoftSymbols)
call decode9(i1SoftSymbols,msg)
print*,msg
xdt=lagpk*0.5*nsps/12000.0
write(*,1010) nutc,xdt,fpk,msg
1010 format(i4.4,f6.1,f7.1,2x,a22)
enddo
call timer('jt9 ',1)
call timer('jt9 ',101)
! call ftnquit
go to 999
998 print*,'Cannot open file:'

View File

@ -102,7 +102,6 @@ program jt9sim
f=f0
if(nsigs.gt.1) f=f0 - 0.5d0*fspan + fspan*(isig-1.d0)/(nsigs-1.d0)
snrdbx=snrdb
! if(snrdb.ge.-1.0) snrdbx=-15.0 - 15.0*(isig-1.0)/nsigs
sig=sqrt(2500.0/6000.0) * 10.0**(0.05*snrdbx)
write(*,1020) ifile,isig,f,snrdbx,msgsent
1020 format(i3,i4,f10.3,f7.1,2x,a22)

View File

@ -1,110 +0,0 @@
subroutine timer(dname,k)
! Times procedure number n between a call with k=0 (tstart) and with
! k=1 (tstop). Accumulates sums of these times in array ut (user time).
! Also traces all calls (for debugging purposes) if limtrace.gt.0
character*8 dname,name(50),space,ename
character*16 sname
logical on(50)
real ut(50),ut0(50),dut(50),tt(2)
integer ncall(50),nlevel(50),nparent(50)
integer onlevel(0:10)
common/tracer/ limtrace,lu
data eps/0.000001/,ntrace/0/
data level/0/,nmax/0/,space/' '/
data limtrace/0/,lu/-1/
save
if(limtrace.lt.0) go to 999
if(lu.lt.1) lu=6
if(k.gt.1) go to 40 !Check for "all done" (k>1)
onlevel(0)=0
do n=1,nmax !Check for existing name
if(name(n).eq.dname) go to 20
enddo
nmax=nmax+1 !This is a new one
n=nmax
ncall(n)=0
on(n)=.false.
ut(n)=eps
name(n)=dname
20 if(k.eq.0) then !Get start times (k=0)
if(on(n)) print*,'Error in timer: ',dname,' already on.'
level=level+1 !Increment the level
on(n)=.true.
ut0(n)=etime(tt)
ncall(n)=ncall(n)+1
if(ncall(n).gt.1.and.nlevel(n).ne.level) then
nlevel(n)=-1
else
nlevel(n)=level
endif
nparent(n)=onlevel(level-1)
onlevel(level)=n
else if(k.eq.1) then !Get stop times and accumulate sums. (k=1)
if(on(n)) then
on(n)=.false.
ut1=etime(tt)
ut(n)=ut(n)+ut1-ut0(n)
endif
level=level-1
endif
ntrace=ntrace+1
if(ntrace.lt.limtrace) write(lu,1020) ntrace,dname,k,level,nparent(n)
1020 format(i8,': ',a8,3i5)
go to 998
! Write out the timer statistics
40 write(lu,1040)
1040 format(/' name time frac dtime', &
' dfrac calls level parent'/73('-'))
if(k.gt.100) then
ndiv=k-100
do i=1,nmax
ncall(i)=ncall(i)/ndiv
ut(i)=ut(i)/ndiv
enddo
endif
total=ut(1)
sum=0.
sumf=0.
do i=1,nmax
dut(i)=ut(i)
do j=i,nmax
if(nparent(j).eq.i) dut(i)=dut(i)-ut(j)
enddo
utf=ut(i)/total
dutf=dut(i)/total
sum=sum+dut(i)
sumf=sumf+dutf
kk=nlevel(i)
sname=space(1:kk)//name(i)//space(1:8-kk)
ename=space
if(i.ge.2) ename=name(nparent(i))
write(lu,1060) float(i),sname,ut(i),utf,dut(i),dutf, &
ncall(i),nlevel(i),ename
1060 format(f4.0,a16,2(f10.2,f6.2),i7,i5,2x,a8)
enddo
write(lu,1070) sum,sumf
1070 format(/36x,f10.2,f6.2)
nmax=0
eps=0.000001
ntrace=0
level=0
space=' '
onlevel(0)=0
998 flush(lu)
999 return
end subroutine timer

View File

@ -1,4 +1,4 @@
//-------------------------------------------------------------- MainWindow
//--------------------------------------------------------------- MainWindow
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "devsetup.h"