Straighten out the extent of copy from MAP65's datcom_ to shared memory region.

This commit is contained in:
Joe Taylor 2021-07-20 09:59:58 -04:00
parent f21ccca0bf
commit 7881b9c79a
7 changed files with 20 additions and 7 deletions

View File

@ -40,6 +40,8 @@ extern struct { //This is "common/datcom/..." in Fortran
char hiscall[12]; char hiscall[12];
char hisgrid[6]; char hisgrid[6];
char datetime[20]; char datetime[20];
int junk1; //Used to test extent of copy to shared memory
int junk2;
} datcom_; } datcom_;
} }

View File

@ -26,6 +26,7 @@ program m65
use timer_module, only: timer use timer_module, only: timer
use timer_impl, only: init_timer, fini_timer use timer_impl, only: init_timer, fini_timer
include 'njunk.f90'
parameter (NFFT=32768) parameter (NFFT=32768)
parameter (NSMAX=60*96000) parameter (NSMAX=60*96000)
parameter (NREAD=2048) parameter (NREAD=2048)
@ -36,7 +37,7 @@ program m65
real*8 fc0,fcenter real*8 fc0,fcenter
character*80 arg,infile character*80 arg,infile
character mycall*12,hiscall*12,mygrid*6,hisgrid*6,datetime*20 character mycall*12,hiscall*12,mygrid*6,hisgrid*6,datetime*20
common/datcom/dd(4,5760000),ss(4,322,NFFT),savg(4,NFFT),fc0,nutc0,junk(38) common/datcom/dd(4,5760000),ss(4,322,NFFT),savg(4,NFFT),fc0,nutc0,junk(NJUNK)
common/npar/fcenter,nutc,idphi,mousedf,mousefqso,nagain, & common/npar/fcenter,nutc,idphi,mousedf,mousefqso,nagain, &
ndepth,ndiskdat,neme,newdat,nfa,nfb,nfcal,nfshift, & ndepth,ndiskdat,neme,newdat,nfa,nfb,nfcal,nfshift, &
mcall3,nkeep,ntol,nxant,nrxlog,nfsample,nxpol,nmode, & mcall3,nkeep,ntol,nxant,nrxlog,nfsample,nxpol,nmode, &

View File

@ -70,9 +70,11 @@ subroutine m65b(m65com,nbytes)
end subroutine m65b end subroutine m65b
subroutine m65c(dd,ss,savg,nparams0) subroutine m65c(dd,ss,savg,nparams0)
include 'njunk.f90'
real*4 dd(4,5760000),ss(4,322,32768),savg(4,32768) real*4 dd(4,5760000),ss(4,322,32768),savg(4,32768)
real*8 fcenter real*8 fcenter
integer nparams0(41),nparams(41) integer nparams0(NJUNK+2),nparams(NJUNK+2)
logical ldecoded logical ldecoded
character*12 mycall,hiscall character*12 mycall,hiscall
character*6 mygrid,hisgrid character*6 mygrid,hisgrid
@ -80,7 +82,8 @@ subroutine m65c(dd,ss,savg,nparams0)
common/npar/fcenter,nutc,idphi,mousedf,mousefqso,nagain, & common/npar/fcenter,nutc,idphi,mousedf,mousefqso,nagain, &
ndepth,ndiskdat,neme,newdat,nfa,nfb,nfcal,nfshift, & ndepth,ndiskdat,neme,newdat,nfa,nfb,nfcal,nfshift, &
mcall3,nkeep,ntol,nxant,nrxlog,nfsample,nxpol,nmode, & mcall3,nkeep,ntol,nxant,nrxlog,nfsample,nxpol,nmode, &
nfast,nsave,max_drift,nhsym,mycall,mygrid,hiscall,hisgrid,datetime nfast,nsave,max_drift,nhsym,mycall,mygrid,hiscall,hisgrid, &
datetime,junk1,junk2
common/early/nhsym1,nhsym2,ldecoded(32768) common/early/nhsym1,nhsym2,ldecoded(32768)
equivalence (nparams,fcenter) equivalence (nparams,fcenter)

1
map65/libm65/njunk.f90 Normal file
View File

@ -0,0 +1 @@
parameter(NJUNK=40)

