From 04757b5f09ce07941edfc12c0f916f4553062c0d Mon Sep 17 00:00:00 2001 From: xh125 Date: Wed, 15 Sep 2021 16:07:45 +0800 Subject: [PATCH] fixed bug in PhU_sit write. --- src_complex/lvcsh.f90 | 4 ++-- src_complex/saveinf.f90 | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src_complex/lvcsh.f90 b/src_complex/lvcsh.f90 index 80d9a42..c4dd38c 100644 --- a/src_complex/lvcsh.f90 +++ b/src_complex/lvcsh.f90 @@ -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 diff --git a/src_complex/saveinf.f90 b/src_complex/saveinf.f90 index 9563546..ca8a430 100644 --- a/src_complex/saveinf.f90 +++ b/src_complex/saveinf.f90 @@ -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)) @@ -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