PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

named pipes

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
AdrianPopescu



Joined: 06 Mar 2005
Posts: 1

PostPosted: Sun Mar 06, 2005 9:41 am    Post subject: named pipes Reply with quote

I'm using PGI Fortran Compiler 5.0-2 on a RedHat Linux 2.4.21. I am trying to transfer data between 2 executables using named pipes. The named pipe was created from Linux using mkfifo. The executables are opening the file (the named pipe) and one application write data, and the other is reading. It seems that the named pipes are buffered, i.e. the data transfer is performed only after the first application is closed. I would like to know how the data transfer can be performed instantaneous, i.e. after each write statement.

If necessary, I can provide the 2 simple applications, the data sender, and the data receiver.

Any suggestions/comments are welcome.
Thank you very much for your help.
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6208
Location: The Portland Group Inc.

PostPosted: Mon Mar 07, 2005 10:05 am    Post subject: Reply with quote

Try calling 'fflush' after a write. This tells the OS to flush the buffer. Note that doing this after every write might cause a slow down so I'd recommend using only as many calls as absolutely needed.

- Mat
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group