More attempts to diagnose or fix the FT8 "hung decoder" issue.

On the Fortran side:
 - For the nzhsym=41 activation, bail out if m_ihsym reaches 45
 - For the nzhsym=47 activation, bail out if m_ihsym reaches 48
 - Change the format and content of what's written to fort.71
 - Change msdelay from 10 to 1

In mainwindow.cpp:
 - change format and content of what's written to qDebug
 - always start FT8 decoder at m_ihsym = 41, 47, and 50
This commit is contained in:
Joe Taylor 2020-03-12 12:33:34 -04:00
parent 6a7263dc94
commit 6e308f0018
4 changed files with 31 additions and 31 deletions

View File

@ -57,6 +57,7 @@ contains
integer allsnrs(100)
integer itone(NN)
integer itone_save(NN,MAX_EARLY)
integer itime(8)
real f1_save(MAX_EARLY)
real xdt_save(MAX_EARLY)
@ -162,19 +163,24 @@ contains
xdt_save(ndecodes)=xdt+0.5
itone_save(1:NN,ndecodes)=itone
endif
! write(81,1004) nutc,ncand,icand,ipass,iaptype,iappass, &
! nharderrors,dmin,hd,min(sync,999.0),nint(xsnr), &
! xdt,nint(f1),msg37
!1004 format(i6.6,2i4,3i2,i3,3f6.1,i4,f6.2,i5,2x,a37)
! flush(81)
if(.not.ldupe .and. associated(this%callback)) then
qual=1.0-(nharderrors+dmin)/60.0 ! scale qual to [0.0,1.0]
call this%callback(sync,nsnr,xdt,f1,msg37,iaptype,qual)
endif
endif
if(nint(ss0).eq.45) go to 800 !Bail out before finishing
if(nzhsym.eq.41 .and. nint(ss0).ge.45) go to 700 !Bail out before done
if(nzhsym.eq.47 .and. nint(ss0).ge.48) go to 700 !Bail out before done
enddo
enddo
go to 800
700 call date_and_time(values=itime)
tsec=mod(itime(7)+0.001*itime(8),15.0)
if(tsec.lt.9.0) tsec=tsec+15.0
write(71,3001) 'BB Bail ',nzhsym,nint(ss0),nutc,tsec
3001 format(a8,2i6,i8,f8.3)
flush(71)
800 ndec_early=0
if(nzhsym.lt.50) ndec_early=ndecodes

View File

