search for: registerdomc

Displaying 20 results from an estimated 23 matches for "registerdomc".

2011 Feb 11
1
foreach with registerDoMC on R 2.12.0 OSX 10.6 --- errors and warnings
some hints for the search engines. I just did install.packages("foreach") install.packages("doMC") library(doMC) registerDoMC() library(foreach) > foreach(i = 1:3) %dopar% sqrt(i) 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. The process has forke...
2010 Sep 16
2
parallel computation with plyr 1.2.1
...tching my CPUs I see that in both cases only a single core is used, and they take about the same amount of time. Is there a limitation with how ddply() dispatches parallel jobs, or is this task not suitable for parallel computing? Cheers, Dylan Here is an example: library(plyr) library(doMC) registerDoMC(cores=2) # example data d <- data.frame(y=rnorm(1000), id=rep(letters[1:4], each=500)) # function that wastes some time f <- function(x) { m <- vector(length=10000) for(i in 1:10000) { m[i] <- mean(sample(x$y, 100)) } mean(m) } system.time(ddply(d, .(id), .fun=f, .parallel=FALSE))...
2012 Feb 18
3
foreach %do% and %dopar%
...s are not getting into the Valuation.R script then #A = MCPVMPA = 0 and B = MCMKMPA = 0 So VarX = NaN Then it does something like: if (VarZ>VarX) VarY = 0 else VarY = VarX-VarZ #This line generates the error I have all the libraries installed: library(foreach) library(doMC) registerDoMC() It's not the installation because all the example code with %dopar% I've tested work fine. So can you help me please to make my code work? Any ideas? -- L.E. Marcos Larios Sata Rosa [[alternative HTML version deleted]]
2011 Jul 02
5
%dopar% parallel processing experiment
...+x^3+i/A+randvalues[i] } ?## an arbitrary function ARGV <- commandArgs(trailingOnly=TRUE) if (ARGV[1] == "do-onecore") { ?library(foreach) ?discard <- foreach(i = 1:A) %do% uniroot( minfn, c(1e-20,9e20), i ) } else if (ARGV[1] == "do-multicore") { ?library(doMC) ?registerDoMC() ?cat("You have", getDoParWorkers(), "cores\n") ?discard <- foreach(i = 1:A) %dopar% uniroot( minfn, c(1e-20,9e20), i ) } else if (ARGV[1] == "plain") ?for (i in 1:A) discard <- uniroot( minfn, c(1e-20,9e20), i ) else cat("sorry, but argument", A...
2012 Feb 20
1
bigmemory not really parallel
Hi, all, I have a really big matrix that I want to run k-means on. I tried: >data <- read.big.memory('mydata.csv',type='double',backingfile='mydata.bin',descriptorfile='mydata.desc') I'm using doMC to register multicore. >library(doMC) >registerDoMC(cores=8) >ans<-bigkmeans(data,k) In system monitor, it seems only one thread running R. Is there anything I did wrong? Thanks in advance for any suggestions. Best, Lishu [[alternative HTML version deleted]]
2015 Feb 09
2
R CMD check: Uses the superseded package: ‘doSNOW’
...method="bootstrap", parallel=TRUE) > \dontrun{ci(roc2, method="bootstrap", parallel=TRUE)} > \dontshow{ci(roc2, method="bootstrap", parallel=TRUE, boot.n=20)} > stopCluster(cl) > } > #endif > #ifdef unix > if (require(doMC)) { > registerDoMC(2) > \dontrun{ci(roc2, method="bootstrap", parallel=TRUE)} > \dontshow{ci(roc2, method="bootstrap", parallel=TRUE, boot.n=20)} > } > #endif The "superseded" part is more confusing to me, though. The doSNOW package seems to be still available on CRA...
2011 Oct 17
2
Foreach (doMC)
Hello, I am trying to run a small example with foreach, but I am having some problems. Here is the code: *library(doMC) registerDoMC() zappa = list() frank = list() foreach (i = 1:4) %dopar% { zappa[[i]] = kmeans (iris[-5],4) frank[[i]] = warnings() }* The code runs without error. However the zappa and frank will be empty lists. If I use regular *for *instead, the list will be filled up with kmeans and warnings results. How...
2011 Jul 04
1
writeLines + foreach/doMC
...'m processing sequencing data trying to collapsing the locations of each unique sequence and write the results to a file (as storing that in a table will require 10GB mem at least) so I wrote a function that, given a sequence id, provide the needed line to be stored library(doMC) # load library registerDoMC(12) # assign the Number of CPU fileConn<-file(paste(fq_file,"_SeqID.txt",sep=""),open = "at") # open connection writeLines(paste("ReadID","Freq","Seq","LOC_UG","Nb_UG_Seq",sep="\t"), fileConn) # write hea...
2015 Feb 10
1
R CMD check: Uses the superseded package: ‘doSNOW’
...dontrun{ci(roc2, method="bootstrap", parallel=TRUE)} >>> \dontshow{ci(roc2, method="bootstrap", parallel=TRUE, boot.n=20)} >>> stopCluster(cl) >>> } >>> #endif >>> #ifdef unix >>> if (require(doMC)) { >>> registerDoMC(2) >>> \dontrun{ci(roc2, method="bootstrap", parallel=TRUE)} >>> \dontshow{ci(roc2, method="bootstrap", parallel=TRUE, boot.n=20)} >>> } >>> #endif >> The "superseded" part is more confusing to me, though. The doSNOW &g...
2012 Jan 19
1
converting a for loop into a foreach loop
...tion. I have a very large dataset and so I'm hoping to make use of a parallel backend to speed up the processing time. I'm having trouble getting selecting three variables in the dataset to use in the foreach() loops. My for() loop code is: library(foreach) library(multicore) library(doMC) registerDoMC() > str(data) 'data.frame': 958 obs. of 13 variables: $ Date.Time: Factor w/ 260 levels "03/07/09 00:00",..: 1 2 2 2 3 3 3 3 3 3 ... $ ID : int 3 1 3 7 1 3 7 8 10 12 ... $ X : num 151 151 151 151 151 ... $ Y : num -33.9 -33.9 -33.9 -33.9 -33.9 ......
2012 May 30
1
caret() train based on cross validation - split dataset to keep sites together?
...?????22.3 90342??? 1980-07-14????????? 19.3??????????28.4 EXAMPLE SCRIPT FOR MODEL FITTING fitControl <- trainControl(method = "repeatedcv", number=10, repeats=3) tuning <- read.table("temptunegrid.txt",head=T,sep=",") tuning # # Model with 100 iterations registerDoMC(4) tempmod100its <- train(watmntemp~tempa + tempb + tempc + tempd + tempe + netarea + netbuffor + strmslope + netsoilprm + netslope + gwndx + mnaspect + urb + ag + forest + buffor + tempa7day + tempb7day + tempc7day + tempd7day + tempe7day + tempa30day + tempb30day + tempc30day + tempd30day...
2015 Feb 10
0
R CMD check: Uses the superseded package: ‘doSNOW’
...TRUE) > > \dontrun{ci(roc2, method="bootstrap", parallel=TRUE)} > > \dontshow{ci(roc2, method="bootstrap", parallel=TRUE, boot.n=20)} > > stopCluster(cl) > > } > > #endif > > #ifdef unix > > if (require(doMC)) { > > registerDoMC(2) > > \dontrun{ci(roc2, method="bootstrap", parallel=TRUE)} > > \dontshow{ci(roc2, method="bootstrap", parallel=TRUE, boot.n=20)} > > } > > #endif > > The "superseded" part is more confusing to me, though. The doSNOW > package...
2012 Jan 12
1
parallel computation in plyr 1.7
Dear all, I have a question regarding the possibility of parallel computation in plyr version 1.7. The help files of the following functions mention the argument '.parallel': ddply, aaply, llply, daply, adply, dlply, alply, ldply, laply However, the help files of the following functions do not mention this argument: ?d_ply, ?aply, ?lply Is it because parallel computation is not
2012 Feb 02
0
bigkmeans not parallel
I'm using bigkmeans in 'biganalytics' to cluster my 60,000 by 600,000 matrix. I'm using a 8 core Linux VM. I have register parallel backend with >registerDoMC() And I checked how many cores registered with >getDoParWorkers() It returns 8, which is the number of cores I have on my machine. And I run the test below, whose results shows improved speed due to parallel. check <-function(n) { + for(i in 1:1000) + { + sme <- matrix(rnorm(100), 10,10...
2012 Jul 24
1
untaring files in parallel with foreach and doSNOW?
Hello, I'm running some code that requires untaring many files in the first step. This takes a lot of time and I'd like to do this in parallel, if possible. If it's the disk reading speed that is the bottleneck I guess I should not expect an improvement, but perhaps it's the processor. So I want to try this out. I'm working on windows 7 with R 2.15.1 and the latest foreach
2013 Feb 01
0
R code parallelized using plyr and doMC: error message: Error in do.ply(i) : task 1 failed - “could not find function ”getClass“”
...32 cores. I'm using doMC instead of snow, because the guy at the supercomputer is in the process of getting Rmpi running. For now, 32 cores should be (more than) adequate for me. My script is of the sort: |define a bunch of functions load the data call libraries require(doMC) require(plyr) registerDoMC(32) main.function <- function(data){ *thefunction* } results= llply(1:500, function(idx){out<-main.function(data)},.parallel=TRUE) save(results,file="trestles_results")| This runs fine on my own machine (setting it to run only a few times and registering only a co...
2010 Sep 10
0
plyr: version 1.2
...in a .parallel argument that when TRUE, applies functions in parallel using a parallel backend registered with the foreach package: x <- seq_len(20) wait <- function(i) Sys.sleep(0.1) system.time(llply(x, wait)) # user system elapsed # 0.007 0.005 2.005 library(doMC) registerDoMC(2) system.time(llply(x, wait, .parallel = TRUE)) # user system elapsed # 0.020 0.011 1.038 This work has been generously supported by BD (Becton Dickinson). MINOR CHANGES * a*ply and m*ply gain an .expand argument that controls whether data frames produce a single output dimensio...
2010 Sep 10
0
plyr: version 1.2
...in a .parallel argument that when TRUE, applies functions in parallel using a parallel backend registered with the foreach package: x <- seq_len(20) wait <- function(i) Sys.sleep(0.1) system.time(llply(x, wait)) # user system elapsed # 0.007 0.005 2.005 library(doMC) registerDoMC(2) system.time(llply(x, wait, .parallel = TRUE)) # user system elapsed # 0.020 0.011 1.038 This work has been generously supported by BD (Becton Dickinson). MINOR CHANGES * a*ply and m*ply gain an .expand argument that controls whether data frames produce a single output dimensio...
2012 Feb 23
1
segfault when using data.table package in conjunction with foreach
...cat("Processing chunk", chunk, "... ") idd <- as.matrix(subset(ss,select=1:2)) newvec <- as.vector(as.matrix(subset(ss,select=3))) ans[idd] <- ans[idd] + newvec cat("OK\n") } ans } require(foreach) require(doMC) registerDoMC(cores=2) num <- 8891 nr <- 500000000L #500 million rows at a time MMM <- foreach(IT = 1:2) %dopar% { require(data.table) if (IT==1){ x <- system.time({computeAllPairSums( paste(GERMLINE,"bc.chr22.q.20.file",sep=''),num,nr)}) } #Run it on regular file PID 6...
2012 Sep 02
0
most efficient plyr solution
...lue }, mc.cores=4) ans3 <- matrix(unlist(res3),ncol=4) } s3 <- sol3() ### solution 4 using plyr::maply # difficulty finding equivalent code # benefit could be: no input transform, no output transform, parallelization, and progress update library(plyr) library(abind) library(doMC) registerDoMC(cores=4) sol4 <- function() { ans4 <- maply( #.data = abind(i=Ax,j=Ay,k=Bx,l=By,along=0), #.data = abind(Ax,Ay,Bx,By,along=3), #.data = data.frame(i=Ax, j=Ay, k=Bx, l=By), #.data = cbind(i=as.vector(Ax), j=as.vector(Ay), k=as.vector(Bx), l=as.vector(By)), #.data = list(i=Ax,...