help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: save/load with pipes


From: Olaf Till
Subject: Re: save/load with pipes
Date: Mon, 3 Mar 2014 11:36:34 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Mar 03, 2014 at 10:00:15AM +0100, Daniel Kraft wrote:
> Hi!
> 
> In one of my codes, I'm using fork to split processing of my data set
> onto multiple processes.  The subprocesses send their results back via
> temporary files and the save/load mechanism for simplicity.  It would be
> much cleaner to use pipes instead.  But since the pipe() function
> returns a pair of file descriptors, I wonder whether one can use
> save/load (or a similar high-level function which serialises the data
> for me) also with file descriptors and not just with file names.  Is
> there a way to do that?

Yes, in the current version of the 'parallel' package there are two
different pairs of functions which do that. Only one variable is
transfered at a time.

fsave/fload have less overhead and are meant for communication within
the local machine. You should probably use these.

__bw_psend__/__bw_prcv__ are not meant for public use. They were
originally intended to be more flexible, and they are usable for
communication between different machines. Currently their interface
might still change.

Olaf

-- 
public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]