From ross at biostat.ucsf.edu  Thu Mar 13 19:40:08 2014
From: ross at biostat.ucsf.edu (Ross Boylan)
Date: Thu, 13 Mar 2014 11:40:08 -0700
Subject: [Rd] 2 versions of same library loaded
In-Reply-To: <1394732791.15874.53.camel@localhost>
References: <1394660055.25697.92.camel@localhost>
	<E236A681-5D73-478E-8FB2-3B04837B00DA@r-project.org>
	<1394686856.15874.16.camel@localhost>
	<E66794E69CFDE04D9A70842786030B933FA936DE@PA-MBX01.na.tibco.com>
	<1394732791.15874.53.camel@localhost>
Message-ID: <1394736008.15874.70.camel@localhost>

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.



[Rd] 2 versions of same library loaded
Ross Boylan