[R] snowfall: sfExport apparently harmless error

Mario Valle mvalle at cscs.ch
Tue Sep 22 14:21:32 CEST 2009


I'm running my script using mpirun -mp 4 and using snowfall+Rmpi on 
Linux 64bits. I receive the following error, but apparently without 
consequences on the results.
Any idea?
I'm able to reproduce it with a minimal script (below). Seems the 
critical issue is the for loop. Without it no error.
Thanks for your help!

TERM: Undefined variable.
TERM: Undefined variable.
TERM: Undefined variable.
TERM: Undefined variable.
Loading required package: utils
Loading required package: utils
Loading required package: utils
Loading required package: utils
Library Rmpi loaded.
snowfall 1.70 initialized: parallel execution on 3 CPUs.

Error in unserialize(obj) : unknown input format
Calls: sfExport ... mpi.recv.Robj -> .mpi.unserialize -> unserialize -> 
.Call
Execution halted
MPI Application rank 0 exited before MPI_Finalize() with status 1
/users/mvalle/snow/snow/inst/RMPISNOW: line 40: 15028 
Terminated              R --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', 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)
        return(1/(logx[r0idx] - sum(logx[1:(r0idx-1)])/(r0idx-1)))
    }
    res <- sfClusterApplyLB(n:1, computeTakens)
}
sfStop()

-- 
Ing. Mario Valle
Data Analysis and Visualization Group            | http://www.cscs.ch/~mvalle
Swiss National Supercomputing Centre (CSCS)      | Tel:  +41 (91) 610.82.60
v. Cantonale Galleria 2, 6928 Manno, Switzerland | Fax:  +41 (91) 610.82.82




More information about the R-help mailing list