Skip to content

multicore/mcparallel error

5 messages · R. Michael Weylandt, Wyatt McMahon

#
I don't know the multicore package, but if possible, it might be
easier to upgrade to 2.15 and use the new built-in parallel package
that was introduced in R 2.14.

Then your syntax would be something like

mclapply(files, illumqc)

Michael
On Tue, Apr 10, 2012 at 11:33 AM, Wyatt McMahon <wmcmahon at vbi.vt.edu> wrote:
1 day later
#
Michael,

Thanks for your help!

I may not be understanding you. I've upgraded to 2.15.  From your text
below, I thought the parallel package was included with R 2.15, but I
cannot find an mclapply function there.  One exists through the multicore
package, which I've now installed.  I also went looking for a "parallel"
package, but was unable to find one.

Is there an mclapply included in 2.15?  Is there a parallel package I'm
missing?  Or am I completely misunderstanding your response?

Thanks!

Wyatt

-----Original Message-----
From: R. Michael Weylandt [mailto:michael.weylandt at gmail.com]
Sent: Tuesday, April 10, 2012 12:07 PM
To: Wyatt McMahon
Cc: R-help at r-project.org
Subject: Re: [R] multicore/mcparallel error

I don't know the multicore package, but if possible, it might be easier to
upgrade to 2.15 and use the new built-in parallel package that was
introduced in R 2.14.

Then your syntax would be something like

mclapply(files, illumqc)

Michael

On Tue, Apr 10, 2012 at 11:33 AM, Wyatt McMahon <wmcmahon at vbi.vt.edu>
wrote:
#
Parallel is one of those packages (like tools or grid) that is not
loaded by default, but comes with the standard installation.

Running library(parallel) will make mclapply() available. Then (at
least for me) it's easy to parallelize some code:

system.time(lapply(1:50000, function(x) max(rnorm(500)))) # ~ 8 seconds

system.time(mclapply(1:50000, function(x) max(rnorm(500)))) # ~ 4.4
seconds [I have two processors]

Michael
On Wed, Apr 11, 2012 at 12:34 PM, Wyatt McMahon <wmcmahon at vbi.vt.edu> wrote:
#
Thanks a ton, Michael!  Everything is running much faster now!!

Wyatt

-----Original Message-----
From: R. Michael Weylandt [mailto:michael.weylandt at gmail.com]
Sent: Wednesday, April 11, 2012 1:41 PM
To: Wyatt McMahon
Cc: R-help at r-project.org
Subject: Re: [R] multicore/mcparallel error

Parallel is one of those packages (like tools or grid) that is not loaded
by default, but comes with the standard installation.

Running library(parallel) will make mclapply() available. Then (at least
for me) it's easy to parallelize some code:

system.time(lapply(1:50000, function(x) max(rnorm(500)))) # ~ 8 seconds

system.time(mclapply(1:50000, function(x) max(rnorm(500)))) # ~ 4.4
seconds [I have two processors]

Michael

On Wed, Apr 11, 2012 at 12:34 PM, Wyatt McMahon <wmcmahon at vbi.vt.edu>
wrote:
"parallel"
"files".