I am looking for a way for my intel Fortran application to start a process (python) to run in parallel with the Fortran process such that a Fortran logical unit connects (writes) to the stdin of the python process and another logical unit in Fortran connects (reads) from stdout of the python process. The python process happens to be associated with a commercial tool (post-processor). The two processes run in parallel exchanging data over time.
We would like to use the process on Windows (7) and Linux as common as possible. Any help would be much appreciated.
For Windows, you would need to pass standard input/output handles to CreateProcess(). See C example in this article: https://msdn.microsoft.com/en-us/library/windows/desktop/ms682499(v=vs.85).aspx
Yes, in fact the current implementation on Windows is using a pipe, but windows pipes and Linux pipes seem different enough that we are trying to get away from pipes and use something that will make the Windows and Linux versions more similar.
How about sockets, then? Unix domain sockets will work for this on Linux, but on Windows you could just create a TCP socket bound to localhost. While the socket creation mechanism would be slightly different between Windows and Linux, the data transfer could be done using send() and recv() on both systems.
(Note that it's harder to secure the sockets solution vs. the pipes solution, in case security is one of your requirements.)