search for: sfinit

Displaying 20 results from an estimated 25 matches for "sfinit".

2008 Dec 06
1
snowfall sfInit error
Dear all, I am trying to execute the simple example in snowfall http://cran.r-project.org/web/packages/snowfall/vignettes/snowfall.pdf ... require(snow) require(snowfall) sfInit( parallel=TRUE, cpus=2 ) sfLapply( 1:10, exp ) sfStop() I have installed the snow and snowfall packages in R on a machine with windows xp, however, after running the "sfInit( parallel=TRUE, cpus=2 )" line I get an error ... Error in system("whoami", intern = TRUE, ignore.stder...
2008 Sep 27
1
Problem with R on dual core under Linux - can not execute mpi.spawn.Rslaves()
Hi I am trying to utilize my dual core processor (and later a High-performance clusters (HPC) ) by using the Rmpi, snow, snowfall, ... packages, but I am struggling at the beginning, i.e. to initialise the "cluster" on my dual core computer. Whenever I try to initialize it (via sfInit(parallel=TRUE, cpus=2) or mpi.spawn.Rslaves(nslaves=2) ), I get an error message: > sfInit(parallel=TRUE, cpus=2) Forced parallel. Using session: XXXXXXXXR_rkrug_143706_092708 Error in mpi.comm.spawn(slave = mpitask, slavearg = args, nslaves = count, : MPI_Comm_spawn is not supported. Error...
2011 Sep 24
1
Can't reliably use RefClass methods in Snowfall
...ary("methods") # set up a simple reference class calculator <- setRefClass("calculator") calculator$methods(do_calc = function(x) {print(x*x)}) my_calc <- calculator$new() wrapper <- function(x) {my_calc$do_calc(x)} # STANZA 2: use snowfall without wrapper -- WORKING #sfInit(parallel=TRUE, cpus=2, type="SOCK") #sfExport("calculator") #sfExport("my_calc") #results <- sfLapply(1:10,my_calc$do_calc) #sfStop() #print(results) # STANZA 3: use snowfall with wrapper -- NOT WORKING # (not working by itself, but does work if the previous stanza...
2009 Mar 24
0
no snowfall on debian after lenny upgrade
...k. Package snowfall used to run just great under debian etch (amd-64, 2x quad-core). After upgrading to lenny (debian 5, reinstalled from scratch), I haven't been able to get snowfall running again. Password-less ssh works fine to localhost, its IP, or zero- config name. But when calling sfInit I invariably get this error message below. What puzzles me is that "ssh localhost" works without a hitch but the socket connection fails. Any suggestions would be greatly appreciated. Best, Martin Error in socketConnection(port = port, server = TRUE, blocking = TRUE, : cann...
2011 Jan 12
1
snowfall
...16 17 18 19 20 0.02380952 0.01984127 0.07936508 0.02380952 0.01984127 0.01190476 0.02777778 0.02380952 0.01984127 0.01190476 0.02380952 0.01984127 0.02380952 0.02380952 0.01984127 0.02380952 0.01984127 0.02380952 0.02380952 0.02777778 library(snowfall) 2) > sfInit() snowfall 1.84 initialized: sequential execution, one CPU. > sfApply(dNiftyOpt,1,getTimeToMaturity) #Works 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18...
2012 Jun 28
1
undefined S4 class in parallel computing at snowfall
Dear All, I have a question of how to export S4 class specification to clusters/workers in parallel computing. The package I used is snowfall. The problem is reproducible as follows. Any hint is greatly appreciated. Edwin Sun === begin =========== library(snowfall) sfInit(parallel = TRUE, cpus = 2) setClass("catt", representation(aa = "numeric")) setClass("dogg", representation(bb = 'character', cc = "catt")) f1 <- function(y1) { new('catt', aa = y1 + 1) } f3 <- function(y2, y3) { new('dogg', bb=c...
2009 Sep 22
0
snowfall: missing MPI node
Hello, I don't know if the question pertains to Rmpi, snow or snowfall. I run my job by: mpirun -np N -hostfile $PBS_NODEFILE RMPISNOW -f my-script.r --slave In the snowfall sfInit call I have to specify one less CPU respect to the mpirun call sfInit(parallel=TRUE, cpus=N-1, type="MPI") otherwise I receive an error similar to: "cluster size N-1 already running" (sorry I don't remember the exact message) Is this normal? In this case, if I want...
2011 Apr 08
2
Snow/Snowfall hangs on windows 7
Dear users, I want to set up R to use one R-script directory and one R-library (directory for packages) for many end-users. I try to do this by using one network-share. This works fine as long as we don't use the snowfall package with parallel=TRUE (sfInit(parallel=TRUE, cpus=4, type="SOCK")). When running R with default settings (local library and local script directory) then snowfall works great. When I tried to understand the problem I tested local library and local script directory and started the R program through a shortcut b...
2012 Apr 05
1
is parallel computing possible for 'rollapplyr' job?
...some windows version packages (parallel, snow, snowfall,..) but could not solve my specific problem. As far as I understood, either I have to write a new function like sfRollapplyr or I have to change my code in a way that it utilizes lapply, or sapply instead of 'rollapplyr' first then use sfInit, sfExport, and sfLapply,.. for parallel computing. I could not perform either so please help me :)   ## nc<-313 rs<-500000 ema<-10 h<-4 gomin1sd<-function (x,rho) { getOutliers(as.vector(x),rho=c(1,1))$limit[1] } dim(dt_l1_inp) [1] 500000 312 dt_l1_min1<-matrix(nrow=rs, ncol=nc-1-...
2008 Jul 16
1
Problems with snowfall
Guys, Is anyone using snowfall? It seems that the last version is broken. sfinit contains test code: data("config", package = "snowfall") configM <- as.matrix(t(config)) config <- as.list(configM) names(config) <- dimnames(configM)[[2]] .sfOption$SERVER <<- as.character(config[["SERVER"]]) .sfOption$PORT <...
2009 Dec 15
0
snowfall on Win7
...fall package work under Windows 7? Recently I upgraded from Windows Vista to Windows 7, and at the same time upgraded R from 2.8.1 to 2.10. On my machine (Intel i7 based) snowfall worked perfectly on my previous installation, but after the upgrade the same scripts do not work. When I issue e.g. sfInit(parallel=T, cpus=2) # (or 'cpus=7', which I often used before as the processor has 8 cores) R appears to be working, but uses no processor power. It stays like that (have waited many minutes) until I interrupt by hitting the Esc-key. After that it has not initiated parallel computing. Is...
2009 Dec 15
1
[Fwd: snowfall on Win7]
...t; Recently I upgraded from Windows Vista to Windows 7, and at the same > time upgraded R from 2.8.1 to 2.10. On my machine (Intel i7 based) > snowfall worked perfectly on my previous installation, but after the > upgrade the same scripts do not work. > > When I issue e.g. > > sfInit(parallel=T, cpus=2) # (or 'cpus=7', which I often used before > as the processor has 8 cores) > > R appears to be working, but uses no processor power. It stays like > that (have waited many minutes) until I interrupt by hitting the > Esc-key. After that it has not initiated...
2009 Sep 22
0
snowfall: sfExport apparently harmless error
...ne 40: 23906 Terminated R --no-save $* /users/mvalle/snow/snow/inst/RMPISNOW: line 40: 22094 Terminated R --no-save $* --- script ------------------------------------ library('Rmpi', verbose=FALSE) library('snowfall', verbose=FALSE) # Initialize cluster sfInit(parallel=TRUE, cpus=3, type="MPI") for(i in 1:2) { # Prepare fake data n <- 46000 x <- runif(n, 0.02, 0.54) logx <- log(x) sfExport("logx") # Compute fake function computeTakens <- function(r0idx) { if(r0idx == 1) return(NA)...
2009 Sep 22
0
(correction) snowfall+Rmpi: sfExport error
...no-save $* /users/mvalle/snow/snow/inst/RMPISNOW: line 40: 23906 Terminated R --no-save $* /users/mvalle/snow/snow/inst/RMPISNOW: line 40: 22094 Terminated R --no-save $* --- script ------------------------------------ library('Rmpi') library('snowfall') sfInit(parallel=TRUE, cpus=3, type="MPI") for(i in 1:9) { n <- 20000 logx <- runif(n, 0.02, 0.54) sfExport("logx") } sfStop() -- Ing. Mario Valle Data Analysis and Visualization Group | http://www.cscs.ch/~mvalle Swiss National Supercomputing Centre (...
2010 Jun 24
0
Snowfall: "cannont open connection " problem
...a connection. I am not sure what it means as I am not a network person. Any advice will be very welcome. Many thanks in advance. See output and the error message below. Best wishes, Edmond ************** OUTPUT AND ERROR MESSAGE ******************* > # initialize Snowfall parameters > sfInit(parallel=TRUE, cpus=2, type="SOCK") snowfall 1.84 initialized (using snow 0.3-3): parallel execution on 2 CPUs. > # perform parallel calculations > rr <- list() > date() [1] "Thu Jun 24 09:17:56 2010" > el.time <- system.time( + + for (i in 1:(n.sims/every...
2010 Oct 11
0
OT: snow socket clusters with VirtualBox and VMware player (Linux host, Win guest)
...system (I've tried in two different Linux systems, an AMD x86-64 workstation and an Intel i686 laptop). However, almost always seting up the cluster fails: either R will hang forever or I will get messages such as "in socketConnect [...] port 10187 cannot be opened" "Error in sfInit [...] Starting of snow cluster failed! Error in sockectConnection " In fact, a command such as socketConnection(port = 10187, server = TRUE) hangs forever. This happens with R-2.11.1 and the current R-devel. For both VirtualBox and VMware Player I am running the latest available versions....
2014 Jan 28
0
Help for how to use "snowfall" package
...set.seed(2014) library(snowfall) ############# #part 1: generate the initial value for simulation #part 2: some functions will be used in the simulation #simulation part, start from "while loop" sink('SnowFallExample.Rout', split=TRUE) .Platform .Machine R.version Sys.info() sfInit(parallel=TRUE,cpus=4,type="SOCK") simu<-1 while(simu<=1000){ functions..... } Then I used the above structure with sflnit to do the simulation, I found that there is no change on the time for simulation, even worse, sometime, the code with "sflnit" is slower than the co...
2016 Apr 28
0
Snowfall - Error in checkForRemoteErrors(val) with sfClusterApplyLB()
Hello, I'm trying to run a code that uses the snowfall package. Here is the structure of my code. sfInit(parallel=T, cpus = 5, slaveOutfile="ErrorMessage.txt") sfExportAll() sfLibrary(rgdal) sfLibrary(raster) sfLibrary(sp) sfLibrary(rgeos) sfLibrary(snowfall) system.time( sfClusterApplyLB(1:10, function(k) { sfCat(paste("Iteration ", k), sep="\n") if (......)...
2011 Mar 01
6
usar multiples procesadores en R
Hola a tod en s, estoy realizando unas operaciones con muchos datos con el paquete "vegan", concretamente la función "metaMDS" y me gustaría saber si puedo usar más de un procesador a la vez para acelerar los cálculos. He visto el paquete "multicore" pero no sé usarlo, ¿alguien lo ha usado para algo así? Gracias y saludos, Javier -- http://oikos.inf.um.es
2010 Dec 10
2
Could concurrent R sessions mix up variables?
Hi, I'm working in R 2.11.1 x64 on Windows x86_64-pc-mingw32. I'm experiencing a strange problem in R that I'm not even sure how to begin to fix. I've got a huge (forty-pages printed) simulation written in R that I'd like to run multiple times. When I open up R and run it on its own, it works fine. At the beginning of the program, there's a variable X that I set to 1,