Home Man
Search
Today's Posts
Register

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

Error in my FORTRAN program

Tags
fortran, i o error, not a typewriter message, programming

👤 Login to reply

 
Thread Tools Search this Thread
# 1  
Old 09-04-2015
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.
# 2  
Old 09-04-2015
We can't see your computer from here. It's difficult to even guess without seeing the code.
# 3  
Old 09-04-2015
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 09-04-2015
"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.
# 5  
Old 09-04-2015
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.
# 6  
Old 09-04-2015
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.
👤 Login to reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 12:53 AM
FORTRAN error *** glibc detected *** antonija Homework & Coursework Questions 0 03-07-2015 06:06 PM
FORTRAN Extends kristinu Programming 3 10-21-2014 08:05 AM
FORTRAN Compiler ajayram_arya Shell Programming and Scripting 10 02-28-2014 04:42 PM
Fortran program issue Arjani Homework & Coursework Questions 3 06-04-2012 12:09 AM
Fortran runtime error: Insufficient data descriptors in format after reversion jm4smtddd Programming 1 07-14-2011 04:07 PM
Error running FORTRAN code sandhyakg Programming 9 07-07-2011 12:09 PM
Problems while linking Fortran program (-> undefined reference to...) Dynamo Programming 0 10-19-2009 10:44 AM
learning fortran gav2251 Programming 1 06-01-2009 03:30 AM
FORTRAN compiling Iamthe great UNIX for Dummies Questions & Answers 1 05-21-2007 10:09 AM


All times are GMT -4. The time now is 01:32 AM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password