Inter-process communication

Inter-process communication


I saw some postings in this forum about using Pipe for inter-process communication. I try to write a Fortran code to implement this idea but ifort does not recognize CreatePipe. What do I miss here? Any hint is highly appreciated,

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

If you wish to make calls to the Windows API/OS from Fortran, you need to do so through an interface library designed for that purpose. Fortran is a high level language and does not "know" about OS-specific functions/subroutines.

Are the processes residing on the same node (SMP)?

If so, do some research on memory mapped files. The is a relatively easy way for two processes to have a shared memory buffer between them.

Jim Dempsey

Do a forum search for 'pipe' and you will get some help from previous posts.

For example, try this one:

CreatePipe is defined in module KERNEL32. You would need to add:

use kernel32

to make that declaration visible. But as it creates an anonymous pipe, you'd need to use Windows API routines to read and write it. You could alternatively use CreateNamedPipe and then open it using the \\.\pipe\pipename filename syntax (I think this works.)

Retired 12/31/2016

Leave a Comment

Please sign in to add a comment. Not a member? Join today