Hi Dr. Blaha, It happened with composerxe-2011.3.174. I thought it was a ifort 12 bug too. However, it also happened with ifort 11.1 update 9. I have since went back to composerxe-2011.3.174. I found that it only happens if you compile with the "-check bounds" option. I guess with the "-check bounds", it doesn't like the loop break from the READ statement. Just realized that is probably what the "END 2" in the read statement does.
So I can either compile without the "-check bounds" or add "IF (i.GT.IEMAX) goto 2" after line 172 in txspec.f as shown: I=0 1 CONTINUE i=i+1 *IF (i.GT.IEMAX) goto 2 !Added line* 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 Best Regards, Gavin On 9/7/2011 2:52 AM, Peter Blaha wrote: > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://zeus.theochem.tuwien.ac.at/pipermail/wien/attachments/20110907/5d82b33b/attachment.htm>