[R] parallel computing in r....
jdnewm|| @end|ng |rom dcn@d@v|@@c@@u@
Sun Jun 24 22:03:53 CEST 2018
You cannot send one task to 12 processors... the price of parallelism is that you must break down your task into smaller tasks. Once you have number of tasks equal to our more than the number of available cores then the higher level functions such as parLapply or mclapply can shuffle tasks onto cores. If you have 48 cores and 4 tasks, only 4 of the cores will be used. You probably should stay away from directly calling mcparallel as it is a low level function. Read the vignette about the base "parallel" package . You might also like to use the forEach contributed package to simplify your work, and should look at the CRAN High Performance Computing Task View .
 vignette("parallel") or http://stat.ethz.ch/R-manual/R-devel/library/parallel/doc/parallel.pdf
On June 22, 2018 3:12:28 AM PDT, akshay kulkarni <akshay_e4 using hotmail.com> wrote:
> I am taking recourse to parallel computing to speed up my R code.
>The mcparallel function(in parallel package),presumably, sends a single
>task (an R function, to be precise) to a single core. Is this right? Is
>that one and only one core? What if there are other cores lying idle?
>As far as I am concerned, I am going to rent an AWS EC2 server with 48
>cores. I have four functions to be parallelized. Can I send the thread
>of one function to 12 cores, so that all 48 cores are utilized? If so,
>how do I do that with mcparallel function in the parallel package?
>Very many thanks for your time and effort...
>AKSHAY M KULKARNI
> [[alternative HTML version deleted]]
>R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.
Sent from my phone. Please excuse my brevity.
More information about the R-help