mirror of
https://develop.openfoam.com/Development/ThirdParty-common.git
synced 2025-12-08 06:57:50 +00:00
CONFIG: remove redundant petsc configure options, add '-debug' option
This commit is contained in:
28
makePETSC
28
makePETSC
@ -49,6 +49,7 @@ options:
|
|||||||
-force Force compilation, even if include/library already exists
|
-force Force compilation, even if include/library already exists
|
||||||
-gcc Force use of gcc/g++
|
-gcc Force use of gcc/g++
|
||||||
-inplace Build/install inplace (expert option)
|
-inplace Build/install inplace (expert option)
|
||||||
|
-debug Build with debugging enabled
|
||||||
-hypre=URL Specify hypre download location
|
-hypre=URL Specify hypre download location
|
||||||
-no-hypre Disable automatic hypre download/detection
|
-no-hypre Disable automatic hypre download/detection
|
||||||
-help
|
-help
|
||||||
@ -68,7 +69,7 @@ USAGE
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
exportCompiler # Compiler info for CMake/configure
|
exportCompiler # Compiler info for CMake/configure
|
||||||
|
|
||||||
unset optForce optInplace optHypre
|
unset optDebug optForce optInplace optHypre
|
||||||
|
|
||||||
# Parse options
|
# Parse options
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
@ -80,13 +81,12 @@ do
|
|||||||
-gcc) useGcc ;;
|
-gcc) useGcc ;;
|
||||||
-force) optForce=true ;;
|
-force) optForce=true ;;
|
||||||
-inplace) optInplace=true ;;
|
-inplace) optInplace=true ;;
|
||||||
|
-debug) optDebug=true ;;
|
||||||
|
|
||||||
lib|libso)
|
lib|libso) targetType="$1" ;;
|
||||||
targetType="$1"
|
|
||||||
;;
|
|
||||||
|
|
||||||
-hypre=*)
|
-hypre=*)
|
||||||
optHypre="${1#*=}" # URL for downloadd
|
optHypre="${1#*=}" # URL for download
|
||||||
unset hyprePACKAGE HYPRE_ARCH_PATH
|
unset hyprePACKAGE HYPRE_ARCH_PATH
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@ -186,9 +186,15 @@ echo
|
|||||||
(
|
(
|
||||||
# Configuration options
|
# Configuration options
|
||||||
configOpt="--with-cc=$(whichMpicc) --with-cxx=$(whichMpicxx)"
|
configOpt="--with-cc=$(whichMpicc) --with-cxx=$(whichMpicxx)"
|
||||||
configOpt="$configOpt --with-debugging=0"
|
|
||||||
# A reasonable assumption
|
if [ "$optDebug" = true ]
|
||||||
configOpt="$configOpt --COPTFLAGS=-O3 --CXXOPTFLAGS=-O3"
|
then
|
||||||
|
configOpt="$configOpt --with-debugging=1"
|
||||||
|
else
|
||||||
|
# A reasonable assumption for optimization
|
||||||
|
configOpt="$configOpt --with-debugging=0"
|
||||||
|
configOpt="$configOpt --COPTFLAGS=-O3 --CXXOPTFLAGS=-O3"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$targetType" = libso ]
|
if [ "$targetType" = libso ]
|
||||||
then
|
then
|
||||||
@ -247,9 +253,6 @@ echo
|
|||||||
rm -rf "$PETSC_ARCH_PATH"
|
rm -rf "$PETSC_ARCH_PATH"
|
||||||
# No clean here, if we have multiple arch in the same directory
|
# No clean here, if we have multiple arch in the same directory
|
||||||
|
|
||||||
## without tests? --testdir=..
|
|
||||||
## configOpt="$configOpt --download-f2cblaslapack=1"
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
set -x
|
set -x
|
||||||
./configure \
|
./configure \
|
||||||
@ -258,9 +261,6 @@ echo
|
|||||||
--with-petsc-arch="$archOpt" \
|
--with-petsc-arch="$archOpt" \
|
||||||
--with-clanguage=C \
|
--with-clanguage=C \
|
||||||
--with-fc=0 \
|
--with-fc=0 \
|
||||||
--with-scalapack=0 \
|
|
||||||
--with-superlu_dist=0 \
|
|
||||||
--with-suitesparse=0 \
|
|
||||||
--with-x=0 \
|
--with-x=0 \
|
||||||
$configOpt \
|
$configOpt \
|
||||||
&& set +x \
|
&& set +x \
|
||||||
|
|||||||
Reference in New Issue
Block a user