- protecting calls where nh(is) is 0, to avoid compilers complaining

This commit is contained in:
carcava 2020-01-15 11:46:26 +01:00
parent ac95954044
commit 4d912d40d7
2 changed files with 53 additions and 48 deletions

View File

@ -538,6 +538,8 @@
deallocate (dproj0, dwfc)
!
end if
!
IF( nh(alpha_s) > 0 ) THEN
!
allocate ( wfcbeta(nwfcU,nh(alpha_s)) )
allocate ( wfcdbeta(nwfcU,nh(alpha_s)) )
@ -595,6 +597,9 @@
!
deallocate (wfcbeta)
deallocate (wfcdbeta)
END IF
return
end subroutine dprojdtau
!

View File

@ -96,7 +96,7 @@
end do
!
inl = indv_ijkb0(ia) + 1
IF( ngw > 0 ) THEN
IF( ngw > 0 .AND. nh(is) > 0 ) THEN
CALL dgemm( 'T', 'N', nh(is), n, 2*ngw, 1.0d0, wrk2, 2*ngw, c, 2*ngw, 0.0d0, becps( inl, 1 ), nkb )
END IF
END IF
@ -209,7 +209,7 @@
end do
inl = indv_ijkb0(ia) + 1
IF( ngw > 0 ) THEN
IF( ngw > 0 .AND. nh(is) > 0 ) THEN
CALL dgemm( 'T', 'N', nh(is), nbsp_bgrp, 2*ngw, 1.0d0, wrk2, 2*ngw, &
c_bgrp, 2*ngw, 0.0d0, becdr_bgrp( inl, 1, k ), nkb )
END IF