[R] cannot load pbdMPI package after compilation

Antoine Migeon antoine.migeon at u-bourgogne.fr
Fri Jun 7 14:42:36 CEST 2013


Hello,

I try to install pbdMPI.
Compilation successful, but load fails with segfault.

Is anyone can help me?

R version 3.0.0
pbdMPI version 0.1-6
Intel compiler version 13.1.1
OpenMPI version 1.6.4-1
CPU Intel x86_64

# R CMD INSTALL pbdMPI_0.1-6.tar.gz
..
....
checking for gcc... icc -std=gnu99
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether icc -std=gnu99 accepts -g... yes
checking for icc -std=gnu99 option to accept ISO C89... none needed
checking for mpirun... mpirun
checking for mpiexec... mpiexec
checking for orterun... orterun
checking for sed... /bin/sed
checking for mpicc... mpicc
checking for ompi_info... ompi_info
checking for mpich2version... F
found sed, mpicc, and ompi_info ...
>> TMP_INC_DIRS = /opt/openmpi/1.6.4-1/intel-13.1.1/include
checking /opt/openmpi/1.6.4-1/intel-13.1.1/include ...
found /opt/openmpi/1.6.4-1/intel-13.1.1/include/mpi.h ...
>> TMP_LIB_DIRS = /opt/openmpi/1.6.4-1/intel-13.1.1/lib64
checking /opt/openmpi/1.6.4-1/intel-13.1.1/lib64 ...
found /opt/openmpi/1.6.4-1/intel-13.1.1/lib64/libmpi.so ...
found mpi.h and libmpi.so ...
>> TMP_INC = /opt/openmpi/1.6.4-1/intel-13.1.1/include
>> TMP_LIB = /opt/openmpi/1.6.4-1/intel-13.1.1/lib64
checking for openpty in -lutil... yes
checking for main in -lpthread... yes

******************* Results of pbdMPI package configure *****************

>> TMP_INC = /opt/openmpi/1.6.4-1/intel-13.1.1/include
>> TMP_LIB = /opt/openmpi/1.6.4-1/intel-13.1.1/lib64
>> MPI_ROOT =
>> MPITYPE = OPENMPI
>> MPI_INCLUDE_PATH = /opt/openmpi/1.6.4-1/intel-13.1.1/include
>> MPI_LIBPATH = /opt/openmpi/1.6.4-1/intel-13.1.1/lib64
>> MPI_LIBS =  -lutil -lpthread
>> MPI_DEFS = -DMPI2
>> MPI_INCL2 =
>> PKG_CPPFLAGS = -I/opt/openmpi/1.6.4-1/intel-13.1.1/include  -DMPI2
-DOPENMPI
>> PKG_LIBS = -L/opt/openmpi/1.6.4-1/intel-13.1.1/lib64 -lmpi  -lutil
-lpthread
*************************************************************************
..
icc -std=gnu99 -I/usr/local/R/3.0.0/intel13/lib64/R/include -DNDEBUG
-I/opt/openmpi/1.6.4-1/intel-13.1.1/include  -DMPI2 -DOPENMPI -O3
-fp-model precise -pc 64 -axAVX    -fpic  -O3 -fp-model precise  -pc 64
-axAVX  -c comm_errors.c -o comm_errors.o
icc -std=gnu99 -I/usr/local/R/3.0.0/intel13/lib64/R/include -DNDEBUG
-I/opt/openmpi/1.6.4-1/intel-13.1.1/include  -DMPI2 -DOPENMPI -O3
-fp-model precise -pc 64 -axAVX    -fpic  -O3 -fp-model precise  -pc 64
-axAVX  -c comm_sort_double.c -o comm_sort_double.o
.
..
....
** testing if installed package can be loaded
sh: line 1:  2905 Segmentation fault     
'/usr/local/R/3.0.0/intel13/lib64/R/bin/R' --no-save --slave 2>&1 <
/tmp/RtmpGkncGK/file1e541c57190
ERROR: loading failed

 *** caught segfault ***
address (nil), cause 'unknown'

Traceback:
 1: .Call("spmd_initialize", PACKAGE = "pbdMPI")
 2: fun(libname, pkgname)
 3: doTryCatch(return(expr), name, parentenv, handler)
 4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 5: tryCatchList(expr, classes, parentenv, handlers)
 6: tryCatch(fun(libname, pkgname), error = identity)
 7: runHook(".onLoad", env, package.lib, package)
 8: loadNamespace(package, c(which.lib.loc, lib.loc))
 9: doTryCatch(return(expr), name, parentenv, handler)
10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
11: tryCatchList(expr, classes, parentenv, handlers)
12: 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 <- paste0(prefix, "\n  ")    }    else prefix
<- "Error : "    msg <- paste0(prefix, conditionMessage(e), "\n")   
.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))})
13: try({    ns <- loadNamespace(package, c(which.lib.loc, lib.loc))   
env <- attachNamespace(ns, pos = pos, deps)})
14: library(pkg_name, lib.loc = lib, character.only = TRUE,
logical.return = TRUE)
15: withCallingHandlers(expr, packageStartupMessage = function(c)
invokeRestart("muffleMessage"))
16: suppressPackageStartupMessages(library(pkg_name, lib.loc = lib,    
character.only = TRUE, logical.return = TRUE))
17: doTryCatch(return(expr), name, parentenv, handler)
18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
19: tryCatchList(expr, classes, parentenv, handlers)
20: 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 <- paste0(prefix, "\n  ")    }    else prefix
<- "Error : "    msg <- paste0(prefix, conditionMessage(e), "\n")   
.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))})
21: try(suppressPackageStartupMessages(library(pkg_name, lib.loc =
lib,     character.only = TRUE, logical.return = TRUE)))
22: tools:::.test_load_package("pbdMPI",
"/usr/local/R/3.0.0/intel13/lib64/R/library")
aborting ...


-- 
Antoine Migeon
Université de Bourgogne
Centre de Calcul et Messagerie
Direction des Systèmes d'Information

tel : 03 80 39 52 70
Site du CCUB : http://www.u-bourgogne.fr/dsi-ccub



More information about the R-help mailing list