Skip to content
Back to formatted view

Raw Message

Message-ID: <CAN6RZdRr9CArbtWXeVs4Qm0M+TQk48xffTm7rWuM9Dz8S+ZoTw@mail.gmail.com>
Date: 2013-01-19T21:29:56Z
From: Nicholas Pezolano
Subject: [Rcpp-devel] RInside and MPI master slave model proper usage

Hi I'm using Rinside with MPI and testing out a simple master slave model.

heres a basic example of what i'm trying to do.
http://www.lam-mpi.org/tutorials/one-step/ezstart.php

The function  *do_work(unit_of_work_t work){ ..... *  gets run across all
the  N nodes until the M units of work are done.
    I am calling many R functions from C++, as well as loading R libraries,
 in the do_work function.

Is there a way to load R once on each of the slaves and have the do_work
function have access to RInside for every iteration of the master-slave
model?

Do I have to run           *RInside R(argc, argv);      *for every-time the
function do_work is called by the master?

Is there a way to free the R instance or is this handled automatically? or
is there a better approach?


Best,
-- 
Nicholas Pezolano
Department of Applied Math & Statistics
State University of New York at Stony Brook
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20130119/737d619a/attachment.html>