[Wien] x xspec runtime error

Gerhard Fecher fecher at uni-mainz.de
Thu Sep 8 10:00:10 CEST 2011


I guess a construct like

i = 0
DO WHILE (.NOT. EOF(32))
        i = i + 1
        IF (LC.EQ.0) then
          READ(32,4713,ERR=913) ENE(i),DOS(i,1),DOS(i,3)
        ELSE
          READ(32,4713,ERR=913) ENE(i),DOS(i,1),DOS(i,2),DOS(i,3)
        ENDIF
END DO

would be better readable than the CONTINUE GOTO CONTINUE spaghetti
(maybe also for the compiler)

Ciao
Gerhard

====================================
Dr. Gerhard H. Fecher
Institut of Inorganic and Analytical Chemistry
Johannes Gutenberg - University
55099 Mainz
________________________________________
Von: wien-bounces at zeus.theochem.tuwien.ac.at [wien-bounces at zeus.theochem.tuwien.ac.at]" im Auftrag von "Gavin Abo [gsabo at crimson.ua.edu]
Gesendet: Mittwoch, 7. September 2011 02:04
Bis: wien at zeus.theochem.tuwien.ac.at
Betreff: [Wien] x xspec runtime error

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


More information about the Wien mailing list