@ -39,7 +39,7 @@ subroutine jt9a()
i0 = len(mykey)
i0=setkey_jt9(trim(mykey))
i1=attach_jt9()
msdelay=10
msdelay=1
! Wait here until the .lock file is removed by GUI
10 inquire(file=trim(temp_dir)//'/.lock',exist=fileExists)
@ -64,9 +64,12 @@ subroutine jt9a()
call c_f_pointer(address_jt9(),shared_data)
local_params=shared_data%params !save a copy because wsjtx carries on accessing
call date_and_time(values=itime)
write(71,3001) 'AA',local_params%nutc,itime(7)+0.001*itime(8), &
nint(shared_data%ss(1,1)),local_params%nzhsym
3001 format(a2,i8,f8.3,2i6)
tsec=mod(itime(7)+0.001*itime(8),15.0)
if(tsec.lt.9.0) tsec=tsec+15.0
if(local_params%nzhsym.eq.41) write(71,3001) ' '
write(71,3001) 'AA Start',local_params%nzhsym,nint(shared_data%ss(1,1)), &
local_params%nutc,tsec
3001 format(a8,2i6,i8,f8.3)
flush(71)
call flush(6)
@ -90,8 +93,10 @@ subroutine jt9a()
call timer('decoder ',1)
call date_and_time(values=itime)
write(71,3001) 'BB',local_params%nutc,itime(7)+0.001*itime(8), &
nint(shared_data%ss(1,1)),local_params%nzhsym
tsec=mod(itime(7)+0.001*itime(8),15.0)
if(tsec.lt.9.0) tsec=tsec+15.0
write(71,3001) 'CC Done ',local_params%nzhsym,nint(shared_data%ss(1,1)), &
local_params%nutc,tsec
flush(71)
! Wait here until GUI routine decodeDone() has re-created the .lock file

View File

@ -1508,15 +1508,6 @@ void MainWindow::dataSink(qint64 frames)
if(m_mode=="FT8" and !m_diskData) {
if(m_ihsym==m_earlyDecode) bCallDecoder=true;
if(m_ihsym==m_earlyDecode2) bCallDecoder=true;
if(m_ihsym>m_hsymStop and !m_bStart3) {
auto now = QDateTime::currentDateTimeUtc();
double tseq = fmod(double(now.toMSecsSinceEpoch() ),1000.0*m_TRperiod)/1000.0;
if(tseq < 0.5*m_TRperiod) tseq+= m_TRperiod;
if(m_ihsym==m_earlyDecode) qDebug() << "";
qDebug() << "cc" << QDateTime::currentDateTimeUtc().toString("hh:mm:ss.zzz")
<< tseq << m_ihsym << m_ndepth << from_jt9();
bCallDecoder=true;
}
}
if(bCallDecoder) {
if(m_mode=="Echo") {
@ -3096,7 +3087,6 @@ void MainWindow::decode() //decode()
memcpy(to, from, qMin(mem_jt9->size(), size));
if(m_mode=="FT8") {
to_jt9(m_ihsym); //Send m_ihsym to jt9[.exe]
if(m_ihsym>=m_hsymStop) m_bStart3=true;
}
release_jt9 ();
@ -3104,8 +3094,8 @@ void MainWindow::decode() //decode()
double tseq = fmod(double(now.toMSecsSinceEpoch() ),1000.0*m_TRperiod)/1000.0;
if(tseq < 0.5*m_TRperiod) tseq+= m_TRperiod;
if(m_ihsym==m_earlyDecode) qDebug() << "";
qDebug() << "aa" << QDateTime::currentDateTimeUtc().toString("hh:mm:ss.zzz")
<< tseq << m_ihsym << m_ndepth << from_jt9();
qDebug() << "aa Start" << m_ihsym
<< QDateTime::currentDateTimeUtc().toString("hh:mm:ss.zzz") << tseq;
decodeBusy(true);
}
}
@ -3157,7 +3147,6 @@ void MainWindow::to_jt9(qint32 n)
{
float ss0=n;
memcpy((char*)mem_jt9->data(),&ss0,4);
// qDebug() << "cc" << ss0 << "sent to jt9";
}
qint32 MainWindow::from_jt9()
{
@ -3176,16 +3165,17 @@ void MainWindow::decodeDone ()
decodeBusy(false);
m_RxLog=0;
m_blankLine=true;
if(m_mode=="FT8" and dec_data.params.nzhsym==m_earlyDecode) m_blankLine=false;
if(m_mode=="FT8" and dec_data.params.nzhsym==m_earlyDecode2) m_blankLine=false;
if(m_mode=="FT8" and m_bStart3) m_bStart3=false;
if(m_mode=="FT8") {
if(dec_data.params.nzhsym==m_earlyDecode) m_blankLine=false;
if(dec_data.params.nzhsym==m_earlyDecode2) m_blankLine=false;
}
if(SpecOp::FOX == m_config.special_op_id()) houndCallers();
auto now = QDateTime::currentDateTimeUtc();
double tseq = fmod(double(now.toMSecsSinceEpoch() ),1000.0*m_TRperiod)/1000.0;
if(tseq < 0.5*m_TRperiod) tseq+= m_TRperiod;
qDebug() << "bb" << QDateTime::currentDateTimeUtc().toString("hh:mm:ss.zzz")
<< tseq << m_ihsym << from_jt9();
qDebug() << "bb Done " << m_ihsym
<< QDateTime::currentDateTimeUtc().toString("hh:mm:ss.zzz") << tseq;
}
void MainWindow::readFromStdout() //readFromStdout

View File

@ -675,7 +675,6 @@ private:
bool m_PwrBandSetOK;
bool m_bVHFwarned;
bool m_bDisplayedOnce;
bool m_bStart3=false;
Frequency m_lastMonitoredFrequency;
double m_toneSpacing;
int m_firstDecode;