Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

output format

Haider__Abbas
Beginner
140 Views

hi, 

I am trying to write my results in an output file but unable to write large data set. (compaq visual fortran)

    write(7,"(20(1X,F22.12))") (resul(jplot,ii),jplot=1,nusav)

i want to write hundreds of columns instead of just 20, but that doesnt work if i replace this 20 with a hundred or something like that. how should i proceed?

regards

0 Kudos
4 Replies
Arjen_Markus
Valued Contributor III
140 Views

You will have to be a bit clearer about what you want to achieve and why things are not working:

  • Replacing the number 20 by 100 or 200 or ... should work. So why doesn't it in your case?
  • Be aware that the Compaq Visual Fortran compiler has been replaced by Intel Fortran a long time ago (20 years?)
  • Do you want the full nusav values on one line? The simplest way would be to construct the format via an internal write
  • (1X,F22.12) can be replaced by F23.12
  • You could actually use a binary or unformatted file instead - that depends on what you want to do with the file but it would relief you of such formatting issues

Just a few questions/suggestions ...

 

Haider__Abbas
Beginner
140 Views

thank you Arjen. i know that ivf is in use now, but due to some reasons i have to use cvf for now. yes i wanted to write full nusav in one line and its working now...as per your suggestion i used an unformatted file. its working perfect now thank you

Steve_Lionel
Black Belt Retired Employee
140 Views

Fortran 2008 allows the use of * here to mean "unlimited repeats", but CVF never supported that (it is supported by Intel Fortran.) Nevertheless, using a large number should have worked in this case with CVF.

reidar
New User
140 Views

In program written in the days of CVF, I had output statements like:

 OPEN(UNIT=IDPL1,FILE=PLFIL1,STATUS='UNKNOWN',ERR=9500)

 WRITE(IDPL1,'(F8.4,2X,120(E16.10,1H;))')T+TELT,(Y (j),j=1,MT2 )      ! 17/01-01

The program is today compiled and linked with VS2013/IVF and it works as intended, so maybe there is another thing that is the real cause of your problem..
 

Reply