Re: [R-sig-Debian] Openblas?
Here is the reproducible example (very educational ...): -- $ wget http://ehar.se/data/reex_0.1.1.tar.gz $ R CMD INSTALL reex_0.1.1.tar.gz {with "status = 1: blas/libblas.so.3, and lapack..} $ R > library("reex") > system.time(res <- coxfunk(beta = 1, X = X, rs = rs, what = 2)) # user system elapsed # 0.093 0.000 0.093 > q() {Change to "status 2; openmp/libblas.so.3", and lapack..} $ R > library(reex) > system.time(res <- coxfunk(beta = 1, X = X, rs = rs, what = 2)) # user system elapsed # 72.050 1.006 6.123 > > system.time(res <- coxfunk(beta = 1, X = X, rs = rs, what = 1)) # user system elapsed # 0.088 0.000 0.088 --- Comment: ## what = 1 calculates loglik and score, what = 2 in addition hessian ## "Extra" code when what = 2: if (*what >= 2){ /* Second derivatives: */ F77_CALL(dsyr)(, p, (wsc + i), (x + (*p) * i), , sumd2score, p FCONE); } and if (*what >= 2){ alpha = -alpha; F77_CALL(daxpy)(, , sumd2score, , d2loglik, ); alpha = -alpha / sumscore; F77_CALL(dsyr)(, p, , sumdscore, , d2loglik, p FCONE); } Full C and R code in package. Göran On 2020-07-15 16:32, Dirk Eddelbuettel wrote: On 15 July 2020 at 16:13, Göran Broström wrote: | On 2020-07-15 14:36, Dirk Eddelbuettel wrote: | > | > Göran, | > | > This is not an easy email to reply to because it _contains nothing | > reproducible_. | | Thanks Dirk, | | Sorry about that, but my real question was (see below): "Is the problem | that openblas uses C versions of blas?" That is, do I need to change | | F77_CALL(name)(...); | | to | | cblas_name(...); | | everywhere? And if so, is this really a good idea with old code? I don't think so. At the end of the day it comes from "higher up" (say, crossprod()) and is just passed down. Remember, at the end it's all assembler :) | I'll try to extract a reproducible example from the package (eha) where | I run it. +1 Dirk ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian
Re: [R-sig-Debian] Openblas?
On 2020-07-15 14:36, Dirk Eddelbuettel wrote: Göran, This is not an easy email to reply to because it _contains nothing reproducible_. Thanks Dirk, Sorry about that, but my real question was (see below): "Is the problem that openblas uses C versions of blas?" That is, do I need to change F77_CALL(name)(...); to cblas_name(...); everywhere? And if so, is this really a good idea with old code? I'll try to extract a reproducible example from the package (eha) where I run it. Göran On 15 July 2020 at 13:24, Göran Broström wrote: | Hello, | | I thought that I should try openblas when building a CRAN package | containing lots of old (twentieth century) C-code with frequent calls to | blas and lapack routines. I have the following options on my Ubuntu | 20.04 machine: | | SelectionPath Priority Status | | * 0openblas-pthread/libblas.so.3 100 auto mode |1blas/libblas.so.3 10 manual mode |2openblas-openmp/libblas.so.395 manual mode |3openblas-pthread/libblas.so.3 100 manual mode | | I tried all four alternatives by timing one particular function call and | got quite surprising (to me) results: | | Selectionuser system elapsed | 0 3.2791.839 1.900 | 1 0.8990.052 0.953 | 2 158.9483.661 20.915 | 3 3.2771.894 1.908 | | Comments on that? How could I comment? I do not know what code you ran. | To me it seems clear that openblas (0, 2, 3) has | nothing to offer me, as my C code stands now. Is the problem that | openblas uses C versions of blas? I am using the Fortran version via | | F77_CALL(name) | | I tried adding | | PKG_CFLAGS = $(SHLIB_OPENMP_CFLAGS) | PKG_LIBS = $(SHLIB_OPENMP_CFLAGS) This is missing LAPACK and BLAS so ... | | to src/Makevars, but then I got | | ...undefined symbol: dsytri_ ... so get a _linker error_ about missing symbols. | when compiling. You meant linking, not compiling. Dirk ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian
[R-sig-Debian] Openblas?
Hello, I thought that I should try openblas when building a CRAN package containing lots of old (twentieth century) C-code with frequent calls to blas and lapack routines. I have the following options on my Ubuntu 20.04 machine: SelectionPath Priority Status * 0openblas-pthread/libblas.so.3 100 auto mode 1blas/libblas.so.3 10 manual mode 2openblas-openmp/libblas.so.395 manual mode 3openblas-pthread/libblas.so.3 100 manual mode I tried all four alternatives by timing one particular function call and got quite surprising (to me) results: Selectionuser system elapsed 0 3.2791.839 1.900 1 0.8990.052 0.953 2 158.9483.661 20.915 3 3.2771.894 1.908 Comments on that? To me it seems clear that openblas (0, 2, 3) has nothing to offer me, as my C code stands now. Is the problem that openblas uses C versions of blas? I am using the Fortran version via F77_CALL(name) I tried adding PKG_CFLAGS = $(SHLIB_OPENMP_CFLAGS) PKG_LIBS = $(SHLIB_OPENMP_CFLAGS) to src/Makevars, but then I got ...undefined symbol: dsytri_ when compiling. Göran ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian
Re: [R-sig-Debian] Local repo for ubuntu including R
Den 2019-02-19 kl. 22:43, skrev George N. White III: On Tue, 5 Feb 2019 at 11:05, Göran Broström <mailto:goran.brost...@umu.se>> wrote: Background: We have a computer lab with two ubuntu 18.04 machines (and lots of windows computers) and I am searching for a convenient way to keep the machines up-to-date regarding R in the first place, but also ubuntu itself. The problem is that the lab is isolated from the internet. Some versions of ubuntu ago I had success with apt-mirror and apt-get for the OS, but now I cannot get it to work. In my search for help on the internet I have come to the conclusion that there is something wrong with apt-mirror nowadays. Yours is a common use-case, but "I cannot get it to work" doesn't help anyone understand what is broken. Since apt-cache is available as an 18.04 package, you should report the bug to Ubuntu maintainers. Thanks George. I asked for a simple way to keep R and packages up-to-date, and I answered my own question about two hours ago: Just download the bionic-cran35 files to an usb stick and move it to the lab. apt-mirror and others are just red herrings. Best, Göran Question: What is the best and simplest way to keep the ubuntu machines up-to-date regarding OS and R with the apt/apt-get approach? Alternatives to apt-mirror? Thanks, Göran ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org <mailto:R-SIG-Debian@r-project.org> https://stat.ethz.ch/mailman/listinfo/r-sig-debian -- George N. White III ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian
Re: [R-sig-Debian] Local repo for ubuntu including R
My simple solution was to download the content of ftp.acc.umu.se/mirror/CRAN/bin/linux/ubuntu/bionic-cran35/ to an usb stick and mount it on the lab machine and configure /etc/apt/sources.list accordingly. The problem with apt-mirror was that not all relevant files were downloaded, e.g. InRelease and Packages.lzma (used for what?), resulting in cryptic errors and error messages when running apt update Simple is best, Göran On 2019-02-05 16:05, Göran Broström wrote: Background: We have a computer lab with two ubuntu 18.04 machines (and lots of windows computers) and I am searching for a convenient way to keep the machines up-to-date regarding R in the first place, but also ubuntu itself. The problem is that the lab is isolated from the internet. Some versions of ubuntu ago I had success with apt-mirror and apt-get for the OS, but now I cannot get it to work. In my search for help on the internet I have come to the conclusion that there is something wrong with apt-mirror nowadays. Question: What is the best and simplest way to keep the ubuntu machines up-to-date regarding OS and R with the apt/apt-get approach? Alternatives to apt-mirror? Thanks, Göran ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian
[R-sig-Debian] Local repo for ubuntu including R
Background: We have a computer lab with two ubuntu 18.04 machines (and lots of windows computers) and I am searching for a convenient way to keep the machines up-to-date regarding R in the first place, but also ubuntu itself. The problem is that the lab is isolated from the internet. Some versions of ubuntu ago I had success with apt-mirror and apt-get for the OS, but now I cannot get it to work. In my search for help on the internet I have come to the conclusion that there is something wrong with apt-mirror nowadays. Question: What is the best and simplest way to keep the ubuntu machines up-to-date regarding OS and R with the apt/apt-get approach? Alternatives to apt-mirror? Thanks, Göran ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian
Re: [R-sig-Debian] ess 17.11-3 won't install on Ubuntu 16.04
Hi Dirk, On 2018-08-20 17:43, Dirk Eddelbuettel wrote: On 20 August 2018 at 15:29, Eva Myers wrote: | Hello, | Attempting to install ess (17.11-3xenial0) on our Ubuntu 16.04 systems | is failing with an error message. This can happen. I (with my Debian hat on) had to make 17.11-3 because the ess package did not behave with Debian untable and Emacs 26.2. It does now. Changes can have side effects. Turn out that in this case 16.04 is affected. And 18.04. I get exactly the same error message as Eva. Your easiest recourse would be to not use this package, but the (much older) ESS from 16.04, or an older release (and then put it on 'hold' to supress updates). There will be a newer elpa-ess which may work for you (or not). You could try these: http://dirk.eddelbuettel.com/tmp/elpa-ess_17.11-4_all.deb http://dirk.eddelbuettel.com/tmp/ess_17.11-4_all.deb and you need both. "Works for me" on 18.04. Not tested on 16.04. YMMV. "Works for me" too. Göran Dirk | root@kore:/home/eva# apt-get install ess | [...] | Install ess for emacs24 | install/ess: Handling install for emacsen flavor emacs24 | ERROR: install script from ess package failed | dpkg: error processing package ess (--configure): | subprocess installed post-installation script returned error exit status 1 | Errors were encountered while processing: | ess | E: Sub-process /usr/bin/dpkg returned an error code (1) | | | Installing the previous version worked perfectly. The relevant | sources.list line is | | deb https://cloud.r-project.org/bin/linux/ubuntu xenial/ | | What is causing this error and how can it be fixed? | Thanks, | Eva. | | ___ | R-SIG-Debian mailing list | R-SIG-Debian@r-project.org | https://stat.ethz.ch/mailman/listinfo/r-sig-debian ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian
Re: [R-sig-Debian] autoremove_
Dirk, thanks a lot. Best, Göran On 2018-08-01 16:24, Dirk Eddelbuettel wrote: Göran, Got it now (thanks to a slower/later than usual commute) -- see 'man apt' which has autoremove (apt-get(8)) autoremove is used to remove packages that were automatically installed to satisfy dependencies for other packages and are now no longer needed as dependencies changed or the package(s) needing them were removed in the meantime. You should check that the list does not include applications you have grown to like even though they were once installed just as a dependency of another package. You can mark such a package as manually installed by using apt-mark(8). Packages which you have installed explicitly via install are also never proposed for automatic removal. leading 'man apt-mark' with the details and commands. The actual file is /var/lib/apt/extended_states Status list of auto-installed packages. Configuration Item: Dir::State::extended_states. and you can switch the state of auto-installed Suggests: or Recommended: packages (like r-cran-littler et al in your case) to 'manual' which will prevent any auto-removal. Hope this helps, and thanks for bringing this up - had been meaning to look around for this myself. Cheers, Dirk ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian
[R-sig-Debian] autoremove_
When I upgraded my ubuntu 18.04 system today, I got to my surprise: --- goran@M6800:~$ sudo apt upgrade Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following packages were automatically installed and are no longer required: littler r-cran-littler r-cran-pkgkitten Use 'sudo apt autoremove' to remove them. - (Why) should I remove them? Why are they 'no longer required'? Göran ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian
Re: [R-sig-Debian] Segfault on ubuntu 18.04
On 2018-07-07 17:13, George N. White III wrote: On Sat, 7 Jul 2018 at 07:52, Göran Broström <mailto:goran.brost...@umu.se>> wrote: On 2018-07-07 06:27, Dirk Eddelbuettel wrote: > > On 7 July 2018 at 00:51, Göran Broström wrote: > | My repo is > | > | deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ > | > | Is that wrong? > > That repo will give you R and key R packages like Matrix lme4. (And you > chose to ignore this repo by compiling R yourself ...). Not really: I installed r-base and r-base-dev from "My repo", but ignored deb http://ppa.launchpad.net/marutter/c2d4u3.5/ubuntu bionic main # deb-src http://ppa.launchpad.net/marutter/c2d4u3.5/ubuntu bionic main because I thought it was easier to handle the rest via install.packages() There can be benefits to using "install.packages()" when distro packages for supporting libraries can't be used (too old or built without some needed configuration option for some other software you need). I was wrong. After reinstalling all extra packages via apt and "c2d4u3.5", all my problems have vanished (or been swept under the carpet;), no segfaults. Many thanks! This issue caught my interest because I often have to deal with conflicts encountered by people using multiple "big" packages that rely on upstream libraries such as libcurl, gdal, hdfN, netcdf, etc. with R and other "mission critical" apps supplied by ESA and NASA. Ubuntu 18.04 has been problematic, so I tried to reproduce your problem (using the WSL version of Ubuntu 18.04) and failed to see the problem. I installed the R curl package from source using the base packages from: debhttps://cloud.r-project.org/bin/linux/ubuntubionic-cran35/ and didn't get segfaults (eha even installed without issues). Göran -- I'm glad you have been able to get R working, but it could be useful to understand what was broken. The original missing symbol error was for something that should have been defined in the header files from the libcurl dev package. Is there anything non-standard about your libcurl and the associated header files? [...] I think that my problems started when I moved ...eha/src/Makevars, containing PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) to ~/.R/Makevars following the previous discussion here. This worked well for building and installing eha, but not for other builds from source, particularly R itself. So I decided to keep Makevars (with that single line) in eha/src, and simply ignore the warnings about nonstandard CFLAGS when checking the build. I can live with those. Everything else seems to be OK now. Göran -- George N. White III ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian
Re: [R-sig-Debian] Segfault on ubuntu 18.04
On 2018-07-07 06:27, Dirk Eddelbuettel wrote: On 7 July 2018 at 00:51, Göran Broström wrote: | My repo is | | deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ | | Is that wrong? That repo will give you R and key R packages like Matrix lme4. (And you chose to ignore this repo by compiling R yourself ...). Not really: I installed r-base and r-base-dev from "My repo", but ignored deb http://ppa.launchpad.net/marutter/c2d4u3.5/ubuntu bionic main # deb-src http://ppa.launchpad.net/marutter/c2d4u3.5/ubuntu bionic main because I thought it was easier to handle the rest via install.packages() I was wrong. After reinstalling all extra packages via apt and "c2d4u3.5", all my problems have vanished (or been swept under the carpet;), no segfaults. Many thanks! Göran Additional package repos then build on top of this one and give you several _thousand_ r-cran-* binary packages prebuilt. Dirk ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian
Re: [R-sig-Debian] Segfault on ubuntu 18.04
On 2018-07-07 00:34, Dirk Eddelbuettel wrote: On 6 July 2018 at 22:57, Göran Broström wrote: | | | On 2018-07-06 22:44, Dirk Eddelbuettel wrote: | > | > On 6 July 2018 at 21:52, Göran Broström wrote: | > | I did this and removed anything related to R and reinstalled. Then, in R, | > | | > | > install.packages("curl") | > | | > | and got | > | | > | Error: package or namespace load failed for 'curl' in dyn.load(file, | > | DLLpath = DLLpath, ...): | > | unable to load shared object | > | '/usr/local/lib/R/site-library/curl/libs/curl.so': | > |/usr/local/lib/R/site-library/curl/libs/curl.so: undefined symbol: | > | curl_easy_escape | > | Error: loading failed | > | | > | I have installed curl, libcurl4, libcurl4-openssl-dev. | > | > We should also have r-cran-curl prebuilt for you. | | $ sudo apt install r-cran-curl | Reading package lists... Done | Building dependency tree | Reading state information... Done | Some packages could not be installed. This may mean that you have | requested an impossible situation or if you are using the unstable | distribution that some required packages have not yet been created | or been moved out of Incoming. | The following information may help to resolve the situation: | | The following packages have unmet dependencies: | r-cran-curl : Depends: r-api-3.4 | E: Unable to correct problems, you have held broken packages. You are looking at the wrong repo (or no add-on repo); all that was discussed in detail here and CRAN has instructions. My repo is deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ Is that wrong? G, Dirk ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian
Re: [R-sig-Debian] Segfault on ubuntu 18.04
Den 2018-07-06 kl. 17:51, skrev Göran Broström: Den 2018-07-06 kl. 17:43, skrev Henrik Bengtsson: On Fri, Jul 6, 2018 at 8:18 AM Göran Broström wrote: Den 2018-07-06 kl. 16:28, skrev Dirk Eddelbuettel: On 6 July 2018 at 12:31, Enrico Schumann wrote: | Just as one more datapoint: I cannot reproduce the segfault, with | R 3.5.1 on (L)Ubuntu 18.04. (I use the Ubuntu package, i.e. I did not | build from source.) I have been a little too busy and have not yet upgraded to 18.04 so I can't attempt to replicate -- but it _looks_ just like a garden variety binary mismatch. We _know_ R 3.5.* requires _all_ binary packages to be reinstalled and it is easy to miss one. So unless Göran shows us a generally reproducible bug I will suspect that this is simply a local deployment issue. I suspect that too, since the segfault does _not_ occur if run R via RStudio. _But_, I have run 'update.packages(checkBuilt = TRUE)', and that should take care of reinstalling, right? Maybe it somehow is an issue with devtools::install_github. If you follow the error traceback (from the bottom of the stack to the top), the most recent package involved is 'curl'. It appears that the segfault occurs when it is loaded. You probably get the same if you attempt: library(curl) Thanks for the suggestion, but that doesn't crash anything. in a fresh R session. If so, as Dirk suggests: We _know_ R 3.5.* requires _all_ binary packages to be reinstalled and it is easy to miss one. make sure to reinstall 'curl'. If that solves it, it's likely that other packages have the same issue, so you probably want to start from a clean slate and wipe your current package library, e.g. unlink(.libPaths()[1], recursive = TRUE). Maybe I should do that anyway. I did this and removed anything related to R and reinstalled. Then, in R, > install.packages("curl") and got Error: package or namespace load failed for 'curl' in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/usr/local/lib/R/site-library/curl/libs/curl.so': /usr/local/lib/R/site-library/curl/libs/curl.so: undefined symbol: curl_easy_escape Error: loading failed I have installed curl, libcurl4, libcurl4-openssl-dev. Göran Göran /Henrik Göran Dirk ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian
Re: [R-sig-Debian] Segfault on ubuntu 18.04
Den 2018-07-06 kl. 17:43, skrev Henrik Bengtsson: On Fri, Jul 6, 2018 at 8:18 AM Göran Broström wrote: Den 2018-07-06 kl. 16:28, skrev Dirk Eddelbuettel: On 6 July 2018 at 12:31, Enrico Schumann wrote: | Just as one more datapoint: I cannot reproduce the segfault, with | R 3.5.1 on (L)Ubuntu 18.04. (I use the Ubuntu package, i.e. I did not | build from source.) I have been a little too busy and have not yet upgraded to 18.04 so I can't attempt to replicate -- but it _looks_ just like a garden variety binary mismatch. We _know_ R 3.5.* requires _all_ binary packages to be reinstalled and it is easy to miss one. So unless Göran shows us a generally reproducible bug I will suspect that this is simply a local deployment issue. I suspect that too, since the segfault does _not_ occur if run R via RStudio. _But_, I have run 'update.packages(checkBuilt = TRUE)', and that should take care of reinstalling, right? Maybe it somehow is an issue with devtools::install_github. If you follow the error traceback (from the bottom of the stack to the top), the most recent package involved is 'curl'. It appears that the segfault occurs when it is loaded. You probably get the same if you attempt: library(curl) Thanks for the suggestion, but that doesn't crash anything. in a fresh R session. If so, as Dirk suggests: We _know_ R 3.5.* requires _all_ binary packages to be reinstalled and it is easy to miss one. make sure to reinstall 'curl'. If that solves it, it's likely that other packages have the same issue, so you probably want to start from a clean slate and wipe your current package library, e.g. unlink(.libPaths()[1], recursive = TRUE). Maybe I should do that anyway. Göran /Henrik Göran Dirk ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian
Re: [R-sig-Debian] Segfault on ubuntu 18.04
Den 2018-07-06 kl. 16:28, skrev Dirk Eddelbuettel: On 6 July 2018 at 12:31, Enrico Schumann wrote: | Just as one more datapoint: I cannot reproduce the segfault, with | R 3.5.1 on (L)Ubuntu 18.04. (I use the Ubuntu package, i.e. I did not | build from source.) I have been a little too busy and have not yet upgraded to 18.04 so I can't attempt to replicate -- but it _looks_ just like a garden variety binary mismatch. We _know_ R 3.5.* requires _all_ binary packages to be reinstalled and it is easy to miss one. So unless Göran shows us a generally reproducible bug I will suspect that this is simply a local deployment issue. I suspect that too, since the segfault does _not_ occur if run R via RStudio. _But_, I have run 'update.packages(checkBuilt = TRUE)', and that should take care of reinstalling, right? Maybe it somehow is an issue with devtools::install_github. Göran Dirk ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian
Re: [R-sig-Debian] Segfault on ubuntu 18.04
Hi Steve, On 2018-07-05 21:49, Steve Gutreuter wrote: Hi Göran, I do not have a solution for your problem, but I can confirm that R 3.5.1 runs correctly for me from the shell prompt on Ubuntu 18.04. However, I compiled R 3.5.1 from the source tarball, so the problem might be with the Ubuntu deb. Have you tried completely removing R and then re-installing the deb? Yes I did, but it didn't help. However, I installed R-devel from source, and there I had no problem. Göran Best, Steve On Thu, 2018-07-05 at 21:37 +0200, Göran Broström wrote: I am running R 3.5.1 on ubuntu 18.04, installed via apt. When I run R from the bash prompt, I get (reinstalling r-base doesn't help) > devtools::install_github("goranbrostrom/eha", build_vignettes = TRUE) *** caught segfault *** address 0x68456, cause 'memory not mapped' Traceback: 1: dyn.load(file, DLLpath = DLLpath, ...) 2: library.dynam(lib, package, package.lib) 3: loadNamespace(name) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch(loadNamespace(name), error = function(e) stop(e)) 8: getNamespace(ns) 9: asNamespace(ns) 10: getExportedValue(pkg, name) 11: curl::new_handle 12: handle(name) 13: handle_find(url) 14: handle_url(handle, url, ...) 15: httr::GET(url, path = path, httr::write_disk(path = tmp), auth) 16: remote_package_name.github_remote(remote) 17: remote_package_name(remote) 18: install_remote(..., quiet = quiet) 19: doTryCatch(return(expr), name, parentenv, handler) 20: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 21: tryCatchList(expr, classes, parentenv, handlers) 22: tryCatch(install_remote(..., quiet = quiet), error = function(e) { if (!quiet) {message("Installation failed: ", conditionMessage(e))}FALSE}) 23: FUN(X[[i]], ...) 24: vapply(remotes, try_install_remote, ..., FUN.VALUE = logical(1)) 25: install_remotes(remotes, quiet = quiet, ...) 26: devtools::install_github("goranbrostrom/eha", build_vignettes = TRUE) 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: 3 Segmentation fault (core dumped) - devtools is version 1.13.6 in all cases. However, running the same in RStudio: No problem. The same setup, but on ubuntu 16.04 (another computer): No problem. On my Mac: No problem. Is it ubuntu, devtools, or me? If it is me, what can I do? Göran ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian
[R-sig-Debian] Segfault on ubuntu 18.04
I am running R 3.5.1 on ubuntu 18.04, installed via apt. When I run R from the bash prompt, I get (reinstalling r-base doesn't help) > devtools::install_github("goranbrostrom/eha", build_vignettes = TRUE) *** caught segfault *** address 0x68456, cause 'memory not mapped' Traceback: 1: dyn.load(file, DLLpath = DLLpath, ...) 2: library.dynam(lib, package, package.lib) 3: loadNamespace(name) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch(loadNamespace(name), error = function(e) stop(e)) 8: getNamespace(ns) 9: asNamespace(ns) 10: getExportedValue(pkg, name) 11: curl::new_handle 12: handle(name) 13: handle_find(url) 14: handle_url(handle, url, ...) 15: httr::GET(url, path = path, httr::write_disk(path = tmp), auth) 16: remote_package_name.github_remote(remote) 17: remote_package_name(remote) 18: install_remote(..., quiet = quiet) 19: doTryCatch(return(expr), name, parentenv, handler) 20: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 21: tryCatchList(expr, classes, parentenv, handlers) 22: tryCatch(install_remote(..., quiet = quiet), error = function(e) { if (!quiet) {message("Installation failed: ", conditionMessage(e))}FALSE}) 23: FUN(X[[i]], ...) 24: vapply(remotes, try_install_remote, ..., FUN.VALUE = logical(1)) 25: install_remotes(remotes, quiet = quiet, ...) 26: devtools::install_github("goranbrostrom/eha", build_vignettes = TRUE) 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: 3 Segmentation fault (core dumped) - devtools is version 1.13.6 in all cases. However, running the same in RStudio: No problem. The same setup, but on ubuntu 16.04 (another computer): No problem. On my Mac: No problem. Is it ubuntu, devtools, or me? If it is me, what can I do? Göran ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian
Re: [R-sig-Debian] undefined symbol: sgemv_thread_n
On 2017-12-01 23:33, Dirk Eddelbuettel wrote: Hi there, On 1 December 2017 at 23:24, Göran Broström wrote: | Dirk, | | thanks for your help. At work I have (ubuntu 16.04): | | ii libblas-common 3.6.0-2ubuntu2 amd64Dependency package for | all BLAS implementations | ii libblas-dev3.6.0-2ubuntu2 amd64Basic Linear Algebra | Subroutines 3, static library | ii libblas3 3.6.0-2ubuntu2 amd64Basic Linear Algebra | Reference implementations, shared library | | and everything works before and after upgrading (/usr/bin/R). However, | at home (ubuntu 17.10): | | goran@M6800:~$ dpkg -l | grep blas | ii libblas-dev:amd64 3.7.1-3ubuntu2 amd64Basic Linear Algebra | Subroutines 3, static library | ii libblas3:amd643.7.1-3ubuntu2 amd64Basic Linear Algebra | Reference implementations, shared library | ii libopenblas-base:amd64 0.2.20+ds-4 amd64Optimized BLAS | (linear algebra) library (shared library) | | and it worked before upgrade but not after. Seems to be missing | 'libblas-common'. Maybe. Maybe not. Did you check packages.ubuntu.com (or another source) to see if it still exists? Per https://packages.ubuntu.com/search?keywords=libblas-common it is only listed for xenial (16.04) and zesty (17.04), not your 17.10. Yes, that is what I found. | So I try to install: | | goran@M6800:~$ sudo apt install libblas-common | [sudo] password for goran: | Reading package lists... Done | Building dependency tree | Reading state information... Done | E: Unable to locate package libblas-common | | So there is no such package in 17.10, but I have it in 16.04. What can | be the replacement? Maybe I should downgrade to R-3.4.2, which works, | but it doesn't feel right. No that would not be right. To recap: you have an issue on 17.10 only, and the R is self-built or the one installable as binary via CRAN? The binary via CRAN. I had both versions a few hours ago, but I uninstalled both ('dpkg --purge r-base' and 'sudo make uninstall' + removing everything under /usr/local/lib/R/'. Then I installed r-base ('sudo apt install r-base') and the error message is the same. Göran Dirk ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian
Re: [R-sig-Debian] undefined symbol: sgemv_thread_n
Dirk, thanks for your help. At work I have (ubuntu 16.04): ii libblas-common 3.6.0-2ubuntu2 amd64Dependency package for all BLAS implementations ii libblas-dev3.6.0-2ubuntu2 amd64Basic Linear Algebra Subroutines 3, static library ii libblas3 3.6.0-2ubuntu2 amd64Basic Linear Algebra Reference implementations, shared library and everything works before and after upgrading (/usr/bin/R). However, at home (ubuntu 17.10): goran@M6800:~$ dpkg -l | grep blas ii libblas-dev:amd64 3.7.1-3ubuntu2 amd64Basic Linear Algebra Subroutines 3, static library ii libblas3:amd643.7.1-3ubuntu2 amd64Basic Linear Algebra Reference implementations, shared library ii libopenblas-base:amd64 0.2.20+ds-4 amd64Optimized BLAS (linear algebra) library (shared library) and it worked before upgrade but not after. Seems to be missing 'libblas-common'. So I try to install: goran@M6800:~$ sudo apt install libblas-common [sudo] password for goran: Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package libblas-common So there is no such package in 17.10, but I have it in 16.04. What can be the replacement? Maybe I should downgrade to R-3.4.2, which works, but it doesn't feel right. Göran On 2017-12-01 21:12, Göran Broström wrote: Den 2017-12-01 kl. 20:24, skrev Dirk Eddelbuettel: On 1 December 2017 at 19:55, Göran Broström wrote: | Hello, | | the following is a part of a question asked on R-help. I realized that | it is better suited for asking here. Apologies for the cross-posting! | | I'm on Ubuntu artful, and upgraded with 'apt'. Then | | | goran@M6800:~/src/R-3.4.3$ /usr/bin/R | /usr/lib/R/bin/exec/R: symbol lookup error: | /usr/lib/x86_64-linux-gnu/libblas.so.3: undefined symbol: sgemv_thread_n | | | Never seen this before. What can I do? At home: edd@bud:~$ COLUMNS=70 dpkg -l | grep blas ii libblas-common 3.7.0-1 amd64Dependency package for all BLAS i ii libblas-dev3.7.0-1 amd64Basic Linear Algebra Subroutines ii libblas3 3.7.0-1 amd64Basic Linear Algebra Reference im ii libopenblas-ba 0.2.19-2 amd64 Optimized BLAS (linear algebra) l edd@bud:~$ At work: @.:~$ COLUMNS=70 dpkg -l | grep blas ii libblas-common 3.7.0-1 amd64Dependency package for all BLAS i ii libblas-dev3.7.0-1 amd64Basic Linear Algebra Subroutines ii libblas3 3.7.0-1 amd64 Basic Linear Algebra Reference im ii libcublas8.0:a 8.0.44-3 amd64NVIDIA cuBLAS Library ii libnvblas8.0:a 8.0.44-3 amd64NVBLAS runtime library ii libopenblas-ba 0.2.19-2 amd64Optimized BLAS (linear algebra) l ii libopenblas-de 0.2.19-2 amd64Optimized BLAS (linear algebra) l @.:~$ In other words, I tend to use standard blas or openblas or atlas (but seemingly less often). Both are 17.04, but that doesn't matter as they both have been updated regularly over the years. You must have gotten out of whack between what compiled R, and what runs it. Did you by chance compile R 3.4.3 locally? Yes, first I installed R-3.4.3 from source and it started OK, but when I tried library(eha) I got the error above. So I installed by apt, and then I got the above. This is what I always have done, installing both from source and the ubuntu versions via 'apt upgrade', and it has always worked without problems. What has changed now? And how can I get out of this? Göran Dirk ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian
Re: [R-sig-Debian] undefined symbol: sgemv_thread_n
Den 2017-12-01 kl. 20:24, skrev Dirk Eddelbuettel: On 1 December 2017 at 19:55, Göran Broström wrote: | Hello, | | the following is a part of a question asked on R-help. I realized that | it is better suited for asking here. Apologies for the cross-posting! | | I'm on Ubuntu artful, and upgraded with 'apt'. Then | | | goran@M6800:~/src/R-3.4.3$ /usr/bin/R | /usr/lib/R/bin/exec/R: symbol lookup error: | /usr/lib/x86_64-linux-gnu/libblas.so.3: undefined symbol: sgemv_thread_n | | | Never seen this before. What can I do? At home: edd@bud:~$ COLUMNS=70 dpkg -l | grep blas ii libblas-common 3.7.0-1 amd64Dependency package for all BLAS i ii libblas-dev3.7.0-1 amd64Basic Linear Algebra Subroutines ii libblas3 3.7.0-1 amd64Basic Linear Algebra Reference im ii libopenblas-ba 0.2.19-2 amd64Optimized BLAS (linear algebra) l edd@bud:~$ At work: @.:~$ COLUMNS=70 dpkg -l | grep blas ii libblas-common 3.7.0-1 amd64Dependency package for all BLAS i ii libblas-dev3.7.0-1 amd64Basic Linear Algebra Subroutines ii libblas3 3.7.0-1 amd64Basic Linear Algebra Reference im ii libcublas8.0:a 8.0.44-3 amd64NVIDIA cuBLAS Library ii libnvblas8.0:a 8.0.44-3 amd64NVBLAS runtime library ii libopenblas-ba 0.2.19-2 amd64Optimized BLAS (linear algebra) l ii libopenblas-de 0.2.19-2 amd64Optimized BLAS (linear algebra) l @.:~$ In other words, I tend to use standard blas or openblas or atlas (but seemingly less often). Both are 17.04, but that doesn't matter as they both have been updated regularly over the years. You must have gotten out of whack between what compiled R, and what runs it. Did you by chance compile R 3.4.3 locally? Yes, first I installed R-3.4.3 from source and it started OK, but when I tried > library(eha) I got the error above. So I installed by apt, and then I got the above. This is what I always have done, installing both from source and the ubuntu versions via 'apt upgrade', and it has always worked without problems. What has changed now? And how can I get out of this? Göran Dirk ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian
[R-sig-Debian] undefined symbol: sgemv_thread_n
Hello, the following is a part of a question asked on R-help. I realized that it is better suited for asking here. Apologies for the cross-posting! I'm on Ubuntu artful, and upgraded with 'apt'. Then goran@M6800:~/src/R-3.4.3$ /usr/bin/R /usr/lib/R/bin/exec/R: symbol lookup error: /usr/lib/x86_64-linux-gnu/libblas.so.3: undefined symbol: sgemv_thread_n Never seen this before. What can I do? Göran Broström ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian
Re: [R-sig-Debian] R-3.4.0 and recommended packages
On 2017-04-25 16:11, Johannes Ranke wrote: Am Dienstag, 25. April 2017, 08:50:34 schrieb Dirk Eddelbuettel: On 25 April 2017 at 14:58, Göran Broström wrote: | hello, | | I just installed R-3.4.0 from scratch: | | $ sudo apt install r-base | | but when I try | | > library(survival, lib.loc = "/usr/lib/R/library") | > fit <- coxph(Surv(exit, event) ~ x, data = mort) | | I get | | Error in fitter(X, Y, strats, offset, init, control, weights = weights, : |object 'Ccoxmart' not found This looks similar to what I got this morning when I tested my (unreleased) backport of R 3.4.0 to Debian jessie. My test was library(MASS) example(rlm) and there was an object that was not found. I am on a train on the way to a meeting right now, so I can not look into it at the moment. Maybe a side effect of the new registration requirements for compiled objects? Right, you need to run > update.packages(checkBuilt=TRUE) to fix it. Best, Göran Cheers, Johannes ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian
Re: [R-sig-Debian] R-3.4.0 and recommended packages
On 2017-04-25 15:50, Dirk Eddelbuettel wrote: On 25 April 2017 at 14:58, Göran Broström wrote: | hello, | | I just installed R-3.4.0 from scratch: | | $ sudo apt install r-base | | but when I try | | > library(survival, lib.loc = "/usr/lib/R/library") | > fit <- coxph(Surv(exit, event) ~ x, data = mort) | | I get | | Error in fitter(X, Y, strats, offset, init, control, weights = weights, : |object 'Ccoxmart' not found | | I was told on R-help that I need to | | > update.packages(checkBuilt = TRUE) | | (and it works), but | | 1. I get two versions of recommended packages, one in | /usr/lib/R/library, and one in That is from apt / dpkg -- ie pre-packaged. | ~/R/x86_64-pc-linux-gnu-library/3.4 | I could fix a write permission in /usr/lib/R or run R as root. That is from you. The two have ALWAYS been independent. I understand that, but what is then the best practice to avoid having duplicates of the recommended packages? I tried running R as root and > update.packages(checkBuilt=TRUE) --- Please select a CRAN mirror for use in this session --- Warning: package 'class' in library '/usr/lib/R/library' will not be updated Warning: package 'cluster' in library '/usr/lib/R/library' will not be updated Warning: package 'codetools' in library '/usr/lib/R/library' will not be updated Warning: package 'foreign' in library '/usr/lib/R/library' will not be updated Warning: package 'KernSmooth' in library '/usr/lib/R/library' will not be updated Warning: package 'lattice' in library '/usr/lib/R/library' will not be updated Warning: package 'Matrix' in library '/usr/lib/R/library' will not be updated Warning: package 'nlme' in library '/usr/lib/R/library' will not be updated Warning: package 'nnet' in library '/usr/lib/R/library' will not be updated Warning: package 'spatial' in library '/usr/lib/R/library' will not be updated Warning: package 'survival' in library '/usr/lib/R/library' will not be updated > Not possible? I also tried $ sudo apt install --reinstall r-cran-survival to no avail. | 2. Installing from scratch should have this fixed automatically, right? False. Thanks. Maybe better to install R from source then. Göran ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian
[R-sig-Debian] R-3.4.0 and recommended packages
hello, I just installed R-3.4.0 from scratch: $ sudo apt install r-base but when I try > library(survival, lib.loc = "/usr/lib/R/library") > fit <- coxph(Surv(exit, event) ~ x, data = mort) I get Error in fitter(X, Y, strats, offset, init, control, weights = weights, : object 'Ccoxmart' not found I was told on R-help that I need to > update.packages(checkBuilt = TRUE) (and it works), but 1. I get two versions of recommended packages, one in /usr/lib/R/library, and one in ~/R/x86_64-pc-linux-gnu-library/3.4 I could fix a write permission in /usr/lib/R or run R as root. 2. Installing from scratch should have this fixed automatically, right? Thanks, Göran ___ R-SIG-Debian mailing list R-SIG-Debian@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian