Workaround for a bug of the PGI compiler (5.1-5).

C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1100 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
sbraccia 2004-07-27 08:47:08 +00:00
parent 425abedc50
commit ec1d92e838
1 changed files with 8 additions and 0 deletions

View File

@ -136,7 +136,15 @@ SUBROUTINE setup()
!
! ... Set the number of electrons equal to the total ionic charge
!
#if defined (__PGI)
IF ( nelec == 0.D0 ) THEN
DO na = 1, nat
nelec = nelec + zv( ityp(na) )
END DO
END IF
#else
IF ( nelec == 0.D0 ) nelec = SUM( zv(ityp(1:nat)) )
#endif
!
! ... If the occupations are from input, check the consistency with the
! ... number of electrons