[R-sig-hpc] Embarrasingly parallel computation of models

Stefan Lüdtke sluedtke at gfz-potsdam.de
Fri Sep 6 13:55:11 CEST 2013


Hi Michael,

hope I  don't write to much nonsense, but after giving the index "i" to
the the list, it complains about the data object that is not found. what
is true since I do not have a object "selected"


> outputList <- foreach(i = 1:4) %dopar% glmer(formulaList[[i]], family
= binomial, data = selected)
Error in glmer(formulaList[[i]], family = binomial, data = selected) :
  task 1 failed - "object 'selected' not found"

HTH, 


Stefan



On 09/06/2013 01:34 PM, Michael Kubovy wrote:
> Dear HPC people,
> 
> I'm trying to leasrn how to run multiple independent models in parrallel. I have succesfully run parallel computations on different sets of data (using 12 of my 24 cores). But there's something (probably trivial) about the nature of formulae that is escaping me. Here is what I tried.
> 
> I store my formulae:
> 
> formulaList <- vector('list', length = 4)
> formulaList[[1]] <- 'resp ~ BAratio +dispDiff + (BAratio + dispDiff | subject)'
> formulaList[[2]] <- 'resp ~ BAratio * dispDiff + (BAratio * dispDiff | subject)'
> formulaList[[3]] <- 'resp ~ BA3Dratio + dispDiff + (BA3Dratio + dispDiff | subject)'
> formulaList[[4]] <- 'resp ~ BA3Dratio * dispDiff + (BA3Dratio * dispDiff | subject)'
> 
> I get workers:
> 
> require(foreach)
> require(doMC)
> registerDoMC()
> getDoParWorkers()
> 
> I try to run:
> 
> outputList <- foreach(i = 1:4) %dopar% glmer(formulaList, family = binomial, data = selected)
> 
> I get: Error: task 1 failed - "invalid formula"
> 
> FYI
> 
>> sessionInfo()
> R version 3.0.1 Patched (2013-09-02 r63805)
> Platform: x86_64-apple-darwin10.8.0 (64-bit)
> 
> locale:
> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
> 
> attached base packages:
> [1] splines   datasets  utils     stats     graphics  grDevices methods   base     
> 
> other attached packages:
>  [1] lme4_0.999999-2   Matrix_1.0-12     lattice_0.20-23   xtable_1.7-1      gamlss_4.2-6      nlme_3.1-111     
>  [7] gamlss.data_4.2-6 gamlss.dist_4.2-0 plyr_1.8          foreach_1.4.1     sos_1.3-7         brew_1.0-6       
> [13] ggplot2_0.9.3.1   car_2.0-18        nnet_7.3-7        MASS_7.3-29      
> 
> loaded via a namespace (and not attached):
>  [1] codetools_0.2-8    colorspace_1.2-2   compiler_3.0.1     dichromat_2.0-0    digest_0.6.3       grid_3.0.1        
>  [7] gtable_0.1.2       iterators_1.0.6    labeling_0.2       munsell_0.4.2      proto_0.3-10       RColorBrewer_1.0-5
> [13] reshape2_1.2.2     scales_0.2.3       stats4_3.0.1       stringr_0.6.2      survival_2.37-4    tools_3.0.1       
> 
> ______________________________________________
> Professor Michael Kubovy
> University of Virginia
> Department of Psychology
> for mail add:						for FedEx or UPS add: 
> P.O.Box 400400					Gilmer Hall, Room 102
> Charlottesville, VA 22904-4400	485 McCormick Road
> USA							Charlottesville, VA 22903
> 		room	phone
> Office:    B011	+1-434-982-4729
> Lab:        B019	+1-434-982-4751
> WWW:    http://www.people.virginia.edu/~mk9y/
> 
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-hpc mailing list
> R-sig-hpc at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-hpc
> 

-- 
PGP Public Key: http://bit.ly/13d9Sca



More information about the R-sig-hpc mailing list