Skip to content

Commit

Permalink
fixed bug in PhU_sit write.
Browse files Browse the repository at this point in the history
  • Loading branch information
xh125 committed Sep 15, 2021
1 parent 9682faf commit 04757b5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src_complex/lvcsh.f90
Original file line number Diff line number Diff line change
Expand Up @@ -536,8 +536,8 @@ program lvcsh
write(stdout,"(A,I4)") "Number of nodes for non-adiabatic calculation:",nnode
write(stdout,"(A,I4)") "Number of samples for each node:",ncore
naver_sum = naver*nnode*ncore
phQsit = 0.0
phPsit = 0.0
phQsit = czero
phPsit = czero
phKsit = 0.0
phUsit = 0.0

Expand Down
8 changes: 5 additions & 3 deletions src_complex/saveinf.f90
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ subroutine read_phK(inode,icore,nmodes,nq,nsnap,phKsit)
real(kind=dp),allocatable :: phKsit_(:,:,:)

if(.not. allocated(phKsit_)) allocate(phKsit_(nmodes,nq,0:nsnap))

phKsit_ = 0.0

write(ctmp1,*) inode
write(ctmp2,*) icore
phK_file_ = "./node"//trim(adjustl(ctmp1))//"/sample"//trim(adjustl(ctmp2))//"/"//trim(outdir)//trim(adjustl(phK_file))
Expand Down Expand Up @@ -311,14 +312,15 @@ subroutine read_phU(inode,icore,nmodes,nq,nsnap,phUsit)
real(kind=dp),allocatable :: phUsit_(:,:,:)

if(.not. allocated(phUsit_)) allocate(phUsit_(nmodes,nq,0:nsnap))

phUsit_ = 0.0

write(ctmp1,*) inode
write(ctmp2,*) icore
phU_file_ = "./node"//trim(adjustl(ctmp1))//"/sample"//trim(adjustl(ctmp2))//"/"//trim(outdir)//trim(adjustl(phU_file))
phu_unit = io_file_unit()
call open_file(phU_file_,phu_unit)

do i=1,3
do i=1,4
read(phu_unit,*)
enddo
do isnap=0,nsnap
Expand Down

0 comments on commit 04757b5

Please sign in to comment.