[R-sig-hpc] trouble installing Rmpi

Dirk Eddelbuettel edd at debian.org
Tue Nov 30 03:14:33 CET 2010


On 29 November 2010 at 19:46, John Joseph wrote:
| 
| Thanks, Kevin and Dirk, for the help you've given me.  I uninstalled
| (COMPLETELY unistalled) all of R, and then re-installed Rmpi, using the simple
| command Dirk had recommended: sudo apt-get install r-cran-rmpi.I am no longer
| getting errors when entering the script "library(Rmpi)", but I'm still having

At this point I strongly recommend two things:

  a) Ascertain that Open MPI works, either just on localhost or between two
     or more machines.

     There are numerous 'hello World' example for C and/or C++ floating
     around, try those.  [ This assumes some familiarity with compilers etc;
     if unsure skip the step. ]

  b) Ascertain that Rmpi work by running a helloWorld example in R.

Example for a) and b) are for example in the 'Intro to HPC with R' slides
from the different tutorials I have given on this.

| trouble associated with dyn.load().  I haven't found clarity by reading the
| documentation.  Maybe someone can at least help me focus my search among what
| I've looked at already: makefile flags/options, installation of the fortran
| compiler software (Intel Composer, latest edition), R manuals.
| Here's the problem I'm having:
| 
| > library(Rmpi)
| > library(snow)
| > setwd("/home/john/LREWI15_TIO")
| > dyn.load("./swat2009_i64_calibrate.so")
| Error in dyn.load("./swat2009_i64_calibrate.so") :
|   unable to load shared library '/home/john/LREWI15_TIO/./
| swat2009_i64_calibrate.so':
|   libifport.so.5: cannot open shared object file: No such file or directory
| >

I am confused:

   c) What is this program?  

   d) Why do you load Rmpi and then compile code? The idea of Rmpi is to give
      you MPI idioms _in R_ without the need to compile anything more.

   e) What is libifport ?
 
| I've also attached the makefile I used to generate swat2009_i64_calibrate.so,
| if it helps.

I saw no attachment.

Good luck,  Dirk

 
| Any guidance would be much appreciated. 
| 
| John Joseph
| 
| P.S.  Thanks for the added clarity regarding what worked for you for Rmpi.  If
| you think the instructions are still relevant to my new situation, I would be
| happy to still try to work them out.  But I have a little fear of digging
| myself into a deeper hole, so I'll need to ask you a couple of things first.
| 
| -----Original Message-----
| From: r-sig-hpc-bounces at r-project.org on behalf of Kevin.Buckley at ecs.vuw.ac.nz
| Sent: Sun 11/21/2010 4:11 PM
| To: r-sig-hpc at r-project.org
| Subject: Re: [R-sig-hpc] trouble installing Rmpi
| 
| >
| > Thanks for your help, Kevin.
| >
| > These instructions look very helpful, and I've begun studying them.
| > I'm such a newbie that I understand little of it.  I'm learning a
| > little by reading the documentation, but I'm just not getting all of
| > it.  It seems that the idea is to make a file called "Makevars" that
| > is stored in certain directories.  I did the first three lines, but
| > can't find where Makevars went...Well, I did find a Makevars and
| > Makevars.win file several directories deep into the R directory that
| > was already there, but I don't know if these two files were created
| > by the 3 lines I wrote or were already there...Anyway, as you can
| > see, I'm struggling with the basics.
| >
| > Another thing is that when I go to etc/profile.d I do not find
| > openmpi.sh within it.
| >
| > In any case, I appreciate this help you gave.
| >
| > John Joseph
| 
| hey John,
| 
| it seems as though I forgot to copy the list into my "advice/experience"
| so am now doing so (see below for original)
| 
| In respect of the issues you raise, the /etc/profile.d/openmpi.sh
| is a LOCAL thing, which merely gives the users, at login time, the
| correct environment (paths, etch) for OpenMPI.
| 
| Chances are that that's being handled for you in some way because
| you installed OpenMPI from a package.
| 
| The inclusion of that line there was just me running things explicitly
| as a "hedge" against a user who might not have had such an environment
| set up. Apologies, I should have tailored the commands to remove the
| "local" bits.
| 
| As to the R Makevars file I referred to, again the syntax of my
| suggestions is creating it as though it was not there (I should
| have, of course, suggested checking to see if the user account
| being used for the installation already had such a file as my
| "instructions" trample all over it).
| 
| That ties in with the note about removing the Makevars file
| afterwards: if you already had one and moved it out of the
| way, or otherwise appended the variables that Rmpi seemed to
| need, you'ld want to simply remove them or replace the old file,
| rather than bin it.
| 
| But basically, you won't see that file ~/.R/Makevars (you might
| not even see the directory ~/.R) unless it had already been created
| beneath the home directory of the user doing the installtion.
| 
| Kevin
| 
| PS
| 
| Just in case it is something you have not seen before, the ~ (tilde)
| character at the start of the path to the Makevears referred to
| is a shorthand for the home directory of the user, in case the user
| doing the install.
| 
| 
| > -----Original Message-----
| > From: Kevin.Buckley at ecs.vuw.ac.nz
| > Sent: Thu 11/18/2010 3:35 PM
| > To: John Joseph
| > Subject: Re: [R-sig-hpc] trouble installing Rmpi
| >
| >
| > Not directly addressing your install methodology issues, John, but
| >
| >  "the way it worked for me"
| >
| > was to install from outside of R itself, but still using R, so as
| > to have some control over the paths to our OpenMPI installtion.
| >
| > Note the use of the R "Makevars" file to override some
| > of the defaults R might be picking up if left to its own
| > devices:
| >
| > The "mpicc" is the OpenMPI-aware C compiler wrapper
| >
| > You might need to tweak the paths for Ubuntu's OpenMPI package
| > setup.
| >
| > This was for Rmpi_0.5-8.tar.bz2
| >
| > mkdir ~/.R
| > echo CC=mpicc > ~/.R/Makevars
| > echo SHLIB_LD=mpicc >> ~/.R/Makevars
| > . /etc/profile.d/openmpi.sh
| >
| > /opt/R/bin/R CMD INSTALL \
| >  --library=/opt/Rlibs \
| >  /path/to/Rmpi_0.5-8.tar.bz2 \
| >  --configure-args=--with-Rmpi-type=OPENMPI  \
| >  --configure-args=--with-Rmpi-libpath=/opt/openmpi/1.4.2/lib \
| >  --configure-args=--with-Rmpi-include=/opt/openmpi/1.4.2/include
| >
| > Oh yeah, once you have built the package, (assuming you do!),
| > remove the file
| >
| >  ~/.R/Makevars
| >
| > unless you want all future R packages you build by hand, to be built
| > against OpenMPI that is !
| >
| > Kevin
| 
| --
| Kevin M. Buckley                                  Room:  CO327
| School of Engineering and                         Phone: +64 4 463 5971
|  Computer Science
| Victoria University of Wellington
| New Zealand
| 
| _______________________________________________
| R-sig-hpc mailing list
| R-sig-hpc at r-project.org
| https://stat.ethz.ch/mailman/listinfo/r-sig-hpc
| 
| 
| 
| 
| 
| 
| xMakefile.calibrate.gmk, Makefile.ca [Click mouse-2 to save to a file]
| _______________________________________________
| R-sig-hpc mailing list
| R-sig-hpc at r-project.org
| https://stat.ethz.ch/mailman/listinfo/r-sig-hpc

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com



More information about the R-sig-hpc mailing list