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

Named pipes in FORTRAN and .NET

mamey4
Beginner
1,572 Views
Hi there,

I'm trying to implement interprocess communication of individual programs by using named pipes. I have not worked with this before, but it seems to me that doing that under Windows is something that is not being done often, since I could not find much documentation and explanations about this topic.
My question is: how do the OPEN,WRITE and READ commands look like for named pipes? How can I ensure, under Windows, that both of the programs work with the same piece of memory?
Another interesting question is if .NET applications that use pipes created by the piping mechanism implemented into the .NET framework (NamedPipeClientStream, NamedPipeServerStream, ...) can communicate with FORTRAN programs via these pipes; that means if it is possible that the ".NET pipes" (with whatever technique lies underneath the .NET surface) can communcate with the "FORTRAN pipes".

Thanks in advance for your thoughts on this!
0 Kudos
6 Replies
jeremy_h
New Contributor I
1,572 Views
We do a lot of pipe stuff, but it is all in C and called from Fortran. This actually has survived quite well since the first Windows port 15 years ago. I hesitate to describe it as ".NET pipes", perhaps this is the same as Windows pipes.
0 Kudos
mamey4
Beginner
1,572 Views
The ".NET pipes" I was referring to are included in the .NET framework since v3.5 ( see f.e. http://www.codeproject.com/KB/threads/dotnetnamedpipespart1.aspx).
So can you give me a hint on how I should proceed in using pipes in Fortran, meaning if there are any callable libraries for that (as you mentioned maybe in C), and if so how to get and use them?
0 Kudos
jeremy_h
New Contributor I
1,572 Views
On re-reading your post, I see you are looking to interop Fortran pipes with .NET pipes. Perhaps you inherited some apps and feel that the easiest point of integration is at the pipe level. I don't have any data on that. I do know that Fortran works OK calling Windows system calls that manage pipes, and I don't think it matters what language is on the other end so long as it is Windows pipes. I doubt that Fortran, Windows and .NET pipes interoperate, though.
0 Kudos
mamey4
Beginner
1,572 Views
Disregarding the ".NET pipes", I'd also be interested in how Fortran uses Windows system calls that manage pipes - meaning what libraries to I have to use for that, and if there are example codes or manuals that describe how to do this. Do you know where I can find something like this?
0 Kudos
anthonyrichards
New Contributor III
1,572 Views
If you do a search for "pipes" on these threads, you will find the subject has many (~105) relevant posts, some of which which may be of assistance to you.

e.g. http://software.intel.com/en-us/forums/showthread.php?t=61838&o=a&s=lr
0 Kudos
joerg_kuthe
Novice
1,572 Views
0 Kudos
Reply