Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29257 Discussions

forrtl: severe (24): end-of-file during read

milenko1976
Beginner
4,259 Views
I got this:
forrtl: severe (24): end-of-file during read, unit 18, file /home/milenko/fast/ray/weight.cell
Image PC Routine Line Source
nray 080BDA03 Unknown Unknown Unknown
nray 080BC720 Unknown Unknown Unknown
nray 0808DA4E Unknown Unknown Unknown
nray 080573FC Unknown Unknown Unknown
nray 08056CFA Unknown Unknown Unknown
nray 0806448D Unknown Unknown Unknown
nray 0804C7D9 MAIN__ 402 main.f
nray 08049E34 Unknown Unknown Unknown
libc.so.6 00694BD6 Unknown Unknown Unknown
nray 08049D41 Unknown Unknown Unknown
Relevant part of the code:
open(18,file='weight.cell',form='unformatted')


do 2130 k=1,inz
do 2130 j=1,iny
read(18) (pert2(i,j,k),i=1,inx) (here is 402 line)
How to make this work?
0 Kudos
8 Replies
Steven_L_Intel1
Employee
4,259 Views
Supply more data? This message says that the READ ran off the end of the file. There are many possible causes of that which are not identifiable without having a complete program with data to examine.

The first thing you should do is determine what the values of i, j and k are at the point of failure. Is this the first time through the loop or not? How many records do you think are in the file?
0 Kudos
milenko1976
Beginner
4,259 Views
I am attaching file.Regarding i,j,k they follow the model dimensions 300,1,24.There are 99 pick,calc,times files,I have just added one of them.
0 Kudos
Steven_L_Intel1
Employee
4,259 Views
This is missing a bunch of routines, such as BNDINTERP, PLOTS, SEGMENT, EMPTY, ERASE, PCOLOR, BOX, etc.

In the future, I'd ask that if you have multiple files to send us that you put them in a tar file and attach that.
0 Kudos
milenko1976
Beginner
4,259 Views
ok.some of these files are just givimg returning becasue i do not need plotting.
0 Kudos
mecej4
Honored Contributor III
4,259 Views

One of your source files results in the following warning:

main.f(1004): warning #6371: A jump into a block from outside the block may have occurred. [2400]
if(iflag.eq.1) go to 2400

What do you expect the compiler to do with this jump into a DO block, which is forbidden?

ok.some of these files are just givimg returning becasue i do not need plotting

Be that as it may, you should provide all the source files needed to build an EXE file.
0 Kudos
milenko1976
Beginner
4,259 Views
Thanks Mecej4.
I will try to explain more.I need travel-time inversion,not plotting which is also part of the code.One guy from texas has patched the code,to work on Linux with f77.In the first place I tried to get rid of all plotting subrutines,it was comlicated at it didn't work.His solution was this:
subroutine dot(x,y,size,icol)
c
return
end
c
Are these subrotines causing jump in the do block?
0 Kudos
Steven_L_Intel1
Employee
4,259 Views
I think the jump into the IF block is harmless in this particular application. It's still not allowed in Fortran.

When I build and run the program, it runs correctly and doesn't get any EOF errors.
0 Kudos
milenko1976
Beginner
4,259 Views
Have you changed something?Makefile?
0 Kudos
Reply