View File

@ -2,6 +2,7 @@ subroutine recvpkt(nsam,nblock2,userx_no,k,buf4,buf8,buf16)
! Reformat timf2 data from Linrad and stuff data into r*4 array dd(). ! Reformat timf2 data from Linrad and stuff data into r*4 array dd().
include 'njunk.f90'
parameter (NSMAX=60*96000) !Total sample intervals per minute parameter (NSMAX=60*96000) !Total sample intervals per minute
parameter (NFFT=32768) parameter (NFFT=32768)
integer*1 userx_no integer*1 userx_no
@ -11,7 +12,8 @@ subroutine recvpkt(nsam,nblock2,userx_no,k,buf4,buf8,buf16)
integer*2 jd(4),kd(2),nblock2 integer*2 jd(4),kd(2),nblock2
real*4 xd(4),yd(2) real*4 xd(4),yd(2)
real*8 fcenter real*8 fcenter
common/datcom/dd(4,5760000),ss(4,322,NFFT),savg(4,NFFT),fcenter,nutc,junk(38) common/datcom/dd(4,5760000),ss(4,322,NFFT),savg(4,NFFT),fcenter,nutc, &
junk(NJUNK)
equivalence (kd,d4) equivalence (kd,d4)
equivalence (jd,d8,yd) equivalence (jd,d8,yd)
equivalence (xd,c16) equivalence (xd,c16)

View File

@ -18,11 +18,13 @@ subroutine symspec(k,nxpol,ndiskdat,nb,nbslider,idphi,nfsample, &
! ihsym index number of this half-symbol (1-322) ! ihsym index number of this half-symbol (1-322)
! nzap number of samples zero'ed by noise blanker ! nzap number of samples zero'ed by noise blanker
include 'njunk.f90'
parameter (NSMAX=60*96000) !Total sample intervals per minute parameter (NSMAX=60*96000) !Total sample intervals per minute
parameter (NFFT=32768) !Length of FFTs parameter (NFFT=32768) !Length of FFTs
real*8 ts,hsym real*8 ts,hsym
real*8 fcenter real*8 fcenter
common/datcom/dd(4,5760000),ss(4,322,NFFT),savg(4,NFFT),fcenter,nutc,junk(38) common/datcom/dd(4,5760000),ss(4,322,NFFT),savg(4,NFFT),fcenter,nutc, &
junk(NJUNK)
real*4 ssz5a(NFFT),w(NFFT),w2a(NFFT),w2b(NFFT) real*4 ssz5a(NFFT),w(NFFT),w2a(NFFT),w2b(NFFT)
complex z,zfac complex z,zfac
complex zsumx,zsumy complex zsumx,zsumy

View File

@ -1319,7 +1319,9 @@ void MainWindow::decode() //decode()
memcpy(datcom_.mygrid, mgrid.toLatin1(), 6); memcpy(datcom_.mygrid, mgrid.toLatin1(), 6);
memcpy(datcom_.hiscall, hcall.toLatin1(), 12); memcpy(datcom_.hiscall, hcall.toLatin1(), 12);
memcpy(datcom_.hisgrid, hgrid.toLatin1(), 6); memcpy(datcom_.hisgrid, hgrid.toLatin1(), 6);
// memcpy(datcom_.datetime, m_dateTime.toLatin1(), 17); //This causes problems!!! Why??? memcpy(datcom_.datetime, m_dateTime.toLatin1(), 17);
datcom_.junk1=1234;
datcom_.junk2=5678;
//newdat=1 ==> this is new data, must do the big FFT //newdat=1 ==> this is new data, must do the big FFT
//nagain=1 ==> decode only at fQSO +/- Tol //nagain=1 ==> decode only at fQSO +/- Tol
@ -1333,7 +1335,7 @@ void MainWindow::decode() //decode()
from += noffset; from += noffset;
size -= noffset; size -= noffset;
} }
memcpy(to, from, qMin(mem_m65.size(), size)); memcpy(to, from, qMin(mem_m65.size(), size-8));
datcom_.nagain=0; datcom_.nagain=0;
datcom_.ndiskdat=0; datcom_.ndiskdat=0;
m_call3Modified=false; m_call3Modified=false;