CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Installing OpenFOAM with SYSTEM MPI while using Third-Party libs (https://www.cfd-online.com/Forums/openfoam-installation/89727-installing-openfoam-system-mpi-while-using-third-party-libs.html)

m.culpo June 21, 2011 03:31

Installing OpenFOAM with SYSTEM MPI while using Third-Party libs
 
Hi,

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:

${WM_MPLIB:=OPENMPI}; export WM_MPLIB

produces in the subdirectory:

~/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/openmpi-1.4.1

the following shared objects:

libmetis-parmetis.so libparMetisDecomp.so libparmetis.so libPstream.so libptscotcherrexit.so libptscotch.so

the same installation with:

${WM_MPLIB:=SYSTEMOPENMPI}; export WM_MPLIB

produces in the directory:

~/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/openmpi-system

only "libPstream.so", 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: http://www.openfoam.com/mantisbt/view.php?id=79

To apply the patch, run:
Code:

foam3rdParty
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,
Bruno

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: http://www.openfoam.com/mantisbt/view.php?id=96

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

    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,
Bruno

m.culpo July 2, 2011 03:51

The last solution works perfectly!

Many thanks,
Massimiliano

alberto July 3, 2011 03:48

Quote:

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

Many thanks,
Massimiliano

Changing settings.sh 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 "prefs.sh".
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.

Best,


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