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

Whit Armstrong armstrong.whit at gmail.com
Thu Sep 29 17:52:37 CEST 2011


Wow!

Props for putting all that together.  I'm just not sure I want to do
the work for a call to eval.

Isn't that what the parser does when you call it from R?

I'm sure you have reasons for doing it that way in your code, I'm just
not sure it's worth the effort in this case.

I would be much happier if R would make it part of the exported api so
you don't have to jump through all those hoops to call it.

-Whit


On Thu, Sep 29, 2011 at 11:38 AM, Michael Spiegel <mspiegel at renci.org> wrote:
> 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.
>
> --Michael
>
> 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
>
> +1
>
> 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.
>
> -Whit
>
>
>
> 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