CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [OpenFOAM.org] OpenMPI Installation with OpenFOAM 3.0 (https://www.cfd-online.com/Forums/openfoam-installation/164642-openmpi-installation-openfoam-3-0-a.html)

JCollins December 28, 2015 19:13

OpenMPI Installation with OpenFOAM 3.0
 
Hi All,

On installing OpenFOAM 3.0 to Ubuntu 14.04 using the standard instructions, everything seems to be working fine with the exception of OpenMPI.

As a test, if I use
Code:

sudo mpirun --np 2 ls
I get two folder listings. However is I omit the sudo:
Code:

mpirun --np 2 ls
I get the error message:
Code:

--------------------------------------------------------------------------
It looks like opal_init failed for some reason; your parallel process is
likely to abort.  There are many reasons that a parallel process can
fail during opal_init; some of which are due to configuration or
environment problems.  This failure appears to be an internal failure;
here's some additional information (which may only be relevant to an
Open MPI developer):

  opal_shmem_base_select failed
  --> Returned value -1 instead of OPAL_SUCCESS
--------------------------------------------------------------------------

is returned. How is it that only the root user can call mpirun?

Cheers

JCollins December 29, 2015 05:03

All has been resolved with a full system restart. I had made some other system updates that may have been standing in the way. No conclusive answer unfortunately.

wyldckat December 29, 2015 05:46

Greetings JCollins,

Quote:

Originally Posted by JCollins (Post 578872)
On installing OpenFOAM 3.0 to Ubuntu 14.04 using the standard instructions, everything seems to be working fine with the exception of OpenMPI.

By "standard instructions", do you mean you followed the Deb package instructions for Ubuntu or the Source instructions?

Quote:

Originally Posted by JCollins (Post 578897)
No conclusive answer unfortunately.

If you followed the instructions for the Ubuntu Deb Package, did you do this step?
Quote:

Originally Posted by http://www.openfoam.org/download/ubuntu.php
3. Open a new terminal window (see Note 2) and test that the icoFoam application, from the OpenFOAM package, is working by typing

Because starting a new terminal should have solved the problem.

Best regards,
Bruno

JCollins December 29, 2015 09:40

Hi Bruno,

Yes they are the exact instructions I followed.

I substituted opening a new terminal for calling

Code:

$ source ~/.bashrc
once I had changed the file. I needed to remove references to previous OF bashrc versions in the .bashrc as the installer does not install to the location where I normally install OF to. (/opt/OpenFoam/openfoamX.Y.Z). I did end up in the process of debugging open new terminals, to no effect.

I did not run the icoFoam but instead started with an existing model I had and proceeded to blockMesh etc. I felt this achieved a similar goal of validating the installation. calling

Code:

$ which blockMesh
for instance gave the correct location in the /opt/openfoam30 folder structure. As single process jobs these all worked fine and the paths all appeared to be correct. It was only the attempt to run parallel jobs with mpirun is where I found the issue originally posted.

wyldckat December 29, 2015 10:35

Quote:

Originally Posted by JCollins (Post 578945)
It was only the attempt to run parallel jobs with mpirun is where I found the issue originally posted.

Mmm... I'll have to test it in a new installation in a virtual machine.

But either way, this sounds like a usual issue with installing Open-MPI at the system level, namely with apt-get in this case. The issue is that the shell environment is not fully updated in situations like these:
  • unless a new terminal window is started;
  • or the user logs out and logs back in or even reboots, because the shell environment might be loaded along with the desktop manager.
The other possibility is if you still have some remnants of environment variables from the previous OpenFOAM installations that affected the paths to the Open-MPI installation, making it ambiguous and leading to failure when running in parallel.

By the way, using which only tells you where the application is located. Only either by running the application or by using ldd can we be certain that the installation is working as intended. For example:
Code:

ldd $(which blockMesh)
This will tell you all of the libraries that will be loaded according to the dependency list within blockMesh. ;)


All times are GMT -4. The time now is 05:55.