[R-sig-Debian] mclapply Segmentation Fault for Ubuntu
Johannes Ranke
jranke at uni-bremen.de
Thu Mar 27 11:30:49 CET 2014
Hi,
I checked on Ubuntu 13.10:
> library(parallel)
> simplify2array(mclapply(rep(4,5), rnorm))
[,1] [,2] [,3] [,4] [,5]
[1,] 0.5615870 -0.27748675 -0.08832828 0.4887008 -0.6710558
[2,] -0.1100447 0.04958648 -1.24414404 -0.5549061 0.4509780
[3,] 1.4462468 -0.12099765 -0.87754954 -0.3806779 -0.1440630
[4,] 0.4429913 -1.06452941 0.42370677 -1.2382726 0.2476223
> quit()
Save workspace image? [y/n/c]: n
ich at pc:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 13.10
Release: 13.10
Codename: saucy
ich at pc:~$
So no problem over here. Maybe you installed a multithreaded blas? Not sure
about the current state but I remember that this combination would lead to
crashes at some point.
Johannes
Am Donnerstag, 27. März 2014, 10:00:28 schrieb Dario Strbenac:
> Running the example in the documentation causes R to crash.
>
> dario at bioinfo:~$ R
>
> R version 3.0.3 (2014-03-06) -- "Warm Puppy"
> Copyright (C) 2014 The R Foundation for Statistical Computing
> Platform: x86_64-pc-linux-gnu (64-bit)
>
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
>
> Natural language support but running in an English locale
>
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
>
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
>
> > library(parallel)
> > simplify2array(mclapply(rep(4, 5), rnorm))
>
> *** caught segfault ***
> address 0x7fee2a7229d0, cause 'memory not mapped'
>
> Traceback:
> 1: mcexit(0L)
> 2: FUN(1:2[[1L]], ...)
> 3: lapply(seq_len(cores), inner.do)
> 4: mclapply(rep(4, 5), rnorm)
> 5: lapply(x, length)
> 6: unlist(lapply(x, length))
> 7: unique(unlist(lapply(x, length)))
> 8: simplify2array(mclapply(rep(4, 5), rnorm))
>
> Possible actions:
> 1: abort (with core dump, if enabled)
> 2: normal R exit
> 3: exit R without saving workspace
> 4: exit R saving workspace
> Selection:
> *** caught segfault ***
> address 0x7fee2a7229d0, cause 'memory not mapped'
>
> Traceback:
> 1: mcexit(0L)
> 2: FUN(1:2[[2L]], ...)
> 3: lapply(seq_len(cores), inner.do)
> 4: mclapply(rep(4, 5), rnorm)
> 5: lapply(x, length)
> 6: unlist(lapply(x, length))
> 7: unique(unlist(lapply(x, length)))
> 8: simplify2array(mclapply(rep(4, 5), rnorm))
>
> Possible actions:
> 1: abort (with core dump, if enabled)
> 2: normal R exit
> 3: exit R without saving workspace
> 4: exit R saving workspace
> Selection: [,1] [,2] [,3] [,4] [,5]
> [1,] -1.147559 0.05071552 -0.8661278 1.3939602 -1.8899639
> [2,] 1.092394 -0.28870308 1.5201952 0.5470172 -1.1965282
> [3,] 2.338910 -0.62201329 -0.5306457 -0.4862363 -0.1221119
> [4,] -0.181282 0.21907111 -1.0803414 -0.1504892 -0.2067919
>
>
> dario at bioinfo:~$ lsb_release -a
> No LSB modules are available.
> Distributor ID: Ubuntu
> Description: Ubuntu 13.10
> Release: 13.10
> Codename: saucy
>
> The same code does not crash on Debian.
>
> /nb$ R
>
> R version 3.0.3 (2014-03-06) -- "Warm Puppy"
> Copyright (C) 2014 The R Foundation for Statistical Computing
> Platform: x86_64-pc-linux-gnu (64-bit)
>
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
>
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
>
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
>
> > library(parallel)
> > simplify2array(mclapply(rep(4, 5), rnorm))
>
> [,1] [,2] [,3] [,4] [,5]
> [1,] 1.25103304 0.71090925 -0.2416887 -1.0442886 0.826455644
> [2,] -0.08600017 -1.55204619 0.3531317 -0.2971294 -0.098026007
> [3,] 1.03296764 -0.02248264 1.0171218 -1.8507103 -1.246730487
> [4,] -0.11282003 -1.19287737 0.6241989 -0.5765659 -0.003024582
>
> > ^Z
>
> [1]+ Stopped R
> /nb$ lsb_release -a
> No LSB modules are available.
> Distributor ID: Debian
> Description: Debian GNU/Linux 7.4 (wheezy)
> Release: 7.4
> Codename: wheezy
>
> How can I fix it ? I read it could be caused by particular versions of BLAS.
> The libraries on the Ubuntu system are
>
> dario at bioinfo:~$ ldconfig -p | grep blas
> libnetblast.so.6 (libc6,x86-64) =>
> /usr/lib/x86_64-linux-gnu/libnetblast.so.6 libblastcompadj.so.6
> (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libblastcompadj.so.6
> libblastapi.so.6 (libc6,x86-64) =>
> /usr/lib/x86_64-linux-gnu/libblastapi.so.6 libblast.so.6 (libc6,x86-64) =>
> /usr/lib/x86_64-linux-gnu/libblast.so.6 libblas.so.3 (libc6,x86-64) =>
> /usr/lib/libblas.so.3
> libblas.so (libc6,x86-64) => /usr/lib/libblas.so
>
> There is no OpenBLAS present.
>
> --------------------------------------
> Dario Strbenac
> PhD Student
> University of Sydney
> Camperdown NSW 2050
> _______________________________________________
> R-SIG-Debian mailing list
> R-SIG-Debian at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-debian
--
PD Dr. Johannes Ranke
Kronacher Str. 8
79639 Grenzach-Wyhlen
More information about the R-SIG-Debian
mailing list