[Wien] x xspec runtime error

Peter Blaha pblaha at theochem.tuwien.ac.at
Wed Sep 7 09:52:20 CEST 2011


It should not happen ! Which compiler are you using ? Again one of the
very new ifort 12.1 versions ?? (See ifort bugs in previous emails)

The dimension is read from unit 32, and then it tries to read as many lines ....

       READ (32,4712) IEMAX
       allocate (   A1(NRAD,IEMAX), B1(NRAD,IEMAX))
       allocate ( ENE(IEMAX))
       allocate ( DOS(IEMAX,3),XI(IEMAX,2),X(IEMAX))
       allocate ( XINTER(IEMAX),XOUT(IEMAX))

Eventually one could try for security to allocate the arrays ENE and DOS with IEMAX+1.

Let me know if this fixes this problem.

Am 07.09.2011 02:04, schrieb Gavin Abo:
> Dear Dr. Blaha and Wien2k users,
>
> When running x xspec, I get the error shown below. It looks like there is an infinite loop from lines 170 to 180 in txspec.f that causes an array index to go out of the upper
> bound, but I don't have much Fortran experience. Should there be a condition (IEMAX?) and break or jump statement to get out of the "1 CONTINUE" and "goto 1" loop from line 170
> and 180?
>
> forrt1: severe (408): fort: (2): Subscript #1 of the array ENE has value 771 which is greater than the upper bound 770
>
> Image PC Routine Line Source
> ...
> txspec 0000000000423085 MAIN__ 176 txspec.f
> ...
>
>  > stop error txspec xspec.def
> ...
>
> *Lines from file txspec.f in SRC_txspec.f*
>
> Line 170:
> I=0
> 1 CONTINUE
> i=i+1
> IF (LC.EQ.0) then
> READ(32,4713,END=2,ERR=913) ENE(i),DOS(i,1),DOS(i,3)
> ELSE
> READ(32,4713,END=2,ERR=913) ENE(i),DOS(i,1),DOS(i,2),DOS(i,3)
> ENDIF
> goto 1
> 2 CONTINUE
> :Line 180
>
> Thanks,
>
> Gavin
>
>
> _______________________________________________
> Wien mailing list
> Wien at zeus.theochem.tuwien.ac.at
> http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien

-- 

                                       P.Blaha
--------------------------------------------------------------------------
Peter BLAHA, Inst.f. Materials Chemistry, TU Vienna, A-1060 Vienna
Phone: +43-1-58801-15671             FAX: +43-1-58801-15698
Email: blaha at theochem.tuwien.ac.at    WWW: http://info.tuwien.ac.at/theochem/
--------------------------------------------------------------------------


More information about the Wien mailing list