Fortran FORTRAN 77 IO Error: Troubleshooting with FORCE 2.0

  • Thread starter Thread starter Sujash Bhattacharya
  • Start date Start date
  • Tags Tags
    Error Fortran
Click For Summary
The discussion centers around a FORTRAN code that compiles without errors but fails during execution, generating an "illegal unit number" message. The user is utilizing Force 2.0 as their compiler, which works correctly on a professor's PC. The issue likely relates to the use of unit numbers in file operations, as the user is advised to check the relevant code, particularly the open statement. It's noted that standard unit numbers include 5 for standard input and 6 for standard output. Additionally, there are considerations regarding system limits, such as the maximum number of open files, which could also contribute to the runtime error. Links to external resources are provided for further guidance on valid unit numbers and potential issues with file handling in FORTRAN.
Sujash Bhattacharya
Messages
1
Reaction score
0
I have a FORTRAN code that is producing no error upon compilation but when I run it, the run aborts with following message

"open: illegal unit number
apparent state: unit 72 <unnamed>
last format: list io
lately writing direct formatted external IO

This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information"

I am using Force 2.0 as compiler. This code is running well in my professors pc with force 2.0. . The code is long. So it is difficult to post it here.
 
Technology news on Phys.org
You'll have to post some code if you want anybody to help you. You can copy and paste the relevant part (including the open statement) inside code tags.
 
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

  • · Replies 17 ·
Replies
17
Views
7K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
8K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
12K
Replies
13
Views
8K
  • · Replies 5 ·
Replies
5
Views
10K