Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

freezing in debug the code

Abou_Galalh
Beginner
534 Views

Hi , i'm not good in FORTRAN programming. i have FORTRAN source code. i need to run it for validation my work. i try to run this code with Intel compiler and Microsoft Visual Studio IDE.

compiling and linking source code files successes. when start debug, at reading the data file, the file is read and we reach the end of file (EOF) but, the code is frozen (do not go out from loop).

 i don't know the problem reason,but i know the problem place (in attachment the red box is the place or between the line 1 and 3)                                             the problem is " it read the last line in the data file by READ (line 1) and  the condition in (line 3) is true  go to 500. the code is freezing between lines 1 and 3 

  1.   500   READ(LUPEP,1800,ERR=500,END=600) IDLIN,IYEAR,IMONTH,IDAY,
  2.            &                                   IHOUR,IMIN,SEC
  3.           IF( IDLIN .NE. '* ' ) GO TO 500

           

the subroutine where the problem is found and data file in attachment.

my Gratitude Abou Galalh

 

0 Kudos
2 Replies
Abou_Galalh
Beginner
534 Views

Hi, the attachment here

Abou Galalh

0 Kudos
IanH
Honored Contributor III
534 Views

If you have any problem during the read, the code jumps back to the read statement (ERR=500, and statement labelled 500 is the read statement) and just tries again. 

In the face of error you have an endless loop!

 

0 Kudos
Reply