Error In Dyn.load Rmpi
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Rmpi unable to load shared libraries as non root user up vote 8 down vote favorite 1 I'm having a problem with Rmpi wherein I try to load it and I get this error message: > library('Rmpi') Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared library '/usr/lib64/R/library/Rmpi/libs/Rmpi.so': libmpi.so.0: cannot open shared object file: No such file or directory In addition: Warning message: .Last.lib failed in detach() for 'Rmpi', details: call: dyn.unload(file.path(libpath, "libs", paste("Rmpi", .Platform$dynlib.ext, error: dynamic/shared library '/usr/lib64/R/library/Rmpi/libs/Rmpi.so' was not loaded Error in library("Rmpi") : .First.lib failed for 'Rmpi' This error does not occur when I'm logged in as root, however. It does not appear to be a permissions issue. I checked the permissions for libmpi.so.0: [meehan@cnl10 /]$ ll /usr/lib64/lam/lib/ total 7.4M -rw-r--r-- 1 root root 207 May 25 2008 lam.module -rw-r--r-- 1 root root 885K May 25 2008 liblam.a -rw-r--r-- 1 root root 361K May 25 2008 liblamf77mpi.a lrwxrwxrwx 1 root root 21 Apr 12 2010 liblamf77mpi.so -> liblamf77mpi.so.0.0.0 lrwxrwxrwx 1 root root 21 Apr 12 2010 liblamf77mpi.so.0 -> liblamf77mpi.so.0.0.0 -rwxr-xr-x 1 root root 73K May 25 2008 liblamf77mpi.so.0.0.0 -rw-r--r-- 1 root root 2.2M May 25 2008 liblammpi++.a -rw-r--r-- 1 root root 509K May 25 2008 liblammpio.a lrwxrwxrwx 1 root root 20 Apr 12 2010 liblammpi++.so -> liblammpi++.so.0.0.0 lrwxrwxrwx 1 root root 20 Apr 12 2010 liblammpi++.so.0 -> liblammpi++.so.0.0.0 -rwxr-xr-x 1 root root 167K May 25 2008 liblammpi++.so.0.0.0 lrwxrwxrwx 1 root root 15 Apr 12 2010 liblam.so -> liblam.so.0.0.0 lrwxrwxrwx 1
am",mpi.comm.rank(),"of",mpi.comm.size()-1)) I can run it from CLI: $ R CMD BATCH myrmpi.R mpi.out. it works all right. But when I run this in RStudio GUI, it tells that loading Rmpi failed. I do have the PATH and LD_LIBRARY_PATH set in Rstudio env. see below messages copied from console of Rstudio GUI: library(Rmpi) Error : .onLoad failed in loadNamespace() for http://stackoverflow.com/questions/19120927/rmpi-unable-to-load-shared-libraries-as-non-root-user 'Rmpi', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared object '/usr/local/lib/R/site-library/Rmpi/libs/Rmpi.so': libmpi.so.1: cannot open shared object file: No such file or directory Error: package or namespace load failed for ‘Rmpi’ mpi.spawn.Rslaves(nslaves=2) Error: could not find function "mpi.spawn.Rslaves" mpi.remote.exec(paste("I am",mpi.comm.rank(),"of",mpi.comm.size()-1)) Error: could not find function "mpi.remote.exec" Sys.getenv("PATH") [1] https://support.rstudio.com/hc/en-us/community/posts/202975648-load-Rmpi-library-from-GUI-failed-while-it-s-fine-from-CLI "/usr/local/cuda-6.5/bin:/usr/local/openmpi/bin:/opt/openlava/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/openlava-2.2/bin" Sys.getenv("LD_LIBRARY_PATH") [1] "/usr/local/openmpi/lib:/usr/local/cuda-6.5/lib64" any comments? thanks, Feng Feng Li March 18, 2015 14:10 Share Facebook Twitter LinkedIn Google+ Please sign in to leave a comment. Date Votes 4 comments 0 Rstudio version and R version: rstudio-server version 0.98.1103 ~# R R version 3.1.3 (2015-03-09) -- "Smooth Sidewalk" Copyright (C) 2015 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) Feng Li March 18, 2015 14:13 0 votes Share Facebook Twitter LinkedIn Google+ Permalink 0 A few more details might help... Is the working directory the same in both cases? Does .libPaths() produce identical output? Does the file /usr/local/lib/R/site-library/Rmpi/libs/Rmpi.so exist? Jonathan. Jonathan McPherson March 18, 2015 16:21 0 votes Share Facebook Twitter LinkedIn Google+ Permalink 0 Rmpi.so file is there. $ ls -l /usr/local/lib/R/site-library/Rmpi/libs/Rmpi.so -rwxrwxr-x 1 root staff 134456 Mar 13 20:57 /usr/local/lib/R/site-library/Rmpi/libs/Rmpi.so on GUI: .libPaths() [1] "/home/clusteradmin/R/x86_64-pc-linux-gnu-library/3.1" "/usr/local/lib/R/site-library" [3] "/usr/lib/R/site-library" "/usr/lib/R/library" library(Rmpi) Error : .onLoad failed in loadName
♦ | Report Content as Inappropriate ♦ ♦ R with MPI Hello, I plan to use R with my cluster with OpenMPI. I need the packaged 'snow' and 'Rmpi' for that, however, I get an error while downloading and installing http://r.789695.n4.nabble.com/R-with-MPI-td900915.html them: When I do a: install.packages("Rmpi", dependencies=T) I get this error: checking for mpi.h... no Try to find libmpi.so or libmpich.a checking for main in -lmpi... no libmpi not https://github.com/mlr-org/mlr/issues/263 found. exiting... However, mpi.h is present via the openmpi-devel package on my RHEL 5.3. Some of those packages need sprng 2.0 (rsprng, for instance, which is a dependency for another MPI-related package). Sprng 2.0, however, isn't in developement for error in years, I wonder how I am supposed to keep my software up to date... Any ideas on how to workaround that mpi.h problem? Please help, --polemon [[alternative HTML version deleted]] ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code. polemon Threaded Open this post in threaded view ♦ ♦ | Report Content as Inappropriate ♦ ♦ Re: R with MPI On Mon, Aug 24, 2009 error in dyn.load at 2:20 PM, polemon <[hidden email]> wrote: > Hello, I plan to use R with my cluster with OpenMPI. > I need the packaged 'snow' and 'Rmpi' for that, however, I get an error > while downloading and installing them: > When I do a: > install.packages("Rmpi", dependencies=T) > > I get this error: > checking for mpi.h... no > Try to find libmpi.so or libmpich.a > checking for main in -lmpi... no > libmpi not found. exiting... > > However, mpi.h is present via the openmpi-devel package on my RHEL 5.3. > > Some of those packages need sprng 2.0 (rsprng, for instance, which is a > dependency for another MPI-related package). Sprng 2.0, however, isn't in > developement for years, I wonder how I am supposed to keep my software up to > date... > > Any ideas on how to workaround that mpi.h problem? > > Please help, > > --polemon > I did as described here: http://www.cybaea.net/Blogs/Data/R-tips-Installing-Rmpi-on-Fedora-Linux.htmlSince Fedora and RHEL are pretty equal, I gave that installation a shot, and from what I can tell, I got pretty far. The package installed well, but when I try to load it with library(Rmpi): > library(Rmpi) Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared library '/opt/R/lib64/R/library/Rmpi/libs/Rmpi.so': libmpi.so.0: cannot open shared object file: No such file or dir
Sign in Pricing Blog Support Search GitHub This repository Watch 67 Star 464 Fork 139 mlr-org/mlr Code Issues 151 Pull requests 31 Projects 0 Wiki Pulse Graphs New issue Travis aborts due to dependency on outdated R packages #263 Closed kerschke opened this Issue Mar 18, 2015 · 22 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 4 participants kerschke commented Mar 18, 2015 Travis fails to build the package. As far as I understand the problem, it's caused by the fact that xgboost is not provided any more for R 3.1.3 (i.e., the most recent CRAN version). Therefore, someone should fix the code, so those "out-dated" packages are automatically installed (if missing) prior to the checks. larskotthoff commented Mar 18, 2015 Huh. http://cran.r-project.org/web/packages/xgboost/index.html suggests that the package is gone for good. I guess we should remove the learner then? kerschke commented Mar 18, 2015 Well, it depends on whether we need an up-to-date version of that package. Otherwise, we could install an old version from the archive, e.g. http://cran.r-project.org/src/contrib/Archive/xgboost/xgboost_0.3-3.tar.gz larskotthoff commented Mar 18, 2015 I don't think that's a good idea. This could break with new versions of R and of course would require the user to install from the archive as well. berndbischl commented Mar 18, 2015 @hetong007 had already told me about this briefly. They need(ed) to fix some stuff for CRAN let, me check now. berndbischl commented Mar 18, 2015 move learner and test to todo-files and make a note here. If they need longer we will open up a separate issue, but we need to be able to test now kerschke commented Mar 18, 2015 Ok, I'll integrate it into my pull request, so you don't have to do it as well.. berndbischl commented Mar 18, 2015 No, I am too lazy, will give you push rights. Use them with dilligence. DONE kerschke commented Mar 18, 2015 I think, I still even have those rights ;-) Just didn't want to mess with your package :) kerschke commented Mar 19, 2015 Well.. I moved all the xgboost files into the todo directory and also updated the DESCRIPTION. However, Travis still says that it wants to install xgboost :-/ Also, when I try t