CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   OpenFOAM installation (

yhoarau October 14, 2011 12:49

OpenFOAM installation

I would like to install OpenFoam on our University cluster. I'm not superuser so I need to use the provided openmpi and I already have scotch in a directory.
Could someone tell me how to specify the openmpi patch and the scotch path in the installation?

Many thanks,


adhiraj October 14, 2011 14:57

I suppose you can look into the etc directory that is part of OpenFOAM, particularly the files, bashrc.

wyldckat October 14, 2011 17:20

Greetings to all!

Yannick, if mpirun is ready to be used from the command line and you are going to build OpenFOAM 2.0.1/x, then all you have to do is source OpenFOAM's bashrc file like this:

source $HOME/OpenFOAM/OpenFOAM-2.0.1/etc/bashrc WM_MPLIB=SYSTEMOPENMPI
Start a new terminal window/tab so you can make sure that the environment is set properly and you ready to go!

Or you can do as Adhiraj said and edit OpenFOAM's "etc/bashrc" file and change the WM_MPLIB entry directly to SYSTEMOPENMPI.
If Open-MPI isn't automatically activated in your terminal environment with this option, then edit the "etc/config/" file and scroll down until near the end where you can find the SYSTEMOPENMPI entry and tweak it to use your Open-MPI version.

Good luck!

yhoarau October 14, 2011 18:25

I did modify the files bashrc and My mpi is openmpi, I check the $MPI_HOME, $MPI_ARCH_PATH and $OPAL_PREFIX and they are correct.

I still have a compilation error :

could not open file ompi/mpi/cxx/pmpicxx.h for source file PstreamGlobals.C

I don't understand why?

Any ideas?

Many many thanks

wyldckat October 16, 2011 04:12

Hi Yannick,

OK, if you look that the file "$HOME/OpenFOAM/OpenFOAM-2.0.x/wmake/rules/General/mplibSYSTEMOPENMPI", you'll see that it tries to define the folders that have Open-MPI's header files and library interfaces by running:

mpicc --showme:compile
mpicc --showme:link

Do these commands give you anything? If not, then see the file "$HOME/OpenFOAM/OpenFOAM-2.0.x/wmake/rules/General/mplibOPENMPI" for ideas.

Best regards,

bego October 17, 2011 04:28

Problem with parafoam
Hello, I have a problem with paraView, I had installed OpenFOAM 2.0.1 and check the system, I had run blockMesh and icoFoam with cavity exemple, but with paraFoam I had the follow error:
ERROR: In /home/begp/OpenFOAM/ThirdParty-2.0.1/ParaView-3.10.1/VTK/Rendering/vtkXOpenGLRenderWindow.cxx, line 611
vtkXOpenGLRenderWindow (0x1d35800): GLX not found. Aborting.

Anybody can help me?

wyldckat October 17, 2011 10:47

Greetings Bego,

Either you haven't installed the drivers for your graphics card or you're missing OpenGL libraries... either way, check the link in my signature, I believe I've got some references written down somewhere about this...

Good luck,

All times are GMT -4. The time now is 10:59.