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

Simultaneous write and read with different programs.

pecan204
Beginner
407 Views
Is it possible to write to a file with one program and read that same file instantaneously with another program?

Suppose I wanted to simulate data being written from a control system computer and the second program would read that data reduce itas soon as it is written.

If this can't be done with fortran are there any alternatives?

Thanks for any comments


0 Kudos
2 Replies
Steven_L_Intel1
Employee
407 Views
It can be done, though a file isn't the best way of doing that, as there can be synchronization problems and the need to periodically "flush" the output.

Windows has a number of mechanisms for sending and receiving data between programs - a pipe would probably be the most appropriate for you. You can read about these in the "Platform SDK" part of the Visual Fortran (or MSDN) documentation.

Steve
0 Kudos
Jugoslav_Dujic
Valued Contributor II
407 Views
The classic starter is this MSDN article. It's in C, of course, but I did recommend it few times here so someone should have a Fortran translation. Anyone?

Jugoslav
0 Kudos
Reply