From bfaea469abae7de0226f3637f7d121793e9633e6 Mon Sep 17 00:00:00 2001 From: Gregor Michalicek Date: Fri, 1 Feb 2019 18:26:22 +0100 Subject: [PATCH] Fix wrong array size in abcrot call in io/writeBasis.F90 --- global/abcrot.f | 2 ++ io/writeBasis.F90 | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/global/abcrot.f b/global/abcrot.f index e2a73adc..b1fdeff7 100644 --- a/global/abcrot.f +++ b/global/abcrot.f @@ -54,9 +54,11 @@ C PRINT*,"calculate wigner-matrix" IF (.NOT.odi%d1) THEN ALLOCATE (d_wgn(-lmaxd:lmaxd,-lmaxd:lmaxd,lmaxd,nop)) + d_wgn = CMPLX(0.0,0.0) ! Initialization is done to avoid complaints by Lord Valgrind CALL d_wigner(nop,mrot,bmat,lmaxd,d_wgn) ELSE ALLOCATE (d_wgn(-lmaxd:lmaxd,-lmaxd:lmaxd,lmaxd,ods%nop)) + d_wgn = CMPLX(0.0,0.0) ! Initialization is done to avoid complaints by Lord Valgrind CALL d_wigner(ods%nop,ods%mrot,bmat,lmaxd,d_wgn) ENDIF ENDIF diff --git a/io/writeBasis.F90 b/io/writeBasis.F90 index 102bfc48..464aadee 100644 --- a/io/writeBasis.F90 +++ b/io/writeBasis.F90 @@ -479,7 +479,7 @@ SUBROUTINE writeBasis(input,noco,kpts,atoms,sym,cell,enpara,vTot,vCoul,vx,mpi,DI ! DO i=1,atoms%nat ! atoms%ngopr(i)=ngopr_temp(i) ! END DO - CALL abcrot(atoms%ntype,atoms%nat,dimension%neigd,atoms%lmaxd,dimension%lmd,atoms%llod,atoms%nlod,atoms%ntype,atoms%neq,& + CALL abcrot(atoms%ntype,atoms%nat,numbands,atoms%lmaxd,dimension%lmd,atoms%llod,atoms%nlod,atoms%ntype,atoms%neq,& numbands,atoms%lmax,atoms%nlo,atoms%llo,sym%nop,atoms%ngopr,sym%mrot,atoms%invsat,sym%invsatnr,cell%bmat,& oneD%odi,oneD%ods,& eigVecCoeffs%acof(:,0:,:,jsp),eigVecCoeffs%bcof(:,0:,:,jsp),eigVecCoeffs%ccof(-atoms%llod:,:,:,:,jsp)) -- GitLab