NB HECToR's front-end nodes, where serial jobs are run, are dual-core and her back-end nodes, where parallel jobs are run, are quad-core. Further, all codes compiled for quad-core nodes may fail when run on dual-core nodes. Since all OpenFOAM codes can be run in either serial or parallel mode, the default, centrally installed version has been compiled for dual-core nodes.
First you must create the typical OpenFOAM working directory structure in your work space on HECToR, i.e., for a user with the username of gavin:
cd /work/z01/z01/gavin mkdir OpenFOAM cd OpenFOAM mkdir OpenFOAM-1.6 mkdir gavin-1.6 cd OpenFOAM-1.6 mkdir etc
Then, copy the default OpenFOAM bashrc file from the OpenFOAM package account, /work/y07/y07/openfoam, into your own etc directory, i.e.
cp /work/y07/y07/openfoam/dual-core/OpenFOAM/OpenFOAM-1.6/etc/bashrc \\ /work/z01/z01/gavin/OpenFOAM/OpenFOAM-1.6/etc/.
You must now edit your local copy of the OpenFOAM bashrc file, to set your User Directory. You have recently create this User Directory, called <username>-1.6, in your local OpenFOAM directory.
Explicitly, the following line in the file ../OpenFOAM/OpenFOAM-1.6/etc/bashrc
export WM_PROJECT_USER_DIR=/work/y07/y07/openfoam/dual-core/$WM_PROJECT/ /$USER-$WM_PROJECT_VERSIONmust be replaced with a line which closely resembles:
export WM_PROJECT_USER_DIR=/work/z01/z01/gavin/$WM_PROJECT/ /$USER-$WM_PROJECT_VERSION
You should now test the installation using following batch script.
#!/bin/bash --login #PBS -q serial #PBS -N testInstall #PBS -l walltime=00:20:00 #PBS -A y07 . /opt/modules/3.1.6/init/bash module swap PrgEnv-pgi PrgEnv-gnu module swap gcc gcc/4.3.3 module swap xt-mpt xt-mpt/3.2.0 source /work/y07/y07/openfoam/dual-core/OpenFOAM/OpenFOAM-1.6/etc/bashrc export LD_LIBRARY_PATH=$WM_PROJECT_DIR/mylib:$LD_LIBRARY_PATH cd $WM_PROJECT_USER_DIR foamInstallationTest
If this is configured correct, then you should now be able to run OpenFOAM as normal, i.e. from within the <username>-1.6 directory.