Hi everyone - 

        I'm running the same R/Rcpp codebase on about 8 machines, 4 of them OSX 
and 4 Ubuntu. Rcpp passes unit tests and my non-unittest code runs fine on 7 of 
the 8 and gives sensible results, so I'm reasonably sure it's correct. However, 
test.NumericMatrix.cumsum gives me a segfault on the 8th machine, as does my 
own code (which does some indexing into, multiplying and summing of 
NumericVector's and NumericMatrix's). I am guessing / thinking that these might 
be related, which is why I am mentioning both. 
        The machine is a dual-hexacore Mac Pro box with OSX lion, Xcode 4.2, R 
2.14.1. One of the functioning machines has slightly older hardware but the 
same version of OSX, same version of Xcode, and same version of R. I'm a bit at 
a loss. Unittest error reproduced below. My code just gives a 'memory not 
mapped' segfault. Any ideas of where else to look? Thanks, 

                Mike Shvartsman. 

========== The unitTest segfault ===========
Executing test function test.NumericMatrix.cumsum  ... 
 *** caught segfault ***
address 0x0, cause 'unknown'

Traceback:
 1: .Primitive(".Call")(<pointer: 0x104c03f80>, x)
 2: funx(x)
 3: all.equal(target, current, tolerance = tolerance, ...)
 4: checkEquals(funx(x), t(apply(x, 1, cumsum)), msg = "cumsum")
 5: func()
 6: system.time(func())
 7: doTryCatch(return(expr), name, parentenv, handler)
 8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 9: tryCatchList(expr, classes, parentenv, handlers)
10: tryCatch(expr, error = function(e) {    call <- conditionCall(e)    if 
(!is.null(call)) {        if (identical(call[[1L]], quote(doTryCatch)))         
    call <- sys.call(-4L)        dcall <- deparse(call)[1L]        prefix <- 
paste("Error in", dcall, ": ")        LONG <- 75L        msg <- 
conditionMessage(e)        sm <- strsplit(msg, "\n")[[1L]]        w <- 14L + 
nchar(dcall, type = "w") + nchar(sm[1L], type = "w")        if (is.na(w))       
      w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],                 type 
= "b")        if (w > LONG)             prefix <- paste(prefix, "\n  ", sep = 
"")    }    else prefix <- "Error : "    msg <- paste(prefix, 
conditionMessage(e), "\n", sep = "")    .Internal(seterrmessage(msg[1L]))    if 
(!silent && identical(getOption("show.error.messages"),         TRUE)) {        
cat(msg, file = stderr())        .Internal(printDeferredWarnings())    }    
invisible(structure(msg, class = "try-error", condition = e))})
11: try(system.time(func()))
12: .executeTestCase(funcName, envir = sandbox, setUpFunc = .setUp,     
tearDownFunc = .tearDown)
13: .sourceTestFile(testFile, testSuite$testFuncRegexp)
14: runTestSuite(testSuite)
aborting ...
Segmentation fault: 11
_______________________________________________
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to