[Rcpp-devel] how to get rid of the warning message: no graphics system to unregister

Haiying Pang haiyingwithu at gmail.com
Mon Feb 13 20:38:25 CET 2012


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 <darren at dcook.org> 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
> Rcpp-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>



-- 
Haiying Pang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20120213/c180a0e3/attachment.html>


More information about the Rcpp-devel mailing list