[R-sig-hpc] [zeromq-dev] rzmq package

Michael Spiegel mspiegel at renci.org
Thu Sep 29 17:38:44 CEST 2011

Calling serialize/serialize from c/c++ is not too convoluted. You can find a good example in https://github.com/mspiegel/PiebaldMPI/blob/master/src/lapply_workers_helpers.c, look for the function "generateReturnList". I'm doing both serialization and unserialization in that function, but you'll be able to tease apart the two calls.


PS: This will help. readonly_serialize is defined elsewhere as "findVar(install("serialize"), R_GlobalEnv);".

-----Original Message-----
From: Whit Armstrong [mailto:armstrong.whit at gmail.com] 
Sent: Thursday, September 29, 2011 11:31 AM
To: Michael Spiegel
Cc: Ulrich Staudinger; r-sig-hpc
Subject: Re: [R-sig-hpc] [zeromq-dev] rzmq package


I'd like to be able to call serialize/unserialize from c/c++, but after looking at serialize.c, I'm a little uncomfortable.

So, for now, all my rzmq code just calls lapply(unserialize,ans) on the results.  no biggie I guess.


On Thu, Sep 29, 2011 at 11:02 AM, Michael Spiegel <mspiegel at renci.org> wrote:
> On a related note, I've submitted a patch to the R-devel mailing list that should offer some performance improvements to the serialize/unserialize interface. It reorganizes the code so that vectors are serialized as bulk operations, instead of the current implementation that serializes one element of the vector at a time. I haven't gotten any feedback yet from the R-devel mailing list.
> I'm using the serialize/unserialize strategy for an MPI interface. My next step is to try to implement compression into the serialization protocol.
> --Michael
> -----Original Message-----
> From: r-sig-hpc-bounces at r-project.org 
> [mailto:r-sig-hpc-bounces at r-project.org] On Behalf Of Whit Armstrong
> Sent: Thursday, September 29, 2011 10:56 AM
> To: Ulrich Staudinger
> Cc: r-sig-hpc
> Subject: Re: [R-sig-hpc] [zeromq-dev] rzmq package
> The limits are determined by what can be represented by a call to 'serialize.'

More information about the R-sig-hpc mailing list