FORTRAN 77 IO Error: Troubleshooting with FORCE 2.0

  • Context: Fortran 
  • Thread starter Thread starter Sujash Bhattacharya
  • Start date Start date
  • Tags Tags
    Error Fortran
Click For Summary
SUMMARY

The discussion centers on troubleshooting an I/O error in FORTRAN 77 when using the Force 2.0 compiler. The error message indicates an "illegal unit number" associated with unit 72 during direct formatted external I/O operations. The user notes that the code runs successfully on a professor's PC with the same compiler version, suggesting potential environmental differences. Key points include the importance of valid unit numbers, with 5 designated for standard input and 6 for standard output, and considerations regarding file limits in the shell environment.

PREREQUISITES
  • Understanding of FORTRAN 77 syntax and I/O operations
  • Familiarity with Force 2.0 compiler features and settings
  • Knowledge of file handling and unit number conventions in FORTRAN
  • Basic troubleshooting skills for runtime errors in programming
NEXT STEPS
  • Research valid unit numbers in FORTRAN 77 I/O operations
  • Explore the limitations of file handling in UNIX-like shell environments
  • Learn about debugging techniques for FORTRAN code using Force 2.0
  • Investigate common I/O errors in FORTRAN and their resolutions
USEFUL FOR

FORTRAN developers, educators, and students troubleshooting I/O errors in their applications, particularly those using the Force 2.0 compiler.

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.
 

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