Merge remote-tracking branch 'remotes/origin/nr/DC' into nextRelease

This commit is contained in:
Hrvoje Jasak 2013-09-30 10:29:30 +01:00
commit ae9ea8f299
7 changed files with 244 additions and 53 deletions

3
Allclean Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
rmdepall
wcleanLnIncludeAll

60
Allwmake.firstInstall Executable file
View file

@ -0,0 +1,60 @@
#!/bin/bash
cd ${0%/*} || exit 1 # run from this directory
if [ "$PWD" != "$WM_PROJECT_DIR" ]
then
echo
echo "Error: Current directory is not \$WM_PROJECT_DIR"
echo " The environment variables are not consistent with the installation."
echo " Please source configuration files."
echo
echo "Examples:"
echo " bash: . etc/bashrc"
echo " tcsh: source etc/cshrc"
echo
echo " If you sourced the configuration files, please check the 'foamInstall' entry."
echo
exit 1
fi
if [ -z "$PARAVIEW_SYSTEM" ] && [ -z "$QT_BIN_DIR" ]
then
echo
echo "\$QT_BIN_DIR not set. To compile Paraview from sources"
echo "the command \$QT_BIN_DIR/qmake needs to be valid."
echo
echo "Examples: "
echo " Ubuntu: \"export QT_BIN_DIR=/usr/bin\""
echo " Fedora: \"export QT_BIN_DIR=????\""
echo " openSuse: \"export QT_BIN_DIR=????\""
echo
read -r -p "Proceed without compiling ParaView [Y/n] " response
if [[ $response =~ ^([nN][oO]|[nN])$ ]]
then
exit 0
fi
fi
# wmake is required for subsequent targets
( cd wmake/src && make )
# build ThirdParty sources
( cd $WM_THIRD_PARTY_DIR && ./AllMake.pre )
# We make sure the ThirdParty packages environment variables are up-to-date
# before compiling the rest of OpenFOAM
. $WM_PROJECT_DIR/etc/settings.sh
# build OpenFOAM libraries and applications
src/Allwmake
applications/Allwmake
if [ "$1" = doc ]
then
doc/Allwmake
fi
# build ThirdParty sources that depend on main installation
( cd $WM_THIRD_PARTY_DIR && ./AllMake.post )
# ----------------------------------------------------------------- end-of-file

70
ThirdParty/AllMake.post vendored Executable file
View file

@ -0,0 +1,70 @@
#!/bin/bash
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright held by original author
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
#
# OpenFOAM is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
#
# Script
# AllMake
#
# Description
# Build script for ThirdParty packages.
# You can pass along a list of package RPMs to this script in order
# to populate the local RPM vault before proceeding to the various
# packages installation
#
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2010)
# Converted to AllMake.post: Dominik Christ, Wikki Ltd, (2013)
#
#------------------------------------------------------------------------------
# run from third-party directory only
cd ${0%/*} || exit 1
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
echo " The environment variables are inconsistent with the installation."
echo " Check the OpenFOAM entries in your dot-files and source them."
exit 1
}
. tools/makeThirdPartyFunctionsForRPM
#------------------------------------------------------------------------------
echo ========================================
echo Starting ThirdParty Allwmake
echo ========================================
echo
# Running stage 5
# This stage depends on a properly compiled installation
# of OpenFOAM. On a brand new installation of OpenFOAM-1.6-ext,
# this stage should be called last in your compilation process
./AllMake.stage5
echo ========================================
echo Done ThirdParty Allwmake
echo ========================================
echo
# ----------------------------------------------------------------- end-of-file

83
ThirdParty/AllMake.pre vendored Executable file
View file

@ -0,0 +1,83 @@
#!/bin/bash
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright held by original author
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
#
# OpenFOAM is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
#
# Script
# AllMake
#
# Description
# Build script for ThirdParty packages.
# You can pass along a list of package RPMs to this script in order
# to populate the local RPM vault before proceeding to the various
# packages installation
#
#
# Author:
# Martin Beaudoin, Hydro-Quebec, (2010)
# Converted to AllMake.Pre: Dominik Christ, Wikki Ltd, (2013)
#
#------------------------------------------------------------------------------
# run from third-party directory only
cd ${0%/*} || exit 1
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
echo " The environment variables are inconsistent with the installation."
echo " Check the OpenFOAM entries in your dot-files and source them."
exit 1
}
. tools/makeThirdPartyFunctionsForRPM
#------------------------------------------------------------------------------
echo ========================================
echo Starting ThirdParty Allwmake.pre
echo ========================================
echo
# Running stage 0 (only if RPM filenames are supplied on the command line)
[ "$#" -gt 0 ] && {
./AllMake.stage0 "$@"
shift "$#"
}
# Running stage 1
./AllMake.stage1
# Running stage 2
./AllMake.stage2
# Running stage 3
./AllMake.stage3
# Running stage 4
./AllMake.stage4
echo ========================================
echo Done ThirdParty Allwmake.pre
echo ========================================
echo
# ----------------------------------------------------------------- end-of-file

View file

@ -127,7 +127,8 @@ Group: Development/Tools
--disable-mpi-f90 \
--disable-mpi-cxx \
--without-slurm \
--enable-mpi-profile $mpiWith
--enable-mpi-profile $mpiWith \
--disable-vt
[ -z "$WM_NCOMPPROCS" ] && WM_NCOMPPROCS=1
make -j $WM_NCOMPPROCS

View file

@ -0,0 +1,20 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
set -x
wmake libso solidModels
wmake elasticContactIncrSolidFoam
wmake elasticContactNonLinULSolidFoam
wmake elasticContactSolidFoam
wmake elasticGravitySolidFoam
wmake elasticIncrSolidFoam
wmake elasticNonLinTLSolidFoam
wmake elasticNonLinULSolidFoam
wmake elasticPlasticNonLinULSolidFoam
wmake elasticPlasticSolidFoam
wmake elasticSolidFoam
wmake elasticThermalSolidFoam
wmake icoFsiElasticNonLinULSolidFoam
wmake viscoElasticSolidFoam

View file

@ -32,54 +32,9 @@
#
#------------------------------------------------------------------------------
unset WM_PROJECT_VERSION_ADDITION
prefSettingFile=$0.preset
if [ -f $prefSettingFile ]
then
# echo "Found presettings $prefSettingFile"
. $prefSettingFile
fi
unset prefSettingFile
export WM_PROJECT=OpenFOAM
export WM_PROJECT_VERSION=1.6-ext
if [ -z "$WM_PROJECT_VERSION_ADDITION" ]
then
fullScriptPath=`pwd`"/$0"
if [ ! -e $fullScriptPath ]
then
fullScriptPath=$0
fi
canonicalFullScriptPath="$(readlink 2>&1 -f $fullScriptPath)"
if [ $? != 0 ]
then
# System with simpler readlink (BSD, Darwin) try replacement
canonicalFullScriptPath="$(greadlink 2>&1 -f $fullScriptPath)"
if [ $? != 0 ]
then
# we give up
canonicalFullScriptPath=""
fi
fi
if [ -n "$canonicalFullScriptPath" ]
then
dirName="$(basename $(dirname $(dirname $canonicalFullScriptPath)))"
rest="$(echo $dirName | sed -e "s/OpenFOAM-$WM_PROJECT_VERSION//")"
if [ -n $rest ]
then
export WM_PROJECT_VERSION_ADDITION="$(echo $rest | sed -e "s/-//")"
fi
unset dirName rest
fi
unset fullScriptPath canonicalFullScriptPath
fi
if [ -n "$WM_PROJECT_VERSION_ADDITION" ]
then
export WM_PROJECT_VERSION=$WM_PROJECT_VERSION-$WM_PROJECT_VERSION_ADDITION
fi
# helps to easily write #ifdefs to detect a dev-version
export FOAM_DEV=1
@ -118,7 +73,12 @@ fi
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~
export WM_PROJECT_INST_DIR=$FOAM_INST_DIR
export WM_PROJECT_DIR=$WM_PROJECT_INST_DIR/$WM_PROJECT-$WM_PROJECT_VERSION
: ${WM_PROJECT_USER_DIR:=$HOME/$WM_PROJECT/$USER-$WM_PROJECT_VERSION}; export WM_PROJECT_USER_DIR
export WM_PROJECT_USER_DIR=$HOME/$WM_PROJECT/$USER-$WM_PROJECT_VERSION
# Location of third-party software
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#: ${WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION}; export WM_THIRD_PARTY_DIR
export WM_THIRD_PARTY_DIR=$WM_PROJECT_DIR/ThirdParty
# Source files, possibly with some verbosity
_foamSource()
@ -135,12 +95,6 @@ _foamSource()
foamPrefs=`$WM_PROJECT_DIR/bin/foamEtcFile prefs.sh` && _foamSource $foamPrefs
unset foamPrefs
# Location of third-party software
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#: ${WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION}; export WM_THIRD_PARTY_DIR
: ${WM_THIRD_PARTY_DIR=$WM_PROJECT_DIR/ThirdParty}; export WM_THIRD_PARTY_DIR
# Evaluate command-line parameters
while [ $# -gt 0 ]
do