Unix/Linux Go Back    


Programming Post questions about C, C++, Java, SQL, and other programming languages here.

Error in my FORTRAN program

Programming


Tags
fortran, i o error, not a typewriter message

Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 09-04-2015   -   Original Discussion by KathyB148
KathyB148's Unix or Linux Image
KathyB148 KathyB148 is offline
Registered User
 
Join Date: Nov 2012
Last Activity: 8 January 2016, 2:13 PM EST
Posts: 24
Thanks: 7
Thanked 1 Time in 1 Post
Error in my FORTRAN program

I have a Fortran program and I am writing out to logical unit 7. The program is reading from a text file and writing to the new file formatted. It gets through the read and writes some to the file but then stops with the following error:

1525-013 The sequential WRITE statement cannot be completed because an errno value of 25 (Not a typewriter) was received while writi
ng the file ACA_TRANSMIT.XML. The program will stop.

I have looked for the error and can only discern it is some type of I/O error, but I cannot find a way to resolve it.

There are many WRITE statements and quite a lot of FORMAT statements, so I'm not sure where to begin. If the source file is changed, the program stops at different places in the write.

I am running a combo FORTRAN77/90 on UNIX AIX editor.
Sponsored Links
    #2  
Old Unix and Linux 09-04-2015   -   Original Discussion by KathyB148
Corona688's Unix or Linux Image
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 8 December 2017, 4:34 PM EST
Location: Saskatchewan
Posts: 22,541
Thanks: 1,158
Thanked 4,285 Times in 3,954 Posts
We can't see your computer from here. It's difficult to even guess without seeing the code.
Sponsored Links
    #3  
Old Unix and Linux 09-04-2015   -   Original Discussion by KathyB148
KathyB148's Unix or Linux Image
KathyB148 KathyB148 is offline
Registered User
 
Join Date: Nov 2012
Last Activity: 8 January 2016, 2:13 PM EST
Posts: 24
Thanks: 7
Thanked 1 Time in 1 Post
There is over 1200 lines of code and I have no idea what would be helpful for you to see. The output always stops at 203 lines and 8192 characters, with a "last line not complete" message. They are not necessarily the same 203 lines, however, as there is some conditions for the output. As I mentioned, if I change the conditions, it writes different data, but always 203 lines and 8192 characters and then stops. I was hoping someone could give me a better explanation of what the error message means...
    #4  
Old Unix and Linux 09-04-2015   -   Original Discussion by KathyB148
Corona688's Unix or Linux Image
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 8 December 2017, 4:34 PM EST
Location: Saskatchewan
Posts: 22,541
Thanks: 1,158
Thanked 4,285 Times in 3,954 Posts
"8192 characters" is interesting. That's a power of two, likely the precise size of some buffer in the program or OS.

If you're not willing to post the program, I'll say that what's being written to and how is probably more interesting and relevant than where the program breaks down. That, I suspect, is where the error arises.

Beyond that, without seeing the program, we are truly wild guessing.
Sponsored Links
    #5  
Old Unix and Linux 09-04-2015   -   Original Discussion by KathyB148
KathyB148's Unix or Linux Image
KathyB148 KathyB148 is offline
Registered User
 
Join Date: Nov 2012
Last Activity: 8 January 2016, 2:13 PM EST
Posts: 24
Thanks: 7
Thanked 1 Time in 1 Post
It is interesting that you say that. I have a rather large loop with multiple conditions and when I comment out that loop, the program runs and writes to the end. I am going to re-write the loop and see if that resolves the issue. Perhaps it is overloading the buffer.
Sponsored Links
    #6  
Old Unix and Linux 09-04-2015   -   Original Discussion by KathyB148
Corona688's Unix or Linux Image
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 8 December 2017, 4:34 PM EST
Location: Saskatchewan
Posts: 22,541
Thanks: 1,158
Thanked 4,285 Times in 3,954 Posts
write() shouldn't be failing though, unless the file itself is invalid. What's writing to it is probably less interesting and relevant than what's being written to.
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
FORTRAN program to extracting column sajmar Programming 1 07-05-2015 01:53 AM
FORTRAN error *** glibc detected *** antonija Homework & Coursework Questions 0 03-07-2015 07:06 PM
Fortran program issue Arjani Homework & Coursework Questions 3 06-04-2012 01:09 AM
Error running FORTRAN code sandhyakg Programming 9 07-07-2011 01:09 PM
Problems while linking Fortran program (-> undefined reference to...) Dynamo Programming 0 10-19-2009 11:44 AM



All times are GMT -4. The time now is 11:06 AM.