More complete definition of CPU usage for MSK144 RT decoding. Speed is back

to that of r7139.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7143 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2016-10-03 13:48:30 +00:00
parent d899d844a6
commit 2068d358c4
2 changed files with 9 additions and 10 deletions

View File

@ -1,7 +1,7 @@
subroutine msk144sync(cdat,nframes,ntol,delf,navmask,npeaks,fc,fest, & subroutine msk144sync(cdat,nframes,ntol,delf,navmask,npeaks,fc,fest, &
npklocs,nsuccess,c) npklocs,nsuccess,c)
!$ use omp_lib !$ use omp_lib
parameter (NSPM=864) parameter (NSPM=864)
complex cdat(NSPM*nframes) complex cdat(NSPM*nframes)
@ -59,12 +59,12 @@ subroutine msk144sync(cdat,nframes,ntol,delf,navmask,npeaks,fc,fest, &
xm=0.0 xm=0.0
bf=0.0 bf=0.0
nthreads=1 nthreads=1
!$ nthreads=min(8,int(OMP_GET_MAX_THREADS(),4)) !$ nthreads=min(8,int(OMP_GET_MAX_THREADS(),4))
nstep=nfreqs/nthreads nstep=nfreqs/nthreads
!$OMP PARALLEL NUM_THREADS(nthreads) PRIVATE(id,if1,if2) !$OMP PARALLEL NUM_THREADS(nthreads) PRIVATE(id,if1,if2)
id=1 id=1
!$ id=OMP_GET_THREAD_NUM() + 1 !Thread id = 1,2,... !$ id=OMP_GET_THREAD_NUM() + 1 !Thread id = 1,2,...
if1=-nint(ntol/delf) + (id-1)*nstep if1=-nint(ntol/delf) + (id-1)*nstep
if2=if1+nstep-1 if2=if1+nstep-1
if(id.eq.nthreads) if2=nint(ntol/delf) if(id.eq.nthreads) if2=nint(ntol/delf)
@ -72,7 +72,7 @@ subroutine msk144sync(cdat,nframes,ntol,delf,navmask,npeaks,fc,fest, &
cdat2(1,id),xm(id),bf(id),cs(1,id),xccs(1,id)) cdat2(1,id),xm(id),bf(id),cs(1,id),xccs(1,id))
! write(73,3002) id,if1,if2,nfreqs,nthreads,bf(id),xm(id) ! write(73,3002) id,if1,if2,nfreqs,nthreads,bf(id),xm(id)
!3002 format(5i5,2f10.3) !3002 format(5i5,2f10.3)
!$OMP END PARALLEL !$OMP END PARALLEL
xmax=xm(1) xmax=xm(1)
fest=fc+bf(1) fest=fc+bf(1)

View File

@ -1279,23 +1279,20 @@ void MainWindow::fastSink(qint64 frames)
bmsk144=bmsk144 && m_config.realTimeDecode(); bmsk144=bmsk144 && m_config.realTimeDecode();
line[0]=0; line[0]=0;
//###
m_RxFreq=ui->RxFreqSpinBox->value (); m_RxFreq=ui->RxFreqSpinBox->value ();
int nTRpDepth=m_TRperiod + 1000*(m_ndepth & 3); int nTRpDepth=m_TRperiod + 1000*(m_ndepth & 3);
qint64 ms0 = QDateTime::currentMSecsSinceEpoch(); qint64 ms0 = QDateTime::currentMSecsSinceEpoch();
hspec_(dec_data.d2,&k,&nutc0,&nTRpDepth,&m_RxFreq,&m_Ftol,&bmsk144,&m_inGain, hspec_(dec_data.d2,&k,&nutc0,&nTRpDepth,&m_RxFreq,&m_Ftol,&bmsk144,&m_inGain,
fast_green,fast_s,&fast_jh, &line[0],80); fast_green,fast_s,&fast_jh, &line[0],80);
float tsec=0.001*(QDateTime::currentMSecsSinceEpoch() - ms0);
m_fCPUmskrtd=0.9*m_fCPUmskrtd + 0.1*tsec;
float px = fast_green[fast_jh]; float px = fast_green[fast_jh];
QString t; QString t;
t.sprintf(" Rx noise: %5.1f ",px); t.sprintf(" Rx noise: %5.1f ",px);
ui->signal_meter_widget->setValue(px); // Update thermometer ui->signal_meter_widget->setValue(px); // Update thermometer
m_fastGraph->plotSpec(m_diskData,m_UTCdisk); m_fastGraph->plotSpec(m_diskData,m_UTCdisk);
DecodedText decodedtext;
QString message;
if(bmsk144 and (line[0]!=0)) { if(bmsk144 and (line[0]!=0)) {
DecodedText decodedtext;
QString message;
message=QString::fromLatin1(line); message=QString::fromLatin1(line);
decodedtext=message.replace("\n",""); decodedtext=message.replace("\n","");
ui->decodedTextBrowser->displayDecodedText (decodedtext,m_baseCall,m_config.DXCC(), ui->decodedTextBrowser->displayDecodedText (decodedtext,m_baseCall,m_config.DXCC(),
@ -1365,6 +1362,8 @@ void MainWindow::fastSink(qint64 frames)
} }
m_bFastDone=false; m_bFastDone=false;
} }
float tsec=0.001*(QDateTime::currentMSecsSinceEpoch() - ms0);
m_fCPUmskrtd=0.9*m_fCPUmskrtd + 0.1*tsec;
} }
void MainWindow::showSoundInError(const QString& errorMsg) void MainWindow::showSoundInError(const QString& errorMsg)