- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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..
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page