[R] multicore mclapply error

Jarrett Byrnes byrnes at msi.ucsb.edu
Thu Aug 12 19:36:45 CEST 2010


I'm running r 2. on a mac running 10.6.4 and a dual-core macbook pro.  I'm having a funny time with multicore.  When I run it with 2 cores, mclapply, R borks with the following error.

The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.


If, however, I crank the # of cores back to 1, it runs just fine.

The code looks as follows:


mmi_fits<-mclapply(responses, function(a_response){
			gmult<-glmulti(glm(make_formula(a_response, sp), data=df, family=binomial))
			return(gmult)
			}, 
		mc.cores=2)


-Jarrett


More information about the R-help mailing list