Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fortran problem:Incrementally linked image

Status
Not open for further replies.

blunt80fi

Electrical
Jun 23, 2004
6
0
0
FI
Hello everyone!

I'm programming a pretty large program with Fortran, and I have encountered the following problem:

When I compile the program, everything seems to be ok. Even the 'program's name'.exe starts and the program starts running. But after a while there comes this error message

forrtl: severe (64): input conversion error, unit 2, file D:\FORTRAN2\testi
Image PC Routine Line Source
LAPIL.exe 00425979 Unknown Unknown Unknown
LAPIL.exe 00425773 Unknown Unknown Unknown
LAPIL.exe 00424904 Unknown Unknown Unknown
LAPIL.exe 00424B7E Unknown Unknown Unknown
LAPIL.exe 004221DA Unknown Unknown Unknown
LAPIL.exe 004215BC Unknown Unknown Unknown
LAPIL.exe 00403081 Unknown Unknown Unknown
LAPIL.exe 00404445 Unknown Unknown Unknown
LAPIL.exe 00401622 Unknown Unknown Unknown
LAPIL.exe 0044FF79 Unknown Unknown Unknown
LAPIL.exe 00443D84 Unknown Unknown Unknown
KERNEL32.dll 77F1BB7B Unknown Unknown Unknown

Incrementally linked image--PC correlation disabled.
Press any key to continue

I don't have so much experience with Fortran, so I really don't know what to do with this problem, because everything seems to be ok, and still it gives me this.. I would really appreciate all the help you can give me to be able to solve this problem. My fortran is digital visual fortran 6.

Thank you.
 
Replies continue below

Recommended for you

I don't use this version of fortran, but the line:-

"forrtl: severe (64): input conversion error, unit 2, file D:\FORTRAN2\testi"

tells you what is wrong. That is the file D:\FORTRAN2\testi is being read with fortran unit 2 and the data in the file does not match the type of data that the program is trying to read from it. For example the file may contain contain character data and the program is trying to read an integer.

The mis-match has occured at some point within the data file, else it would fail immediately.
 
Johnhors, thank you for your reply.

I think you're right. When I debug the program, the arrow shows to a line which says int 3. But how to correct this? I have went through my code, but I don't understand where that match error is. Does the debugger tell it somehow?
 
Well the debugger I use certainly highlights the line of code at which the error has occured and gives values for all the relevant variables. I use Salford Software FTN95 I would have thought that digital visual fortran would have similar facilities. Otherwise you can insert simple write statements into your code which report back to the screen their location within the code i.e. WRITE(6,*)'#1' at some point WRITE(6,*)'#2' and so on, and isolate the problem that way.
 
I don't use that compiler either, but my first impression from the messages was that you need to compile with options to include subroutine name and line number information in the object, so that runtime error messages can produce a meaningful traceback to the offending routine and line. The PC (program counter) can be looked up in the .map file from the link, maybe, to see which routine(s) are at fault. That may not work if they are within the Fortran runtime itself and not in your code.

One other thought. I found that with Lahey Fortran, the LF95 version enforces a more strict match between READ/WRITE variable type and the format spec used. With earlier versions, one could write a real variable with an integer "I" format spec and the runtime would do the conversion for me. Not so with LF95. Look for that situation. Good luck.
 
Status
Not open for further replies.
Back
Top