Dear all, I am using my code the vgram.matrix of packets fields. I have around 500 matrices that I need to pass inside that function and then plot those results. Even though my system has 16 cores is quite clear that I am only using one of those. Would it be able to skip these 500 "tasks" to the 16 cores, with each processor having around 4 matrices to process? What would you suggest me doing? Regards Alex [[alternative HTML version deleted]]
library(parallel) # Requires R >=2.14 mclapply # a parallelized lapply() You can process in parallel, but I'm not sure if it's safe to do graphics in parallel: someone else will need to chime in about that. Best, Michael On Thu, May 10, 2012 at 9:12 AM, Alaios <alaios at yahoo.com> wrote:> Dear all, > I am using my code the vgram.matrix of packets fields. I have around 500 matrices that I need to pass inside that function and then plot those results. > > Even though my system has 16 cores is quite clear that I am only using one of those. > Would it be able to skip these 500 "tasks" to the 16 cores, with each processor having around 4 matrices to process? > > What would you suggest me doing? > > Regards > Alex > > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
One replier worried about doing multiple operations on the graphics device in parallel. To avoid this, try saving the output of your plot function instead of immediately displaying it (if the function allows this). Then display everything when you're all done. Norm Matloff To: Alaios <alaios at yahoo.com> Subject: Re: Split the work for many cores In-Reply-To: <1336655568.56888.YahooMailNeo at web120106.mail.ne1.yahoo.com> References: <1336655568.56888.YahooMailNeo at web120106.mail.ne1.yahoo.com> In gmane.comp.lang.r.general, you wrote:> Dear all, > I am using my code the vgram.matrix of packets fields. I have around 500 matrices that I need to pass inside that function and then plot those results. > > Even though my system has 16 cores is quite clear that I am only using one of those. > Would it be able to skip these 500 "tasks" to the 16 cores, with each processor having around 4 matrices to process? > > What would you suggest me doing? > > Regards > Alex > > [[alternative HTML version deleted]] >