[MPICH] Re: New version of MPICH2 (1.0.2)

Ralph M. Butler rbutler at mtsu.edu
Sat Jun 18 19:38:53 CDT 2005


This is not an mpd issue.  It is really a linux/unix issue.
You can see mention of LD_LIBRARY_PATH being cleared if you look
at the man page "man 8 ld.so" which says:
    The necessary shared libraries needed by the program are searched
    for in the following order
       - Using the environment variable LD_LIBRARY_PATH
         (LD_AOUT_LIBRARY_PATH for a.out programs).  Except if  the
	 executable is a setuid/setgid binary, in which case it is
	 ignored.
This is done for security reasons.
A common way around the problem for standard or widely used libraries
is for the sysadmin to add dirs to /etc/ld.so.conf and rerun ldconfig.
That way you don't need to set LD_LIBRARY_PATH at all.

Many folks believe that the use of LD_LIBRARY_PATH has been exploited
beyond the intended usage.  I do not necessarily support this fellow's
position, but you might see this webpage for commentary by someone who
is fairly religious on the issue:
    http://www.visi.com/~barr/ldpath.html

> Date: Sun, 12 Jun 2005 11:15:59 +0200
> From: Trach-Minh Tran <trach-minh.tran at epfl.ch>
> To: Rusty Lusk <lusk at mcs.anl.gov>
> Cc: mpich-discuss at mcs.anl.gov
> Subject: Re: [MPICH] Re: New version of MPICH2 (1.0.2)
>
> On 06/12/2005 08:04 AM, Trach-Minh Tran wrote:
> > On 06/12/2005 02:20 AM, Rusty Lusk wrote:
> >
> >>> - The mpdrun/mpirun did not export the current LD_LIBRARY_PATH
> >>> environment variable.
> >>>   It seems however that it does export the other variables (PATH,
> >>> PWD, ...) !
> >>>   Spawning the processes with mpdboot and mpirun from the 1.0.1
> >>> version appears to
> >>>   work with codes compiled with the 1.0.2 version!
> >>>
> >>
> >>
> >> You will want to use the MPI-2 standard 'mpiexec' instead of mpirun.
> >> By default, it should export all environment variables.  Let us know if
> >> it doesn't.
> >>
> > Both mpiexec and mpdrun fail to export LD_LIBRARY_PATH, as mpirun. It is
> > strange that it seems that all environment variables are exported *except*
> > LD_LIBRARY_PATH!
> >
>
> Ok, I have just found out that the setuid bit of "mpdroot" was set! After removing
> it, mpirun/mpdrun/mpiexec work as expected now :-) May be somebody can explain me
> why?




More information about the mpich-discuss mailing list