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

Inter-process communication

Lei_T_
Beginner
992 Views

Hello,

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,

0 Kudos
4 Replies
mecej4
Honored Contributor III
992 Views

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.

0 Kudos
jimdempseyatthecove
Honored Contributor III
992 Views

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

0 Kudos
Anthony_Richards
New Contributor I
992 Views

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

For example, try this one:

https://software.intel.com/en-us/forums/topic/299693

0 Kudos
Steven_L_Intel1
Employee
992 Views

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.)

0 Kudos
Reply