Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd. # \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# | Copyright (C) 2011-2016 OpenFOAM Foundation # | Copyright (C) 2011-2016 OpenFOAM Foundation
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
# foamConfigurePaths # foamConfigurePaths
# #
# Description # 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() { usage() {
...@@ -29,10 +30,10 @@ usage: ${0##*/} options ...@@ -29,10 +30,10 @@ usage: ${0##*/} options
Basic Basic
-project-path DIR specify 'WM_PROJECT_DIR' (eg, /opt/openfoam1806-patch1) -project-path DIR specify 'WM_PROJECT_DIR' (eg, /opt/openfoam1806-patch1)
-version VER specify project version (eg, v1806) -version VER specify project version (eg, v1806)
-archOption 32|64 specify 'WM_ARCH_OPTION' architecture option -SP | -float32 single precision (WM_PRECISION_OPTION)
-SP | -float32 specify 'WM_PRECISION_OPTION' for single precision -DP | -float64 double precision (WM_PRECISION_OPTION)
-DP | -float64 specify 'WM_PRECISION_OPTION' for double precision -SPDP mixed single/double precision
-int32 | -int64 specify 'WM_LABEL_SIZE' -int32 | -int64 the 'WM_LABEL_SIZE'
Compiler Compiler
-system NAME specify 'system' compiler to use (eg, Gcc, Icc,...) -system NAME specify 'system' compiler to use (eg, Gcc, Icc,...)
...@@ -75,9 +76,10 @@ Misc ...@@ -75,9 +76,10 @@ Misc
-foamInstall DIR [obsolete] -foamInstall DIR [obsolete]
-projectName NAME [obsolete] -projectName NAME [obsolete]
-sigfpe|-no-sigfpe [obsolete - now under etc/controlDict] -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: Equivalent options:
...@@ -305,18 +307,7 @@ do ...@@ -305,18 +307,7 @@ do
-archOption | --archOption) -archOption | --archOption)
# Replace WM_ARCH_OPTION=... # Replace WM_ARCH_OPTION=...
optionValue=$(getOptionValue "$@") optionValue=$(getOptionValue "$@")
_matches "$optionValue" 32 64 || \ echo "Ignoring $1 option: no longer supported" 1>&2
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
shift shift
;; ;;
...@@ -334,6 +325,13 @@ do ...@@ -334,6 +325,13 @@ do
adjusted=true 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) -int32 | -int64)
# Replace WM_LABEL_SIZE=... # Replace WM_LABEL_SIZE=...
optionValue="${1#-int}" optionValue="${1#-int}"
......
...@@ -124,7 +124,7 @@ export WM_MPLIB=SYSTEMOPENMPI ...@@ -124,7 +124,7 @@ export WM_MPLIB=SYSTEMOPENMPI
# = 32 | 64 # = 32 | 64
# * on a 64-bit OS this can be 32 or 64 # * on a 64-bit OS this can be 32 or 64
# * on a 32-bit OS this option is ignored (always 32-bit) # * 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 ...@@ -126,7 +126,7 @@ setenv WM_MPLIB SYSTEMOPENMPI
# = 32 | 64 # = 32 | 64
# * on a 64-bit OS this can be 32 or 64 # * on a 64-bit OS this can be 32 or 64
# * on a 32-bit OS this option is ignored (always 32-bit) # * on a 32-bit OS this option is ignored (always 32-bit)
setenv WM_ARCH_OPTION 64 #setenv WM_ARCH_OPTION 64
################################################################################ ################################################################################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment