Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

output format

Haider__Abbas
Beginner
492 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
Honored Contributor I
492 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 ...

 

0 Kudos
Haider__Abbas
Beginner
492 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

0 Kudos
Steve_Lionel
Honored Contributor III
492 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.

0 Kudos
reidar
New User
492 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..
 

0 Kudos
Reply