Download OpenFOAM-2.2.x.tar.gz and OpenFOAM-2.3.x.tar.gz from http://sourceforge.net/projects/centfoam
install in /opt/OpenFOAM/
$ ls /opt/OpenFOAM –> OpenFOAM-2.2.x OpenFOAM-2.3.x ThirdParty-2.2.x ThirdParty-2.3.x
source normally or create module files: /etc/modulefiles/openfoam/2.2.x and 2.3.x
they look like (just execute the command module load openfoam/2.2.x before using that OpenFOAM version.
#%Module1.0####################################################################
##
## openfoam/2.2.x modulefile
##
##
##
proc ModulesHelp { } {
puts stderr ”\tAdd OpenFOAM 2.2.x environment by Björn Bergqvist.”
}
module-whatis ”Adds OpenFOAM 2.2.x links, aliases and paths”
set home $env(HOME)
set user $env(USER)
## Add my bin directory to the path
append-path PATH /opt/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/gperftools-svn/bin:/opt/OpenFOAM/ThirdParty-2.2.x/platforms/linux64Gcc/openmpi-1.7.2/bin:/opt/OpenFOAM/ThirdParty-2.2.x/platforms/linux64/gcc-4.7.2/bin:$home/OpenFOAM/$user-2.2.x/platforms/linux64GccDPOpt/bin:/opt/OpenFOAM/site/2.2.x/platforms/linux64GccDPOpt/bin:/opt/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPOpt/bin:/opt/OpenFOAM/OpenFOAM-2.2.x/bin:/opt/OpenFOAM/OpenFOAM-2.2.x/wmake
## Set an environment variable
setenv FOAM_APPBIN ”/opt/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPOpt/bin”
setenv FOAM_APP ”/opt/OpenFOAM/OpenFOAM-2.2.x/applications”
setenv FOAM_EXT_LIBBIN ”/opt/OpenFOAM/ThirdParty-2.2.x/platforms/linux64GccDPOpt/lib”
setenv FOAM_INST_DIR ”/opt/OpenFOAM”
setenv FOAM_JOB_DIR ”/opt/OpenFOAM/jobControl”
setenv FOAM_LIBBIN ”/opt/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPOpt/lib”
setenv FOAM_MPI ”openmpi-1.7.2”
setenv FOAM_RUN ”$home/OpenFOAM/$user-2.2.x/run”
Update: recompile openmpi
I got a problem with mpirun on my 2.2.x installation so I had to recompile openmpi
Update: Errormessage:
$ mpirun -np 4 simpleFoam -parallel
————————————————————————–
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
————————————————————————–
————————————————————————–
It looks like orte_init failed for some reason; your parallel process is
likely to abort. There are many reasons that a parallel process can
fail during orte_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_init failed
–> Returned value Error (-1) instead of ORTE_SUCCESS
————————————————————————–
Problem solution
module load openfoam/2.2.x
cd /opt/OpenFOAM/ThirdParty-2.2.x
rm -r platforms/linux64Gcc/openmpi-1.7.2
./Allwmake
and
module load openfoam/2.3.x
cd /opt/OpenFOAM/ThirdParty-2.3.x
rm -r platforms/linux64Gcc/openmpi-1.6.5/
./Allwmake