[R-sig-hpc] Rmpi on NetBSD with OpenMPI

Kevin.Buckley at ecs.vuw.ac.nz Kevin.Buckley at ecs.vuw.ac.nz
Tue May 18 00:06:26 CEST 2010


I have moved this off the OpenMPI devel list as this is more
of an "interaction with OpenMPI" than an issue for the OpenMPI
development community and moved it to the R HPC SIG list as
the discussion pertains to how the Rmpi package interacts with
OpenMPI.

Aleksej (the NetBSD maintainer of OpenMPI) in response to this

> > Mark Davies has now determined a way to force the Rmpi package to
> > load libmpi.so, ahead of loading the Rmpi shared library itself,
> > so that what appear to be the missing symbols are then available,
> > for any future loads of the OpenMPI component libraries.
> >
> > On the version of Rmpi that I have been using, 0.5-8, the "fix"
> > can be effected by the following, one, line, patch
> >
> > --- Rmpi/R/zzz.R        2009-02-04 05:27:08.000000000 +1300
> > +++ Rmpi.local/R/zzz.R  2010-05-17 14:25:27.000000000 +1200
> > @@ -7,6 +7,7 @@
> >      #    cat(vertxt)
> >
> >      # Check if lam-mpi is running
> > +    dyn.load("/usr/pkg/lib/libmpi.so", local=FALSE)
> >      library.dynam("Rmpi", pkg, lib)
> >      if (!TRUE)
> >         stop("Fail to load Rmpi dynamic library.")

writes as follows,

> This patch is wrong even on NetBSD, some deployments use other
> LOCALBASE rather than default "/usr/pkg". You identify it correct
> that this isn't valid approach. Package should detect which library
> it should use. In case you want it fixed as soon as possible, file
> PR for pkgsrc, we'll handle it at packaging level.

We, Mark in determining a fix and myself in posting it, were not
suggesting that the patch was "right", merely demonstrating that
it "worked".

As mentioned in the original R HPC SIG posting, the patch is wrong
from an Rmpi persepective too: there's not enough R there!

Furthermore, and here is where my (growing) NetBSD knowledge fails me,
it would seem likely that the package is not going to be under PkgSrc
control.

R the package, used to install Rmpi, has been patched to operate within
PkgSrc, but once you have it up and ruuning, many/most R users/deployers
would expect to just be able to run

R CMD INSTALL package

for any R add-on package.

Is there then a "standard" way to tailor R add-on packages, such as
Rmpi, to make them NetBSD aware ?

Similarly, is there a "standard" way for R packages to test for, and/or
find, a library needed in a situation like this, which would surely be
the place at which a NetBSD-aware patch should be made.

It would seem that the Rmpi package would not lose anything by testing
for, and loading if not loaded, the library on ANY platform, however
if it did so, it would then allow for a cleaner implemetation of any
platform-specific patches.

-- 
Kevin M. Buckley                                  Room:  CO327
School of Engineering and                         Phone: +64 4 463 5971
 Computer Science
Victoria University of Wellington
New Zealand



More information about the R-sig-hpc mailing list