code changes after using valgrind. Related to https://github.com/nwchemgit/nwchem/issues/132

This commit is contained in:
edoapra 2020-02-06 15:01:53 -08:00
parent 172e38db71
commit ae85e06a00
No known key found for this signature in database
GPG key ID: 48E12DA1EDE9E1B0
2 changed files with 14 additions and 12 deletions

View file

@ -737,12 +737,13 @@ cold rec_mem=1
!QuantumComputing qrotation
if (.not.rtdb_get(rtdb,'tce:qrotation',
4 mt_log,1,qrotation)) qrotation=.false.
if(qrotation) then
nacto=0
nrotv=0
nrot=0
if(qrotation) then
if (.not.rtdb_get(rtdb,'tce:nacto',mt_int,1,nacto))
1 call errquit('tce_energy:nacto=0 while qrotation T',0,
2 RTDB_ERR)
nrotv=0
if (.not.rtdb_get(rtdb,'tce:nrotv',mt_int,1,nrotv))
1 call errquit('tce_energy:nrotv=0 while qrotation T',0,
2 RTDB_ERR)
@ -835,11 +836,7 @@ c
if(res_log) ccsd_var='ic'
!
slice=.false.
if (.not.rtdb_get(rtdb,'tce:xmem',mt_int,1,xmem)) then
continue
else
slice=.true.
end if
if (rtdb_get(rtdb,'tce:xmem',mt_int,1,xmem))slice=.true.
!
d4d5=.false.
if (.not.rtdb_get(rtdb,'tce:d4d5',mt_log,1,d4d5)) then

View file

@ -101,15 +101,15 @@ cx call dfill(maxtrials,1.0d99,dbl_mb(k_diff),1)
110 continue
if (.not.ma_pop_stack(l_diff))
1 call errquit('tce_eom_xguess: MA problem',1,MA_ERR)
if (nodezero) write(LuOut,*) ' maxdiff = ',maxdiff
c
maxeorb=0.0d0
defmeo=.false.
if (.not.rtdb_get(rtdb,'tce:maxeorb',mt_dbl,1,maxeorb)) then
defmeo=.false.
else
if (rtdb_get(rtdb,'tce:maxeorb',mt_dbl,1,maxeorb)) then
defmeo=.true.
maxdiff=maxeorb
end if
if (nodezero.and.defmeo) write(LuOut,*) ' maxeorb = ',maxeorb
c
c
c Make trial X1
@ -308,8 +308,13 @@ c
c
300 continue
c
if (nxtrials.lt.nroots_reduced)
1 call errquit('there is a bug in the program',0,UNKNOWN_ERR)
if (nxtrials.lt.nroots_reduced) then
if(nodezero) then
write(luout,'(a,i15,a,i15)') ' nxtrials ',nxtrials,
c ' < ',nroots_reduced
endif
call errquit('there is a bug in the program',0,UNKNOWN_ERR)
endif
if (nodezero) then
write(LuOut,9000) nxtrials
if (nroots.gt.nroots_reduced) then