Darren,

I did create the R instance in main(), and pass the reference to another
function. I do have 1000 CPUs calling that function, but as they don't
create new R reference, how come there are so many warning messages?

After reading your message in another thread of yours, I realize that the
troublesome part might be that the R reference is passed to a function that
many other CPUs call. what should I do to fix it? if I let each cpu creates
its own instance of R, will that end up with more warning messages?


On Sat, Feb 11, 2012 at 8:34 PM, Darren Cook <[email protected]> wrote:

> > I am calling a R function through Rcpp and RInside in my c++ program
> > in Linux. There are a lot of warning messages saying "no graphics
> > system to unregister" ...Is there anyone who knows the reason and how
> > to avoid the printing of such warning messages?
>
> Generally, once you track down the line causing the problem,
> suppressWarnings() (an R function) might help. Or
> suppressPackageStartupMessages() or suppressMessages() may help.
>
> For the cause, are you running on a machine with no GUI or X server?
>
> However, a google suggests this is a message related to shutting down R,
> and implies your script has corrupted something. There appears to be no
> fix as they, like Dirk, insisted on a reproducible example.
>
> I'm wondering why you would be starting up and shutting down R so many
> times in your script. Do you create one RInside instance, either as a
> global, or in main() and then pass it around by reference? Or are you
> create RInside instances inside other functions, or inside loop bodies?
> If the latter, can you refactor to do the former so you only have one
> instance?
>
> HTH,
> Darren
>
>
> --
> Darren Cook, Software Researcher/Developer
>
> http://dcook.org/work/ (About me and my work)
> http://dcook.org/blogs.html (My blogs and articles)
> _______________________________________________
> Rcpp-devel mailing list
> [email protected]
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>



-- 
Haiying Pang
_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to