INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Fortran runtime error: End of file.

Fortran runtime error: End of file.

(OP)
I am curretly working on a CFD code in which I am required to read a values of diameter from a file 'dialog4.dat' (generated by fortran) and transfer the diameters to an array 'dd1'. while running the code it gives the error "Fortran runtime error: End of file."
I am attaching a screenshot of the code with the error message.
Please help me to sort it out as I am running out of deadline.

RE: Fortran runtime error: End of file.

Basically, there is insufficient data for dd1 in dialog4.dat. Remember that if you read in free format, there must be at least a space between the numbers. If the data was generated without any spaces between some of the numbers then you have to find out what format it was written in and use that format to read your data.

1) what is dd1 - how big is the array
2) how much data is there in the file dialog4.dat?

RE: Fortran runtime error: End of file.

is it dialog4 or dialog006?

Basically, you need to make sure that dialog006.dat actually has the data you are planning to read, does it? can you open such file? is it plain text? is it a single line of numbers? how many?

RE: Fortran runtime error: End of file.

(OP)
@salgerman: ya it has the data (diameters of droplets having log normal distribution) and it's a .dat file and single line of numbers. I am attaching the file. You can check it.
@xwb: you can check the file I am attaching here. And the array dd1 is sufficiently big (aroound 20000).

You can open the file using Gedit editor or any other you prefer.

RE: Fortran runtime error: End of file.

I just opened the attached file...it does not look like it is a single line of numbers; instead, it very much looks like there is on number per line...and about 220,000 lines (not 20,000 as you mentioned).

So, I would suggest you be more explicit as to how you go about reading the data and how many items. The thing that when you attempt to read an array without specifying any indexing, Fortran will attempt to read as many items as it takes to fill up the entire array...what's the dimension of dd1?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close