Commit 47f37588 authored by Mark Olesen's avatar Mark Olesen Committed by Andrew Heather
Browse files

CONFIG: adjust bin/tools/foamConfigurePaths

- add a '-SPDP' option

- remove the '-archOption' for forcing a '-m32' build on 64-bit
  architecture, which is now considered too obscure.
  Must edit files manually if this option is really required.
parent e6270d12
......@@ -3,7 +3,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd.
# \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
# \\/ M anipulation |
#------------------------------------------------------------------------------
# | Copyright (C) 2011-2016 OpenFOAM Foundation
......@@ -16,7 +16,8 @@
# foamConfigurePaths
#
# Description
# Adjust hardcoded installation versions and paths in bashrc and config.sh/
# Adjust hardcoded installation versions and paths
# in etc/{bashrc,cshrc} and etc/config.{sh,csh}/
#
#------------------------------------------------------------------------------
usage() {
......@@ -29,10 +30,10 @@ usage: ${0##*/} options
Basic
-project-path DIR specify 'WM_PROJECT_DIR' (eg, /opt/openfoam1806-patch1)
-version VER specify project version (eg, v1806)
-archOption 32|64 specify 'WM_ARCH_OPTION' architecture option
-SP | -float32 specify 'WM_PRECISION_OPTION' for single precision
-DP | -float64 specify 'WM_PRECISION_OPTION' for double precision
-int32 | -int64 specify 'WM_LABEL_SIZE'
-SP | -float32 single precision (WM_PRECISION_OPTION)
-DP | -float64 double precision (WM_PRECISION_OPTION)
-SPDP mixed single/double precision
-int32 | -int64 the 'WM_LABEL_SIZE'
Compiler
-system NAME specify 'system' compiler to use (eg, Gcc, Icc,...)
......@@ -75,9 +76,10 @@ Misc
-foamInstall DIR [obsolete]
-projectName NAME [obsolete]
-sigfpe|-no-sigfpe [obsolete - now under etc/controlDict]
-archOption 32|64 [obsolete setting of 'WM_ARCH_OPTION' - edit manually]
Adjusts hardcoded versions and installation paths (for bash, POSIX shell).
Adjusts hardcoded versions and installation paths (POSIX and C-shell).
Equivalent options:
......@@ -305,18 +307,7 @@ do
-archOption | --archOption)
# Replace WM_ARCH_OPTION=...
optionValue=$(getOptionValue "$@")
_matches "$optionValue" 32 64 || \
die "'$1' has bad value: '$optionValue'"
if [ "$optionValue" = "$(sed -ne '/^[^#]/s/^.* WM_ARCH_OPTION=//p' etc/bashrc)" ]
then
echo "WM_ARCH_OPTION already set to $optionValue"
: ${adjusted:=false}
else
replace etc/bashrc WM_ARCH_OPTION "$optionValue"
replaceCsh etc/cshrc WM_ARCH_OPTION "$optionValue"
adjusted=true
fi
echo "Ignoring $1 option: no longer supported" 1>&2
shift
;;
......@@ -334,6 +325,13 @@ do
adjusted=true
;;
-SPDP)
# Replace WM_PRECISION_OPTION=...
replace etc/bashrc WM_PRECISION_OPTION "SPDP"
replaceCsh etc/cshrc WM_PRECISION_OPTION "SPDP"
adjusted=true
;;
-int32 | -int64)
# Replace WM_LABEL_SIZE=...
optionValue="${1#-int}"
......
......@@ -124,7 +124,7 @@ export WM_MPLIB=SYSTEMOPENMPI
# = 32 | 64
# * on a 64-bit OS this can be 32 or 64
# * on a 32-bit OS this option is ignored (always 32-bit)
export WM_ARCH_OPTION=64
#export WM_ARCH_OPTION=64
################################################################################
......
......@@ -126,7 +126,7 @@ setenv WM_MPLIB SYSTEMOPENMPI
# = 32 | 64
# * on a 64-bit OS this can be 32 or 64
# * on a 32-bit OS this option is ignored (always 32-bit)
setenv WM_ARCH_OPTION 64
#setenv WM_ARCH_OPTION 64
################################################################################
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment