I think you have to modify the code like you indicated. I made the
attached patch. It removed the compile time errors, but I never tested
it make sure it didn't have any runtime errors.
Placed gfortran.patch (for Wien2k 12.1) into $WIENROOT, and entered:
$ patch -b -p0 -i gfortran.patch
On 2/20/2013 11:26 PM, tasaka at affinity-science.com wrote:
Hello,
I encountered the follwoing errors when compiling in SRC_hf
with GNU Fortran (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3.
if there are any options of gfortran to avoid these errors, please advise.
//
gfortran -ffree-form -O2 -ffree-line-length-none -c calc_exhfvv_tmp_.F
calc_exhfvv_tmp_.F:269.22:
igv = (/ 1:ng /)
1
Error: Syntax error in array constructor at (1)
calc_exhfvv_tmp_.F:272.22:
igv = (/ 1:(igs-1),(igs+1):ng /)
1
Error: Syntax error in array constructor at (1)
make[1]: *** [calc_exhfvv.o] Error 1
//
Or, should I modify the codes as like below?
igv = (/ (i, i=1,ng,1) /)
Any information would be appreciated.
With best regards,
Tomo
___
Wien mailing list
Wien at zeus.theochem.tuwien.ac.at
http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
-- next part --
diff -cr SRC_hf/calc_exhfvv.F SRC_hf/calc_exhfvv.F
*** SRC_hf/calc_exhfvv.F2012-06-13 02:53:03.0 -0600
--- SRC_hf/calc_exhfvv.F2013-01-21 12:33:50.0 -0700
***
*** 266,275
enddo
if (igs .eq. 0) then
allocate(igv(ng))
! igv = (/ 1:ng /)
else
allocate(igv(ng-1))
! igv = (/ 1:(igs-1),(igs+1):ng /)
endif
ftmp3a = (0d0,0d0)
--- 266,275
enddo
if (igs .eq. 0) then
allocate(igv(ng))
! igv = (/ (i,i=1,ng) /)
else
allocate(igv(ng-1))
! igv = (/ (i,i=1,(igs-1)),(i,i=(igs+1),ng) /)
endif
ftmp3a = (0d0,0d0)
diff -cr SRC_hf/calc_h.F SRC_hf/calc_h.F
*** SRC_hf/calc_h.F 2012-07-15 06:45:02.0 -0600
--- SRC_hf/calc_h.F 2013-01-21 12:37:57.0 -0700
***
*** 287,293
elseif (diaghf .eqv. .true.) then
nindexb2(1:nbf) = 1
! indexb(1:nbf,1) = (/1:nbf/)
endif
--- 287,293
elseif (diaghf .eqv. .true.) then
nindexb2(1:nbf) = 1
! indexb(1:nbf,1) = (/(i,i=1,nbf)/)
endif
***
*** 418,427
enddo
if (igs .eq. 0) then
allocate(igv(ng))
! igv = (/ 1:ng /)
else
allocate(igv(ng-1))
! igv = (/ 1:(igs-1),(igs+1):ng /)
endif
nkvhf = nkvt(ik3) - nlototold
--- 418,427
enddo
if (igs .eq. 0) then
allocate(igv(ng))
! igv = (/ (i,i=1,ng) /)
else
allocate(igv(ng-1))
! igv = (/ (i,i=1,(igs-1)),(i,i=(igs+1),ng) /)
endif
nkvhf = nkvt(ik3) - nlototold
diff -cr SRC_hf/calc_rhovalvxsl.F SRC_hf/calc_rhovalvxsl.F
*** SRC_hf/calc_rhovalvxsl.F2012-06-11 07:28:52.0 -0600
--- SRC_hf/calc_rhovalvxsl.F2013-01-21 12:40:07.0 -0700
***
*** 9,15
use struct, only : dx, iatnr, jri, mult, nat, nrad, r0, vcell
implicit none
! integer :: iat, ilm, nr
real*8 :: fac, result, rhovalvxsl, rhovalvxslint
--- 9,15
use struct, only : dx, iatnr, jri, mult, nat, nrad, r0, vcell
implicit none
! integer :: i, iat, ilm, nr
real*8 :: fac, result, rhovalvxsl, rhovalvxslint
***
*** 22,28
do iat=1, nat
nr = jri(iat)
! r(1:nr) = r0(iat)*exp(dx(iat)*(dble((/1:nr/))-1d0))
do ilm=1, nlmvsl(iat)
--- 22,28
do iat=1, nat
nr = jri(iat)
! r(1:nr) = r0(iat)*exp(dx(iat)*(dble((/(i,i=1,nr)/))-1d0))
do ilm=1, nlmvsl(iat)
diff -cr SRC_hf/calc_ucuchucuc.f SRC_hf/calc_ucuchucuc.f
*** SRC_hf/calc_ucuchucuc.f 2012-06-05 09:21:25.0 -0600
--- SRC_hf/calc_ucuchucuc.f 2013-01-21 12:41:20.0 -0700
***
*** 30,36
do iat=1, nat
nr = jri(iat)
! r(1:nr) = r0(iat)*exp(dx(iat)*(dble((/1:nr/))-1d0))
if (screened .eqv. .true.) then
sbi = 0d0
--- 30,36
do iat=1, nat
nr = jri(iat)
! r(1:nr) = r0(iat)*exp(dx(iat)*(dble((/(i,i=1,nr)/))-1d0))
if (screened .eqv. .true.) then
sbi = 0d0
diff -cr SRC_hf/calc_uuchucu.f SRC_hf/calc_uuchucu.f
*** SRC_hf/calc_uuchucu.f 2012-06-05 09:23:37.0 -0600
--- SRC_hf/calc_uuchucu.f 2013-01-21 12:43:16.0 -0700