Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

Maximum line length for WRITE statement

$
0
0

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 17.0.2.187 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) )   

Note:
-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:

WRITE(16,'(A)') trim(out_test)

Again same error.

this however works (but contains line breaks in the output I want to avoid):

WRITE(16,*) trim(out_test)

Any hints?

Cheers

-Ralf

 

Thread Topic: 

Question

Viewing all articles
Browse latest Browse all 5691

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>