CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   Installing OpenFOAM with SYSTEM MPI while using Third-Party libs (

m.culpo June 21, 2011 03:31

Installing OpenFOAM with SYSTEM MPI while using Third-Party libs

I am trying to install OpenFOAM 1.7.1 on a linux cluster using the OpenMPI libraries installed on the system. Anyhow, I am not able to compile cleanly the Third party libraries (metis,scotch). In fact, while a complete installation with Gcc 4.5.2 and Third-party OpenMPI:


produces in the subdirectory:


the following shared objects:

the same installation with:


produces in the directory:


only "", i.e. it seems that Third-party libraries are not built. Even though a bad-hack to make things work is to manually copy the missing shared objects from the first directory to the second, I would like to ask if anybody knows a clean way to compile and install OpenFOAM using SYSTEM OpenMPI. I apologize if the question is somehow trivial, but I am an OpenFOAM beginner and I was not able to find further clues on the subject on the web.

Many thanks in advance to anyone answering

wyldckat June 25, 2011 07:57

Greetings Massimiliano and welcome to the forum!

I think you should check this bug report:

To apply the patch, run:

gunzip ThirdParty_Allwmake.diff.gz
patch -p0 < ThirdParty_Allwmake.diff

Running Allwmake a second time before applying this patch might also fix the problem!

Best regards,

m.culpo July 1, 2011 08:07

Hi Bruno,

and many thanks for the hint!

Anyhow, I tried the patch and it does not seem to solve the problem. :-(

wyldckat July 1, 2011 20:03

Hi Massimiliano,

OK, I had to test this for myself... And came to the same problem! Then I remembered of another bug report I made a while back:

Basically, edit the file etc/, search for the following block of code in the SYSTEMOPENMPI entry and add the line in bold:

    export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
    export MPI_ARCH_PATH="${libDir%/*}"
    unset mpi_version libDir

Start a new terminal or source etc/bashrc once again and run Allwmake. This should do the trick :cool:

Best regards,

m.culpo July 2, 2011 03:51

The last solution works perfectly!

Many thanks,

alberto July 3, 2011 03:48


Originally Posted by m.culpo (Post 314466)
The last solution works perfectly!

Many thanks,

Changing is going to potentially cause problems with git, if you use OpenFOAM 2.0.x, since if the file is changed in the repository, git won't fast-forward and it will ask you to merge.

Custom settings like this should go into the file "".
You find an example of this file in ~/OpenFOAM/OpenFOAM-2.0.x/etc/config/example/, and the file should be saved into ~/OpenFOAM/OpenFOAM-2.0.x/etc.

Simply uncomment "export WM_MPLIB=SYSTEMOPENMPI" in the example, and you are done.


All times are GMT -4. The time now is 08:04.