update foamInstallationTest for 1.6 and new FOAM_SITE_{APPBIN,LIBBIN}

This commit is contained in:
Mark Olesen
2009-07-23 10:59:10 +02:00
parent 229c07e5fc
commit d28cf0f242
3 changed files with 52 additions and 46 deletions

22
README
View File

@ -1,8 +1,8 @@
# -*- mode: org; -*- # -*- mode: org; -*-
# #
#+TITLE: *OpenFOAM README for version 1.5* #+TITLE: OpenFOAM README for version 1.6
#+AUTHOR: OpenCFD Ltd. #+AUTHOR: OpenCFD Ltd.
#+DATE: 26 August 2008 #+DATE: July 2009
#+LINK: http://www.opencfd.co.uk #+LINK: http://www.opencfd.co.uk
#+OPTIONS: author:nil ^:{} #+OPTIONS: author:nil ^:{}
@ -62,7 +62,7 @@
in the OpenFOAM release. e.g. in in the OpenFOAM release. e.g. in
+ $HOME/OpenFOAM/OpenFOAM-<VERSION>/etc/ + $HOME/OpenFOAM/OpenFOAM-<VERSION>/etc/
+ where <VERSION> corresponds to the version 1.4, 1.5, ... + where <VERSION> corresponds to the version 1.5, 1.6, ...
1) EITHER, if running bash or ksh (if in doubt type 'echo $SHELL'), source the 1) EITHER, if running bash or ksh (if in doubt type 'echo $SHELL'), source the
etc/bashrc file by adding the following line to the end of your etc/bashrc file by adding the following line to the end of your
@ -135,7 +135,7 @@
* Getting Started * Getting Started
Create a project directory within the $HOME/OpenFOAM directory named Create a project directory within the $HOME/OpenFOAM directory named
<USER>-<VERSION> (e.g. 'chris-1.5' for user chris and OpenFOAM version 1.5) <USER>-<VERSION> (e.g. 'chris-1.6' for user chris and OpenFOAM version 1.6)
and create a directory named 'run' within it, e.g. by typing: and create a directory named 'run' within it, e.g. by typing:
+ mkdir -p $HOME/OpenFOAM/${USER}-${WM_PROJECT_VERSION}/run + mkdir -p $HOME/OpenFOAM/${USER}-${WM_PROJECT_VERSION}/run
@ -156,12 +156,13 @@
* Compiling Paraview 3.3 and the PV3FoamReader module * Compiling Paraview 3.3 and the PV3FoamReader module
A version of Qt 4.3.x must be installed to compile ParaView. The compilation A version of Qt 4.3.x must be installed to compile ParaView. The compilation
is a fairly simple process using the supplied buildParaView3.3-cvs script that is a fairly simple process using the supplied buildParaView script that
has worked is our tests with other packages supplied in the ThirdParty has worked in our tests with other packages supplied in the ThirdParty
directory, namely cmake-2.4.6 and gcc-4.3.1. Execute the following: directory, namely cmake-2.6.4 and gcc-4.3.3. Execute the following:
+ cd $FOAM_INST_DIR/ThirdParty + cd $WM_THIRD_PARTY_DIR
+ rm -rf ParaView3.3-cvs/platforms + rm -rf paraview-3.6/platforms
+ buildParaView3.3-cvs + buildParaView
The PV3FoamReader module is an OpenFOAM utility that can be compiled in the The PV3FoamReader module is an OpenFOAM utility that can be compiled in the
usual manner as follows: usual manner as follows:
@ -184,3 +185,4 @@
is the default mode on a 64-bit machine. To use an installed 32-bit version, is the default mode on a 64-bit machine. To use an installed 32-bit version,
the user must set the environment variable WM_ARCH_OPTION to 32 before the user must set the environment variable WM_ARCH_OPTION to 32 before
sourcing the etc/bashrc (or etc/cshrc) file. sourcing the etc/bashrc (or etc/cshrc) file.

View File

