Hi all, I'm running in an error:
"forrtl: severe (66): output statement overflows record"
ifort - v says I'm running "Intel(R) 64, Version 220.127.116.11 Build 20170213" in MS Studio Community 2015
I am writing a very long line to a file with 1007 columns, the following statement gives the error
WRITE(16,'(2G13.3, 2I3, 2G10.2, I4, 1200(1X,G15.8,1X,E12.6))') & X, Y, N, IH, ZT, ZB, NH, ( PROP(M), FLAG(M) , M=1, SIZE(PROP) )
-statement simplified for this post
-unit 16 is well defined
-the value of '1200' in the format is always larger than SIZE(PROP)
I changed the code to first do an internal write to "out_test", where this variable has a large enough size:
CHARACTER(35000) :: out_test
so instead of the above, I do
WRITE(out_test, <SAME FORMAT ETC.>
this works until I try to write it to a file:
Again same error.
this however works (but contains line breaks in the output I want to avoid):
Show us the OPEN statement for unit 16. The documented maximum record length for a formatted, variable-length record is 2147483640 bytes. As far as I know, you should not need to specify RECL. Can you post a small but complete program that shows the problem?
really confused now. I thought there was some problem with records over 132 characters as I have had problems in the past. I can even look at code where i have added record lengths as a fix. Try as I might I cannot replicate this problem. Maybe with some other /older compiler perhaps ......
Thanks Andrew and Steve,
indeed it was the OPEN statement:
which I changed to