I realized that I can emulate stream access in a compiler without it using a direct access file of characters.
Are there any pitfalls or portability issues I should be aware of?
My program seems to work OK.
Asked
Active
Viewed 1,636 times
0

Johan
- 74,508
- 24
- 191
- 319

Vladimir F Героям слава
- 57,977
- 4
- 76
- 119
-
3What do you mean? Stream I/O is a part of Fortran 2003 and therefore should be portable across Fortran 2003 compilers. Why do you need to emulate it? – M. S. B. May 29 '11 at 12:19
-
I meant in machines with only a Fortran 95 conforming compiler. – Vladimir F Героям слава May 30 '11 at 15:31
-
@VladimirF - Which one is that? – Rook Feb 23 '12 at 14:09
-
1Any older version of any compiler. You are quite likely not to find the newest version of your compiler on some big cluster you have to use. On mainframes, the IBM compiler is even Fortran 77 only. – Vladimir F Героям слава Feb 23 '12 at 14:26
-
@VladimirF - I'm aware that some are still "stuck" at f77. However, those that "have gotten up to" f95, usually follow the developments ... ymmv I guess. – Rook Feb 23 '12 at 15:03
-
the main thing you can not do w/o streams is process binary standard input. So long as you liteally mean files, direct acess works fine. My recollection is it is quite slow, but that may of course be an implementation issue. – agentp Jan 24 '13 at 20:25
1 Answers
2
I found that direct access files are indeed sometimes used for this purpose. The example is library binstreams in FLIBS. The issues that comes with this approach are described there as well under implementation notes. This approach can be handy, because there sometimes not the newest compilers available on every HPC computer.

Bart
- 19,692
- 7
- 68
- 77

Vladimir F Героям слава
- 57,977
- 4
- 76
- 119