[R] possible bug in function 'mclapply' of package parallel

Asis Hallab asis.hallab at gmail.com
Thu Dec 13 02:54:32 CET 2012


Dear parallel users and developers,

I might have encountered a bug in the function 'mclapply' of package
'parallel'. I construct a matrix using the same input data and code with a
single difference: Once I use mclapply and the other time lapply.

Shockingly the result is NOT the same.

To evaluate please unpack the attached archive and execute
Rscript mclapply_test.R

I put the two simple functions I wrote inside the R script and the
serialized input matrix.
My function is once executed using mclapply and the other time lapply
internally. - There's an argument lapply.funk, one can set to mclapply.

The results are checked for identity with a striking FALSE.

Any hints on my misuse and or misunderstanding of mclapply or verification
of a true bug will be much appreciated.

Kind regards!


More information about the R-help mailing list