[Rd] 2 versions of same library loaded

Ross Boylan ross at biostat.ucsf.edu
Thu Mar 13 19:40:08 CET 2014


On Thu, 2014-03-13 at 10:46 -0700, Ross Boylan wrote:
> 
> It seems very odd that the same Rmpi.so is requiring both the old and
> new libmpi.so (compare to the first 
> trace in in point 1).  There is this code in Rmpi.c:
>     if (!dlopen("libmpi.so.0", RTLD_GLOBAL | RTLD_LAZY)
>         && !dlopen("libmpi.so", RTLD_GLOBAL | RTLD_LAZY)){
> 
> 
> So I'm still not sure what it's using, or if there is some mishmash of
> the 2. 

There is an explanation for the explicit load in the Changelog:
2007-10-24, version 0.5-5:

dlopen has been used to load libmpi.so explicitly. This is mainly useful
for Rmpi under OpenMPI where one might see many error messages:
mca: base: component_find: unable to open osc pt2pt: file not found
(ignored) if libmpi.so is not loaded with RTLD_GLOBAL flag.
http://www.stats.uwo.ca/faculty/yu/Rmpi/changelogs.htm

There is another interesting note about openmpi:
It looks like that the option --disable-dlopen is not necessary to
install Open MPI 1.6, at least on Debian. This might be R's .onLoad
correctly loading dynamic libraries and Open MPI is not required to be
compiled with static libraries enabled.



More information about the R-devel mailing list