CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[OpenFOAM.org] OpenMPI Installation with OpenFOAM 3.0

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 28, 2015, 20:13
Default OpenMPI Installation with OpenFOAM 3.0
  #1
New Member
 
J Collins
Join Date: Feb 2015
Posts: 14
Rep Power: 11
JCollins is on a distinguished road
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 is offline   Reply With Quote

Old   December 29, 2015, 06:03
Default
  #2
New Member
 
J Collins
Join Date: Feb 2015
Posts: 14
Rep Power: 11
JCollins is on a distinguished road
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.
JCollins is offline   Reply With Quote

Old   December 29, 2015, 06:46
Default
  #3
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings JCollins,

Quote:
Originally Posted by JCollins View Post
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 View Post
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
__________________
wyldckat is offline   Reply With Quote

Old   December 29, 2015, 10:40
Default
  #4
New Member
 
J Collins
Join Date: Feb 2015
Posts: 14
Rep Power: 11
JCollins is on a distinguished road
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.
JCollins is offline   Reply With Quote

Old   December 29, 2015, 11:35
Default
  #5
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by JCollins View Post
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.
wyldckat is offline   Reply With Quote

Reply

Tags
openfoam 3.0.0, openmpi


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[foam-extend.org] problems with openFoam extend 3.0 installation AmirBaqa1987 OpenFOAM Installation 1 December 20, 2016 20:17
Openfoam 2.1 installation in ubuntu 12.04 jsm OpenFOAM Installation 11 May 7, 2012 05:56
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 07:55
OpenFOAM 1.7.1 installation problem on Fedora 14 armonica OpenFOAM Installation 16 March 31, 2011 14:16
Installation of OpenFOAM 1.7.1 to OprnSUSE 11.2 superfxfund OpenFOAM Installation 3 November 11, 2010 03:15


All times are GMT -4. The time now is 07:00.