1

I installed OpenMPI-3.0 over an existing version of MPI, but in a separate directory as one of the four options recommended in the openMPI website

The installation seems to have worked fine but when I type ompi_info on the terminal, I still get the information for version 1.10 in my terminal from which I assume mpirun will use the libraries from version 1.10 instead of MPI-3.0 . How can I enable and make sure

 mpirun -np [number_of_procs] a.out 

uses the newer version of MPI instead of old version ?

ggulgulia
  • 2,720
  • 21
  • 31
  • 1
    Wha does `which ompi_info` says ? Are you running the new one ? Do you have anything related to Open MPI in your environment ? Do you have a `$HOME/.openmpi` directory that could fool the new version ? – Gilles Gouaillardet Dec 30 '17 at 01:32
  • i don't understand 'which ompi_info' . I myself am a bit lost here. I simply type ompi_info to see what I get. The output of which looks like this : Package: Open MPI buildd@lgw01-57 Distribution Open MPI: 1.10.2 Open MPI repo revision: v1.10.1-145-g799148f – ggulgulia Dec 30 '17 at 01:44
  • 1
    Instead of `ompi_info`, try `which ompi_info` to confirm you are trying the new version – Gilles Gouaillardet Dec 30 '17 at 01:53
  • aah! i got confused. Sorry for that. I just tried that and the output is : /usr/bin/ompi_info – ggulgulia Dec 30 '17 at 01:58
  • and where did you install the new Open MPI ? if you do not know, simply post your `configure` command line. – Gilles Gouaillardet Dec 30 '17 at 02:02
  • i installed MPI 3.0 in `usr/local/MPI3.0` and within the bin of that directory is also a `ompi_info` file. I suppose I somehow have to tell my bash to link to MPI3.0 directory – ggulgulia Dec 30 '17 at 09:59
  • Normally it is better to use the switching features of your Linux distro, like modules in more professional setups, or `/etc/alternatives/` in more basic ones. Otherwise you have to setup your `PATH`, `LIBRARY_PATH`, `LD_LIBRARY_PATH` and so on yourself manually. – Vladimir F Героям слава Dec 30 '17 at 10:02
  • 2
    @gajendra yep, you have to update your `PATH` or use a full pathname to invoke `/usr/local/MPI3.0/bin/ompi_info`. – Gilles Gouaillardet Dec 30 '17 at 10:18
  • @VladimirF if the `mpicc` and friends wrappers are used, there should be no need to set `LIBRARY_PATH`. In the case of Open MPI, it is possible to `configure --enable-mpirun-prefix-by-default` to avoid setting `LD_LIBRARY_PATH` too. as far as i am concerned, MPI wrappers should always be used. fwiw, i always `configure --enable-mpirun-prefix-by-default`, but this is clearly a matter of taste. For the sake of completion, this option prevents the install directory from being moved (and i never do that anyway) – Gilles Gouaillardet Dec 30 '17 at 10:22
  • @Gilles. invoking `/usr/local/MPI3.0/bin/ompi_info` gives me the output I had been longing to see. But how to set up the `PATH, LIBRARY_PATH, LD_LIBRARY_PATH` just for this version of openMPI ? I've never done that. This post : https://stackoverflow.com/questions/13428910/how-to-set-the-environmental-variable-ld-library-path-in-linux says something but apparently none of the answers is accepted . Maybe you can write the detailed reply as a reply to my post instead of comment. My current linux distribution is `Ubuntu 16.04 LTS` if that helps in anyway – ggulgulia Dec 30 '17 at 10:30

0 Answers0