Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [OMPI users] Fwd: installation with two different compilers
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2009-10-26 17:43:37

Sorry for the delay in answering. More below.

On Oct 23, 2009, at 4:02 AM, Francesco Pietra wrote:

> I have also put the 1.3.3 version (gfortran) on the path:
> #For openmpi-1.2.6 Intel compiler
> if [ "$LD_LIBRARY_PATH" ] ; then
> export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
> else
> export LD_LIBRARY_PATH="/usr/local/lib"
> fi
> #For openmpi-1.3.3 gnu (gfortran) compiled
> if [ "$LD_LIBRARY_PATH" ] ; then
> export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/lib"
> else
> export LD_LIBRARY_PATH="/opt/lib"
> fi

I think you're going to run into issues with the above scheme.

In particular, if you have both the 1.2.6 and 1.3.3 libraries in your
LD_LIBRARY_PATH, then the *first* (etc.) is going to be used
-- i.e., the 1.2.6 version. This is just the way Linux works -- it
can't know that you want the 2nd (or 3rd or 4th or ...); it
always just takes the first matching library that it finds.

> francesco_at_tya64:~$ $PATH
> bash: /opt/etsf/bin:/usr/local/delphi_4.1.1:/opt/intel/cce/10.1.015/
> bin:/opt/intel/fce/10.1.015/bin:/usr/local/bin/vmd:/usr/local/
> chimera/bin:/opt/etsf/bin:/usr/local/delphi_4.1.1:/opt/intel/cce/
> 10.1.015/bin:/opt/intel/fce/10.1.015/bin:/usr/local/bin/vmd:/usr/
> local/chimera/bin:/opt/etsf/bin:/usr/local/delphi_4.1.1:/opt/intel/
> cce/10.1.015/bin:/opt/intel/fce/10.1.015/bin:/usr/local/bin/vmd:/usr/
> local/chimera/bin:/usr/local/bin:/usr/bin:/bin:/usr/games:/home/
> francesco/hole2/exe:/opt/bin:/usr/local/amber10/exe:/usr/local/dock6/
> bin:/home/francesco/hole2/exe:/opt/bin:/usr/local/amber10/exe:/usr/
> local/dock6/bin:/home/francesco/hole2/exe:/opt/bin:/usr/local/
> amber10/exe:/usr/local/dock6/bin:
> No such file or directory

Note that typing "$PATH" at a shell prompt is not a valid command,
which is why you're getting the error message. I think you want "echo
$PATH". Ditto for "echo $LD_LIBRARY_PATH".

> To get info, I have to command
> $ /opt/bin/ompi_info
> which reports correctly.
> $ ompi_info
> reports about previous installation of 1.2.6 version (intel).

Correct. There is deep mojo involved here; I can explain it all if
you care, but the *easiest* solution is just to have one Open MPI in
your PATH/LD_LIBRARY_PATH at a time. A common mechanism that people
use is a software package called "modules" that allows simple
switching of your run-time environment. For example:

shell$ module load ompi/1.2.6
shell$ ompi_info
...shows the correct output for 1.2.6
shell$ module unload ompi
shell$ module load ompi/1.3.3
shell$ ompi_info
...shows the correct output for 1.3.3

Check out modules -- -- and see if that helps

If you want further explanations, let me know, but it gets a bit
complicated. :-)

Jeff Squyres