search for: startwork

Displaying 5 results from an estimated 5 matches for "startwork".

Did you mean: start_work
2010 Nov 10
2
Parallel code runs slower!
...w(t) tTA = matrix(nrow=nRows,ncol=nCols) require(TTR) system.time( for (i in 1:nCols) { x = t[,i] xROC = ROC(x) tTA[,i]=xROC } ) user system elapsed 123.24 0.07 123.47 # PARALLEL CODE nCols=ncol(t) nRows=nrow(t) tTA = matrix(nrow=nRows,ncol=nCols) require(doSMP) workers <- startWorkers(4) # My computer has 4 cores registerDoSMP(workers) system.time( foreach (i=1:nCols) %dopar%{ x = t[,i] xROC = ROC(x) tTA[,i]=xROC } ) # stop workers stopWorkers(workers) It is taking ages! Thanks, S
2011 Jun 28
1
parallel computing with 'foreach'
...rary(doSMP) library(survival) # Create the simplest test data set test1 <- list(time=c(4,3,1,1,2,2,3), status=c(1,1,1,0,1,1,0), x=c(0,2,1,1,1,0,0), sex=c(0,0,0,0,1,1,1)) # Fit a stratified model coxph(Surv(time, status) ~ x + strata(sex), test1) w <- startWorkers() registerDoSMP(w) foreach(i=1:3) %dopar% { # Fit a stratified model fit<-coxph(Surv(time, status) ~ x + strata(sex), test1) summary(fit)$coef[i] } stopWorkers(w) ####Error message: Error in { : task 1 failed - "could not find function "coxph"" If I call library(survival...
2011 May 27
0
saving multiple arrays from a foreach loop
...save every list entry into a specific arrays "x" and "y"; stop time system.time(for(j in 1:n.run) { z = check(j) x[,, j] <- z$sme y[,, j] <- z$test }) #### trying to do the same with a foreach loop - does not work!! require(doSMP) workers <- startWorkers(2) # My computer has 2 cores registerDoSMP(workers) notcreative = array(NA,dim=c(4,n.vpn,n.l?ufe)) tempList = list(matrix(NA,4,n.vpn),matrix(NA,4,n.vpn)) system.time(notcreative <- foreach(j=1:n.run) %dopar% { tempList=check(j) x[,,j] = tempList$sme y[,,j] = tempList$test...
2006 Jun 01
5
RAD RAILS Problem. Wont start! Linux nubee
...de.ui is invalid at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:141) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:965) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:317) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:256) at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.preFindLocalClass(EclipseLazyStarter.java:86) at org.eclipse.osgi.baseadaptor.loader.ClasspathM...
2011 Apr 19
0
doSMP package works better than perfect, at least sometimes.
...nally get kicked for their closed-source addon to R, but it's clear that their releases of packages like doSMP and foreach are important contributions to the community. ###### Toy test code follows:###### # Toy SMP memory.limit(3000) require(doSMP) require(reshape2) getDoParWorkers() w<- startWorkers(workerCount=3) registerDoSMP(w) timeSMP <- function(g, n) # g = number of groups to process # n = size of each group. { for(rep in 1:3) { times <- NULL dd <- data.frame(k=rep(1:g, n), x=runif(g*n)) ddSplit <- split(dd, dd$k) tt<-system.time({ dd2...