domc

How to use doMC under Windows or alternative parallel processing implementation for glmnet?

不打扰是莪最后的温柔 提交于 2019-12-07 01:34:20
问题 I am on Win7 OS with R 3.3.1 in Rstudio. Intention is to use glmnet with parallel processing. From the ?glmnet help: parallel : If TRUE , use parallel foreach to fit each fold. Must register parallel before hand, such as doMC or others. See the example below. From the referenced example: # Parallel require(doMC) registerDoMC(cores=4) install.packages('doMC') returns package is not available. Manually checking CRAN gives downloadable UNIX code but Windows binaries are not available. Can I

tryCatch with a complicated function and plyr in R

时光毁灭记忆、已成空白 提交于 2019-12-06 11:11:24
I've got a complicated, long function that I'm using to do simulations. It can generate errors, mostly having to do with random vectors ending up with equal values with zero-variance, getting fed either into PCA's or logistic regressions. I'm executing it on a cluster using doMC and plyr . I don't want to tryCatch every little thing inside of the function, because the possibilities for errors are many and the probabilities of each of them are small. How do I tryCatch each run, rather than tryCatch ing every little line?? The code is something like this: iteration = function(){ a really long

Allow foreach workers to register and distribute sub-tasks to other workers

雨燕双飞 提交于 2019-12-04 07:48:20
I have an R code that involves several foreach workers to perform some tasks in parallel. I am using foreach and doMC for this purpose. I want to let each of the foreach workers recruits some new workers and distribute some parts of their code, which is parallelizable, to them. The current code looks like: require(doMC) require(foreach) registerDoMC(cores = 8) foreach (i = (1:8)) %dopar% { <<some code here>> for (j in c(1:4)) { <<some other code here>> } } I am looking for an ideal code that would look like: require(doMC) require(foreach) registerDoMC(cores = 8) foreach (i = (1:8)) %dopar% { <

package doMC NOT available for R version 3.0.0 warning in install.packages

纵饮孤独 提交于 2019-11-30 09:06:14
For some packages like doMC & doSMP, i get the warning & inability to library(doMC). As shown below, i have no problem with subselect thus no file/directory permission issue. Also tried repo= http://cran.us.r-project.org & others, no luck. please advise. ps: for the unexpected Japanese characters, i have no clue; i assume that is a separable issue; no response yet from support.rstudio.org/help/discussions/problems/6009-japanese-characters-show-unexpectedly > install.packages('doMC') Warning in install.packages : package 租oMC・is not available (for R version 3.0.0) Installing package into 舛:

How to kill a doMC worker when it's done?

白昼怎懂夜的黑 提交于 2019-11-29 15:13:10
问题 The documentation for doMC seems very sparse, listing only doMC-package and registerDoMC(). The problem I'm encountering is I'll spawn several workers via doMC/foreach, but then when the job is done they just sit there taking up memory. I can go and hunt their process IDs, but I often kill the master process by accident. library(doMC) library(foreach) registerDoMC(32) foreach(i=1:32) %dopar% foo() ##kill command here? I've tried following with registerDoSEQ() but it doesn't seem to kill off

the difference between doMC and doParallel in R

戏子无情 提交于 2019-11-28 16:39:16
What's the difference between doParallel and doMC in R concerning foreach function? doParallel supports windows, unix-like, while doMC supports unix-like only. In other words, why doParallel cannot replace doMC directly? Thank you. Update: doParallel is built on parallel , which is essentially a merger of multicore and snow and automatically uses the appropriate tool for your system. As a result, we can use doParallel to support multi systems. In other words, we can use doParallel to replace doMC . ref: http://michaeljkoontz.weebly.com/uploads/1/9/9/4/19940979/parallel.pdf BTW, what is the