@ -33,9 +33,9 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Base settings # Base settings
FOAM_VERSION=1.5 FOAM_VERSION=1.6
SUPPLIED_VERSION_GCC=4.3.1 SUPPLIED_VERSION_GCC=4.3.3
MIN_VERSION_GCC=4.2.0 MIN_VERSION_GCC=4.3.1
# General # General
WIDTH=20 WIDTH=20
@ -46,10 +46,8 @@ CRITICALERROR=0
SSHRSHOK=0 SSHRSHOK=0
# System variables # System variables
USER_SHELL=`basename $SHELL`
HOST_NAME=`uname -n` HOST_NAME=`uname -n`
OS=`uname -s` OS=`uname -s`
OS_VERSION=`uname -r`
USER_NAME=$LOGNAME USER_NAME=$LOGNAME
if [ ! -n $USER_NAME ]; then if [ ! -n $USER_NAME ]; then
USER_NAME=$USER USER_NAME=$USER
@ -92,7 +90,7 @@ length () {
stringLength () { stringLength () {
echo $1 | wc -m | tr -d " " echo $1 | wc -m | tr -d " "
} }
@ -125,7 +123,7 @@ reportEnv () {
SunOS) SunOS)
if /usr/bin/test -e $EXP_ENV ; then if /usr/bin/test -e $EXP_ENV ; then
EXISTS=" yes " EXISTS=" yes "
if [ "$2" != "noPath" ]; then if [ "$2" != noPath ]; then
ON_PATH=" no " ON_PATH=" no "
OLD_IFS=$IFS OLD_IFS=$IFS
IFS=':' IFS=':'
@ -152,7 +150,7 @@ reportEnv () {
*) *)
if [ -e "$EXP_ENV" ] ; then if [ -e "$EXP_ENV" ] ; then
EXISTS=" yes " EXISTS=" yes "
if [ "$2" != "noPath" ]; then if [ "$2" != noPath ]; then
ON_PATH=" no " ON_PATH=" no "
OLD_IFS=$IFS OLD_IFS=$IFS
IFS=':' IFS=':'
@ -182,10 +180,10 @@ reportEnv () {
fi fi
ERROR="false" ERROR="false"
if [ "$EXISTS" = "no" ] || [ "$ON_PATH" = "no" ]; then if [ "$EXISTS" = no ] || [ "$ON_PATH" = no ]; then
ERROR="true" ERROR="true"
fi fi
if [ "$3" = "yes" ] && [ "$ERROR" = "true" ]; then if [ "$3" = yes ] && [ "$ERROR" = true ]; then
CRITICALERROR=`expr $CRITICALERROR + 1` CRITICALERROR=`expr $CRITICALERROR + 1`
echo "WARNING: CRITICAL ERROR" echo "WARNING: CRITICAL ERROR"
echo echo
@ -312,9 +310,9 @@ pingTest () {
case $OS in case $OS in
SunOS) SunOS)
PINGTEST=`/usr/sbin/ping $1 2>&1` PINGTEST=`/usr/sbin/ping $1 2>&1`
if [ "`echo $PINGTEST | grep "alive"`" != "" ] ; then if [ "`echo $PINGTEST | grep alive`" != "" ] ; then
RESULT="Successful" RESULT="Successful"
elif [ "`echo $PINGTEST | grep "unknown host"`" != "" ] ; then elif [ "`echo $PINGTEST | grep 'unknown host'`" != "" ] ; then
RESULT="No_entry_for_\"$1\"_in_/etc/hosts" RESULT="No_entry_for_\"$1\"_in_/etc/hosts"
else else
RESULT="Networking_cannot_reach_$1" RESULT="Networking_cannot_reach_$1"
@ -322,9 +320,9 @@ pingTest () {
;; ;;
*) *)
PINGTEST=`/bin/ping -w 3 -c 1 $1 2>&1` PINGTEST=`/bin/ping -w 3 -c 1 $1 2>&1`
if [ "`echo $PINGTEST | grep "1 received"`" != "" ] ; then if [ "`echo $PINGTEST | grep '1 received'`" != "" ] ; then
RESULT="Successful" RESULT="Successful"
elif [ "`echo $PINGTEST | grep "unknown host"`" != "" ] ; then elif [ "`echo $PINGTEST | grep 'unknown host'`" != "" ] ; then
RESULT="No_entry_for_\"$1\"_in_/etc/hosts" RESULT="No_entry_for_\"$1\"_in_/etc/hosts"
else else
RESULT="Networking_cannot_reach_$1" RESULT="Networking_cannot_reach_$1"
@ -334,7 +332,7 @@ pingTest () {
echo "`fixlen "Pinging_$1" 25` `fixlen "$RESULT" 45` `fixlen "$2" 5`" echo "`fixlen "Pinging_$1" 25` `fixlen "$RESULT" 45` `fixlen "$2" 5`"
if [ "$2" = "yes" ] && [ "$RESULT" != "Successful" ]; then if [ "$2" = yes ] && [ "$RESULT" != Successful ]; then
CRITICALERROR=`expr $CRITICALERROR + 1` CRITICALERROR=`expr $CRITICALERROR + 1`
echo "WARNING: CRITICAL ERROR" echo "WARNING: CRITICAL ERROR"
echo echo
@ -351,7 +349,7 @@ EOF
checkTelnetPort () { checkTelnetPort () {
if [ -x "/usr/bin/telnet" ] || [ -x "/bin/telnet" ] ; then if [ -x "/usr/bin/telnet" ] || [ -x "/bin/telnet" ] ; then
RESULT=`telnetPortTest $1 $2 2>&1 | egrep "onnect.* [t|r]"` RESULT=`telnetPortTest $1 $2 2>&1 | egrep "onnect.* [t|r]"`
if [ "`echo $RESULT | grep 'Connected to'`" ] ; then if [ "`echo $RESULT | grep 'Connected to'`" ] ; then
RESULT='Successful' RESULT='Successful'
@ -361,7 +359,7 @@ checkTelnetPort () {
RESULT="Not_active*" RESULT="Not_active*"
fi fi
else else
RESULT='No_telnet_running:_cannot_check*' RESULT='No_telnet_installed:_cannot_check*'
fi fi
} }
@ -369,7 +367,7 @@ checkTelnetPort () {
checkRsh () { checkRsh () {
checkTelnetPort $HOST_NAME 222 checkTelnetPort $HOST_NAME 222
echo "`fixlen "Test_rsh:" 25` `fixlen "$RESULT" 45` "yes"" echo "`fixlen "Test_rsh:" 25` `fixlen "$RESULT" 45` "yes""
if [ "$RESULT" != 'Successful' ]; then if [ "$RESULT" != Successful ]; then
SSHRSHOK=`expr $SSHRSHOK + 1` SSHRSHOK=`expr $SSHRSHOK + 1`
fi fi
} }
@ -378,14 +376,14 @@ checkRsh () {
checkSsh () { checkSsh () {
checkTelnetPort $HOST_NAME 22 checkTelnetPort $HOST_NAME 22
echo "`fixlen "Test_ssh:" 25` `fixlen "$RESULT" 45` "yes"" echo "`fixlen "Test_ssh:" 25` `fixlen "$RESULT" 45` "yes""
if [ "$RESULT" != 'Successful' ]; then if [ "$RESULT" != Successful ]; then
SSHRSHOK=`expr $SSHRSHOK + 1` SSHRSHOK=`expr $SSHRSHOK + 1`
fi fi
} }
checkOpenFOAMEnvironment() { checkOpenFOAMEnvironment() {
if [ ! -d "$WM_PROJECT_INST_DIR" -o ! -d "$WM_THIRD_PARTY_DIR" ]; then [ -d "$WM_PROJECT_INST_DIR" ] && [ -d "$WM_THIRD_PARTY_DIR" ] || {
echo "" echo ""
echo "FATAL ERROR: OpenFOAM environment not configured." echo "FATAL ERROR: OpenFOAM environment not configured."
echo "" echo ""
@ -394,22 +392,23 @@ checkOpenFOAMEnvironment() {
echo " to source the OpenFOAM environment." echo " to source the OpenFOAM environment."
echo "" echo ""
exit 1 exit 1
fi }
} }
checkUserShell() { checkUserShell() {
case $USER_SHELL in case $SHELL in
csh | tcsh) */csh | */tcsh)
USER_CONFIG_TYPE="cshrc" # USER_CONFIG_TYPE="cshrc"
echo "`fixlen "Shell:" $WIDTH` ${USER_SHELL}" echo "`fixlen "Shell:" $WIDTH` ${SHELL##*/}"
;; ;;
bash | ksh) */bash | */ksh)
USER_CONFIG_TYPE="bashrc" # USER_CONFIG_TYPE="bashrc"
echo "`fixlen "Shell:" $WIDTH` ${USER_SHELL}" echo "`fixlen "Shell:" $WIDTH` ${SHELL##*/}"
;; ;;
*) USER_CONFIG_TYPE="" *)
echo "`fixlen "Shell:" $WIDTH` ${USER_SHELL}" # USER_CONFIG_TYPE=""
echo "`fixlen "Shell:" $WIDTH` ${SHELL##*/}"
echo "FATAL ERROR: Cannot identify the shell you are running." echo "FATAL ERROR: Cannot identify the shell you are running."
echo " OpenFOAM ${FOAM_VERSION} is compatible with " echo " OpenFOAM ${FOAM_VERSION} is compatible with "
echo " csh, tcsh, ksh and bash." echo " csh, tcsh, ksh and bash."
@ -435,15 +434,18 @@ checkHostName() {
checkOS () { checkOS () {
if [ "$OS" = "Linux" ] || [ "$OS" = "LinuxAMD64" ] || [ "$OS" = "SunOS" ]; then case "$OS" in
echo "`fixlen "OS:" $WIDTH` ${OS} version ${OS_VERSION}" Linux | LinuxAMD64 | SunOS )
else echo "`fixlen "OS:" $WIDTH` ${OS} version $(uname -r)"
;;
*)
echo "FATAL ERROR: Incompatible operating system \"$OS\"." echo "FATAL ERROR: Incompatible operating system \"$OS\"."
echo " OpenFOAM ${FOAM_VERSION} is currently " echo " OpenFOAM ${FOAM_VERSION} is currently "
echo " available for Linux and SunOS only." echo " available for Linux and SunOS only."
echo echo
FATALERROR=`expr $FATALERROR + 1` FATALERROR=`expr $FATALERROR + 1`
fi ;;
esac
} }
@ -485,6 +487,7 @@ hline
reportEnv '$WM_PROJECT_DIR' '$PATH' "yes" reportEnv '$WM_PROJECT_DIR' '$PATH' "yes"
echo "" echo ""
reportEnv '$FOAM_APPBIN' '$PATH' "yes" reportEnv '$FOAM_APPBIN' '$PATH' "yes"
reportEnv '$FOAM_SITE_APPBIN' '$PATH' "no"
reportEnv '$FOAM_USER_APPBIN' '$PATH' "no" reportEnv '$FOAM_USER_APPBIN' '$PATH' "no"
reportEnv '$WM_DIR' '$PATH' "yes" reportEnv '$WM_DIR' '$PATH' "yes"
hline hline
@ -495,6 +498,7 @@ hline
echo "$COL1 $COL2 $COL3 $COL4 $COL5" echo "$COL1 $COL2 $COL3 $COL4 $COL5"
hline hline
reportEnv '$FOAM_LIBBIN' '$LD_LIBRARY_PATH' "yes" reportEnv '$FOAM_LIBBIN' '$LD_LIBRARY_PATH' "yes"
reportEnv '$FOAM_SITE_LIBBIN' '$LD_LIBRARY_PATH' "no"
reportEnv '$FOAM_USER_LIBBIN' '$LD_LIBRARY_PATH' "no" reportEnv '$FOAM_USER_LIBBIN' '$LD_LIBRARY_PATH' "no"
reportEnv '$MPI_ARCH_PATH' '$LD_LIBRARY_PATH' "yes" reportEnv '$MPI_ARCH_PATH' '$LD_LIBRARY_PATH' "yes"
hline hline
@ -509,7 +513,7 @@ echo "$COL1 $COL2 $COL3"
hline hline
reportExecutable gcc "${WM_COMPILER_DIR}/bin/gcc" reportExecutable gcc "${WM_COMPILER_DIR}/bin/gcc"
reportExecutable gzip reportExecutable gzip
if [ "$OS" = "Linux" ] ; then if [ "$OS" = Linux ] ; then
reportExecutable tar reportExecutable tar
else else
reportExecutable gtar reportExecutable gtar

View File

@ -34,7 +34,7 @@
# STATIC VARIABLES # STATIC VARIABLES
# ~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~
FOAM_VERSION=1.5 FOAM_VERSION=1.6
HLINE="-----------------------------------------------------------------------" HLINE="-----------------------------------------------------------------------"
WIDTH=16 WIDTH=16