[R-sig-hpc] multicore performance question
Rainer M Krug
R.M.Krug at gmail.com
Mon Jul 9 14:01:37 CEST 2012
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 09/07/12 12:18, Mauricio Zambrano-Bigiarini wrote:
> I apologise. In my previous e-mail I did not write the time spent in each function:
>
> # No multicore nr <- 500 ; X <- matrix(rnorm(1000), ncol=30, nrow=nr) set.seed(100)
> system.time( unlist(lapply(1:nr, FUN=fn1, x=X)) ) # user system elapsed # 0.013 0.000
> 0.013
>
> # multicore nr <- 500 ; X <- matrix(rnorm(1000), ncol=30, nrow=nr) set.seed(100) system.time(
> unlist(mclapply(1:nr, FUN=fn1, x=X, mc.cores=6)) ) # user system elapsed # 0.030 0.380
> 0.125
>
> Running on RHEL6 (64) with 8 cores.
Typical for communication: trying to distribute the job to 8 cores, doing the calculations,
getting the data back, assemble it -> longer then the calculations on one core.
Cheers,
Rainer
>
> Thanks in advance,
>
> Mauricio
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk/6yCEACgkQoYgNqgF2egrrmQCcDcYv1V1PXlO+oxHQ7wUbgait
bOoAn0tWYrIVxikHz3a4Ws2eHtJn2ATB
=4IMK
-----END PGP SIGNATURE-----
More information about the R-sig-hpc
mailing list