Compare commits
165 Commits
v1612
...
develop.mo
| Author | SHA1 | Date | |
|---|---|---|---|
| dc217245ff | |||
| cf83f194a8 | |||
| 1ed1f6471b | |||
| 7ff69fa1a7 | |||
| 1fdacf14dd | |||
| 678ec1c8d0 | |||
| 7c72929887 | |||
| 365730e5b7 | |||
| d5589614f4 | |||
| c30d606f52 | |||
| ad69b472e6 | |||
| 525f3f4e67 | |||
| 43606b62df | |||
| 1054dd83cf | |||
| 0d0f439dde | |||
| 325e3e230d | |||
| f1fe6c9866 | |||
| 1f6835794f | |||
| 665437cf8c | |||
| cd853a6270 | |||
| 2beb3cfbc9 | |||
| c8542bd70d | |||
| f84990e906 | |||
| ddfdec4cd9 | |||
| 834efe6dda | |||
| 69cff3b3d3 | |||
| c3aa2a4bfe | |||
| 9a3938551a | |||
| 28f482b836 | |||
| 53a1736aad | |||
| f197c721c8 | |||
| 11e3723f10 | |||
| 9a8a4852bc | |||
| 507c01e485 | |||
| bdd4266e2f | |||
| 36f89097d8 | |||
| 78819144d3 | |||
| 348b8cd4f4 | |||
| b9ace75da8 | |||
| aa2523ee63 | |||
| 6e03e1ecb4 | |||
| 7958c7e4c1 | |||
| 67093bfb2f | |||
| 9de516d315 | |||
| 69de80cd08 | |||
| 60d3922681 | |||
| a4ba6b72f5 | |||
| 0c7c86faa6 | |||
| cd811d9b28 | |||
| 03f529f3bd | |||
| cb75d01584 | |||
| baae61e0ec | |||
| 714cddd6ca | |||
| c8a7f46db2 | |||
| e51f92f2f1 | |||
| a0d0ee36af | |||
| 074481b2f0 | |||
| a856a5fcad | |||
| c41b591b30 | |||
| a9f5058557 | |||
| 54d6b7994d | |||
| 17a443a557 | |||
| b987703b3c | |||
| 325f848dc1 | |||
| 4c4a11755a | |||
| 3c852a8929 | |||
| 867d96ec54 | |||
| 16b59832cc | |||
| ddd4176269 | |||
| ae5b2326c0 | |||
| bbbc7b2953 | |||
| 5ac0e3624f | |||
| a7c2a4bfb9 | |||
| c6e6c0abbf | |||
| fbbb275862 | |||
| 770e22bf51 | |||
| 830e92194a | |||
| 8df5d377e7 | |||
| aa9fc0efd2 | |||
| f968a67362 | |||
| c8135cc48e | |||
| adfe28332e | |||
| 3fe5c2beb5 | |||
| 6e0c9f9d8b | |||
| 013c7154ff | |||
| 28e7982258 | |||
| 7e5bdfd747 | |||
| f64c88a1cf | |||
| b71a60d122 | |||
| 7aee88cf92 | |||
| d2334fe051 | |||
| a77852ae18 | |||
| 0e599b7a64 | |||
| 1a1c624422 | |||
| 2dd42d8c6c | |||
| ff162da2f8 | |||
| a91157470d | |||
| 8a53a789f7 | |||
| a42362f8b8 | |||
| 4f844dabcf | |||
| d446ee8b31 | |||
| 54efaa445a | |||
| dab3042c45 | |||
| 52ad71871c | |||
| 31ffa9c92c | |||
| 5886ce9f65 | |||
| 93b8816b3e | |||
| cbea5788a3 | |||
| 6d7ef8dc42 | |||
| 455551b48b | |||
| 231733bc15 | |||
| 5ecf33d4d8 | |||
| 475220cfae | |||
| de7ac04146 | |||
| 7419702a85 | |||
| 43cbb24ddd | |||
| f49d26dad5 | |||
| 4c049afb40 | |||
| ea9c2471a8 | |||
| 03075ef079 | |||
| 6485db81a9 | |||
| 5fcd29aa99 | |||
| 816173b7c4 | |||
| 491b3390bb | |||
| 6f32862d26 | |||
| bc7fb08810 | |||
| 0c7fa1cc7c | |||
| 5112b60e58 | |||
| bdfdff11c8 | |||
| 51435f2e56 | |||
| c0de94d846 | |||
| 19f241fae2 | |||
| 0f9fe6b863 | |||
| 7f4a904b90 | |||
| ec80e1df97 | |||
| 092d71c3df | |||
| 54356f8f87 | |||
| 4a6ab3779f | |||
| 458d9dadbf | |||
| aac32ece63 | |||
| 62c8476a4e | |||
| 4a0f78084b | |||
| 986d9120fd | |||
| 43cffa29db | |||
| ce4c19c717 | |||
| c291d5742d | |||
| d2da5b440e | |||
| 59be96faed | |||
| 5d592841fd | |||
| 493d4b01ac | |||
| 1189ff23c9 | |||
| 5c09a6433f | |||
| 9f6a77a1ab | |||
| 59432b7b2d | |||
| 82595ca823 | |||
| d55ae084d4 | |||
| e3190722e5 | |||
| 1622a46832 | |||
| 9926569ca1 | |||
| fc3ea2f182 | |||
| 907e04f35c | |||
| ae464766e6 | |||
| 45caecb85b | |||
| 705556c3eb | |||
| 122ee3386e |
10
.gitignore
vendored
10
.gitignore
vendored
@ -12,9 +12,13 @@
|
|||||||
*.tgz
|
*.tgz
|
||||||
*.gtgz
|
*.gtgz
|
||||||
|
|
||||||
# Ignore build and platforms folders
|
# Ignore standard input/output folders
|
||||||
build/
|
/build/
|
||||||
platforms/
|
/download/
|
||||||
|
/opt/
|
||||||
|
/platforms/
|
||||||
|
/sources/
|
||||||
|
/unpack/
|
||||||
|
|
||||||
# Generated files in the main directory
|
# Generated files in the main directory
|
||||||
/*.html
|
/*.html
|
||||||
|
|||||||
276
Allclean
276
Allclean
@ -3,151 +3,231 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
# \\ / A nd | www.openfoam.com
|
||||||
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2011 OpenFOAM Foundation
|
||||||
|
# Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
#
|
|
||||||
# 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
|
# Script
|
||||||
# Allclean
|
# Allclean
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Clean script for third-party applications and libraries
|
# Clean script for ThirdParty applications/libraries
|
||||||
#
|
#
|
||||||
|
# ----------------------------------------------
|
||||||
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# run from third-party directory only
|
# Run from third-party directory only
|
||||||
cd ${0%/*} || exit 1
|
cd "${0%/*}" || exit
|
||||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
echo " The environment variables are inconsistent with the installation."
|
echo " Check your OpenFOAM environment and installation"
|
||||||
echo " Check the OpenFOAM entries in your dot-files and source them."
|
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
# . etc/tools/ThirdPartyFunctions
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
Script=${0##*/}
|
printHelp() {
|
||||||
|
|
||||||
usage() {
|
|
||||||
exec 1>&2
|
|
||||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
|
||||||
cat<<USAGE
|
cat<<USAGE
|
||||||
Usage: $Script [OPTION] [<platform> [ ... <platformN> ]]
|
Usage: ${0##*/} [OPTION]
|
||||||
options:
|
options:
|
||||||
-all remove all platforms directories.
|
-build Remove all 'build' directories
|
||||||
-current clean the current platform ($WM_OPTIONS).
|
-current Clean the current platform ($WM_OPTIONS)
|
||||||
-help print the usage
|
-platform=NAME Clean the named platform
|
||||||
|
-src | -sources Clean sources (eg, with make distclean)
|
||||||
|
-full Same as -build -src -current
|
||||||
|
-n | -dry-run Do not perform actions
|
||||||
|
-help Display usage help
|
||||||
|
|
||||||
Cleanup intermediate build directories.
|
Cleanup intermediate build directories.
|
||||||
Optionally remove specified platform(s) from the ThirdParty platforms
|
Optionally remove specified platform(s) from the ThirdParty platforms
|
||||||
directory $WM_THIRD_PARTY_DIR/platforms
|
directory \$WM_THIRD_PARTY_DIR/platforms
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
exit 1
|
exit 0 # Clean exit
|
||||||
}
|
}
|
||||||
|
|
||||||
# Print help message
|
#------------------------------------------------------------------------------
|
||||||
if [ "$1" = "-h" -o "$1" = "-help" ]; then
|
unset optDryRun optCleanType optPlatformName
|
||||||
usage
|
|
||||||
fi
|
# Parse options
|
||||||
|
while [ "$#" -gt 0 ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
'') ;; # Ignore empty
|
||||||
|
--) shift; break;; # End option processing
|
||||||
|
(-h | -help*) printHelp ;;
|
||||||
|
(-n | -dry-run) optDryRun="(dry-run) " ;;
|
||||||
|
|
||||||
|
(-build)
|
||||||
|
optCleanType="${optCleanType}:build"
|
||||||
|
;;
|
||||||
|
|
||||||
|
(-src | -source*)
|
||||||
|
optCleanType="${optCleanType}:sources"
|
||||||
|
;;
|
||||||
|
|
||||||
|
(-full)
|
||||||
|
optCleanType="full"
|
||||||
|
;;
|
||||||
|
|
||||||
|
(-current)
|
||||||
|
optCleanType="${optCleanType}:current"
|
||||||
|
;;
|
||||||
|
|
||||||
|
(-platform=*)
|
||||||
|
optCleanType="${optCleanType}:platform"
|
||||||
|
optPlatformName="${1#*=}"
|
||||||
|
;;
|
||||||
|
|
||||||
|
*) echo "Ignore unknown option/argument" 1>&2 ;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
[ -n "$optCleanType" ] || die "No clean operation specified"
|
||||||
|
|
||||||
# Clean various packages via 'distclean'
|
# sources
|
||||||
for i in openmpi-* ADIOS-* metis-*
|
case "$optCleanType" in (*full* | *source*)
|
||||||
do
|
|
||||||
[ -d "$i" ] && (
|
# Clean various packages via 'distclean'
|
||||||
echo
|
for dir in \
|
||||||
echo "${i%/*}"
|
$(etc/list-available -dirs \
|
||||||
echo " make distclean"
|
gcc \
|
||||||
echo
|
gmp \
|
||||||
cd $i && make distclean
|
gperftools \
|
||||||
|
llvm \
|
||||||
|
metis \
|
||||||
|
mpc \
|
||||||
|
mpfr \
|
||||||
|
openmpi \
|
||||||
|
qt \
|
||||||
)
|
)
|
||||||
done
|
do
|
||||||
|
if [ -n "$optDryRun" ]
|
||||||
|
then
|
||||||
|
echo "$dir : ${optDryRun}make distclean"
|
||||||
|
elif [ -d "$dir" ]
|
||||||
|
then
|
||||||
|
(
|
||||||
|
cd "$dir" 2>/dev/null || exit
|
||||||
|
echo
|
||||||
|
echo "$dir : make distclean"
|
||||||
|
echo
|
||||||
|
make distclean || true
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Clean scotch (src) with 'realclean'
|
||||||
|
for dir in $(etc/list-available -dirs scotch)
|
||||||
|
do
|
||||||
|
dir="$dir/src" # Within the src directory!
|
||||||
|
|
||||||
# Clean various packages via 'realclean'
|
if [ -n "$optDryRun" ]
|
||||||
for i in scotch*/src
|
then
|
||||||
do
|
echo "$dir : ${optDryRun}make realclean"
|
||||||
[ -d "$i" ] && (
|
elif [ -d "$dir" ]
|
||||||
|
then
|
||||||
|
(
|
||||||
|
cd "$dir" 2>/dev/null || exit
|
||||||
|
echo
|
||||||
|
echo "$dir : make realclean"
|
||||||
|
echo
|
||||||
|
make realclean || true
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Clean various packages via 'wclean'
|
||||||
|
for dir in $(etc/list-available -dirs ccmio libccmio)
|
||||||
|
do
|
||||||
|
if [ -n "$optDryRun" ]
|
||||||
|
then
|
||||||
|
echo "$dir : ${optDryRun}wclean"
|
||||||
|
elif [ -f "$dir/Make/files" ]
|
||||||
|
then
|
||||||
|
(
|
||||||
|
cd "$dir" 2>/dev/null || exit
|
||||||
|
echo
|
||||||
|
echo "${dir}: wclean"
|
||||||
|
echo
|
||||||
|
wclean || true
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Clean various packages via 'wclean'
|
||||||
|
for dir in $(etc/list-available -dirs kahip)
|
||||||
|
do
|
||||||
|
dir="$dir/lib"
|
||||||
|
if [ -n "$optDryRun" ]
|
||||||
|
then
|
||||||
|
echo "$dir : ${optDryRun}wclean"
|
||||||
|
elif [ -f "$dir/Make/files" ]
|
||||||
|
then
|
||||||
|
(
|
||||||
|
cd "$dir" 2>/dev/null || exit
|
||||||
|
echo
|
||||||
|
echo "${dir}: wclean"
|
||||||
|
echo
|
||||||
|
wclean || true
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
esac
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# build
|
||||||
|
case "$optCleanType" in (*full* | *build*)
|
||||||
|
# Clean out-of-source build directories
|
||||||
|
if [ -d build ]
|
||||||
|
then
|
||||||
echo
|
echo
|
||||||
echo "${i%/*}"
|
echo "${optDryRun}Remove build/ directory contents"
|
||||||
echo " make realclean"
|
[ -z "$optDryRun" ] && rm -rf build/*
|
||||||
echo
|
fi
|
||||||
cd $i && make realclean
|
esac
|
||||||
)
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
# Clean out-of-source build directories
|
|
||||||
if [ -d build ]
|
|
||||||
then
|
|
||||||
echo
|
|
||||||
echo "Clean build/ directory"
|
|
||||||
rm -rf build/*
|
|
||||||
fi
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#
|
#
|
||||||
# Clean platforms directories
|
# Clean platforms directories
|
||||||
#
|
#
|
||||||
if [ "$#" -ge 1 ]
|
|
||||||
then
|
|
||||||
echo
|
|
||||||
echo "Clean platforms/sub-directories"
|
|
||||||
fi
|
|
||||||
|
|
||||||
removePlatform()
|
removePlatform()
|
||||||
{
|
{
|
||||||
local platform="$1"
|
local platform="$1"
|
||||||
if [ -n "$platform" -a -d "platforms/$platform" ]
|
if [ -n "$platform" ] && [ -d "platforms/$platform" ]
|
||||||
then
|
then
|
||||||
echo
|
echo
|
||||||
echo "Cleaning platform '$platform'"
|
echo "${optDryRun}Cleaning platform '$platform'"
|
||||||
\rm -rf "platforms/$platform"
|
[ -z "$optDryRun" ] && "platforms/$platform"
|
||||||
else
|
else
|
||||||
echo
|
echo
|
||||||
echo "Platform '$platform' not built"
|
echo "${optDryRun}Platform '$platform' not built"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Optionally cleanup platforms specified from the arguments
|
# -----------------------------------------------------------------------------
|
||||||
while [ "$#" -ge 1 ]
|
|
||||||
do
|
|
||||||
case "$1" in
|
|
||||||
-all)
|
|
||||||
echo
|
|
||||||
echo "Removing all platforms/sub-directories"
|
|
||||||
echo
|
|
||||||
\rm -rf platforms/*
|
|
||||||
break
|
|
||||||
;;
|
|
||||||
|
|
||||||
-current)
|
# current platform
|
||||||
echo "Current platform '$WM_OPTIONS'"
|
case "$optCleanType" in (*full* | *current*)
|
||||||
removePlatform "$WM_OPTIONS"
|
echo "${optDryRun}Remove current platform: '$WM_OPTIONS'"
|
||||||
;;
|
removePlatform "$WM_OPTIONS"
|
||||||
|
esac
|
||||||
|
|
||||||
*)
|
|
||||||
removePlatform "$1"
|
# named platform
|
||||||
;;
|
case "$optCleanType" in (*platform*)
|
||||||
esac
|
echo "${optDryRun}Remove platform: '$optPlatformName'"
|
||||||
shift
|
removePlatform "$optPlatformName"
|
||||||
done
|
esac
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
447
Allwmake
447
Allwmake
@ -3,70 +3,36 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
# \\ / A nd | www.openfoam.com
|
||||||
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
# Copyright (C) 2016-2023 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
#
|
|
||||||
# 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
|
# Script
|
||||||
# Allwmake
|
# ThirdParty Allwmake
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Build script for ThirdParty
|
# Build script for ThirdParty applications/libraries
|
||||||
#
|
#
|
||||||
|
# ----------------------------------------------
|
||||||
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
# Run from third-party directory only
|
||||||
cd ${0%/*} || exit 1
|
cd "${0%/*}" || exit
|
||||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
echo " The environment variables are inconsistent with the installation."
|
echo " Check your OpenFOAM environment and installation"
|
||||||
echo " Check the OpenFOAM entries in your dot-files and source them."
|
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
[ -n "$FOAM_EXT_LIBBIN" ] || {
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
echo "Error: FOAM_EXT_LIBBIN not set"
|
|
||||||
echo " Check the OpenFOAM entries in your dot-files and source them."
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
. etc/tools/ThirdPartyFunctions
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Export WM settings in a form that GNU configure recognizes
|
exportCompiler true # Compiler info + flags for CMake/configure
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
exportLinker # Linker flags for CMake/configure
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
useGccFlag $@ # Scan arguments for a '-gcc' option
|
||||||
[ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS"
|
|
||||||
[ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS"
|
|
||||||
[ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS"
|
|
||||||
|
|
||||||
|
|
||||||
warnBuildIssues()
|
|
||||||
{
|
|
||||||
echo
|
|
||||||
echo " ---------------------------------------------------"
|
|
||||||
echo " Optional component ($1) had build issues"
|
|
||||||
echo " OpenFOAM will nonetheless remain largely functional"
|
|
||||||
echo " ---------------------------------------------------"
|
|
||||||
echo
|
|
||||||
}
|
|
||||||
|
|
||||||
warnNotFound()
|
|
||||||
{
|
|
||||||
echo " Optional component ($1) was not found"
|
|
||||||
echo
|
|
||||||
}
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -74,367 +40,100 @@ echo
|
|||||||
echo ========================================
|
echo ========================================
|
||||||
echo Start ThirdParty Allwmake
|
echo Start ThirdParty Allwmake
|
||||||
echo ========================================
|
echo ========================================
|
||||||
|
echo "using: $CC $CFLAGS"
|
||||||
|
echo "using: $CXX $CXXFLAGS"
|
||||||
echo
|
echo
|
||||||
echo ========================================
|
echo ========================================
|
||||||
echo Build MPI libraries if required
|
echo Build MPI libraries if required
|
||||||
echo " $MPI_ARCH_PATH"
|
echo " $MPI_ARCH_PATH"
|
||||||
case "$WM_MPLIB" in
|
case "$WM_MPLIB" in
|
||||||
OPENMPI)
|
(OPENMPI | MPICH)
|
||||||
if [ -r $MPI_ARCH_PATH/lib${WM_COMPILER_LIB_ARCH}/libmpi.so ]
|
if ! ./make"$WM_MPLIB" -test "$MPI_ARCH_PATH"
|
||||||
then
|
then
|
||||||
echo " have $WM_MPLIB shared library ($FOAM_MPI)"
|
./make"$WM_MPLIB"
|
||||||
echo
|
|
||||||
elif [ -r $MPI_ARCH_PATH/lib${WM_COMPILER_LIB_ARCH}/libmpi.a ]
|
|
||||||
then
|
|
||||||
echo " have $WM_MPLIB static library ($FOAM_MPI)"
|
|
||||||
echo
|
|
||||||
else
|
|
||||||
(
|
|
||||||
# configuration options:
|
|
||||||
# Start with GridEngine support - builds without external libraries
|
|
||||||
configOpt="--with-sge"
|
|
||||||
|
|
||||||
# Add InfiniBand support
|
|
||||||
ibDir=/usr/local/ofed
|
|
||||||
ibLib=$infbDIR/lib${WM_COMPILER_LIB_ARCH}
|
|
||||||
if [ -d "$ibDir" -a -d "$ibLib" ]
|
|
||||||
then
|
|
||||||
configOpt="$configOpt --with-verbs=$ibDir --with-verbs-lib=$ibLib"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# end of configuration options
|
|
||||||
# ----------------------------
|
|
||||||
mpiPACKAGE="${MPI_ARCH_PATH##*/}"
|
|
||||||
sourceDIR=$sourceBASE/$mpiPACKAGE
|
|
||||||
buildDIR=$buildBASE/$mpiPACKAGE
|
|
||||||
|
|
||||||
cd $sourceDIR || exit 1
|
|
||||||
[ -e Makefile ] && make distclean 2>/dev/null
|
|
||||||
|
|
||||||
rm -rf $MPI_ARCH_PATH
|
|
||||||
rm -rf $buildDIR
|
|
||||||
mkdir -p $buildDIR
|
|
||||||
cd $buildDIR
|
|
||||||
|
|
||||||
set -x
|
|
||||||
$sourceDIR/configure \
|
|
||||||
--prefix=$MPI_ARCH_PATH \
|
|
||||||
--disable-orterun-prefix-by-default \
|
|
||||||
--enable-shared --disable-static \
|
|
||||||
--libdir=$MPI_ARCH_PATH/lib${WM_COMPILER_LIB_ARCH} \
|
|
||||||
--enable-mpi-fortran=none \
|
|
||||||
--disable-mpi-profile \
|
|
||||||
$configOpt \
|
|
||||||
&& make -j $WM_NCOMPPROCS \
|
|
||||||
&& make install \
|
|
||||||
&& echo "Built: $mpiPACKAGE"
|
|
||||||
) || {
|
|
||||||
echo "Error building: $mpiPACKAGE"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
MPICH)
|
|
||||||
if [ -r $MPI_ARCH_PATH/lib/libmpich.so ]
|
|
||||||
then
|
|
||||||
echo " have $WM_MPLIB shared library ($FOAM_MPI)"
|
|
||||||
echo
|
|
||||||
elif [ -r $MPI_ARCH_PATH/lib/libmpich.a ]
|
|
||||||
then
|
|
||||||
echo " have $WM_MPLIB static library ($FOAM_MPI)"
|
|
||||||
echo
|
|
||||||
else
|
|
||||||
(
|
|
||||||
# WARNING: unmaintained build code:
|
|
||||||
# ---------------------------------
|
|
||||||
mpiPACKAGE="${MPI_ARCH_PATH##*/}"
|
|
||||||
sourceDIR=$sourceBASE/$mpiPACKAGE
|
|
||||||
cd $sourceDIR || exit 1
|
|
||||||
|
|
||||||
set -x
|
|
||||||
[ -e Makefile ] && make distclean 2>/dev/null
|
|
||||||
rm -rf $MPI_ARCH_PATH
|
|
||||||
rm -rf util/machines/machines.*
|
|
||||||
|
|
||||||
./configure \
|
|
||||||
--prefix=$MPI_ARCH_PATH \
|
|
||||||
--without-mpe \
|
|
||||||
--disable-f77 \
|
|
||||||
--disable-f90 \
|
|
||||||
--disable-f90modules \
|
|
||||||
--disable-mpedbg \
|
|
||||||
--disable-devdebug \
|
|
||||||
--disable-debug \
|
|
||||||
--enable-sharedlib=$MPI_ARCH_PATH/lib \
|
|
||||||
--with-device=ch_p4 \
|
|
||||||
;
|
|
||||||
|
|
||||||
# For MPICH2 below 1.5a1 uncomment this line and comment next
|
|
||||||
# make && make install
|
|
||||||
|
|
||||||
# For MPICH2 1.5a1 or above
|
|
||||||
make -j $WM_NCOMPPROCS && make install
|
|
||||||
|
|
||||||
make distclean
|
|
||||||
|
|
||||||
if [ -r $MPI_ARCH_PATH ]
|
|
||||||
then
|
|
||||||
cd $MPI_ARCH_PATH/bin
|
|
||||||
for file in *
|
|
||||||
do
|
|
||||||
sed s%$MPI_ARCH_PATH%'$MPI_ARCH_PATH'%g $file > temp.$$
|
|
||||||
mv temp.$$ $file
|
|
||||||
chmod 0755 $file
|
|
||||||
done
|
|
||||||
|
|
||||||
cd $MPI_ARCH_PATH/lib
|
|
||||||
|
|
||||||
if [ -r libmpich.so.1.0 ]
|
|
||||||
then
|
|
||||||
rm *.so
|
|
||||||
ln -s libmpich.so.1.0 libmpich.so
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Building scotch is still a bit of a pain
|
|
||||||
|
|
||||||
# Get SCOTCH_VERSION, SCOTCH_ARCH_PATH
|
|
||||||
if settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/scotch)
|
|
||||||
then
|
|
||||||
. $settings
|
|
||||||
else
|
|
||||||
echo
|
|
||||||
echo "Error: no config.sh/scotch settings"
|
|
||||||
echo
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo ========================================
|
|
||||||
echo "Build Scotch decomposition library $SCOTCH_VERSION"
|
|
||||||
echo " $SCOTCH_ARCH_PATH"
|
|
||||||
|
|
||||||
SCOTCH_SOURCE_DIR=$sourceBASE/$SCOTCH_VERSION
|
|
||||||
|
|
||||||
# This needs generalizing, but works fairly well
|
|
||||||
scotchMakefile=../../etc/wmakeFiles/scotch/Makefile.inc.i686_pc_linux2.shlib-OpenFOAM
|
|
||||||
|
|
||||||
if [ -f $SCOTCH_ARCH_PATH/include/scotch.h \
|
|
||||||
-a -r $FOAM_EXT_LIBBIN/libscotch.so \
|
|
||||||
-a -r $FOAM_EXT_LIBBIN/libscotcherrexit.so ]
|
|
||||||
then
|
|
||||||
echo " scotch header in $SCOTCH_ARCH_PATH/include"
|
|
||||||
echo " scotch libs in $FOAM_EXT_LIBBIN"
|
|
||||||
elif [ -d "$SCOTCH_SOURCE_DIR" ]
|
|
||||||
then
|
|
||||||
(
|
|
||||||
cd $SCOTCH_SOURCE_DIR/src || exit 1
|
|
||||||
rm -rf $SCOTCH_ARCH_PATH
|
|
||||||
|
|
||||||
applyPatch $SCOTCH_VERSION .. # patch at parent-level
|
|
||||||
|
|
||||||
prefixDIR=$SCOTCH_ARCH_PATH
|
|
||||||
libDIR=$FOAM_EXT_LIBBIN
|
|
||||||
|
|
||||||
mkdir -p $prefixDIR 2>/dev/null
|
|
||||||
mkdir -p $libDIR 2>/dev/null
|
|
||||||
|
|
||||||
configOpt="prefix=$prefixDIR libdir=$libDIR"
|
|
||||||
|
|
||||||
if [ -f $scotchMakefile ]
|
|
||||||
then
|
|
||||||
rm -f Makefile.inc
|
|
||||||
ln -s $scotchMakefile Makefile.inc
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ -f Makefile.inc ] || {
|
|
||||||
echo " Error: scotch needs an appropriate Makefile.inc"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# handle non-gcc compilers
|
|
||||||
unset configEnv
|
|
||||||
[ "${WM_CC:-gcc}" != gcc ] && configEnv="CC=$WM_CC CCS=$WM_CC"
|
|
||||||
|
|
||||||
make realclean 2>/dev/null # for safety
|
|
||||||
|
|
||||||
make -j $WM_NCOMPPROCS $configEnv scotch \
|
|
||||||
&& make $configOpt install
|
|
||||||
|
|
||||||
# cleanup, could also remove Makefile.inc
|
|
||||||
make realclean 2>/dev/null
|
|
||||||
) || warnBuildIssues SCOTCH
|
|
||||||
else
|
|
||||||
warnNotFound SCOTCH
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Build ptscotch if MPI (ThirdParty or system) is available
|
|
||||||
# and normal scotch was build (has include and library)
|
|
||||||
if [ "${FOAM_MPI:-dummy}" != dummy ] && \
|
|
||||||
[ -f $SCOTCH_ARCH_PATH/include/scotch.h \
|
|
||||||
-a -r $FOAM_EXT_LIBBIN/libscotch.so ] || \
|
|
||||||
{
|
|
||||||
echo
|
|
||||||
echo " WARNING: skipping pt-scotch - 'scotch.h' include file not found!"
|
|
||||||
false
|
|
||||||
}
|
|
||||||
then
|
|
||||||
echo
|
|
||||||
echo ========================================
|
|
||||||
echo "Build pt-scotch decomposition library $SCOTCH_VERSION (with $FOAM_MPI)"
|
|
||||||
echo " $SCOTCH_ARCH_PATH"
|
|
||||||
|
|
||||||
if [ -f $SCOTCH_ARCH_PATH/include/$FOAM_MPI/ptscotch.h \
|
|
||||||
-a -r $FOAM_EXT_LIBBIN/$FOAM_MPI/libptscotch.so \
|
|
||||||
-a -r $FOAM_EXT_LIBBIN/$FOAM_MPI/libptscotcherrexit.so ]
|
|
||||||
then
|
|
||||||
echo " ptscotch header in $SCOTCH_ARCH_PATH/include/$FOAM_MPI"
|
|
||||||
echo " ptscotch libs in $FOAM_EXT_LIBBIN/$FOAM_MPI"
|
|
||||||
else
|
|
||||||
(
|
|
||||||
cd $SCOTCH_SOURCE_DIR/src || exit 1
|
|
||||||
echo
|
|
||||||
|
|
||||||
prefixDIR=$SCOTCH_ARCH_PATH
|
|
||||||
incDIR=$SCOTCH_ARCH_PATH/include/$FOAM_MPI
|
|
||||||
libDIR=$FOAM_EXT_LIBBIN/$FOAM_MPI
|
|
||||||
|
|
||||||
mkdir -p $prefixDIR 2>/dev/null
|
|
||||||
mkdir -p $libDIR 2>/dev/null
|
|
||||||
|
|
||||||
configOpt="prefix=$prefixDIR includedir=$incDIR libdir=$libDIR"
|
|
||||||
|
|
||||||
if [ -f $scotchMakefile ]
|
|
||||||
then
|
|
||||||
rm -f Makefile.inc
|
|
||||||
ln -s $scotchMakefile Makefile.inc
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ -f Makefile.inc ] || {
|
|
||||||
echo " Error: scotch needs an appropriate Makefile.inc"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# handle non-gcc compilers
|
|
||||||
unset configEnv
|
|
||||||
[ "${WM_CC:-gcc}" != gcc ] && configEnv="CC=$WM_CC CCS=$WM_CC"
|
|
||||||
|
|
||||||
make realclean 2>/dev/null # for safety
|
|
||||||
|
|
||||||
make -j $WM_NCOMPPROCS $configEnv ptscotch \
|
|
||||||
&& make $configOpt install
|
|
||||||
|
|
||||||
# cleanup, could also remove Makefile.inc
|
|
||||||
make realclean 2>/dev/null
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# verify existence of ptscotch include
|
|
||||||
[ -f $SCOTCH_ARCH_PATH/include/$FOAM_MPI/ptscotch.h ] || {
|
|
||||||
echo
|
|
||||||
echo " WARNING: required include file 'ptscotch.h' not found!"
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
# Treat as optional, but really isn't if anyone wants parallel calculations
|
||||||
|
./makeSCOTCH || warnBuildIssues SCOTCH
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Metis is optional
|
|
||||||
echo
|
echo
|
||||||
echo ========================================
|
echo ========================================
|
||||||
echo Build Metis decomposition
|
# Get KAHIP_ARCH_PATH
|
||||||
|
if settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/kahip)
|
||||||
|
then
|
||||||
|
. $settings
|
||||||
|
fi
|
||||||
|
if [ -n "$KAHIP_ARCH_PATH" ]
|
||||||
|
then
|
||||||
|
echo KAHIP decomposition
|
||||||
|
./makeKAHIP -test "$KAHIP_ARCH_PATH" || \
|
||||||
|
./makeKAHIP || warnBuildIssues KAHIP
|
||||||
|
else
|
||||||
|
warnNotFound KAHIP # is optional
|
||||||
|
fi
|
||||||
|
|
||||||
# get METIS_VERSION, METIS_ARCH_PATH
|
#------------------------------------------------------------------------------
|
||||||
|
echo
|
||||||
|
echo ========================================
|
||||||
|
# Get METIS_ARCH_PATH
|
||||||
if settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/metis)
|
if settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/metis)
|
||||||
then
|
then
|
||||||
. $settings
|
. $settings
|
||||||
fi
|
fi
|
||||||
|
if [ -n "$METIS_ARCH_PATH" ]
|
||||||
METIS_SOURCE_DIR=$sourceBASE/$METIS_VERSION
|
|
||||||
|
|
||||||
if [ -f $METIS_ARCH_PATH/include/metis.h \
|
|
||||||
-a -r $FOAM_EXT_LIBBIN/libmetis.so ]
|
|
||||||
then
|
then
|
||||||
echo " metis header in $METIS_ARCH_PATH/include"
|
echo METIS decomposition
|
||||||
echo " metis libs in $FOAM_EXT_LIBBIN"
|
./makeMETIS -test "$METIS_ARCH_PATH" || \
|
||||||
echo
|
./makeMETIS || warnBuildIssues METIS
|
||||||
elif [ -d "$METIS_SOURCE_DIR" ]
|
|
||||||
then
|
|
||||||
(
|
|
||||||
cd $METIS_SOURCE_DIR || exit 1
|
|
||||||
rm -rf $METIS_ARCH_PATH
|
|
||||||
|
|
||||||
# Adjust metis integer size to match OpenFOAM label-size
|
|
||||||
sed -i -e 's=\(#define IDXTYPEWIDTH\).*=\1 '$WM_LABEL_SIZE'=' \
|
|
||||||
include/metis.h
|
|
||||||
|
|
||||||
# No config option for the library location.
|
|
||||||
# - build normally and use mv to relocate it
|
|
||||||
|
|
||||||
make config shared=1 prefix=$METIS_ARCH_PATH \
|
|
||||||
&& make -j $WM_NCOMPPROCS install \
|
|
||||||
&& mv $METIS_ARCH_PATH/lib/libmetis.so $FOAM_EXT_LIBBIN
|
|
||||||
|
|
||||||
rmdir $METIS_ARCH_PATH/lib 2>/dev/null || true # failure is not critical
|
|
||||||
) || warnBuildIssues METIS
|
|
||||||
else
|
else
|
||||||
warnNotFound METIS
|
warnNotFound METIS # is optional
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# CGAL is optional
|
|
||||||
echo
|
echo
|
||||||
echo ========================================
|
echo ========================================
|
||||||
echo Build CGAL
|
if [ -n "$CGAL_ARCH_PATH" ]
|
||||||
if [ -d "$CGAL_ARCH_PATH/include" \
|
|
||||||
-a -r "$CGAL_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libCGAL.so" ]
|
|
||||||
then
|
|
||||||
# first some information about boost
|
|
||||||
for root in "$BOOST_ARCH_PATH" /usr
|
|
||||||
do
|
|
||||||
if [ -d "$root/include/boost" \
|
|
||||||
-a -r "$root/lib$WM_COMPILER_LIB_ARCH/libboost_system.so" ]
|
|
||||||
then
|
|
||||||
echo " BOOST headers in $root/include"
|
|
||||||
echo " BOOST libs in $root/lib$WM_COMPILER_LIB_ARCH"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
echo " CGAL headers in $CGAL_ARCH_PATH/include"
|
|
||||||
echo " CGAL libs in $CGAL_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH"
|
|
||||||
elif [ -n "$CGAL_ARCH_PATH" ]
|
|
||||||
then
|
then
|
||||||
|
echo "cgal/boost"
|
||||||
|
./makeCGAL -test "$CGAL_ARCH_PATH" "$BOOST_ARCH_PATH" || \
|
||||||
./makeCGAL || warnBuildIssues CGAL
|
./makeCGAL || warnBuildIssues CGAL
|
||||||
else
|
else
|
||||||
warnNotFound CGAL
|
warnNotFound CGAL # is optional
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
# FFTW is optional
|
|
||||||
echo
|
echo
|
||||||
echo ========================================
|
echo ========================================
|
||||||
echo Build FFTW
|
if [ -n "$FFTW_ARCH_PATH" ]
|
||||||
if [ -d "$FFTW_ARCH_PATH/include" \
|
|
||||||
-a -r "$FFTW_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libfftw3.so" ]
|
|
||||||
then
|
|
||||||
echo " FFTW headers in $FFTW_ARCH_PATH/include"
|
|
||||||
echo " FFTW libs in $FFTW_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH"
|
|
||||||
elif [ -n "$FFTW_ARCH_PATH" ]
|
|
||||||
then
|
then
|
||||||
|
echo FFTW
|
||||||
|
./makeFFTW -test "$FFTW_ARCH_PATH" || \
|
||||||
./makeFFTW || warnBuildIssues FFTW
|
./makeFFTW || warnBuildIssues FFTW
|
||||||
else
|
else
|
||||||
warnNotFound FFTW
|
warnNotFound FFTW # is optional
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
echo
|
||||||
|
echo ========================================
|
||||||
|
# Get ADIOS2_ARCH_PATH
|
||||||
|
if settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/adios2)
|
||||||
|
then
|
||||||
|
. $settings
|
||||||
|
fi
|
||||||
|
if [ -n "$ADIOS2_ARCH_PATH" ]
|
||||||
|
then
|
||||||
|
echo ADIOS2
|
||||||
|
./makeAdios2 -test "$ADIOS2_ARCH_PATH" || \
|
||||||
|
./makeAdios2 || warnBuildIssues ADIOS2
|
||||||
|
else
|
||||||
|
warnNotFound ADIOS2 # is optional
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
529
BUILD.md
529
BUILD.md
@ -1,31 +1,19 @@
|
|||||||
<!--
|
|
||||||
|--------------------------------------------------------------------------|
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | |
|
|
||||||
| \\ / A nd | Copyright (C) 2016 OpenCFD Ltd. |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
|--------------------------------------------------------------------------|
|
|
||||||
-->
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# OpenFOAM® ThirdParty Build
|
# OpenFOAM® ThirdParty Build
|
||||||
|
|
||||||
OpenFOAM depends to a certain extent on third-party libraries
|
OpenFOAM depends to a certain extent on third-party libraries
|
||||||
(*opensource only*). It also provides some interfaces to *opensource* or
|
(*opensource only*). It also provides some interfaces to *opensource* or
|
||||||
*proprietary* libraries. This third-party package contains configurations and
|
*proprietary* libraries. This third-party collection contains configurations and
|
||||||
scripts for building third-party packages. It should normally only be used in
|
scripts for building third-party packages. It will normally only be used in
|
||||||
conjunction with the corresponding OpenFOAM version.
|
conjunction with the corresponding OpenFOAM version.
|
||||||
|
|
||||||
## Organization
|
## Directory Organization
|
||||||
|
|
||||||
The ThirdParty directory contains a number of build scripts as well as
|
The ThirdParty directory contains a number of build scripts as well as
|
||||||
some directories:
|
some directories:
|
||||||
|
|
||||||
| Directory | Contains
|
| Directory | Contains
|
||||||
|-------------------|--------------------------------------------
|
|-------------------|-------------------------------------------------------
|
||||||
| etc/ | auxiliary scripts used for the build process
|
| etc/ | auxiliary tools and content used for the build process
|
||||||
| build/ | intermediate build objects
|
| build/ | intermediate build objects
|
||||||
| platforms/ | the installation directories
|
| platforms/ | the installation directories
|
||||||
|
|
||||||
@ -38,40 +26,45 @@ This approach avoids duplicate entries for the default versions and
|
|||||||
ensures the best overall consistency between the OpenFOAM installation
|
ensures the best overall consistency between the OpenFOAM installation
|
||||||
and its corresponding third-party installation.
|
and its corresponding third-party installation.
|
||||||
|
|
||||||
Nonethess, the distributed make scripts can generally be used for a
|
Nonetheless, the distributed make scripts can generally be used for a
|
||||||
variety of versions of the third-party libraries, with the software
|
variety of versions of the third-party libraries, with the software
|
||||||
version specified on the command-line. For example,
|
version specified on the command-line. For example,
|
||||||
|
```
|
||||||
$ ./makeFFTW -help
|
$ ./makeFFTW -help
|
||||||
usage: makeFFTW [OPTION] [fftw-VERSION]
|
Usage: makeFFTW [OPTION] [fftw-VERSION]
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Before Starting
|
## Before Starting
|
||||||
|
|
||||||
0. Review the [system requirements](http://www.openfoam.com/documentation/system-requirements.php)
|
0. Review the [system requirements][link openfoam-require]
|
||||||
and decide on the following:
|
and decide on the following:
|
||||||
* compiler type/version - if the system compiler is not relatively recent,
|
- compiler type/version - if the system compiler is not relatively recent,
|
||||||
you will need a [third-party compiler](#makeGcc) installation.
|
you will need a [third-party compiler](#makeGcc) installation.
|
||||||
* MPI type/version.
|
- MPI type/version.
|
||||||
* ParaView type/version.
|
- ParaView type/version.
|
||||||
* CMake type/version, ...
|
- CMake type/version, ...
|
||||||
1. If you are using a system MPI (eg, openmpi), ensure that this environment
|
1. If you are using a system MPI (eg, openmpi), ensure that this environment
|
||||||
has also been properly activated for your user.
|
has also been properly activated for your user.
|
||||||
Often (but not always) a `mpi-selector` command is available for this purpose.
|
Often (but not always) a `mpi-selector` command is available for this purpose.
|
||||||
You may need to open a new shell afterwards for the change to take effect.
|
You may need to open a new shell afterwards for the change to take effect.
|
||||||
Using the following command may help diagnosing things:
|
Using the following command may help diagnosing things:
|
||||||
|
```
|
||||||
which mpicc
|
which mpicc
|
||||||
|
```
|
||||||
2. Adjust the OpenFOAM `etc/bashrc`, `etc/config.sh/...` or equivalent
|
2. Adjust the OpenFOAM `etc/bashrc`, `etc/config.sh/...` or equivalent
|
||||||
`prefs.sh` files to reflect your preferred configuration.
|
the `etc/prefs.{csh,sh}` files to reflect your preferred configuration.
|
||||||
For many config files, there are several configuration possibilities:
|
For many config files, there are several configuration possibilities:
|
||||||
- Define a particular third-party version.
|
- Define a particular third-party version.
|
||||||
- Use a system installation.
|
- Use a system installation.
|
||||||
- Disable use of an optional component.
|
- Disable use of an optional component.
|
||||||
- Define an alternative site-wide central location.
|
- Define an alternative site-wide central location.
|
||||||
- After making the desired changes, use `wmRefresh` or equivalent to use the configurations.
|
|
||||||
|
See the [OpenFOAM configuration information][link openfoam-config]
|
||||||
|
for more details.
|
||||||
|
After making the desired changes, use the `wmRefresh` alias
|
||||||
|
or equivalent to enable the configuration.
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -83,9 +76,9 @@ automatically as part of the top-level OpenFOAM `Allwmake`.
|
|||||||
Nonetheless it may be necessary or useful to build various
|
Nonetheless it may be necessary or useful to build various
|
||||||
ThirdParty components prior to building OpenFOAM itself.
|
ThirdParty components prior to building OpenFOAM itself.
|
||||||
|
|
||||||
|
### Bootstrapping *(optional)*
|
||||||
|
|
||||||
### Build Sequence
|
* `makeGcc` _or_ `makeLLVM` <a name="makeGcc"></a>
|
||||||
1. `makeGcc` _or_ `makeLLVM` <a name="makeGcc"></a> *(optional)*
|
|
||||||
- Makes a third-party [gcc](#gcc-compiler) or [clang](#clang-compiler) installation,
|
- Makes a third-party [gcc](#gcc-compiler) or [clang](#clang-compiler) installation,
|
||||||
which is needed if the system gcc is [too old](#gcc-compiler).
|
which is needed if the system gcc is [too old](#gcc-compiler).
|
||||||
If your system compiler is recent enough, you can skip this step.
|
If your system compiler is recent enough, you can skip this step.
|
||||||
@ -93,59 +86,127 @@ ThirdParty components prior to building OpenFOAM itself.
|
|||||||
OpenFOAM `etc/bashrc` or your equivalent `prefs.sh` file:
|
OpenFOAM `etc/bashrc` or your equivalent `prefs.sh` file:
|
||||||
- `WM_COMPILER_TYPE=ThirdParty`
|
- `WM_COMPILER_TYPE=ThirdParty`
|
||||||
- `WM_COMPILER=Gcc48` (for example)
|
- `WM_COMPILER=Gcc48` (for example)
|
||||||
- or `WM_COMPILER=Clang` and adjust the `clang_version` entry in the OpenFOAM
|
- `WM_COMPILER=Clang40` (for example)
|
||||||
|
- or `WM_COMPILER=Clang` and adjust `clang_version` in the OpenFOAM
|
||||||
`etc/config.sh/compiler` or equivalent.
|
`etc/config.sh/compiler` or equivalent.
|
||||||
- More description is contained in the header comments of the
|
- More description is contained in the header comments of the
|
||||||
`makeGcc` and `makeLLVM` files.
|
`makeGcc` and `makeLLVM` files.
|
||||||
- *Attention*: If you are building a newer version of clang, you may need to
|
- *Attention*: If you are building a newer version of clang, you may need to
|
||||||
update your CMake beforehand.
|
update your CMake beforehand.
|
||||||
2. `makeCmake` *(optional)*
|
* `makeCmake`
|
||||||
- Makes a third-party [CMake](#general-packages) installation, which is
|
- Makes a third-party [CMake](#general-packages) installation, which is
|
||||||
needed if a system CMake does not exist or is [too old](#min-cmake),
|
needed if a system CMake does not exist or is [too old](#min-cmake),
|
||||||
- Note that CMake is being used by an number of third-party packages
|
- Note that CMake is being used by an number of third-party packages
|
||||||
(CGAL, LLVM, ParaView, VTK, ...)
|
(CGAL, LLVM, ParaView, VTK, ...)
|
||||||
so this may become an increasingly important aspect of the build.
|
so this may become an increasingly important aspect of the build.
|
||||||
3. `Allwmake`
|
|
||||||
|
Note that the order of the bootstrapping process may need to be
|
||||||
|
reversed, or even require a few loops. For example, if you may need a
|
||||||
|
newer version of CMake before being able to build LLVM/Clang and
|
||||||
|
subsequently use the newly build clang to create a newer version of
|
||||||
|
CMake in the desired location.
|
||||||
|
|
||||||
|
Additionally, if you are using clang but with ThirdParty locations for
|
||||||
|
gmp/mpfr you will need some extra work. Here is an example:
|
||||||
|
|
||||||
|
* Compile a new ThirdParty clang version:
|
||||||
|
```
|
||||||
|
./makeLLVM llvm-4.0.1
|
||||||
|
```
|
||||||
|
* Now adjust the OpenFOAM `prefs.sh` to use the new compiler settings,
|
||||||
|
and update the OpenFOAM environment (eg, `wmRefresh`)
|
||||||
|
|
||||||
|
* Next use (abuse) the `makeGcc` script to compile gmp/mpfr libraries.
|
||||||
|
It is best to pass the desired versions explicitly, and necessary
|
||||||
|
to set the CC/CXX variables so that the correct compiler is used:
|
||||||
|
```
|
||||||
|
CC=clang CXX=clang++ ./makeGcc gmp-6.1.2 mpfr-4.0.0 gcc-system
|
||||||
|
```
|
||||||
|
specifying `gcc-system` effectively disables building of gcc,
|
||||||
|
but will build the gmp/mpfr components.
|
||||||
|
|
||||||
|
* As a final step, it will be necessary to add the ThirdParty
|
||||||
|
gmp/mpfr locations in the OpenFOAM config files since they are
|
||||||
|
normally only used in combination with a ThirdParty gcc.
|
||||||
|
The location to make these changes is in the `etc/config.sh/CGAL`,
|
||||||
|
since this is the component that uses the mpfr library.
|
||||||
|
For example,
|
||||||
|
```
|
||||||
|
gmp_version=gmp-6.1.2
|
||||||
|
mpfr_version=mpfr-4.0.0
|
||||||
|
export GMP_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gmp_version
|
||||||
|
export MPFR_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpfr_version
|
||||||
|
```
|
||||||
|
* Update update the OpenFOAM environment (eg, `wmRefresh`) again.
|
||||||
|
|
||||||
|
|
||||||
|
### Build Sequence
|
||||||
|
|
||||||
|
1. `Allwmake`
|
||||||
- This will be automatically invoked by the top-level OpenFOAM `Allwmake`, but
|
- This will be automatically invoked by the top-level OpenFOAM `Allwmake`, but
|
||||||
can also be invoked directly to find possible build errors.
|
can also be invoked directly to find possible build errors.
|
||||||
- Builds an mpi library (openmpi or mpich), scotch decomposition, boost, CGAL, FFTW.
|
- Builds an mpi library (openmpi or mpich), scotch decomposition, boost, CGAL, FFTW.
|
||||||
- If the optional metis directory is found, it will also be compiled.
|
- If the optional kahip or metis directories are found, they will also be compiled.
|
||||||
4. `makeParaView` *(optional but highly recommended)*
|
2. `makeParaView` *(optional)*
|
||||||
- This is optional, but extremely useful for visualization and for
|
- Can be useful for visualization and for run-time post-processing function objects.
|
||||||
run-time post-processing function objects.
|
You can build this at a later point in time, and rebuild the visualization modules.
|
||||||
You can build this at a later point in time, but then you should
|
3. Make any additional optional components
|
||||||
remember to rebuild the post-processing function objects and the
|
|
||||||
reader module as well.
|
|
||||||
5. Make any additional optional components
|
|
||||||
|
|
||||||
|
|
||||||
#### Optional Components
|
#### Optional Components
|
||||||
|
|
||||||
|
`makeAdios2`
|
||||||
|
- Only required for [ADIOS](#parallel) support.
|
||||||
|
|
||||||
`makeCGAL`
|
`makeCGAL`
|
||||||
- Builds third-party boost and CGAL.
|
- Builds [boost](#general-packages) and [CGAL](#general-packages).
|
||||||
Automatically invoked from the ThirdParty `Allwmake`,
|
Automatically invoked from the ThirdParty `Allwmake`,
|
||||||
but can be invoked directly to resolve possible build errors.
|
but can be invoked directly to resolve possible build errors.
|
||||||
|
|
||||||
`makeFFTW`
|
`makeFFTW`
|
||||||
- Builds third-party FFTW.
|
- Builds [FFTW](#general-packages).
|
||||||
Automatically invoked from the ThirdParty `Allwmake`,
|
Automatically invoked from the ThirdParty `Allwmake`,
|
||||||
but can be invoked directly to resolve possible build errors.
|
but can be invoked directly to resolve possible build errors.
|
||||||
|
|
||||||
|
`makeKAHIP`
|
||||||
|
- Builds [KaHIP](#parallel) decomposition library.
|
||||||
|
Automatically invoked from the ThirdParty `Allwmake`,
|
||||||
|
but can be invoked directly to resolve possible build errors.
|
||||||
|
|
||||||
|
`makeOPENMPI`
|
||||||
|
- Builds [OPENMPI](#parallel) library.
|
||||||
|
|
||||||
|
`makePETSC`
|
||||||
|
- Only required for [PETSC](#general-packages) support.
|
||||||
|
|
||||||
|
`makeMETIS`
|
||||||
|
- Builds [METIS](#parallel) decomposition library.
|
||||||
|
Automatically invoked from the ThirdParty `Allwmake`,
|
||||||
|
but can be invoked directly to resolve possible build errors.
|
||||||
|
|
||||||
|
`makeSCOTCH`
|
||||||
|
- Builds [scotch, ptscotch](#parallel) decomposition libraries.
|
||||||
|
Automatically invoked from the ThirdParty `Allwmake`,
|
||||||
|
but can be invoked directly for special configurations
|
||||||
|
or to resolve possible build errors.
|
||||||
|
|
||||||
|
`makeMGridGen`
|
||||||
|
- Optional agglomeration routines.
|
||||||
|
|
||||||
`makeCCMIO`
|
`makeCCMIO`
|
||||||
- Only required for conversion to/from STARCD/STARCCM+ files.
|
- Only required for conversion to/from STARCD/STARCCM+ files.
|
||||||
|
|
||||||
`makeTecio`
|
|
||||||
- Only required for conversion of results to Tecplot format.
|
|
||||||
|
|
||||||
`makeMesa`, `makeVTK`
|
`makeMesa`, `makeVTK`
|
||||||
- Additional support for building offscreen rendering components.
|
- Additional support for building offscreen rendering components.
|
||||||
Useful if you want to render on computer servers without graphics cards.
|
Useful if you want to render on computer servers without graphics cards.
|
||||||
The `makeParaView.example` and `makeVTK.example` files provide some useful
|
The `makeParaView.example` and `makeVTK.example` files offer some
|
||||||
suggestions about compiling such a configuration.
|
suggestions about compiling such a configuration.
|
||||||
|
|
||||||
`makeQt`
|
`makeQt`
|
||||||
- Script to build a [third-party installation of Qt](#makeQt), including qmake.
|
- Script to build a [Qt](#makeQt), including qmake.
|
||||||
- Possibly needed for `makeParaView`.
|
- Possibly needed for `makeParaView`.
|
||||||
|
- The associated `etc/relocateQt` may be of independent use.
|
||||||
|
Read the file for more details.
|
||||||
|
|
||||||
`makeGperftools`
|
`makeGperftools`
|
||||||
- Build gperftools (originally Google Performance Tools)
|
- Build gperftools (originally Google Performance Tools)
|
||||||
@ -155,19 +216,23 @@ ThirdParty components prior to building OpenFOAM itself.
|
|||||||
Report in sorted order.
|
Report in sorted order.
|
||||||
|
|
||||||
`Allclean`
|
`Allclean`
|
||||||
- After building, this script may be used to remove intermediate build information
|
- After building, this script may be used to remove intermediate build
|
||||||
and save some disk space.
|
information and save some disk space.
|
||||||
|
|
||||||
|
|
||||||
## Build Notes
|
## Build Notes
|
||||||
|
|
||||||
|
### CGAL
|
||||||
|
- The [zlib][page zlib] library and development headers are required.
|
||||||
|
|
||||||
### Scotch
|
### Scotch
|
||||||
- The zlib library and zlib development headers are required.
|
- The [zlib][page zlib] library and development headers are required.
|
||||||
|
|
||||||
|
|
||||||
### Mesa
|
### Mesa
|
||||||
- Needed for off-screen rendering.
|
- Needed for off-screen rendering.
|
||||||
- Building with [mesa-11][older mesa] is fine and [mesa-13][link mesa] also seems to be okay.
|
- Building with [mesa-11][link mesa11] and [mesa-13][link mesa13] both
|
||||||
|
seem okay, as does building with [mesa-17][link mesa].
|
||||||
- Building with mesa-12 is not possible since it fails to create
|
- Building with mesa-12 is not possible since it fails to create
|
||||||
the necessary `include/GL` directory and `osmesa.h` file.
|
the necessary `include/GL` directory and `osmesa.h` file.
|
||||||
|
|
||||||
@ -177,72 +242,124 @@ and save some disk space.
|
|||||||
- Rather than downloading VTK separately, it is easy to reuse the VTK
|
- Rather than downloading VTK separately, it is easy to reuse the VTK
|
||||||
sources that are bundled with ParaView.
|
sources that are bundled with ParaView.
|
||||||
For example, by using a symbolic link:
|
For example, by using a symbolic link:
|
||||||
|
```
|
||||||
ln -s ParaView-5.0.1/VTK VTK-7.1.0
|
ln -s ParaView-v5.6.0/VTK VTK-8.2.0
|
||||||
|
```
|
||||||
The appropriate VTK version number can be found from the contents of
|
The appropriate VTK version number can be found from the contents of
|
||||||
the `vtkVersion.cmake` file.
|
the `vtkVersion.cmake` file.
|
||||||
For example,
|
For example,
|
||||||
|
```
|
||||||
$ cat ParaView-5.0.1/VTK/CMake/vtkVersion.cmake
|
$ cat ParaView-v5.6.0/VTK/CMake/vtkVersion.cmake
|
||||||
|
```
|
||||||
# VTK version number components.
|
contains this type of information
|
||||||
set(VTK_MAJOR_VERSION 7)
|
```
|
||||||
set(VTK_MINOR_VERSION 1)
|
# VTK version number components.
|
||||||
set(VTK_BUILD_VERSION 0)
|
set(VTK_MAJOR_VERSION 8)
|
||||||
|
set(VTK_MINOR_VERSION 2)
|
||||||
|
set(VTK_BUILD_VERSION 0)
|
||||||
|
```
|
||||||
|
|
||||||
### ParaView
|
### ParaView
|
||||||
- **ParaView-5.0.1** is the last version for which the OpenFOAM reader
|
|
||||||
modules (eg, to visualize a `blockMeshDict`) work in their present form.
|
|
||||||
|
|
||||||
- Building ParaView requires CMake, qmake and a `qt` development files.
|
- Building ParaView requires CMake, qmake and a `qt` development files.
|
||||||
Use the `-cmake`, `-qmake` and `-qt-*` options for `makeParaView` as
|
Use the `-cmake`, `-qmake` and `-qt-*` options for `makeParaView` as
|
||||||
required.
|
required.
|
||||||
See additional notes below about [making Qt](#makeQt) if necessary.
|
See additional notes below about [making Qt](#makeQt) if necessary.
|
||||||
|
|
||||||
#### 5.2.0
|
**NOTE** this step may not be entirely successful for your particular
|
||||||
- Compiles without patching, but the OpenFOAM reader modules
|
system. Building ParaView itself is generally not a significant problem
|
||||||
(eg, to visualize a `blockMeshDict`) have not yet been migrated
|
but its dependency on particular Qt versions can be a problem.
|
||||||
to this version.
|
|
||||||
|
|
||||||
#### 4.4.0/5.0.0/5.0.1/5.1.2
|
If you fail at this step due to Qt dependencies, you may have success
|
||||||
- When using `makeParaView`, the following patches will be automatically
|
building a slightly older Qt version. Another alternative may be to
|
||||||
applied (see the `etc/patches` directory):
|
use the ParaView-5.4 sources that were included in the ThirdParty-v1712
|
||||||
- Bugfix for STL reader - affects 4.4.0 only.
|
source pack. This, however, has never been tested in combination with
|
||||||
- Broken installation (ui_pqExportStateWizard.h) - affects 4.4.0/5.0.0/5.0.1/5.1.x
|
the OpenFOAM Catalyst insitu visualization.
|
||||||
- Building with gcc-6.1.0 - affects 4.4.0/5.0.0/5.0.1 (patch applied for 5.0.1)
|
|
||||||
- The SciberQuestToolKit plugin fails to compile with gcc-6.1.0 and causes
|
If you encounter problems starting paraview (eg, segmentation fault)
|
||||||
the compilation of ParaView to halt. The easiest solution is to delete
|
it could be related to the graphics libraries not being properly found.
|
||||||
the ParaView-5.0.1/Plugins/SciberQuestToolKit directory.
|
The `LIBGL_DEBUG` environment variable can be used to obtain more
|
||||||
|
detailed information:
|
||||||
|
```
|
||||||
|
$ export LIBGL_DEBUG=verbose
|
||||||
|
```
|
||||||
|
|
||||||
|
The call to paraview now emits this information:
|
||||||
|
```
|
||||||
|
libGL: screen 0 does not appear to be DRI2 capable
|
||||||
|
libGL: OpenDriver: trying /usr/lib64/dri/tls/swrast_dri.so
|
||||||
|
libGL: OpenDriver: trying /usr/lib64/dri/swrast_dri.so
|
||||||
|
...
|
||||||
|
libGL error: No matching fbConfigs or visuals found
|
||||||
|
libGL error: failed to load driver: swrast
|
||||||
|
```
|
||||||
|
Indicating that the drivers are probably not correctly installed.
|
||||||
|
The `/var/log/Xorg.0.log` file or the `dmesg` command may yield more
|
||||||
|
information to the cause.
|
||||||
|
In this particular case, the Nvidia drivers had a client/server
|
||||||
|
version mismatch.
|
||||||
|
|
||||||
|
|
||||||
|
#### 5.6.x, 5.5.x binary packages
|
||||||
|
|
||||||
|
For general functionality, the paraview version distributed with
|
||||||
|
the operating system or a [binary package][download ParaView]
|
||||||
|
may be sufficient for your needs.
|
||||||
|
- No known issues with the native OpenFOAM reader.
|
||||||
|
|
||||||
|
|
||||||
|
Using a binary package does mean you miss these elements (which may or
|
||||||
|
may not be important for you):
|
||||||
|
- cannot visualize a `blockMeshDict`
|
||||||
|
- cannot build Catalyst insitu visualization
|
||||||
|
- no alternative OpenFOAM reader module for some special features not
|
||||||
|
found in the native OpenFOAM reader.
|
||||||
|
|
||||||
|
#### 5.5.x
|
||||||
|
- Requires patching for the vtk-m configuration (on some systems).
|
||||||
|
- Recommended patching for ParaView Catalyst.
|
||||||
|
- Recommended patching for file series
|
||||||
|
No known issues with the native OpenFOAM reader.
|
||||||
|
|
||||||
|
#### 5.4.x
|
||||||
|
- Compiles without patching.
|
||||||
|
No known issues with the native OpenFOAM reader.
|
||||||
|
|
||||||
|
#### 5.3.0 and older are neither recommended nor supported
|
||||||
|
- Various compilation issues and known bugs.
|
||||||
|
|
||||||
### Making Qt <a name="makeQt"></a>
|
### Making Qt <a name="makeQt"></a>
|
||||||
- Building a third-party Qt installation (prior to building ParaView) requires
|
- Building a third-party Qt installation (prior to building ParaView) requires
|
||||||
some additional effort, but should nonetheless work smoothly.
|
some additional effort, but should nonetheless work smoothly.
|
||||||
|
|
||||||
1. Download a [*qt-everywhere-opensource-src*][link Qt] package and
|
1. Download a [*qt-everywhere-opensource-src*][link Qt5] package and
|
||||||
unpack in the third-party directory.
|
unpack in the third-party directory.
|
||||||
2. Use the `makeQt` script with the QT version number. For example,
|
2. Use the `makeQt` script with the QT version number. For example,
|
||||||
|
```
|
||||||
./makeQt 4.8.7
|
./makeQt 5.9.3
|
||||||
|
```
|
||||||
3. Build ParaView using this third-party QT. For example,
|
3. Build ParaView using this third-party QT. For example,
|
||||||
|
```
|
||||||
./makeParaView -qt-4.8.7 5.0.1
|
./makeParaView -qt-5.9.3 5.6.0
|
||||||
|
```
|
||||||
- ParaView does not yet support QT5.
|
- ParaView versions prior to 5.3.0 do not properly support QT5.
|
||||||
|
|
||||||
- If you relocate the third-party directory to another location
|
- If you relocate the third-party directory to another location
|
||||||
(eg, you built in your home directory, but want to install it in a
|
(eg, you built in your home directory, but want to install it in a
|
||||||
central location), you will need to use the `etc/relocateQt` script
|
central location), you will need to use the `etc/relocateQt` script
|
||||||
afterwards.
|
afterwards.
|
||||||
|
|
||||||
|
*Note* On some older systems it can be quite difficult to build the
|
||||||
|
latest QT. In these cases, it is sometimes possible to build a
|
||||||
|
slightly older QT (eg, [qt-5.6.3][link Qt56]) instead.
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Versions
|
## Versions
|
||||||
|
|
||||||
### Gcc Compiler <a name="gcc-compiler"></a>
|
### Gcc Compiler <a name="gcc-compiler"></a>
|
||||||
|
|
||||||
The minimum version of gcc required is 4.8.0.
|
The minimum version of gcc required is **4.8.5**
|
||||||
|
|
||||||
| Name | Location
|
| Name | Location
|
||||||
|-------------------|--------------------------------------------
|
|-------------------|--------------------------------------------
|
||||||
@ -276,26 +393,22 @@ install the 32-bit development libraries by default.
|
|||||||
|
|
||||||
### Clang Compiler <a name="clang-compiler"></a>
|
### Clang Compiler <a name="clang-compiler"></a>
|
||||||
|
|
||||||
The minimum version of clang required is 3.3.
|
The minimum version of clang required is **3.7**
|
||||||
|
|
||||||
*Attention*: If you are building a newer version of clang, you may need to
|
*Attention*: If you are building a newer version of clang, you may need to
|
||||||
update your CMake beforehand.
|
update your CMake beforehand since GNU *configure* can only be used prior
|
||||||
GNU *configure* can only be used prior to clang version 3.9.
|
to clang version 3.9.
|
||||||
|
|
||||||
|
If your system gcc is particularly old
|
||||||
|
(see [minimum gcc requirements for clang](#min-gcc))
|
||||||
|
you may have additional hurdles to using the newest versions of clang.
|
||||||
|
|
||||||
|
|
||||||
| Name | Location
|
| Name | Location
|
||||||
|-----------------------|------------------------
|
|-----------------------|------------------------
|
||||||
| [clang][page clang] | [download][link clang]
|
| [clang][page clang] | [download][link clang] or [newer][newer clang]
|
||||||
| [llvm][page llvm] | [download][link llvm]
|
| [llvm][page llvm] | [download][link llvm] or [newer][newer llvm]
|
||||||
|
| [openmp][page omp] | [download][link omp] or [newer][newer omp]
|
||||||
|
|
||||||
### Parallel Processing <a name="parallel"></a>
|
|
||||||
|
|
||||||
| Name | Location
|
|
||||||
|-----------------------|------------------------
|
|
||||||
| [adios][page adios] | [repo][repo adios] or [github download][link adios] or [alt download][altlink adios]
|
|
||||||
| [scotch, ptscotch][page scotch] | [download][link scotch]
|
|
||||||
| [openmpi][page openmpi] | [download][link openmpi]
|
|
||||||
|
|
||||||
|
|
||||||
### General <a name="general-packages"></a>
|
### General <a name="general-packages"></a>
|
||||||
@ -304,46 +417,85 @@ GNU *configure* can only be used prior to clang version 3.9.
|
|||||||
|-----------------------|------------------------
|
|-----------------------|------------------------
|
||||||
| [CMake][page cmake] | [download][link cmake]
|
| [CMake][page cmake] | [download][link cmake]
|
||||||
| [boost][page boost] | [download][link boost]
|
| [boost][page boost] | [download][link boost]
|
||||||
| [CGAL][page CGAL] | [download][link CGAL] or [older][older CGAL]
|
| [CGAL][page CGAL] | [download][link CGAL]
|
||||||
| [FFTW][page FFTW] | [download][link FFTW]
|
| [FFTW][page FFTW] | [download][link FFTW]
|
||||||
|
| [HDF5][page HDF5] | [download][link HDF5]
|
||||||
|
| [PETSC][page PETSC] | [download][link PETSC]
|
||||||
|
| [HYPRE][page HYPRE] | [repo][repo HYPRE] or [download][link HYPRE]
|
||||||
| [ADF/CGNS][page CGNS], ccm | [link ccmio][link ccmio]
|
| [ADF/CGNS][page CGNS], ccm | [link ccmio][link ccmio]
|
||||||
| [tecio][page tecio] | [link tecio][link tecio]
|
|
||||||
| gperftools | [repo][repo gperftools] or [download][link gperftools]
|
| gperftools | [repo][repo gperftools] or [download][link gperftools]
|
||||||
|
|
||||||
|
|
||||||
|
### Parallel Processing <a name="parallel"></a>
|
||||||
|
|
||||||
|
| Name | Location
|
||||||
|
|-----------------------|------------------------
|
||||||
|
| [openmpi][page openmpi] | [download][link openmpi]. ***Some openmpi2/openmpi3 versions exhibit [stability issues](https://github.com/open-mpi/ompi/issues/5375)***
|
||||||
|
| [adios][page adios] | [repo][repo adios] or [github download][link adios]
|
||||||
|
| [scotch, ptscotch][page scotch] | [repo][repo scotch] or [download][link scotch] or [older][older scotch]
|
||||||
|
| [kahip][page kahip] | [download][link kahip] or [older][older kahip]
|
||||||
|
| [metis][page metis] | [download][link metis]
|
||||||
|
|
||||||
|
|
||||||
### Visualization <a name="viz-version"></a>
|
### Visualization <a name="viz-version"></a>
|
||||||
|
|
||||||
| Name | Location
|
| Name | Location
|
||||||
|-----------------------|------------------------
|
|-----------------------|------------------------
|
||||||
| [MESA][page mesa] | [download][link mesa] or [older][older mesa]
|
| [MESA][page mesa] | [download][link mesa] or [older 13][link mesa13], [older 11][link mesa11]
|
||||||
| [ParaView][page ParaView] | [download][link ParaView]. The reader modules do not yet work with the newest paraview versions.
|
| [ParaView][page ParaView] | [download][link ParaView] or older [paraview-56][link ParaView56] or [binaries][download ParaView]
|
||||||
| [Qt][page Qt] | [repo][repo Qt] or [download][link Qt]. The newer [Qt5][newer Qt5] is **not** currently supported by ParaView.
|
| [Qt][page Qt] | [QT5][link Qt5] for ParaView-5.3.0 and later, or the [older qt-56][link Qt56] for older systems.
|
||||||
|
|
||||||
|
|
||||||
### CMake Minimum Requirements <a name="min-cmake"></a>
|
### CMake Minimum Requirements <a name="min-cmake"></a>
|
||||||
|
|
||||||
The minimum CMake requirements for building various components.
|
The minimum CMake requirements for building various components.
|
||||||
|
```
|
||||||
2.8 llvm-3.4.2
|
2.8 llvm-3.4.2
|
||||||
2.8.8 ParaView-5.0.1
|
2.8.11 CGAL-4.9
|
||||||
2.8.11 CGAL-4.9
|
2.8.11 CGAL-4.11
|
||||||
2.8.12.2 llvm-3.7.0
|
3.1 CGAL-4.12 -> CGAL-4.14.3
|
||||||
2.8.12.2 llvm-3.8.0
|
2.8.12.2 llvm-3.7.0
|
||||||
2.8.4 cmake-3.6.0
|
2.8.12.2 llvm-3.8.0
|
||||||
3.3 ParaView-5.1.2
|
2.8.4 cmake-3.6.0
|
||||||
3.3 ParaView-5.2.0
|
3.3 ParaView-5.6.3
|
||||||
3.4.3 llvm-3.9.0.src
|
3.10 ParaView-5.7.0 - ParaView-5.8.0
|
||||||
3.5 ParaView-5.1.0
|
3.12 - 3.16 ParaView-5.9.0 - ParaView-5.10.1
|
||||||
|
3.4.3 llvm-3.9.1
|
||||||
|
3.4.3 llvm-4.0.0 - llvm-6.0.0
|
||||||
|
3.12 ADIOS2
|
||||||
|
```
|
||||||
|
|
||||||
### GCC Minimum Requirements <a name="min-gcc"></a>
|
### GCC Minimum Requirements <a name="min-gcc"></a>
|
||||||
|
|
||||||
The minimum gcc/g++ requirements for building various components.
|
The minimum gcc/g++ requirements for building various components.
|
||||||
|
```
|
||||||
|
4.7 llvm-3.7.0
|
||||||
|
4.7 llvm-3.6.2
|
||||||
|
4.7 llvm-3.5.2
|
||||||
|
4.4 llvm-3.4.2
|
||||||
|
```
|
||||||
|
|
||||||
4.7 llvm-3.7.0
|
If your system gcc/g++ is too old to build the desired llvm/clang
|
||||||
4.7 llvm-3.6.2
|
version, you may need to build a lower llvm/clang version and then use
|
||||||
4.7 llvm-3.5.2
|
that clang compiler for building the newer llvm/clang version.
|
||||||
4.4 llvm-3.4.2
|
|
||||||
|
<!-- OpenFOAM, Internal links -->
|
||||||
|
|
||||||
|
[link openfoam-readme]: https://develop.openfoam.com/Development/openfoam/blob/develop/README.md
|
||||||
|
[link openfoam-config]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Config.md
|
||||||
|
[link openfoam-build]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Build.md
|
||||||
|
[link openfoam-require]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Requirements.md
|
||||||
|
[link third-readme]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/README.md
|
||||||
|
[link third-build]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/BUILD.md
|
||||||
|
[link third-require]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/Requirements.md
|
||||||
|
|
||||||
|
|
||||||
|
## Software Links
|
||||||
|
|
||||||
|
If you have access to this information file in its raw form, you will
|
||||||
|
note that most of the software pages and download links are listed as
|
||||||
|
a collection at the end of the file. This is designed to make it
|
||||||
|
easier to use `grep` and find the relevant pages and links.
|
||||||
|
|
||||||
|
|
||||||
<!-- gcc-related -->
|
<!-- gcc-related -->
|
||||||
@ -353,90 +505,127 @@ The minimum gcc/g++ requirements for building various components.
|
|||||||
[page mpc]: http://www.multiprecision.org/
|
[page mpc]: http://www.multiprecision.org/
|
||||||
|
|
||||||
[link gcc]: http://gcc.gnu.org/releases.html
|
[link gcc]: http://gcc.gnu.org/releases.html
|
||||||
[link gmp]: ftp://ftp.gnu.org/gnu/gmp/gmp-6.1.0.tar.bz2
|
[link gmp]: ftp://ftp.gnu.org/gnu/gmp/gmp-6.2.0.tar.xz
|
||||||
[link mpfr]: ftp://ftp.gnu.org/gnu/mpfr/mpfr-3.1.4.tar.bz2
|
[link mpfr]: ftp://ftp.gnu.org/gnu/mpfr/mpfr-4.0.2.tar.xz
|
||||||
[link mpc]: ftp://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz
|
[link mpc]: ftp://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz
|
||||||
|
|
||||||
|
|
||||||
<!-- clang-related -->
|
<!-- clang-related -->
|
||||||
[page clang]: http://llvm.org/
|
|
||||||
[page llvm]: http://llvm.org/
|
[page llvm]: http://llvm.org/
|
||||||
|
[page clang]: http://clang.llvm.org/
|
||||||
|
[page omp]: http://openmp.llvm.org/
|
||||||
|
|
||||||
[link clang]: http://llvm.org/releases/3.7.0/cfe-3.7.0.src.tar.xz
|
[link clang]: http://llvm.org/releases/3.7.1/cfe-3.7.1.src.tar.xz
|
||||||
[link llvm]: http://llvm.org/releases/3.7.0/llvm-3.7.0.src.tar.xz
|
[link llvm]: http://llvm.org/releases/3.7.1/llvm-3.7.1.src.tar.xz
|
||||||
|
[link omp]: http://llvm.org/releases/3.7.1/openmp-3.7.1.src.tar.xz
|
||||||
|
|
||||||
[newer clang]: http://llvm.org/releases/3.9.0/cfe-3.9.0.src.tar.xz
|
[newer clang]: http://llvm.org/releases/4.0.1/cfe-4.0.1.src.tar.xz
|
||||||
[newer llvm]: http://llvm.org/releases/3.9.0/llvm-3.9.0.src.tar.xz
|
[newer llvm]: http://llvm.org/releases/4.0.1/llvm-4.0.1.src.tar.xz
|
||||||
|
[newer omp]: http://llvm.org/releases/4.0.1/openmp-4.0.1.src.tar.xz
|
||||||
|
|
||||||
|
|
||||||
<!-- parallel -->
|
<!-- parallel -->
|
||||||
[page adios]: https://www.olcf.ornl.gov/center-projects/adios/
|
[page adios]: https://csmd.ornl.gov/software/adios2
|
||||||
[repo adios]: https://github.com/ornladios/ADIOS
|
[repo adios]: https://github.com/ornladios/ADIOS2
|
||||||
[link adios]: https://github.com/ornladios/ADIOS/archive/v1.11.0.tar.gz
|
[link adios]: https://github.com/ornladios/ADIOS2/archive/v2.10.2.tar.gz
|
||||||
[altlink adios]: http://users.nccs.gov/%7Epnorbert/adios-1.11.0.tar.gz
|
|
||||||
|
[page hdf5]: https://www.hdfgroup.org
|
||||||
|
[repo hdf5]: https://github.com/HDFGroup/hdf5
|
||||||
|
[link hdf5]: https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5_1.14.4.3.tar.gz
|
||||||
|
|
||||||
[page zfp]: http://computation.llnl.gov/projects/floating-point-compression/zfp-versions
|
[page zfp]: http://computation.llnl.gov/projects/floating-point-compression/zfp-versions
|
||||||
|
|
||||||
[page scotch]: https://www.labri.fr/perso/pelegrin/scotch/
|
[page scotch]: https://www.labri.fr/perso/pelegrin/scotch/
|
||||||
[link scotch]: https://gforge.inria.fr/frs/download.php/file/34099/scotch_6.0.3.tar.gz
|
[repo scotch]: https://gitlab.inria.fr/scotch/scotch
|
||||||
|
[link scotch]: https://gitlab.inria.fr/scotch/scotch/-/archive/v6.1.3/scotch-v6.1.3.tar.gz
|
||||||
|
[link scotch60_10]: https://gforge.inria.fr/frs/download.php/file/38350/scotch_6.0.10.tar.gz
|
||||||
|
[link scotch60_9]: https://gforge.inria.fr/frs/download.php/file/38187/scotch_6.0.9.tar.gz
|
||||||
|
[link scotch61_0]: https://gforge.inria.fr/frs/download.php/file/38352/scotch_6.1.0.tar.gz
|
||||||
|
[link scotch61_3]: https://gitlab.inria.fr/scotch/scotch/-/archive/v6.1.3/scotch-v6.1.3.tar.gz
|
||||||
|
[older scotch]: https://gforge.inria.fr/frs/download.php/file/38352/scotch_6.1.0.tar.gz
|
||||||
|
[newer scotch]: https://gitlab.inria.fr/scotch/scotch/-/archive/v7.0.1/scotch-v7.0.1.tar.gz
|
||||||
|
[newest scotch]: https://gitlab.inria.fr/scotch/scotch/-/archive/v7.0.6/scotch-v7.0.6.tar.gz
|
||||||
|
|
||||||
|
[page kahip]: http://algo2.iti.kit.edu/documents/kahip/
|
||||||
|
[older kahip]: https://github.com/KaHIP/KaHIP/archive/v3.15.tar.gz
|
||||||
|
[link kahip]: https://github.com/KaHIP/KaHIP/archive/v3.18.tar.gz
|
||||||
|
|
||||||
|
[page metis]: http://glaros.dtc.umn.edu/gkhome/metis/metis/overview
|
||||||
|
[link metis]: http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz
|
||||||
|
|
||||||
[page openmpi]: http://www.open-mpi.org/
|
[page openmpi]: http://www.open-mpi.org/
|
||||||
[link openmpi]: http://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.4.tar.bz2
|
[older openmpi]: https://download.open-mpi.org/release/open-mpi/v1.10/openmpi-1.10.7.tar.bz2
|
||||||
[newer openmpi]: https://www.open-mpi.org/software/ompi/v2.0/downloads/openmpi-2.0.1.tar.bz2
|
[link openmpi]: https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.2.tar.bz2
|
||||||
|
|
||||||
|
[page mpich]: http://www.mpich.org/
|
||||||
|
[older mpich]: http://www.mpich.org/static/downloads/3.4.2/mpich-3.4.2.tar.gz
|
||||||
|
[link mpich]: https://www.mpich.org/static/downloads/4.2.3/mpich-4.2.3.tar.gz
|
||||||
|
|
||||||
|
[page mvpapich]: http://mvapich.cse.ohio-state.edu/
|
||||||
|
[link mvpapich]: https://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.3.7-1.tar.gz
|
||||||
|
|
||||||
<!-- general -->
|
<!-- general -->
|
||||||
[page cmake]: http://www.cmake.org/
|
[page cmake]: http://www.cmake.org/
|
||||||
[link cmake]: http://www.cmake.org/files/v3.5/cmake-3.5.2.tar.gz
|
[link cmake]: https://cmake.org/files/v3.8/cmake-3.8.2.tar.gz
|
||||||
|
|
||||||
[page boost]: http://boost.org
|
[page boost]: http://boost.org
|
||||||
[link boost]: https://sourceforge.net/projects/boost/files/boost/1.62.0/boost_1_62_0.tar.bz2
|
[link boost]: https://sourceforge.net/projects/boost/files/boost/1.87.0/boost_1_87_0.tar.bz2
|
||||||
|
|
||||||
[page CGAL]: http://cgal.org
|
[page CGAL]: http://cgal.org
|
||||||
[link CGAL]: https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.9/CGAL-4.9.tar.xz
|
[old CGAL]: https://github.com/CGAL/cgal/releases/download/releases/CGAL-4.14.3/CGAL-4.14.3.tar.xz
|
||||||
[older CGAL]: https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.8.2/CGAL-4.8.2.tar.xz
|
[link CGAL]: https://github.com/CGAL/cgal/releases/download/v6.0.1/CGAL-6.0.1-library.tar.xz
|
||||||
|
|
||||||
[page FFTW]: http://www.fftw.org/
|
[page FFTW]: http://www.fftw.org/
|
||||||
[link FFTW]: http://www.fftw.org/fftw-3.3.5.tar.gz
|
[link FFTW]: http://www.fftw.org/fftw-3.3.10.tar.gz
|
||||||
|
|
||||||
|
[page petsc]: https://petsc.org/
|
||||||
|
[link petsc]: https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-lite-3.22.4.tar.gz
|
||||||
|
|
||||||
|
[page hypre]: https://computing.llnl.gov/projects/hypre-scalable-linear-solvers-multigrid-methods/
|
||||||
|
[repo hypre]: https://github.com/hypre-space/hypre/
|
||||||
|
[link hypre]: https://github.com/hypre-space/hypre/archive/v2.31.0.tar.gz
|
||||||
|
|
||||||
[page cgns]: http://cgns.github.io/
|
[page cgns]: http://cgns.github.io/
|
||||||
[link ccmio]: http://portal.nersc.gov/svn/visit/trunk/third_party/libccmio-2.6.1.tar.gz (check usage conditions)
|
[link ccmio]: http://portal.nersc.gov/project/visit/third_party/libccmio-2.6.1.tar.gz (check usage conditions)
|
||||||
|
[altlink ccmio]: https://sourceforge.net/projects/foam-extend/files/ThirdParty/libccmio-2.6.1.tar.gz (check usage conditions)
|
||||||
[page tecio]: http://www.tecplot.com/
|
|
||||||
[link tecio]: http://www.tecplot.com/my/tecio-library/ (needs registration)
|
|
||||||
|
|
||||||
[repo gperftools]: https://github.com/gperftools/gperftools
|
[repo gperftools]: https://github.com/gperftools/gperftools
|
||||||
[link gperftools]: https://github.com/gperftools/gperftools/releases/download/gperftools-2.5/gperftools-2.5.tar.gz
|
[link gperftools]: https://github.com/gperftools/gperftools/releases/download/gperftools-2.5/gperftools-2.5.tar.gz
|
||||||
|
|
||||||
|
[page zlib]: https://www.zlib.net/
|
||||||
|
[link zlib]: https://sourceforge.net/projects/libpng/files/zlib/1.2.11/zlib-1.2.11.tar.xz
|
||||||
|
|
||||||
|
|
||||||
|
<!-- profiling -->
|
||||||
|
|
||||||
|
[link extrae]: https://github.com/bsc-performance-tools/extrae/archive/refs/tags/4.1.7.tar.gz
|
||||||
|
[link libunwind]: https://github.com/libunwind/libunwind/releases/download/v1.8.1/libunwind-1.8.1.tar.gz
|
||||||
|
[link papi]: http://icl.utk.edu/projects/papi/downloads/papi-7.0.1.tar.gz
|
||||||
|
|
||||||
<!-- Visualization -->
|
<!-- Visualization -->
|
||||||
|
|
||||||
[page ParaView]: http://www.paraview.org/
|
[page ParaView]: http://www.paraview.org/
|
||||||
[link ParaView]: http://www.paraview.org/files/v5.0/ParaView-v5.0.1-source.tar.gz
|
[download ParaView]: https://www.paraview.org/download/
|
||||||
|
[link ParaView56]: http://www.paraview.org/files/v5.6/ParaView-v5.6.3.tar.xz
|
||||||
[older ParaView-44]: http://www.paraview.org/files/v4.4/ParaView-v4.4.0-source.tar.gz
|
[link ParaView57]: http://www.paraview.org/files/v5.7/ParaView-v5.7.0.tar.xz
|
||||||
[newer ParaView-51]: http://www.paraview.org/files/v5.1/ParaView-v5.1.2-source.tar.gz
|
[link ParaView58]: http://www.paraview.org/files/v5.8/ParaView-v5.8.1.tar.xz
|
||||||
[newer ParaView-52]: http://www.paraview.org/files/v5.2/ParaView-v5.2.0.tar.gz
|
[link ParaView59]: http://www.paraview.org/files/v5.9/ParaView-v5.9.1.tar.xz
|
||||||
|
[link ParaView510]: http://www.paraview.org/files/v5.10/ParaView-v5.10.1.tar.xz
|
||||||
|
[link ParaView511]: http://www.paraview.org/files/v5.11/ParaView-v5.11.2.tar.xz
|
||||||
|
[link ParaView512]: http://www.paraview.org/files/v5.12/ParaView-v5.12.1.tar.xz
|
||||||
|
[link ParaView513]: http://www.paraview.org/files/v5.13/ParaView-v5.13.2.tar.xz
|
||||||
|
[link ParaView]: http://www.paraview.org/files/v5.13/ParaView-v5.13.2.tar.xz
|
||||||
|
|
||||||
[page mesa]: http://mesa3d.org/
|
[page mesa]: http://mesa3d.org/
|
||||||
[link mesa]: ftp://ftp.freedesktop.org/pub/mesa/13.0.1/mesa-13.0.1.tar.xz
|
[link mesa]: ftp://ftp.freedesktop.org/pub/mesa/mesa-17.1.1.tar.xz
|
||||||
[older mesa]: ftp://ftp.freedesktop.org/pub/mesa/11.2.2/mesa-11.2.2.tar.xz
|
[link mesa13]: ftp://ftp.freedesktop.org/pub/mesa/13.0.6/mesa-13.0.6.tar.xz
|
||||||
|
[link mesa11]: ftp://ftp.freedesktop.org/pub/mesa/older-versions/11.x/11.2.2/mesa-11.2.2.tar.xz
|
||||||
|
|
||||||
[page Qt]: https://www.qt.io/download-open-source/
|
[page Qt]: https://www.qt.io/download-open-source/
|
||||||
[repo Qt]: http://code.qt.io/cgit/qt-creator/qt-creator.git
|
[repo Qt]: http://code.qt.io/cgit/qt-creator/qt-creator.git
|
||||||
[link Qt]: http://download.qt.io/official_releases/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz
|
[link Qt56]: http://download.qt.io/official_releases/qt/5.6/5.6.3/single/qt-everywhere-opensource-src-5.6.3.tar.xz
|
||||||
[newer Qt5]: http://download.qt.io/official_releases/qt/5.7/5.7.0/single/qt-everywhere-opensource-src-5.7.0.tar.gz
|
[link Qt5]: http://download.qt.io/official_releases/qt/5.9/5.9.3/single/qt-everywhere-opensource-src-5.9.3.tar.xz
|
||||||
|
|
||||||
|
|
||||||
<!-- Standard Footer -->
|
|
||||||
## Additional OpenFOAM Links
|
|
||||||
|
|
||||||
- [Download](http://www.openfoam.com/releases) and
|
|
||||||
[installation instructions](http://www.openfoam.com/download/installation.php)
|
|
||||||
- [Documentation](http://www.openfoam.com/documentation)
|
|
||||||
- [Reporting bugs/issues (including bugs/suggestions/feature requests) in OpenFOAM+](http://www.openfoam.com/code/bug-reporting.php)
|
|
||||||
- [Collaborative and Community-based Developments](http://www.openfoam.com/services/community-projects.php)
|
|
||||||
- [Contacting OpenCFD](http://www.openfoam.com/contact)
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Copyright 2016 OpenCFD Ltd
|
Copyright 2016-2025 OpenCFD Ltd
|
||||||
|
|||||||
77
Environ.md
Normal file
77
Environ.md
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
## OpenFOAM® ThirdParty Environment Variables
|
||||||
|
|
||||||
|
When using these scripts for building third-party libraries
|
||||||
|
various environment variables are required or expected.
|
||||||
|
|
||||||
|
### Mandatory
|
||||||
|
|
||||||
|
- **WM_THIRD_PARTY_DIR** : Location of third-party library sources etc
|
||||||
|
- **WM_PROJECT_DIR** : The OpenFOAM project directory. <br>
|
||||||
|
Used for `wmake` information, config files, etc
|
||||||
|
- **WM_ARCH** : The target architecture (eg, Linux64)
|
||||||
|
- **WM_OSTYPE** : The operating system type (eg, POSIX, MSwindows) <br>
|
||||||
|
Used as fallback for determining the ending for dynamic libraries.
|
||||||
|
Used for Windows-specific handling in scotch builds.
|
||||||
|
- **WM_COMPILER** : The compiler name (eg, Gcc, Clang)
|
||||||
|
- **WM_COMPILER_LIB_ARCH** : The target library ending (eg, 64). <br>
|
||||||
|
Typically used as `lib$WM_COMPILER_LIB_ARCH` to generate the name
|
||||||
|
`lib64`, for example.
|
||||||
|
- **WM_LABEL_SIZE** : The OpenFOAM size for `label` (eg, 32 for int32)
|
||||||
|
- **WM_PRECISION_OPTION** : The OpenFOAM representation for `scalar`
|
||||||
|
(eg, DP for double-precision)
|
||||||
|
- **FOAM_EXT_LIBBIN** : Common _pool_ for the library targets.
|
||||||
|
|
||||||
|
|
||||||
|
### MPI-related
|
||||||
|
|
||||||
|
- **FOAM_MPI** : The OpenFOAM MPI sub-directory name (eg, sys-openmpi)
|
||||||
|
- **WM_MPLIB** : The canonical OpenFOAM MPI name (eg, SYSTEMOPENMPI)
|
||||||
|
- **MPI_ARCH_PATH** : Location of the current MPI implementation.
|
||||||
|
Used for additional linkage, but primarily to set MPI_ROOT
|
||||||
|
for a cmake hint.
|
||||||
|
|
||||||
|
|
||||||
|
### Other
|
||||||
|
|
||||||
|
- **WM_CONTINUE_ON_ERROR** : Ignore build errors.
|
||||||
|
Mostly set internally from `wmake -k`.
|
||||||
|
- **WM_NCOMPPROCS** : The number of build processes to launch.
|
||||||
|
Often set internally from `wmake -j`.
|
||||||
|
- **WM_COMPILER_TYPE** : Used internally for a few build scripts.
|
||||||
|
Has values of `system` or `ThirdParty`.
|
||||||
|
|
||||||
|
|
||||||
|
## Output
|
||||||
|
|
||||||
|
Similar to OpenFOAM itself, the build and final output are separated
|
||||||
|
into different directories that contain a non-colliding hierarchy of
|
||||||
|
target names. However, in contrast to the OpenFOAM target names,
|
||||||
|
there are several different types of output targets:
|
||||||
|
|
||||||
|
- *ARCH* : (eg, `linux64`) <br>
|
||||||
|
Base infrastructure such as compiler and base libraries.
|
||||||
|
- *ARCH+COMPILER* : (eg, `linux64Gcc`) <br>
|
||||||
|
Compiler-specific libraries and applications.
|
||||||
|
- *ARCH+COMPILER+SIZING* : (eg, `linux64GccDPInt32`) <br>
|
||||||
|
Libraries and applications specific to a particular combination
|
||||||
|
of OpenFOAM scalar/label sizes. This is the same as the
|
||||||
|
***WM_OPTIONS*** value.
|
||||||
|
|
||||||
|
By default, the locations of the build and final targets are hard-coded
|
||||||
|
relative to the WM_THIRD_PARTY_DIR:
|
||||||
|
|
||||||
|
- WM_THIRD_PARTY_DIR<b>/build/</b> : intermediate build artifacts
|
||||||
|
- WM_THIRD_PARTY_DIR<b>/platforms/</b> : installation root
|
||||||
|
|
||||||
|
The expert user or sys-admin can influence these locations with the
|
||||||
|
following environment variables
|
||||||
|
|
||||||
|
- **FOAM_THIRD_PARTY_BUILDROOT** :
|
||||||
|
Replaces WM_THIRD_PARTY_DIR as the root for build/ and platforms/.<br>
|
||||||
|
***!! The specified build-root directory must exist !!***
|
||||||
|
|
||||||
|
- **FOAM_THIRD_PARTY_SOURCES** :
|
||||||
|
Provide alternative location to WM_THIRD_PARTY_DIR/sources
|
||||||
|
for finding source bundles.<br>
|
||||||
|
|
||||||
|
---
|
||||||
95
README.md
95
README.md
@ -1,15 +1,3 @@
|
|||||||
<!--
|
|
||||||
|--------------------------------------------------------------------------|
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | |
|
|
||||||
| \\ / A nd | Copyright (C) 2016 OpenCFD Ltd. |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
|--------------------------------------------------------------------------|
|
|
||||||
-->
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# OpenFOAM® ThirdParty
|
# OpenFOAM® ThirdParty
|
||||||
|
|
||||||
OpenFOAM depends to a certain extent on third-party libraries
|
OpenFOAM depends to a certain extent on third-party libraries
|
||||||
@ -34,14 +22,14 @@ version specified on the command-line.
|
|||||||
|
|
||||||
## Before Starting
|
## Before Starting
|
||||||
|
|
||||||
0. Review the [system requirements](http://www.openfoam.com/documentation/system-requirements.php)
|
0. Review the [system requirements][link openfoam-require]
|
||||||
and decide on the following:
|
and decide on the following:
|
||||||
* compiler type/version (you may need a third-party compiler installation).
|
* compiler type/version (you may need a third-party compiler installation).
|
||||||
* MPI type/version.
|
* MPI type/version.
|
||||||
* ParaView type/version.
|
* ParaView type/version.
|
||||||
* CMake type/version, ...
|
* CMake type/version, ...
|
||||||
1. Adjust the OpenFOAM `etc/bashrc`, `etc/config.sh/...` or equivalent
|
1. Adjust the OpenFOAM `etc/bashrc`, `etc/config.sh/...` or equivalent
|
||||||
`prefs.sh` files to reflect your preferred configuration.
|
`prefs.sh` files to reflect your preferred [configuration][link openfoam-config].
|
||||||
2. Source the updated OpenFOAM environment
|
2. Source the updated OpenFOAM environment
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -53,31 +41,82 @@ automatically as part of the top-level OpenFOAM `Allwmake`.
|
|||||||
Nonetheless it may be necessary or useful to build particular
|
Nonetheless it may be necessary or useful to build particular
|
||||||
ThirdParty components prior to building OpenFOAM itself.
|
ThirdParty components prior to building OpenFOAM itself.
|
||||||
|
|
||||||
### Build Sequence
|
### Sequence
|
||||||
|
|
||||||
1. `makeGcc` _or_ `makeLLVM` *(optional)*
|
1. `makeGcc` _or_ `makeLLVM` *(optional)*
|
||||||
2. `makeCmake` *(optional)*
|
2. `makeCmake` *(optional)*
|
||||||
3. `Allwmake`
|
3. `Allwmake`
|
||||||
- This will be automatically invoked by the top-level OpenFOAM `Allwmake`.
|
- This will be automatically invoked by the top-level OpenFOAM `Allwmake`.
|
||||||
4. `makeParaView` *(optional but highly recommended)*
|
4. `makeParaView` *(optional)*
|
||||||
5. Any other additional optional components
|
5. Any other additional optional components
|
||||||
|
|
||||||
|
If the `Allwmake` is being invoked directly (not from the OpenFOAM `Allwmake`),
|
||||||
|
it may be necessary to bootstrap the binary parts of the `wmake` toolchain
|
||||||
|
manually before proceeding. This is done with the following command:
|
||||||
|
```
|
||||||
|
$WM_PROJECT_DIR/wmake/src/Allmake
|
||||||
|
```
|
||||||
|
|
||||||
### Build Details
|
**It normally advisable to skip the ParaView compilation initially**.
|
||||||
|
|
||||||
More details can be found the ThirdParty ./BUILD.md information.
|
Building ParaView from source tends to be the most difficult part of
|
||||||
|
any third-party compilation.
|
||||||
|
|
||||||
|
For general functionality, the paraview version distributed with
|
||||||
|
the operating system or a [binary package][download ParaView]
|
||||||
|
may be sufficient for your needs.
|
||||||
|
|
||||||
|
|
||||||
<!-- Standard Footer -->
|
### Details
|
||||||
## Additional OpenFOAM Links
|
|
||||||
|
|
||||||
- [Download](http://www.openfoam.com/releases) and
|
- More details can be found the [ThirdParty BUILD.md][link third-build] information.
|
||||||
[installation instructions](http://www.openfoam.com/download/installation.php)
|
- Some configuration details can be found in the
|
||||||
- [Documentation](http://www.openfoam.com/documentation)
|
[OpenFOAM doc/Config.md][link openfoam-config] information.
|
||||||
- [Reporting bugs/issues (including bugs/suggestions/feature requests) in OpenFOAM+](http://www.openfoam.com/code/bug-reporting.php)
|
|
||||||
- [Collaborative and Community-based Developments](http://www.openfoam.com/services/community-projects.php)
|
|
||||||
- [Contacting OpenCFD](http://www.openfoam.com/contact)
|
### Other
|
||||||
|
|
||||||
|
When building other libraries directly, with autoconfig or cmake, it
|
||||||
|
will be useful or necessary to use the same compiler and compiler
|
||||||
|
settings as are used by OpenFOAM itself. These are obtained from the
|
||||||
|
`wmake` show options and can be used to set corresponding environment
|
||||||
|
variables. For example,
|
||||||
|
```
|
||||||
|
CC="$(wmake -show-c)" CFLAGS="$(wmake -show-cflags)" ./configure
|
||||||
|
```
|
||||||
|
|
||||||
|
Here is the correspondence to commonly used environment variables
|
||||||
|
|
||||||
|
| Env variable | Obtaining from wmake | Meaning |
|
||||||
|
|-------------------|---------------------------|-----------------------|
|
||||||
|
| CC | `wmake -show-c` | C compiler |
|
||||||
|
| CFLAGS | `wmake -show-cflags` | C compiler flags |
|
||||||
|
| CXX | `wmake -show-cxx` | C++ compiler |
|
||||||
|
| CXXFLAGS | `wmake -show-cxxflags` | C++ compiler flags |
|
||||||
|
| | `wmake -show-cflags-arch` | Architecture information when linking |
|
||||||
|
| | `wmake -show-cxxflags-arch` | Architecture information when linking |
|
||||||
|
|
||||||
|
|
||||||
|
In some situations it can also be useful to have the compiler and flags
|
||||||
|
together (similar to `mpicc -show` and `mpicxx -show`):
|
||||||
|
```
|
||||||
|
wmake -show-compile-c
|
||||||
|
wmake -show-compile-cxx
|
||||||
|
```
|
||||||
|
|
||||||
|
<!-- Quick links -->
|
||||||
|
|
||||||
|
[download ParaView]: https://www.paraview.org/download/
|
||||||
|
|
||||||
|
<!-- OpenFOAM -->
|
||||||
|
|
||||||
|
[link openfoam-readme]: https://develop.openfoam.com/Development/openfoam/blob/develop/README.md
|
||||||
|
[link openfoam-config]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Config.md
|
||||||
|
[link openfoam-build]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Build.md
|
||||||
|
[link openfoam-require]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Requirements.md
|
||||||
|
[link third-readme]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/README.md
|
||||||
|
[link third-build]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/BUILD.md
|
||||||
|
[link third-require]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/Requirements.md
|
||||||
|
|
||||||
---
|
---
|
||||||
|
Copyright 2016-2019 OpenCFD Ltd
|
||||||
Copyright 2016 OpenCFD Ltd
|
|
||||||
|
|||||||
86
Requirements.md
Normal file
86
Requirements.md
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
## OpenFOAM® ThirdParty System Requirements
|
||||||
|
|
||||||
|
For building some particular third-party libraries from source,
|
||||||
|
the normal [OpenFOAM System Requirements][link openfoam-require]
|
||||||
|
may not be sufficient.
|
||||||
|
|
||||||
|
This is most notably the case for ParaView and/or QT compilation.
|
||||||
|
As duly noted in [BUILD][link third-build] and [README][link third-readme] information,
|
||||||
|
building ParaView from source tends to be the most difficult part of
|
||||||
|
any third-party compilation.
|
||||||
|
|
||||||
|
For general functionality, the paraview version distributed with
|
||||||
|
the operating system or a [binary package][download ParaView]
|
||||||
|
is likely [fully adequate for your needs][FAQ ParaView].
|
||||||
|
|
||||||
|
|
||||||
|
***Please help us with keeping the information here up-to-date and accurate.***
|
||||||
|
|
||||||
|
### Ubuntu
|
||||||
|
|
||||||
|
The full dependency list for building ParaView can be found from the
|
||||||
|
corresponding [debian/control][debian control] file.
|
||||||
|
|
||||||
|
A ***quick*** way to get these dependencies on to your system is to
|
||||||
|
use the paraview development package:
|
||||||
|
```
|
||||||
|
sudo apt install paraview-dev
|
||||||
|
```
|
||||||
|
Depending on your setup, the following subset may also be enough:
|
||||||
|
```
|
||||||
|
sudo apt install cmake qtbase5-dev qttools5-dev qttools5-dev-tools libqt5opengl5-dev libqt5x11extras5-dev libxt-dev
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### openSUSE (eg, Leap-15.3)
|
||||||
|
|
||||||
|
The full dependency list for building ParaView can be found from the
|
||||||
|
corresponding [rpm spec][suse spec] file.
|
||||||
|
|
||||||
|
A ***quick*** way to get these dependencies on to your system is to
|
||||||
|
use the paraview development package:
|
||||||
|
```
|
||||||
|
sudo zypper install paraview-devel
|
||||||
|
```
|
||||||
|
|
||||||
|
Depending on your setup, the following subset may also be enough:
|
||||||
|
```
|
||||||
|
sudo zypper install Mesa-libEGL-devel
|
||||||
|
sudo zypper install libqt5-qtbase-devel libqt5-qtsvg-devel libqt5-qttools-devel libqt5-qtx11extras-devel
|
||||||
|
sudo zypper install libxcb-devel libXt-devel
|
||||||
|
```
|
||||||
|
|
||||||
|
For building paraview with ffmpeg support (components: avformat
|
||||||
|
avcodec avutil swscale), the packman repository may be required, with a
|
||||||
|
variety of additional packages:
|
||||||
|
```
|
||||||
|
sudo zypper install ffmpeg-3
|
||||||
|
sudo zypper install ffmpeg-3-libavcodec-devel
|
||||||
|
sudo zypper install ffmpeg-3-libavformat-devel
|
||||||
|
sudo zypper install ffmpeg-3-libavresample-devel
|
||||||
|
sudo zypper install ffmpeg-3-libavutil-devel
|
||||||
|
sudo zypper install ffmpeg-3-libswresample-devel
|
||||||
|
sudo zypper install ffmpeg-3-libswscale-devel
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Quick links -->
|
||||||
|
|
||||||
|
[download ParaView]: https://www.paraview.org/download/
|
||||||
|
[debian control]: https://salsa.debian.org/science-team/paraview/-/blob/master/debian/control
|
||||||
|
[suse spec]: https://build.opensuse.org/package/view_file/science/paraview/paraview.spec
|
||||||
|
[FAQ ParaView]: https://discourse.paraview.org/t/i-want-to-visualize-my-openfoam-simulation-results-with-paraview-but-im-confused-which-version-should-i-use
|
||||||
|
|
||||||
|
|
||||||
|
<!-- OpenFOAM -->
|
||||||
|
|
||||||
|
[link openfoam-readme]: https://develop.openfoam.com/Development/openfoam/blob/develop/README.md
|
||||||
|
[link openfoam-config]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Config.md
|
||||||
|
[link openfoam-build]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Build.md
|
||||||
|
[link openfoam-require]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Requirements.md
|
||||||
|
[link third-readme]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/README.md
|
||||||
|
[link third-build]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/BUILD.md
|
||||||
|
[link third-require]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/Requirements.md
|
||||||
|
|
||||||
|
---
|
||||||
|
Copyright 2019-2022 OpenCFD Ltd
|
||||||
221
SOURCES.md
Normal file
221
SOURCES.md
Normal file
@ -0,0 +1,221 @@
|
|||||||
|
Third-party software (shipped) versions according to OpenFOAM version
|
||||||
|
|
||||||
|
# OpenFOAM-2406, OpenFOAM-2412
|
||||||
|
|
||||||
|
- ADIOS2-2.10.1 *update*
|
||||||
|
- CGAL-4.14.3
|
||||||
|
- ParaView-v5.12.1 *update*
|
||||||
|
- boost_1_74_0
|
||||||
|
- fftw-3.3.10
|
||||||
|
- openmpi-4.1.2
|
||||||
|
- scotch_6.1.0
|
||||||
|
- kahip-3.15
|
||||||
|
|
||||||
|
|
||||||
|
# OpenFOAM-2312
|
||||||
|
|
||||||
|
- ADIOS2-2.9.2 *update*
|
||||||
|
- CGAL-4.14.3
|
||||||
|
- ParaView-v5.11.2 *update*
|
||||||
|
- boost_1_74_0
|
||||||
|
- fftw-3.3.10
|
||||||
|
- openmpi-4.1.2
|
||||||
|
- scotch_6.1.0
|
||||||
|
- kahip-3.15
|
||||||
|
|
||||||
|
|
||||||
|
# OpenFOAM-2306
|
||||||
|
|
||||||
|
- ADIOS2-2.8.3
|
||||||
|
- CGAL-4.14.3
|
||||||
|
- ParaView-v5.11.1 *update*
|
||||||
|
- boost_1_74_0
|
||||||
|
- fftw-3.3.10
|
||||||
|
- openmpi-4.1.2
|
||||||
|
- scotch_6.1.0
|
||||||
|
- kahip-3.15 *update*
|
||||||
|
|
||||||
|
|
||||||
|
# OpenFOAM-2212
|
||||||
|
|
||||||
|
- ADIOS2-2.8.3 *new*
|
||||||
|
- CGAL-4.14.3
|
||||||
|
- ParaView-v5.11.0 *new*
|
||||||
|
- boost_1_74_0
|
||||||
|
- fftw-3.3.10
|
||||||
|
- openmpi-4.1.2
|
||||||
|
- scotch_6.1.0
|
||||||
|
- kahip-3.14
|
||||||
|
|
||||||
|
|
||||||
|
# OpenFOAM-2206
|
||||||
|
|
||||||
|
- ADIOS2-2.7.1
|
||||||
|
- CGAL-4.14.3
|
||||||
|
- ParaView-v5.10.1 *update*
|
||||||
|
- boost_1_74_0
|
||||||
|
- fftw-3.3.10
|
||||||
|
- openmpi-4.1.2
|
||||||
|
- scotch_6.1.0
|
||||||
|
- kahip-3.14
|
||||||
|
|
||||||
|
|
||||||
|
# OpenFOAM-2112
|
||||||
|
|
||||||
|
- ADIOS2-2.7.1 *new*
|
||||||
|
- CGAL-4.14.3 *new*
|
||||||
|
- ParaView-v5.10.0 *new*
|
||||||
|
- boost_1_74_0 *new*
|
||||||
|
- fftw-3.3.10 *update*
|
||||||
|
- openmpi-4.1.2 *new*
|
||||||
|
- scotch_6.1.0
|
||||||
|
- kahip-3.14 *new*
|
||||||
|
|
||||||
|
|
||||||
|
# OpenFOAM-2106
|
||||||
|
|
||||||
|
- ADIOS2-2.6.0
|
||||||
|
- CGAL-4.12.2
|
||||||
|
- ParaView-v5.9.1 *update*
|
||||||
|
- boost_1_66_0
|
||||||
|
- fftw-3.3.7
|
||||||
|
- openmpi-4.0.3
|
||||||
|
- scotch_6.1.0 *update*
|
||||||
|
- kahip-2.12
|
||||||
|
|
||||||
|
|
||||||
|
# OpenFOAM-2012
|
||||||
|
|
||||||
|
- ADIOS2-2.6.0 *update*
|
||||||
|
- CGAL-4.12.2
|
||||||
|
- ParaView-v5.6.3
|
||||||
|
- boost_1_66_0
|
||||||
|
- fftw-3.3.7
|
||||||
|
- openmpi-4.0.3
|
||||||
|
- scotch_6.0.9
|
||||||
|
- kahip-2.12
|
||||||
|
|
||||||
|
|
||||||
|
# OpenFOAM-2006
|
||||||
|
|
||||||
|
- ADIOS2-2.4.0
|
||||||
|
- CGAL-4.12.2 *update*
|
||||||
|
- ParaView-v5.6.3
|
||||||
|
- boost_1_66_0 *update*
|
||||||
|
- fftw-3.3.7
|
||||||
|
- openmpi-4.0.3 *update*
|
||||||
|
- scotch_6.0.9
|
||||||
|
- kahip-2.12
|
||||||
|
|
||||||
|
|
||||||
|
# OpenFOAM-1912
|
||||||
|
|
||||||
|
- ADIOS2-2.4.0 *new*
|
||||||
|
- CGAL-4.9.1
|
||||||
|
- ParaView-v5.6.3 *minor*
|
||||||
|
- boost_1_64_0
|
||||||
|
- fftw-3.3.7
|
||||||
|
- openmpi-1.10.7 *minor*
|
||||||
|
- scotch_6.0.9 *minor*
|
||||||
|
- kahip-2.12 *update*
|
||||||
|
|
||||||
|
|
||||||
|
# OpenFOAM-1906
|
||||||
|
|
||||||
|
- CGAL-4.9.1
|
||||||
|
- ParaView-v5.6.0
|
||||||
|
- boost_1_64_0
|
||||||
|
- fftw-3.3.7
|
||||||
|
- openmpi-1.10.7 *minor*
|
||||||
|
- scotch_6.0.6
|
||||||
|
- kahip-2.00d
|
||||||
|
|
||||||
|
|
||||||
|
# OpenFOAM-1812
|
||||||
|
|
||||||
|
- CGAL-4.9.1
|
||||||
|
- ParaView-v5.6.0 *update*
|
||||||
|
- boost_1_64_0
|
||||||
|
- fftw-3.3.7
|
||||||
|
- openmpi-1.10.4
|
||||||
|
- scotch_6.0.6 *minor*
|
||||||
|
- kahip-2.00d
|
||||||
|
|
||||||
|
|
||||||
|
# OpenFOAM-1806
|
||||||
|
|
||||||
|
- CGAL-4.9.1
|
||||||
|
- ParaView-v5.5.2 *update*
|
||||||
|
- boost_1_64_0
|
||||||
|
- fftw-3.3.7
|
||||||
|
- openmpi-1.10.4
|
||||||
|
- scotch_6.0.3
|
||||||
|
- kahip-2.00d
|
||||||
|
|
||||||
|
|
||||||
|
# OpenFOAM-1712
|
||||||
|
|
||||||
|
- CGAL-4.9.1
|
||||||
|
- ParaView-v5.4.1 *minor*
|
||||||
|
- boost_1_64_0
|
||||||
|
- fftw-3.3.7 *minor*
|
||||||
|
- openmpi-1.10.4
|
||||||
|
- scotch_6.0.3
|
||||||
|
- kahip-2.00d *new*
|
||||||
|
|
||||||
|
|
||||||
|
# OpenFOAM-1706
|
||||||
|
|
||||||
|
- CGAL-4.9.1 *minor*
|
||||||
|
- ParaView-v5.4.0 *update*
|
||||||
|
- boost_1_64_0 *update*
|
||||||
|
- fftw-3.3.6-pl1 *minor*
|
||||||
|
- openmpi-1.10.4
|
||||||
|
- scotch_6.0.3
|
||||||
|
|
||||||
|
|
||||||
|
# OpenFOAM-1612
|
||||||
|
|
||||||
|
- CGAL-4.9 *update*
|
||||||
|
- ParaView-v5.0.1 *update*
|
||||||
|
- boost_1_62_0 *update*
|
||||||
|
- fftw-3.3.5 *minor*
|
||||||
|
- openmpi-1.10.4 *minor*
|
||||||
|
- scotch_6.0.3
|
||||||
|
|
||||||
|
|
||||||
|
# OpenFOAM-1606
|
||||||
|
|
||||||
|
- CGAL-4.8 *update*
|
||||||
|
- ParaView-v5.0.1 *update*
|
||||||
|
- boost_1_61_0 *new*
|
||||||
|
- fftw-3.3.4 *new*
|
||||||
|
- openmpi-1.10.2 *minor*
|
||||||
|
- scotch_6.0.3
|
||||||
|
|
||||||
|
|
||||||
|
# OpenFOAM-1601 (3.0+)
|
||||||
|
|
||||||
|
- CGAL-4.7 *update*
|
||||||
|
- ParaView-v4.4.0 *update*
|
||||||
|
- openmpi-1.10.0 *update*
|
||||||
|
- scotch_6.0.3
|
||||||
|
|
||||||
|
|
||||||
|
# OpenFOAM-2.4
|
||||||
|
|
||||||
|
- CGAL-4.6 *update*
|
||||||
|
- ParaView-v4.1.0
|
||||||
|
- openmpi-1.8.5 *update*
|
||||||
|
- scotch_6.0.3 *update*
|
||||||
|
|
||||||
|
|
||||||
|
# OpenFOAM-2.3
|
||||||
|
|
||||||
|
- CGAL-4.3
|
||||||
|
- ParaView-v4.1.0
|
||||||
|
- openmpi-1.6.5
|
||||||
|
- scotch_6.0.0
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
86
etc/list-available
Executable file
86
etc/list-available
Executable file
@ -0,0 +1,86 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | www.openfoam.com
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2021 OpenCFD Ltd.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# etc/list-available
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# List available unpacked source versions
|
||||||
|
#
|
||||||
|
# checks:
|
||||||
|
# - ThirdParty/PACKAGE
|
||||||
|
# - ThirdParty/sources/PACKAGE
|
||||||
|
# - ThirdParty/sources/canonical/PACKAGE
|
||||||
|
#
|
||||||
|
# Example usage
|
||||||
|
# etc/list-available paraview
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
printHelp() {
|
||||||
|
cat<<USAGE
|
||||||
|
|
||||||
|
Usage: ${0##*/} [OPTION] [package1 .. [packageN]]
|
||||||
|
Options:
|
||||||
|
-dirs List with relative source directories
|
||||||
|
-names List names only [default]
|
||||||
|
-full List with absolute source directories
|
||||||
|
-help Display usage help
|
||||||
|
|
||||||
|
List available (unpacked) source packages.
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
exit 0 # Clean exit
|
||||||
|
}
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
optOutput="-names"
|
||||||
|
|
||||||
|
# Process options/arguments
|
||||||
|
while [ "$#" -gt 0 ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
'') ;; # Ignore empty
|
||||||
|
-h | -help*) printHelp;;
|
||||||
|
|
||||||
|
# Resolve with (relative) dirs
|
||||||
|
-dir*)
|
||||||
|
optOutput="-dirs"
|
||||||
|
;;
|
||||||
|
|
||||||
|
# Resolve packages names only (without directory)
|
||||||
|
-name*)
|
||||||
|
optOutput="-names"
|
||||||
|
;;
|
||||||
|
|
||||||
|
# Resolve with full (absolute) dirs
|
||||||
|
-full | -long)
|
||||||
|
optOutput="-long"
|
||||||
|
;;
|
||||||
|
|
||||||
|
-*) echo "Ignore unknown option" 1>&2 ;;
|
||||||
|
*) break ;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$#" -gt 0 ]
|
||||||
|
then
|
||||||
|
listPackageVersions $optOutput "$@"
|
||||||
|
else
|
||||||
|
die "Did not specify any package(s)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
62
etc/list-download
Executable file
62
etc/list-download
Executable file
@ -0,0 +1,62 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | www.openfoam.com
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2021 OpenCFD Ltd.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# etc/list-download
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# List known download hints. Required BUILD.md
|
||||||
|
#
|
||||||
|
# Example usage
|
||||||
|
# etc/list-download paraview
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
printHelp() {
|
||||||
|
cat<<USAGE
|
||||||
|
|
||||||
|
Usage: ${0##*/} [OPTION] [package1 .. [packageN]]
|
||||||
|
Options:
|
||||||
|
-help Display usage help
|
||||||
|
|
||||||
|
List known download hints.
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
exit 0 # Clean exit
|
||||||
|
}
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Process options/arguments
|
||||||
|
while [ "$#" -gt 0 ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
'') ;; # Ignore empty
|
||||||
|
-h | -help*) printHelp;;
|
||||||
|
|
||||||
|
-*) echo "Ignore unknown option" 1>&2 ;;
|
||||||
|
*) break ;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$#" -gt 0 ]
|
||||||
|
then
|
||||||
|
showDownloadHint "$@"
|
||||||
|
else
|
||||||
|
die "Did not specify any package(s)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
167
etc/list-sources
Executable file
167
etc/list-sources
Executable file
@ -0,0 +1,167 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | www.openfoam.com
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2021 OpenCFD Ltd.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# etc/list-sources
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Extract package names from SOURCES.md and resolve their respective
|
||||||
|
# (unpacked) directory paths.
|
||||||
|
#
|
||||||
|
# The input source file is assumed to be Markdown formatted with
|
||||||
|
# sections for each OpenFOAM version, followed by a '-' bulleted
|
||||||
|
# list of the software package/versions.
|
||||||
|
#
|
||||||
|
# Example,
|
||||||
|
# # OpenFOAM-2106
|
||||||
|
#
|
||||||
|
# - ADIOS2-2.6.0
|
||||||
|
# - CGAL-4.12.2
|
||||||
|
# ...
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
printHelp() {
|
||||||
|
cat<<USAGE
|
||||||
|
|
||||||
|
Usage: ${0##*/} [OPTION]
|
||||||
|
Options:
|
||||||
|
-dirs Resolve source directories (relative dir names)
|
||||||
|
-full Resolve source directories (absolute dir names)
|
||||||
|
-file=FILE Alternative file to process (default: SOURCES.md)
|
||||||
|
-vDIGITS | -DIGITS
|
||||||
|
OpenFOAM version (eg, -v2106, -2106) to process.
|
||||||
|
The default is to process the first (latest) section.
|
||||||
|
-help
|
||||||
|
|
||||||
|
Extract package names from SOURCES.md and optionally
|
||||||
|
resolve their respective (unpacked) directory paths.
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
exit 0 # Clean exit
|
||||||
|
}
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
inputFile="SOURCES.md"
|
||||||
|
unset version optResolve
|
||||||
|
|
||||||
|
# Process options/arguments
|
||||||
|
while [ "$#" -gt 0 ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
'') ;; # Ignore empty
|
||||||
|
-h | -help*) printHelp;;
|
||||||
|
|
||||||
|
# Resolve (relative) directories
|
||||||
|
-dir*)
|
||||||
|
: "${optResolve:=-relative}"
|
||||||
|
;;
|
||||||
|
|
||||||
|
# Resolve (full) directories
|
||||||
|
-full)
|
||||||
|
optResolve="-absolute"
|
||||||
|
;;
|
||||||
|
-file=*)
|
||||||
|
inputFile="${1#*=}"
|
||||||
|
;;
|
||||||
|
|
||||||
|
-[0-9]*) version="${1#*-}" ;;
|
||||||
|
-v[0-9]*) version="${1#*-v}" ;;
|
||||||
|
|
||||||
|
-*) echo "Ignore unknown option" 1>&2 ;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
# Resolve file (if necessary)
|
||||||
|
file="$inputFile"
|
||||||
|
|
||||||
|
if [ ! -f "$file" ]
|
||||||
|
then
|
||||||
|
file="$WM_THIRD_PARTY_DIR/$inputFile"
|
||||||
|
[ -f "$file" ] || die "No such file: $inputFile"
|
||||||
|
fi
|
||||||
|
|
||||||
|
## echo "processing: $file" 1>&2
|
||||||
|
|
||||||
|
# Parse this type of input:
|
||||||
|
#
|
||||||
|
# # OpenFOAM-2106
|
||||||
|
#
|
||||||
|
# - ADIOS2-2.6.0
|
||||||
|
# - CGAL-4.12.2
|
||||||
|
# - ParaView-v5.9.1 *update*
|
||||||
|
# - boost_1_66_0
|
||||||
|
# - fftw-3.3.7
|
||||||
|
# - openmpi-4.0.3
|
||||||
|
# - scotch_6.1.0 *update*
|
||||||
|
# - kahip-2.12
|
||||||
|
|
||||||
|
# By default use the top section, unless '$version' is specified
|
||||||
|
|
||||||
|
unset active section
|
||||||
|
while read -r line
|
||||||
|
do
|
||||||
|
case "$line" in
|
||||||
|
('#'*)
|
||||||
|
# A markdown section
|
||||||
|
if [ -n "$active" ]
|
||||||
|
then
|
||||||
|
break # Done
|
||||||
|
elif [ -z "$version" ]
|
||||||
|
then
|
||||||
|
active=true # No version: take the first section
|
||||||
|
else
|
||||||
|
# Match version (eg, '2106') vs these types of input:
|
||||||
|
# - '## OpenFOAM-2106'
|
||||||
|
# - '## OpenFOAM-v2106 update1'
|
||||||
|
|
||||||
|
item="$(echo "$line" | sed 's/^#*.*-v*//')"
|
||||||
|
case "$item" in
|
||||||
|
("$version"*) active=true;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Strip leading space
|
||||||
|
line="$(echo "$line" | sed 's/^ *//')"
|
||||||
|
|
||||||
|
case "$line" in
|
||||||
|
([-*]' '*)
|
||||||
|
# A markdown list item. Extract first after the bullet
|
||||||
|
item="$(echo "$line" | sed 's/^[-*] *//;s/ .*$//')"
|
||||||
|
if [ "$active" != true ] || [ -z "$item" ]
|
||||||
|
then
|
||||||
|
continue
|
||||||
|
elif [ -n "$optResolve" ]
|
||||||
|
then
|
||||||
|
dir="$(findSourceDir "$optResolve" "$item" 2>/dev/null)"
|
||||||
|
if [ -n "$dir" ]
|
||||||
|
then
|
||||||
|
echo "$dir"
|
||||||
|
else
|
||||||
|
echo "missing: $item" 1>&2
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "$item" # Report item without resolving
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done < "$file"
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
71
etc/makeFiles/kahip/files
Normal file
71
etc/makeFiles/kahip/files
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
/*
|
||||||
|
* NOTE: make any changes to this file in ThirdParty etc/wmakeFiles/
|
||||||
|
*/
|
||||||
|
|
||||||
|
interface/kaHIP_interface.cpp
|
||||||
|
|
||||||
|
/* List obtained from SConscript, libkaffpa_files = [ ... ] entry */
|
||||||
|
|
||||||
|
data_structure/graph_hierarchy.cpp
|
||||||
|
algorithms/strongly_connected_components.cpp
|
||||||
|
algorithms/topological_sort.cpp
|
||||||
|
algorithms/push_relabel.cpp
|
||||||
|
io/graph_io.cpp
|
||||||
|
tools/quality_metrics.cpp
|
||||||
|
tools/random_functions.cpp
|
||||||
|
tools/graph_extractor.cpp
|
||||||
|
tools/misc.cpp
|
||||||
|
tools/partition_snapshooter.cpp
|
||||||
|
partition/graph_partitioner.cpp
|
||||||
|
partition/w_cycles/wcycle_partitioner.cpp
|
||||||
|
partition/coarsening/coarsening.cpp
|
||||||
|
partition/coarsening/contraction.cpp
|
||||||
|
partition/coarsening/edge_rating/edge_ratings.cpp
|
||||||
|
partition/coarsening/matching/matching.cpp
|
||||||
|
partition/coarsening/matching/random_matching.cpp
|
||||||
|
partition/coarsening/matching/gpa/path.cpp
|
||||||
|
partition/coarsening/matching/gpa/gpa_matching.cpp
|
||||||
|
partition/coarsening/matching/gpa/path_set.cpp
|
||||||
|
partition/coarsening/clustering/node_ordering.cpp
|
||||||
|
partition/coarsening/clustering/size_constraint_label_propagation.cpp
|
||||||
|
partition/initial_partitioning/initial_partitioning.cpp
|
||||||
|
partition/initial_partitioning/initial_partitioner.cpp
|
||||||
|
partition/initial_partitioning/initial_partition_bipartition.cpp
|
||||||
|
partition/initial_partitioning/initial_refinement/initial_refinement.cpp
|
||||||
|
partition/initial_partitioning/bipartition.cpp
|
||||||
|
partition/initial_partitioning/initial_node_separator.cpp
|
||||||
|
partition/uncoarsening/uncoarsening.cpp
|
||||||
|
partition/uncoarsening/separator/area_bfs.cpp
|
||||||
|
partition/uncoarsening/separator/vertex_separator_algorithm.cpp
|
||||||
|
partition/uncoarsening/separator/vertex_separator_flow_solver.cpp
|
||||||
|
partition/uncoarsening/refinement/cycle_improvements/greedy_neg_cycle.cpp
|
||||||
|
partition/uncoarsening/refinement/cycle_improvements/problem_factory.cpp
|
||||||
|
partition/uncoarsening/refinement/cycle_improvements/augmented_Qgraph.cpp
|
||||||
|
partition/uncoarsening/refinement/mixed_refinement.cpp
|
||||||
|
partition/uncoarsening/refinement/label_propagation_refinement/label_propagation_refinement.cpp
|
||||||
|
partition/uncoarsening/refinement/refinement.cpp
|
||||||
|
partition/uncoarsening/refinement/quotient_graph_refinement/2way_fm_refinement/two_way_fm.cpp
|
||||||
|
partition/uncoarsening/refinement/quotient_graph_refinement/flow_refinement/two_way_flow_refinement.cpp
|
||||||
|
partition/uncoarsening/refinement/quotient_graph_refinement/flow_refinement/boundary_bfs.cpp
|
||||||
|
partition/uncoarsening/refinement/quotient_graph_refinement/flow_refinement/flow_solving_kernel/cut_flow_problem_solver.cpp
|
||||||
|
partition/uncoarsening/refinement/quotient_graph_refinement/flow_refinement/most_balanced_minimum_cuts/most_balanced_minimum_cuts.cpp
|
||||||
|
partition/uncoarsening/refinement/quotient_graph_refinement/quotient_graph_refinement.cpp
|
||||||
|
partition/uncoarsening/refinement/quotient_graph_refinement/complete_boundary.cpp
|
||||||
|
partition/uncoarsening/refinement/quotient_graph_refinement/partial_boundary.cpp
|
||||||
|
partition/uncoarsening/refinement/quotient_graph_refinement/quotient_graph_scheduling/quotient_graph_scheduling.cpp
|
||||||
|
partition/uncoarsening/refinement/quotient_graph_refinement/quotient_graph_scheduling/simple_quotient_graph_scheduler.cpp
|
||||||
|
partition/uncoarsening/refinement/quotient_graph_refinement/quotient_graph_scheduling/active_block_quotient_graph_scheduler.cpp
|
||||||
|
partition/uncoarsening/refinement/kway_graph_refinement/kway_graph_refinement.cpp
|
||||||
|
partition/uncoarsening/refinement/kway_graph_refinement/kway_graph_refinement_core.cpp
|
||||||
|
partition/uncoarsening/refinement/kway_graph_refinement/kway_graph_refinement_commons.cpp
|
||||||
|
partition/uncoarsening/refinement/cycle_improvements/augmented_Qgraph_fabric.cpp
|
||||||
|
partition/uncoarsening/refinement/cycle_improvements/advanced_models.cpp
|
||||||
|
partition/uncoarsening/refinement/kway_graph_refinement/multitry_kway_fm.cpp
|
||||||
|
partition/uncoarsening/refinement/node_separators/greedy_ns_local_search.cpp
|
||||||
|
partition/uncoarsening/refinement/node_separators/fm_ns_local_search.cpp
|
||||||
|
partition/uncoarsening/refinement/node_separators/localized_fm_ns_local_search.cpp
|
||||||
|
algorithms/cycle_search.cpp
|
||||||
|
partition/uncoarsening/refinement/cycle_improvements/cycle_refinement.cpp
|
||||||
|
partition/uncoarsening/refinement/tabu_search/tabu_search.cpp
|
||||||
|
|
||||||
|
LIB = $(KAHIP_LIB_DIR)/libkahip
|
||||||
21
etc/makeFiles/kahip/options
Normal file
21
etc/makeFiles/kahip/options
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* NOTE: make any changes to this file in ThirdParty etc/wmakeFiles/
|
||||||
|
* Must use -DNDEBUG to disable kahip debug mode.
|
||||||
|
* Using -DMODE_NODESEP is not strictly required for building the library.
|
||||||
|
*/
|
||||||
|
|
||||||
|
EXE_INC = \
|
||||||
|
${c++LESSWARN} \
|
||||||
|
${COMP_OPENMP} \
|
||||||
|
-DNDEBUG -DMODE_NODESEP \
|
||||||
|
-I. \
|
||||||
|
-I./partition \
|
||||||
|
-I./partition/uncoarsening/refinement/quotient_graph_refinement/flow_refinement
|
||||||
|
|
||||||
|
LIB_LIBS =
|
||||||
|
PROJECT_LIBS =
|
||||||
|
|
||||||
|
/* failsafe location */
|
||||||
|
ifeq (,$(strip $(KAHIP_LIB_DIR)))
|
||||||
|
KAHIP_LIB_DIR = $(FOAM_EXT_LIBBIN)
|
||||||
|
endif
|
||||||
24
etc/makeFiles/libccmio/files
Normal file
24
etc/makeFiles/libccmio/files
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* NOTE: make any changes to this file in ThirdParty etc/makeFiles/
|
||||||
|
*/
|
||||||
|
|
||||||
|
libadf/ADF_interface.c
|
||||||
|
libadf/ADF_internals.c
|
||||||
|
|
||||||
|
libccmio/ccmio.c
|
||||||
|
libccmio/ccmiocore.c
|
||||||
|
libccmio/ccmioprivate.c
|
||||||
|
libccmio/ccmioutility.c
|
||||||
|
libccmio/ccmioversion.c
|
||||||
|
|
||||||
|
/*
|
||||||
|
* CGNS library not needed by ccmio, retain for documentation purposes only
|
||||||
|
*
|
||||||
|
libcgns/adf_cond.c
|
||||||
|
libcgns/adf_ftoc.c
|
||||||
|
libcgns/cgns_error.c
|
||||||
|
libcgns/cgns_internals.c
|
||||||
|
libcgns/cgnslib.c
|
||||||
|
*/
|
||||||
|
|
||||||
|
LIB = $(CCMIO_LIB_DIR)/libccmio
|
||||||
10
etc/makeFiles/libccmio/options
Normal file
10
etc/makeFiles/libccmio/options
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
/* NOTE: make any changes to this file in ThirdParty etc/wmakeFiles/ */
|
||||||
|
|
||||||
|
EXE_INC = -I.
|
||||||
|
LIB_LIBS =
|
||||||
|
PROJECT_LIBS =
|
||||||
|
|
||||||
|
/* failsafe location */
|
||||||
|
ifeq (,$(strip $(CCMIO_LIB_DIR)))
|
||||||
|
CCMIO_LIB_DIR = $(FOAM_EXT_LIBBIN)
|
||||||
|
endif
|
||||||
68
etc/makeFiles/scotch/Makefile.inc.Darwin.shlib
Normal file
68
etc/makeFiles/scotch/Makefile.inc.Darwin.shlib
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
#-------------------------------*- makefile -*---------------------------------
|
||||||
|
#
|
||||||
|
# Prior to OpenFOAM-v1906, these were always part of the environment
|
||||||
|
#
|
||||||
|
# - WM_CFLAGS : with -m32 / -m64 and -fPIC
|
||||||
|
# - WM_LDFLAGS : with -m32 / -m64
|
||||||
|
#
|
||||||
|
# With OpenFOAM-v1906 and later
|
||||||
|
#
|
||||||
|
# - wmake -show-cflags : with -m32 / -m64
|
||||||
|
# - wmake -show-cflags-arch : with -m32 / -m64
|
||||||
|
#
|
||||||
|
# Pass these in via the environment since using '$(shell ...)' here does not
|
||||||
|
# always work well.
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
# - compiled without pthread
|
||||||
|
#
|
||||||
|
# Normally set CCS, CCP by caller
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
EXE =
|
||||||
|
LIB = .dylib
|
||||||
|
OBJ = .o
|
||||||
|
|
||||||
|
AR = $(CC)
|
||||||
|
ARFLAGS = $(WM_CFLAGS) -dynamiclib -undefined dynamic_lookup -o
|
||||||
|
CCS ?= $(CC)
|
||||||
|
CCP ?= mpicc
|
||||||
|
CCD = $(CCP)
|
||||||
|
CFLAGS = $(WM_CFLAGS) -fPIC -O3 \
|
||||||
|
-UCOMMON_FILE_COMPRESS \
|
||||||
|
-DCOMMON_RANDOM_FIXED_SEED \
|
||||||
|
-DSCOTCH_DETERMINISTIC \
|
||||||
|
-DSCOTCH_RENAME \
|
||||||
|
-DIDXSIZE64 \
|
||||||
|
-Drestrict=__restrict
|
||||||
|
|
||||||
|
# Use 32/64-bit integers
|
||||||
|
# ---------------
|
||||||
|
# Unfortunately -DINT32 seems to fail when openmpi is build without
|
||||||
|
# Fortran! The MPI_INT32_T is interpreted as MPI_INTEGER4 which does
|
||||||
|
# not exist
|
||||||
|
# ---------------
|
||||||
|
# ifeq ($(WM_LABEL_SIZE),32)
|
||||||
|
# CFLAGS += -DINTSIZE32
|
||||||
|
# endif
|
||||||
|
ifeq ($(WM_LABEL_SIZE),64)
|
||||||
|
CFLAGS += -DINTSIZE64
|
||||||
|
endif
|
||||||
|
|
||||||
|
CLIBFLAGS =
|
||||||
|
LDFLAGS = $(WM_LDFLAGS) -lm
|
||||||
|
|
||||||
|
MAKE = make
|
||||||
|
CP = cp
|
||||||
|
CAT = cat
|
||||||
|
LN = ln
|
||||||
|
MKDIR = mkdir
|
||||||
|
MV = mv
|
||||||
|
RANLIB = echo
|
||||||
|
|
||||||
|
FLEX = flex "-Pscotchyy$(SCOTCH_NAME_SUFFIX)" -olex.yy.c
|
||||||
|
BISON = bison "-pscotchyy$(SCOTCH_NAME_SUFFIX)" -y -b y
|
||||||
|
LEX = $(FLEX)
|
||||||
|
YACC = $(BISON)
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
85
etc/makeFiles/scotch/Makefile.inc.Linux-Mingw.shlib
Normal file
85
etc/makeFiles/scotch/Makefile.inc.Linux-Mingw.shlib
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
#-------------------------------*- makefile -*---------------------------------
|
||||||
|
#
|
||||||
|
# Prior to OpenFOAM-v1906, these were always part of the environment
|
||||||
|
#
|
||||||
|
# - WM_CFLAGS : with -m32 / -m64 and -fPIC
|
||||||
|
# - WM_LDFLAGS : with -m32 / -m64
|
||||||
|
#
|
||||||
|
# With OpenFOAM-v1906 and later
|
||||||
|
#
|
||||||
|
# - wmake -show-cflags : with -m32 / -m64
|
||||||
|
# - wmake -show-cflags-arch : with -m32 / -m64
|
||||||
|
#
|
||||||
|
# Pass these in via the environment since using '$(shell ...)' here does not
|
||||||
|
# always work well.
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
# - compiled without pthread
|
||||||
|
#
|
||||||
|
# Normally set CCS, CCP by caller
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
EXE =
|
||||||
|
LIB = .dll
|
||||||
|
OBJ = .o
|
||||||
|
|
||||||
|
# Separate the cross-compilation flags from regular CFLAGS to ensure that
|
||||||
|
# system gcc does not use them for the scotch build toolchain
|
||||||
|
|
||||||
|
# cross-compile broken for scotch-v7
|
||||||
|
CFLAGS_CROSS = -DCOMMON_STUB_FORK -DCOMMON_WINDOWS
|
||||||
|
|
||||||
|
# Flags for including windows MPI information (MSMPI)
|
||||||
|
CFLAGS_WINMPI = -I$(MPI_ARCH_PATH)/include \
|
||||||
|
-DMSMPI_NO_SAL -DMSMPI_NO_DEPRECATE_20 \
|
||||||
|
-D_MPICH_DLL_
|
||||||
|
|
||||||
|
AR = x86_64-w64-mingw32-gcc
|
||||||
|
ARFLAGS = $(CFLAGS) -shared -Wl,--output-def,libscotch.def,--out-implib,libscotch.a,--enable-auto-import,--strip-all -o
|
||||||
|
CC = x86_64-w64-mingw32-gcc $(CFLAGS_CROSS)
|
||||||
|
CCS = x86_64-w64-mingw32-gcc $(CFLAGS_WINMPI)
|
||||||
|
CCP = x86_64-w64-mingw32-gcc $(CFLAGS_WINMPI)
|
||||||
|
CCD = gcc $(CFLAGS_WINMPI)
|
||||||
|
CFLAGS = $(WM_CFLAGS) -fPIC -O3 \
|
||||||
|
-DCOMMON_PTHREAD_FILE -DSCOTCH_PTHREAD \
|
||||||
|
-UCOMMON_FILE_COMPRESS \
|
||||||
|
-DCOMMON_RANDOM_FIXED_SEED \
|
||||||
|
-DSCOTCH_DETERMINISTIC \
|
||||||
|
-DSCOTCH_RENAME \
|
||||||
|
-DIDXSIZE64 \
|
||||||
|
-Drestrict=__restrict
|
||||||
|
|
||||||
|
# Use 32/64-bit integers
|
||||||
|
# ---------------
|
||||||
|
# Unfortunately -DINT32 seems to fail when openmpi is build without
|
||||||
|
# Fortran! The MPI_INT32_T is interpreted as MPI_INTEGER4 which does
|
||||||
|
# not exist
|
||||||
|
# ---------------
|
||||||
|
# ifeq ($(WM_LABEL_SIZE),32)
|
||||||
|
# CFLAGS += -DINTSIZE32
|
||||||
|
# endif
|
||||||
|
ifeq ($(WM_LABEL_SIZE),64)
|
||||||
|
CFLAGS += -DINTSIZE64
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Non-standard "__stdcall" in MSMPI <mpi.h>
|
||||||
|
CCDFLAGS = $(CFLAGS) -D__stdcall=''
|
||||||
|
|
||||||
|
|
||||||
|
CLIBFLAGS = -shared
|
||||||
|
LDFLAGS =
|
||||||
|
|
||||||
|
MAKE = make
|
||||||
|
CP = cp
|
||||||
|
CAT = cat
|
||||||
|
LN = ln
|
||||||
|
MKDIR = mkdir
|
||||||
|
MV = mv
|
||||||
|
RANLIB = echo
|
||||||
|
|
||||||
|
FLEX = flex "-Pscotchyy$(SCOTCH_NAME_SUFFIX)" -olex.yy.c
|
||||||
|
BISON = bison "-pscotchyy$(SCOTCH_NAME_SUFFIX)" -y -b y
|
||||||
|
LEX = $(FLEX)
|
||||||
|
YACC = $(BISON)
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
68
etc/makeFiles/scotch/Makefile.inc.Linux.shlib
Normal file
68
etc/makeFiles/scotch/Makefile.inc.Linux.shlib
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
#-------------------------------*- makefile -*---------------------------------
|
||||||
|
#
|
||||||
|
# Prior to OpenFOAM-v1906, these were always part of the environment
|
||||||
|
#
|
||||||
|
# - WM_CFLAGS : with -m32 / -m64 and -fPIC
|
||||||
|
# - WM_LDFLAGS : with -m32 / -m64
|
||||||
|
#
|
||||||
|
# With OpenFOAM-v1906 and later
|
||||||
|
#
|
||||||
|
# - wmake -show-cflags : with -m32 / -m64
|
||||||
|
# - wmake -show-cflags-arch : with -m32 / -m64
|
||||||
|
#
|
||||||
|
# Pass these in via the environment since using '$(shell ...)' here does not
|
||||||
|
# always work well.
|
||||||
|
#
|
||||||
|
# Notes:
|
||||||
|
# - compiled without pthread
|
||||||
|
#
|
||||||
|
# Normally set CCS, CCP by caller
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
EXE =
|
||||||
|
LIB = .so
|
||||||
|
OBJ = .o
|
||||||
|
|
||||||
|
AR = $(CC)
|
||||||
|
ARFLAGS = $(WM_CFLAGS) -shared -o
|
||||||
|
CCS ?= $(CC)
|
||||||
|
CCP ?= mpicc
|
||||||
|
CCD = $(CCP)
|
||||||
|
CFLAGS = $(WM_CFLAGS) -fPIC -O3 \
|
||||||
|
-UCOMMON_FILE_COMPRESS \
|
||||||
|
-DCOMMON_RANDOM_FIXED_SEED \
|
||||||
|
-DSCOTCH_DETERMINISTIC \
|
||||||
|
-DSCOTCH_RENAME \
|
||||||
|
-DIDXSIZE64 \
|
||||||
|
-Drestrict=__restrict
|
||||||
|
|
||||||
|
# Use 32/64-bit integers
|
||||||
|
# ---------------
|
||||||
|
# Unfortunately -DINT32 seems to fail when openmpi is build without
|
||||||
|
# Fortran! The MPI_INT32_T is interpreted as MPI_INTEGER4 which does
|
||||||
|
# not exist
|
||||||
|
# ---------------
|
||||||
|
# ifeq ($(WM_LABEL_SIZE),32)
|
||||||
|
# CFLAGS += -DINTSIZE32
|
||||||
|
# endif
|
||||||
|
ifeq ($(WM_LABEL_SIZE),64)
|
||||||
|
CFLAGS += -DINTSIZE64
|
||||||
|
endif
|
||||||
|
|
||||||
|
CLIBFLAGS = -shared
|
||||||
|
LDFLAGS = -Xlinker --no-as-needed $(WM_LDFLAGS) -lm -lrt
|
||||||
|
|
||||||
|
MAKE = make
|
||||||
|
CP = cp
|
||||||
|
CAT = cat
|
||||||
|
LN = ln
|
||||||
|
MKDIR = mkdir
|
||||||
|
MV = mv
|
||||||
|
RANLIB = echo
|
||||||
|
|
||||||
|
FLEX = flex "-Pscotchyy$(SCOTCH_NAME_SUFFIX)" -olex.yy.c
|
||||||
|
BISON = bison "-pscotchyy$(SCOTCH_NAME_SUFFIX)" -y -b y
|
||||||
|
LEX = $(FLEX)
|
||||||
|
YACC = $(BISON)
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
@ -1,12 +0,0 @@
|
|||||||
--- ADIOS-1.11.0/src/core/adios_transform_methods.c.orig 2016-11-17 19:46:11.000000000 +0100
|
|
||||||
+++ ADIOS-1.11.0/src/core/adios_transform_methods.c 2016-12-14 15:19:39.870832445 +0100
|
|
||||||
@@ -7,6 +7,9 @@
|
|
||||||
|
|
||||||
ADIOS_AVAILABLE_TRANSFORM_METHODS * adios_available_transform_methods()
|
|
||||||
{
|
|
||||||
+ /* Ensure the transforms are initialized before accessing */
|
|
||||||
+ adios_transform_read_init();
|
|
||||||
+
|
|
||||||
int i, n;
|
|
||||||
n = 0;
|
|
||||||
for (i = (int)adios_transform_none; i < num_adios_transform_types; i++) {
|
|
||||||
@ -1 +0,0 @@
|
|||||||
ADIOS-1.11.0
|
|
||||||
155
etc/patches/gcc-4.8.5-with-gcc-7
Normal file
155
etc/patches/gcc-4.8.5-with-gcc-7
Normal file
@ -0,0 +1,155 @@
|
|||||||
|
#
|
||||||
|
# Patch for building older gcc versions with gcc-7
|
||||||
|
#
|
||||||
|
--- gcc-4.8.5/gcc/cp/cfns.gperf.orig 2013-01-10 21:38:27.000000000 +0100
|
||||||
|
+++ gcc-4.8.5/gcc/cp/cfns.gperf 2016-02-25 16:36:41.000000000 +0100
|
||||||
|
@@ -1,5 +1,7 @@
|
||||||
|
+%language=C++
|
||||||
|
+%define class-name libc_name
|
||||||
|
%{
|
||||||
|
-/* Copyright (C) 2000-2013 Free Software Foundation, Inc.
|
||||||
|
+/* Copyright (C) 2000-2014 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is part of GCC.
|
||||||
|
|
||||||
|
@@ -16,14 +18,6 @@
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with GCC; see the file COPYING3. If not see
|
||||||
|
<http://www.gnu.org/licenses/>. */
|
||||||
|
-#ifdef __GNUC__
|
||||||
|
-__inline
|
||||||
|
-#endif
|
||||||
|
-static unsigned int hash (const char *, unsigned int);
|
||||||
|
-#ifdef __GNUC__
|
||||||
|
-__inline
|
||||||
|
-#endif
|
||||||
|
-const char * libc_name_p (const char *, unsigned int);
|
||||||
|
%}
|
||||||
|
%%
|
||||||
|
# The standard C library functions, for feeding to gperf; the result is used
|
||||||
|
--- gcc-4.8.5/gcc/cp/cfns.h.orig 2013-01-10 21:38:27.000000000 +0100
|
||||||
|
+++ gcc-4.8.5/gcc/cp/cfns.h 2016-02-25 16:36:41.000000000 +0100
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
-/* ANSI-C code produced by gperf version 3.0.3 */
|
||||||
|
-/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */
|
||||||
|
+/* C++ code produced by gperf version 3.0.4 */
|
||||||
|
+/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ --output-file cfns.h cfns.gperf */
|
||||||
|
|
||||||
|
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
||||||
|
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
|
||||||
|
@@ -28,9 +28,9 @@
|
||||||
|
#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#line 1 "cfns.gperf"
|
||||||
|
+#line 3 "cfns.gperf"
|
||||||
|
|
||||||
|
-/* Copyright (C) 2000-2013 Free Software Foundation, Inc.
|
||||||
|
+/* Copyright (C) 2000-2014 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is part of GCC.
|
||||||
|
|
||||||
|
@@ -47,25 +47,18 @@
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with GCC; see the file COPYING3. If not see
|
||||||
|
<http://www.gnu.org/licenses/>. */
|
||||||
|
-#ifdef __GNUC__
|
||||||
|
-__inline
|
||||||
|
-#endif
|
||||||
|
-static unsigned int hash (const char *, unsigned int);
|
||||||
|
-#ifdef __GNUC__
|
||||||
|
-__inline
|
||||||
|
-#endif
|
||||||
|
-const char * libc_name_p (const char *, unsigned int);
|
||||||
|
/* maximum key range = 391, duplicates = 0 */
|
||||||
|
|
||||||
|
-#ifdef __GNUC__
|
||||||
|
-__inline
|
||||||
|
-#else
|
||||||
|
-#ifdef __cplusplus
|
||||||
|
-inline
|
||||||
|
-#endif
|
||||||
|
-#endif
|
||||||
|
-static unsigned int
|
||||||
|
-hash (register const char *str, register unsigned int len)
|
||||||
|
+class libc_name
|
||||||
|
+{
|
||||||
|
+private:
|
||||||
|
+ static inline unsigned int hash (const char *str, unsigned int len);
|
||||||
|
+public:
|
||||||
|
+ static const char *libc_name_p (const char *str, unsigned int len);
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+inline unsigned int
|
||||||
|
+libc_name::hash (register const char *str, register unsigned int len)
|
||||||
|
{
|
||||||
|
static const unsigned short asso_values[] =
|
||||||
|
{
|
||||||
|
@@ -122,14 +115,8 @@
|
||||||
|
return hval + asso_values[(unsigned char)str[len - 1]];
|
||||||
|
}
|
||||||
|
|
||||||
|
-#ifdef __GNUC__
|
||||||
|
-__inline
|
||||||
|
-#ifdef __GNUC_STDC_INLINE__
|
||||||
|
-__attribute__ ((__gnu_inline__))
|
||||||
|
-#endif
|
||||||
|
-#endif
|
||||||
|
const char *
|
||||||
|
-libc_name_p (register const char *str, register unsigned int len)
|
||||||
|
+libc_name::libc_name_p (register const char *str, register unsigned int len)
|
||||||
|
{
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
--- gcc-4.8.5/gcc/cp/except.c.orig 2013-10-25 15:49:48.000000000 +0200
|
||||||
|
+++ gcc-4.8.5/gcc/cp/except.c 2018-07-27 13:11:11.825369497 +0200
|
||||||
|
@@ -1025,7 +1025,7 @@
|
||||||
|
unless the system headers are playing rename tricks, and if
|
||||||
|
they are, we don't want to be confused by them. */
|
||||||
|
id = DECL_NAME (fn);
|
||||||
|
- return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
|
||||||
|
+ return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Returns nonzero if an exception of type FROM will be caught by a
|
||||||
|
--- gcc-4.8.5/libgcc/config/i386/linux-unwind.h.orig 2013-02-04 20:06:20.000000000 +0100
|
||||||
|
+++ gcc-4.8.5/libgcc/config/i386/linux-unwind.h 2018-07-27 12:51:18.305390871 +0200
|
||||||
|
@@ -58,7 +58,7 @@
|
||||||
|
if (*(unsigned char *)(pc+0) == 0x48
|
||||||
|
&& *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
|
||||||
|
{
|
||||||
|
- struct ucontext *uc_ = context->cfa;
|
||||||
|
+ ucontext_t *uc_ = context->cfa;
|
||||||
|
/* The void * cast is necessary to avoid an aliasing warning.
|
||||||
|
The aliasing warning is correct, but should not be a problem
|
||||||
|
because it does not alias anything. */
|
||||||
|
@@ -138,7 +138,7 @@
|
||||||
|
siginfo_t *pinfo;
|
||||||
|
void *puc;
|
||||||
|
siginfo_t info;
|
||||||
|
- struct ucontext uc;
|
||||||
|
+ ucontext_t uc;
|
||||||
|
} *rt_ = context->cfa;
|
||||||
|
/* The void * cast is necessary to avoid an aliasing warning.
|
||||||
|
The aliasing warning is correct, but should not be a problem
|
||||||
|
--- gcc-4.8.5/libsanitizer/asan/asan_linux.cc.orig 2013-01-23 12:41:33.000000000 +0100
|
||||||
|
+++ gcc-4.8.5/libsanitizer/asan/asan_linux.cc 2018-07-27 12:51:45.641390381 +0200
|
||||||
|
@@ -25,6 +25,7 @@
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <pthread.h>
|
||||||
|
+#include <signal.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <unwind.h>
|
||||||
|
--- gcc-4.8.5/libsanitizer/tsan/tsan_platform_linux.cc.orig 2013-02-21 11:57:10.000000000 +0100
|
||||||
|
+++ gcc-4.8.5/libsanitizer/tsan/tsan_platform_linux.cc 2018-07-27 13:17:32.417362682 +0200
|
||||||
|
@@ -292,7 +292,7 @@
|
||||||
|
#ifndef TSAN_GO
|
||||||
|
int ExtractResolvFDs(void *state, int *fds, int nfd) {
|
||||||
|
int cnt = 0;
|
||||||
|
- __res_state *statp = (__res_state*)state;
|
||||||
|
+ struct __res_state *statp = (struct __res_state*)state;
|
||||||
|
for (int i = 0; i < MAXNS && cnt < nfd; i++) {
|
||||||
|
if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
|
||||||
|
fds[cnt++] = statp->_u._ext.nssocks[i];
|
||||||
87
etc/patches/gcc-4.9.4-with-gcc-7
Normal file
87
etc/patches/gcc-4.9.4-with-gcc-7
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
#
|
||||||
|
# Patch for building older gcc versions with gcc-7
|
||||||
|
#
|
||||||
|
--- gcc-4.9.4/libgcc/config/i386/linux-unwind.h.orig 2014-01-02 23:25:22.000000000 +0100
|
||||||
|
+++ gcc-4.9.4/libgcc/config/i386/linux-unwind.h 2018-07-27 10:43:46.021527909 +0200
|
||||||
|
@@ -58,7 +58,7 @@
|
||||||
|
if (*(unsigned char *)(pc+0) == 0x48
|
||||||
|
&& *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
|
||||||
|
{
|
||||||
|
- struct ucontext *uc_ = context->cfa;
|
||||||
|
+ ucontext_t *uc_ = context->cfa;
|
||||||
|
/* The void * cast is necessary to avoid an aliasing warning.
|
||||||
|
The aliasing warning is correct, but should not be a problem
|
||||||
|
because it does not alias anything. */
|
||||||
|
@@ -138,7 +138,7 @@
|
||||||
|
siginfo_t *pinfo;
|
||||||
|
void *puc;
|
||||||
|
siginfo_t info;
|
||||||
|
- struct ucontext uc;
|
||||||
|
+ ucontext_t uc;
|
||||||
|
} *rt_ = context->cfa;
|
||||||
|
/* The void * cast is necessary to avoid an aliasing warning.
|
||||||
|
The aliasing warning is correct, but should not be a problem
|
||||||
|
--- gcc-4.9.4/libsanitizer/asan/asan_linux.cc.orig 2013-12-05 10:18:38.000000000 +0100
|
||||||
|
+++ gcc-4.9.4/libsanitizer/asan/asan_linux.cc 2018-07-27 11:11:52.085497715 +0200
|
||||||
|
@@ -26,6 +26,7 @@
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <pthread.h>
|
||||||
|
+#include <signal.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <unwind.h>
|
||||||
|
--- gcc-4.9.4/libsanitizer/sanitizer_common/sanitizer_linux.cc.orig 2013-12-05 10:18:38.000000000 +0100
|
||||||
|
+++ gcc-4.9.4/libsanitizer/sanitizer_common/sanitizer_linux.cc 2018-07-27 10:43:02.405528690 +0200
|
||||||
|
@@ -599,8 +599,7 @@
|
||||||
|
return internal_syscall(__NR_prctl, option, arg2, arg3, arg4, arg5);
|
||||||
|
}
|
||||||
|
|
||||||
|
-uptr internal_sigaltstack(const struct sigaltstack *ss,
|
||||||
|
- struct sigaltstack *oss) {
|
||||||
|
+uptr internal_sigaltstack(const void *ss, void *oss) {
|
||||||
|
return internal_syscall(__NR_sigaltstack, (uptr)ss, (uptr)oss);
|
||||||
|
}
|
||||||
|
|
||||||
|
--- gcc-4.9.4/libsanitizer/sanitizer_common/sanitizer_linux.h.orig 2013-12-05 10:18:38.000000000 +0100
|
||||||
|
+++ gcc-4.9.4/libsanitizer/sanitizer_common/sanitizer_linux.h 2018-07-27 10:42:29.845529273 +0200
|
||||||
|
@@ -18,7 +18,6 @@
|
||||||
|
#include "sanitizer_platform_limits_posix.h"
|
||||||
|
|
||||||
|
struct link_map; // Opaque type returned by dlopen().
|
||||||
|
-struct sigaltstack;
|
||||||
|
|
||||||
|
namespace __sanitizer {
|
||||||
|
// Dirent structure for getdents(). Note that this structure is different from
|
||||||
|
@@ -28,8 +27,7 @@
|
||||||
|
// Syscall wrappers.
|
||||||
|
uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
|
||||||
|
uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5);
|
||||||
|
-uptr internal_sigaltstack(const struct sigaltstack* ss,
|
||||||
|
- struct sigaltstack* oss);
|
||||||
|
+uptr internal_sigaltstack(const void* ss, void* oss);
|
||||||
|
uptr internal_sigaction(int signum, const __sanitizer_kernel_sigaction_t *act,
|
||||||
|
__sanitizer_kernel_sigaction_t *oldact);
|
||||||
|
uptr internal_sigprocmask(int how, __sanitizer_kernel_sigset_t *set,
|
||||||
|
--- gcc-4.9.4/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc.orig 2013-12-05 11:28:59.000000000 +0100
|
||||||
|
+++ gcc-4.9.4/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc 2018-07-27 10:41:32.053530308 +0200
|
||||||
|
@@ -238,7 +238,7 @@
|
||||||
|
|
||||||
|
// Alternate stack for signal handling.
|
||||||
|
InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize);
|
||||||
|
- struct sigaltstack handler_stack;
|
||||||
|
+ stack_t handler_stack;
|
||||||
|
internal_memset(&handler_stack, 0, sizeof(handler_stack));
|
||||||
|
handler_stack.ss_sp = handler_stack_memory.data();
|
||||||
|
handler_stack.ss_size = kHandlerStackSize;
|
||||||
|
--- gcc-4.9.4/libsanitizer/tsan/tsan_platform_linux.cc.orig 2013-12-05 10:18:38.000000000 +0100
|
||||||
|
+++ gcc-4.9.4/libsanitizer/tsan/tsan_platform_linux.cc 2018-07-27 10:40:13.781531710 +0200
|
||||||
|
@@ -351,7 +351,7 @@
|
||||||
|
// closes within glibc. The code is a pure hack.
|
||||||
|
int ExtractResolvFDs(void *state, int *fds, int nfd) {
|
||||||
|
int cnt = 0;
|
||||||
|
- __res_state *statp = (__res_state*)state;
|
||||||
|
+ struct __res_state *statp = (struct __res_state*)state;
|
||||||
|
for (int i = 0; i < MAXNS && cnt < nfd; i++) {
|
||||||
|
if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
|
||||||
|
fds[cnt++] = statp->_u._ext.nssocks[i];
|
||||||
82
etc/patches/gcc-6.3.0-with-gcc-7
Normal file
82
etc/patches/gcc-6.3.0-with-gcc-7
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
#
|
||||||
|
# Patch for building older gcc versions with gcc-7
|
||||||
|
#
|
||||||
|
diff -u gcc-6.3.0/libgcc/config/i386/linux-unwind.h.orig gcc-6.3.0/libgcc/config/i386/linux-unwind.h
|
||||||
|
--- gcc-6.3.0/libgcc/config/i386/linux-unwind.h.orig 2016-01-04 23:30:50.000000000 +0900
|
||||||
|
+++ gcc-6.3.0/libgcc/config/i386/linux-unwind.h 2017-10-29 23:01:21.717240052 +0900
|
||||||
|
@@ -58,7 +58,7 @@
|
||||||
|
if (*(unsigned char *)(pc+0) == 0x48
|
||||||
|
&& *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
|
||||||
|
{
|
||||||
|
- struct ucontext *uc_ = context->cfa;
|
||||||
|
+ ucontext_t *uc_ = context->cfa;
|
||||||
|
/* The void * cast is necessary to avoid an aliasing warning.
|
||||||
|
The aliasing warning is correct, but should not be a problem
|
||||||
|
because it does not alias anything. */
|
||||||
|
@@ -138,7 +138,7 @@
|
||||||
|
siginfo_t *pinfo;
|
||||||
|
void *puc;
|
||||||
|
siginfo_t info;
|
||||||
|
- struct ucontext uc;
|
||||||
|
+ ucontext_t uc;
|
||||||
|
} *rt_ = context->cfa;
|
||||||
|
/* The void * cast is necessary to avoid an aliasing warning.
|
||||||
|
The aliasing warning is correct, but should not be a problem
|
||||||
|
diff -u gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_linux.cc.orig gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_linux.cc
|
||||||
|
--- gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_linux.cc.orig 2015-11-23 18:07:18.000000000 +0900
|
||||||
|
+++ gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_linux.cc 2017-10-29 23:09:00.490577558 +0900
|
||||||
|
@@ -546,8 +546,7 @@
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-uptr internal_sigaltstack(const struct sigaltstack *ss,
|
||||||
|
- struct sigaltstack *oss) {
|
||||||
|
+uptr internal_sigaltstack(const void *ss, void *oss) {
|
||||||
|
return internal_syscall(SYSCALL(sigaltstack), (uptr)ss, (uptr)oss);
|
||||||
|
}
|
||||||
|
|
||||||
|
diff -u gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_linux.h.orig gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_linux.h
|
||||||
|
--- gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_linux.h.orig 2015-10-21 16:32:45.000000000 +0900
|
||||||
|
+++ gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_linux.h 2017-10-29 23:09:43.907244619 +0900
|
||||||
|
@@ -19,7 +19,6 @@
|
||||||
|
#include "sanitizer_platform_limits_posix.h"
|
||||||
|
|
||||||
|
struct link_map; // Opaque type returned by dlopen().
|
||||||
|
-struct sigaltstack;
|
||||||
|
|
||||||
|
namespace __sanitizer {
|
||||||
|
// Dirent structure for getdents(). Note that this structure is different from
|
||||||
|
@@ -28,8 +27,7 @@
|
||||||
|
|
||||||
|
// Syscall wrappers.
|
||||||
|
uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
|
||||||
|
-uptr internal_sigaltstack(const struct sigaltstack* ss,
|
||||||
|
- struct sigaltstack* oss);
|
||||||
|
+uptr internal_sigaltstack(const void* ss, void* oss);
|
||||||
|
uptr internal_sigprocmask(int how, __sanitizer_sigset_t *set,
|
||||||
|
__sanitizer_sigset_t *oldset);
|
||||||
|
void internal_sigfillset(__sanitizer_sigset_t *set);
|
||||||
|
diff -u gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc.orig gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
|
||||||
|
--- gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc.orig 2015-10-21 16:32:45.000000000 +0900
|
||||||
|
+++ gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc 2017-10-29 23:08:07.260577074 +0900
|
||||||
|
@@ -267,7 +267,7 @@
|
||||||
|
|
||||||
|
// Alternate stack for signal handling.
|
||||||
|
InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize);
|
||||||
|
- struct sigaltstack handler_stack;
|
||||||
|
+ stack_t handler_stack;
|
||||||
|
internal_memset(&handler_stack, 0, sizeof(handler_stack));
|
||||||
|
handler_stack.ss_sp = handler_stack_memory.data();
|
||||||
|
handler_stack.ss_size = kHandlerStackSize;
|
||||||
|
diff -u gcc-6.3.0/libsanitizer/tsan/tsan_platform_linux.cc.orig gcc-6.3.0/libsanitizer/tsan/tsan_platform_linux.cc
|
||||||
|
--- gcc-6.3.0/libsanitizer/tsan/tsan_platform_linux.cc.orig 2016-08-12 17:53:46.000000000 +0900
|
||||||
|
+++ gcc-6.3.0/libsanitizer/tsan/tsan_platform_linux.cc 2017-10-29 23:10:38.817245120 +0900
|
||||||
|
@@ -291,7 +291,7 @@
|
||||||
|
int ExtractResolvFDs(void *state, int *fds, int nfd) {
|
||||||
|
#if SANITIZER_LINUX
|
||||||
|
int cnt = 0;
|
||||||
|
- __res_state *statp = (__res_state*)state;
|
||||||
|
+ struct __res_state *statp = (struct __res_state*)state;
|
||||||
|
for (int i = 0; i < MAXNS && cnt < nfd; i++) {
|
||||||
|
if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
|
||||||
|
fds[cnt++] = statp->_u._ext.nssocks[i];
|
||||||
@ -1,27 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# simple script to generate patches
|
|
||||||
paraview=ParaView-5.0.1
|
|
||||||
if [ "$#" -gt 0 ]
|
|
||||||
then
|
|
||||||
paraview="${1%%/}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ -d "$paraview" ] || {
|
|
||||||
echo "No directory '$paraview'" 1>&2
|
|
||||||
exit 2
|
|
||||||
}
|
|
||||||
|
|
||||||
for i in \
|
|
||||||
$paraview/VTK/CMake/vtkCompilerExtras.cmake \
|
|
||||||
$paraview/VTK/CMake/GenerateExportHeader.cmake \
|
|
||||||
$paraview/Qt/Components/CMakeLists.txt \
|
|
||||||
$paraview/CMake/generate_qhp.cmake \
|
|
||||||
$paraview/CMake/ParaViewMacros.cmake \
|
|
||||||
$paraview/CMake/generate_proxydocumentation.cmake \
|
|
||||||
;
|
|
||||||
do
|
|
||||||
diff -uw $i.orig $i
|
|
||||||
done
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
--- ParaView-4.4.0/VTK/IO/Geometry/vtkSTLReader.cxx.orig 2015-09-11 19:59:24.000000000 +0200
|
|
||||||
+++ ParaView-4.4.0/VTK/IO/Geometry/vtkSTLReader.cxx 2016-06-19 12:59:50.769770143 +0200
|
|
||||||
@@ -448,7 +448,7 @@
|
|
||||||
done = done || (fscanf(fp,"%s", line)==EOF);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- if (!done)
|
|
||||||
+ else if (!done)
|
|
||||||
{
|
|
||||||
done = (fgets(line, 255, fp) == 0);
|
|
||||||
lineCount++;
|
|
||||||
--- ParaView-5.0.1/VTK/CMake/vtkCompilerExtras.cmake.orig 2016-03-28 17:07:10.000000000 +0200
|
|
||||||
+++ ParaView-5.0.1/VTK/CMake/vtkCompilerExtras.cmake 2016-06-11 15:10:14.820958942 +0200
|
|
||||||
@@ -32,7 +32,7 @@
|
|
||||||
OUTPUT_VARIABLE _gcc_version_info
|
|
||||||
ERROR_VARIABLE _gcc_version_info)
|
|
||||||
|
|
||||||
- string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]*"
|
|
||||||
+ string (REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*"
|
|
||||||
_gcc_version "${_gcc_version_info}")
|
|
||||||
if(NOT _gcc_version)
|
|
||||||
string (REGEX REPLACE ".*\\(GCC\\).*([34]\\.[0-9]).*" "\\1.0"
|
|
||||||
--- ParaView-5.0.1/VTK/CMake/GenerateExportHeader.cmake.orig 2016-03-28 17:07:10.000000000 +0200
|
|
||||||
+++ ParaView-5.0.1/VTK/CMake/GenerateExportHeader.cmake 2016-06-11 15:12:16.344357746 +0200
|
|
||||||
@@ -166,7 +166,7 @@
|
|
||||||
execute_process(COMMAND ${CMAKE_C_COMPILER} ARGS --version
|
|
||||||
OUTPUT_VARIABLE _gcc_version_info
|
|
||||||
ERROR_VARIABLE _gcc_version_info)
|
|
||||||
- string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]*"
|
|
||||||
+ string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*"
|
|
||||||
_gcc_version "${_gcc_version_info}")
|
|
||||||
# gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
|
|
||||||
# patch level, handle this here:
|
|
||||||
--- ParaView-5.0.1/Qt/Components/CMakeLists.txt.orig 2016-06-13 09:27:27.827849525 +0200
|
|
||||||
+++ ParaView-5.0.1/Qt/Components/CMakeLists.txt 2016-06-13 09:29:28.599318445 +0200
|
|
||||||
@@ -640,7 +640,7 @@
|
|
||||||
#the pqSGExportStateWizard has subclasses that directly access
|
|
||||||
#the UI file, and currently we don't have a clean way to break this hard
|
|
||||||
#dependency, so for no we install this ui file.
|
|
||||||
-if(PARAVIEW_INSTALL_DEVELOPMENT_FILES)
|
|
||||||
+if(PARAVIEW_INSTALL_DEVELOPMENT_FILES AND PARAVIEW_ENABLE_PYTHON)
|
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h"
|
|
||||||
DESTINATION "${VTK_INSTALL_INCLUDE_DIR}")
|
|
||||||
endif()
|
|
||||||
@ -1 +0,0 @@
|
|||||||
paraview-5.0.1
|
|
||||||
@ -1,87 +0,0 @@
|
|||||||
--- ParaView-5.0.1/VTK/CMake/vtkCompilerExtras.cmake.orig 2016-03-28 17:07:10.000000000 +0200
|
|
||||||
+++ ParaView-5.0.1/VTK/CMake/vtkCompilerExtras.cmake 2016-12-13 17:21:25.382720945 +0100
|
|
||||||
@@ -32,7 +32,7 @@
|
|
||||||
OUTPUT_VARIABLE _gcc_version_info
|
|
||||||
ERROR_VARIABLE _gcc_version_info)
|
|
||||||
|
|
||||||
- string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]*"
|
|
||||||
+ string (REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*"
|
|
||||||
_gcc_version "${_gcc_version_info}")
|
|
||||||
if(NOT _gcc_version)
|
|
||||||
string (REGEX REPLACE ".*\\(GCC\\).*([34]\\.[0-9]).*" "\\1.0"
|
|
||||||
--- ParaView-5.0.1/VTK/CMake/GenerateExportHeader.cmake.orig 2016-03-28 17:07:10.000000000 +0200
|
|
||||||
+++ ParaView-5.0.1/VTK/CMake/GenerateExportHeader.cmake 2016-12-13 17:21:25.382720945 +0100
|
|
||||||
@@ -166,7 +166,7 @@
|
|
||||||
execute_process(COMMAND ${CMAKE_C_COMPILER} ARGS --version
|
|
||||||
OUTPUT_VARIABLE _gcc_version_info
|
|
||||||
ERROR_VARIABLE _gcc_version_info)
|
|
||||||
- string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]*"
|
|
||||||
+ string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*"
|
|
||||||
_gcc_version "${_gcc_version_info}")
|
|
||||||
# gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
|
|
||||||
# patch level, handle this here:
|
|
||||||
--- ParaView-5.0.1/Qt/Components/CMakeLists.txt.orig 2016-03-28 17:07:03.000000000 +0200
|
|
||||||
+++ ParaView-5.0.1/Qt/Components/CMakeLists.txt 2016-12-13 17:38:42.713553032 +0100
|
|
||||||
@@ -656,7 +656,7 @@
|
|
||||||
#the pqSGExportStateWizard has subclasses that directly access
|
|
||||||
#the UI file, and currently we don't have a clean way to break this hard
|
|
||||||
#dependency, so for no we install this ui file.
|
|
||||||
-if(PARAVIEW_INSTALL_DEVELOPMENT_FILES)
|
|
||||||
+if(PARAVIEW_INSTALL_DEVELOPMENT_FILES AND PARAVIEW_ENABLE_PYTHON)
|
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h"
|
|
||||||
DESTINATION "${VTK_INSTALL_INCLUDE_DIR}")
|
|
||||||
endif()
|
|
||||||
--- ParaView-5.0.1/CMake/generate_qhp.cmake.orig 2016-03-28 17:06:22.000000000 +0200
|
|
||||||
+++ ParaView-5.0.1/CMake/generate_qhp.cmake 2016-12-13 17:21:25.382720945 +0100
|
|
||||||
@@ -44,7 +48,9 @@
|
|
||||||
message(FATAL_ERROR "Missing one of the required arguments!!")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
-string (REPLACE "+" ";" file_patterns "${file_patterns}")
|
|
||||||
+# Recover original ';' separated list.
|
|
||||||
+string(REPLACE "_s" ";" file_patterns "${file_patterns}")
|
|
||||||
+string(REPLACE "_u" "_" file_patterns "${file_patterns}")
|
|
||||||
|
|
||||||
get_filename_component(working_dir "${output_file}" PATH)
|
|
||||||
|
|
||||||
--- ParaView-5.0.1/CMake/ParaViewMacros.cmake.orig 2016-03-28 17:07:03.000000000 +0200
|
|
||||||
+++ ParaView-5.0.1/CMake/ParaViewMacros.cmake 2016-12-13 17:21:25.382720945 +0100
|
|
||||||
@@ -219,15 +226,21 @@
|
|
||||||
set (xmls_string "")
|
|
||||||
foreach (xml ${xmls})
|
|
||||||
get_filename_component(xml "${xml}" ABSOLUTE)
|
|
||||||
- set (xmls_string "${xmls_string}${xml}+")
|
|
||||||
+ set (xmls_string "${xmls_string}${xml};")
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
set (gui_xmls_string "")
|
|
||||||
foreach (gui_xml ${gui_xmls})
|
|
||||||
get_filename_component(gui_xml "${gui_xml}" ABSOLUTE)
|
|
||||||
- set (gui_xmls_string "${gui_xmls_string}${gui_xml}+")
|
|
||||||
+ set (gui_xmls_string "${gui_xmls_string}${gui_xml};")
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
+ # Escape ';' in lists
|
|
||||||
+ string(REPLACE "_" "_u" xmls_string "${xmls_string}")
|
|
||||||
+ string(REPLACE ";" "_s" xmls_string "${xmls_string}")
|
|
||||||
+ string(REPLACE "_" "_u" gui_xmls_string "${gui_xmls_string}")
|
|
||||||
+ string(REPLACE ";" "_s" gui_xmls_string "${gui_xmls_string}")
|
|
||||||
+
|
|
||||||
set (all_xmls ${xmls} ${gui_xmls})
|
|
||||||
list (GET all_xmls 0 first_xml)
|
|
||||||
if (NOT first_xml)
|
|
||||||
--- ParaView-5.0.1/CMake/generate_proxydocumentation.cmake.orig 2016-03-28 17:06:22.000000000 +0200
|
|
||||||
+++ ParaView-5.0.1/CMake/generate_proxydocumentation.cmake 2016-12-13 17:21:25.382720945 +0100
|
|
||||||
@@ -21,8 +21,10 @@
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# input_xmls is a pseudo-list. Convert it to a real CMake list.
|
|
||||||
-string(REPLACE "+" ";" input_xmls "${input_xmls}")
|
|
||||||
-string(REPLACE "+" ";" input_gui_xmls "${input_gui_xmls}")
|
|
||||||
+string(REPLACE "_s" ";" input_xmls "${input_xmls}")
|
|
||||||
+string(REPLACE "_u" "_" input_xmls "${input_xmls}")
|
|
||||||
+string(REPLACE "_s" ";" input_gui_xmls "${input_gui_xmls}")
|
|
||||||
+string(REPLACE "_u" "_" input_gui_xmls "${input_gui_xmls}")
|
|
||||||
|
|
||||||
set (xslt_xml)
|
|
||||||
|
|
||||||
@ -1 +0,0 @@
|
|||||||
paraview-5.1.2
|
|
||||||
@ -1,65 +0,0 @@
|
|||||||
--- ParaView-5.1.2/Qt/Components/CMakeLists.txt.orig 2016-07-26 21:52:16.000000000 +0200
|
|
||||||
+++ ParaView-5.1.2/Qt/Components/CMakeLists.txt 2016-12-13 17:38:42.713553032 +0100
|
|
||||||
@@ -591,7 +591,7 @@
|
|
||||||
#the pqSGExportStateWizard has subclasses that directly access
|
|
||||||
#the UI file, and currently we don't have a clean way to break this hard
|
|
||||||
#dependency, so for no we install this ui file.
|
|
||||||
-if(PARAVIEW_INSTALL_DEVELOPMENT_FILES)
|
|
||||||
+if(PARAVIEW_INSTALL_DEVELOPMENT_FILES AND PARAVIEW_ENABLE_PYTHON)
|
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h"
|
|
||||||
DESTINATION "${VTK_INSTALL_INCLUDE_DIR}")
|
|
||||||
endif()
|
|
||||||
--- ParaView-5.1.2/CMake/generate_qhp.cmake.orig 2016-03-28 17:06:22.000000000 +0200
|
|
||||||
+++ ParaView-5.1.2/CMake/generate_qhp.cmake 2016-12-13 17:21:25.382720945 +0100
|
|
||||||
@@ -44,7 +48,9 @@
|
|
||||||
message(FATAL_ERROR "Missing one of the required arguments!!")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
-string (REPLACE "+" ";" file_patterns "${file_patterns}")
|
|
||||||
+# Recover original ';' separated list.
|
|
||||||
+string(REPLACE "_s" ";" file_patterns "${file_patterns}")
|
|
||||||
+string(REPLACE "_u" "_" file_patterns "${file_patterns}")
|
|
||||||
|
|
||||||
get_filename_component(working_dir "${output_file}" PATH)
|
|
||||||
|
|
||||||
--- ParaView-5.1.2/CMake/ParaViewMacros.cmake.orig 2016-03-28 17:07:03.000000000 +0200
|
|
||||||
+++ ParaView-5.1.2/CMake/ParaViewMacros.cmake 2016-12-13 17:21:25.382720945 +0100
|
|
||||||
@@ -219,15 +226,21 @@
|
|
||||||
set (xmls_string "")
|
|
||||||
foreach (xml ${xmls})
|
|
||||||
get_filename_component(xml "${xml}" ABSOLUTE)
|
|
||||||
- set (xmls_string "${xmls_string}${xml}+")
|
|
||||||
+ set (xmls_string "${xmls_string}${xml};")
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
set (gui_xmls_string "")
|
|
||||||
foreach (gui_xml ${gui_xmls})
|
|
||||||
get_filename_component(gui_xml "${gui_xml}" ABSOLUTE)
|
|
||||||
- set (gui_xmls_string "${gui_xmls_string}${gui_xml}+")
|
|
||||||
+ set (gui_xmls_string "${gui_xmls_string}${gui_xml};")
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
+ # Escape ';' in lists
|
|
||||||
+ string(REPLACE "_" "_u" xmls_string "${xmls_string}")
|
|
||||||
+ string(REPLACE ";" "_s" xmls_string "${xmls_string}")
|
|
||||||
+ string(REPLACE "_" "_u" gui_xmls_string "${gui_xmls_string}")
|
|
||||||
+ string(REPLACE ";" "_s" gui_xmls_string "${gui_xmls_string}")
|
|
||||||
+
|
|
||||||
set (all_xmls ${xmls} ${gui_xmls})
|
|
||||||
list (GET all_xmls 0 first_xml)
|
|
||||||
if (NOT first_xml)
|
|
||||||
--- ParaView-5.1.2/CMake/generate_proxydocumentation.cmake.orig 2016-03-28 17:06:22.000000000 +0200
|
|
||||||
+++ ParaView-5.1.2/CMake/generate_proxydocumentation.cmake 2016-12-13 17:21:25.382720945 +0100
|
|
||||||
@@ -21,8 +21,10 @@
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# input_xmls is a pseudo-list. Convert it to a real CMake list.
|
|
||||||
-string(REPLACE "+" ";" input_xmls "${input_xmls}")
|
|
||||||
-string(REPLACE "+" ";" input_gui_xmls "${input_gui_xmls}")
|
|
||||||
+string(REPLACE "_s" ";" input_xmls "${input_xmls}")
|
|
||||||
+string(REPLACE "_u" "_" input_xmls "${input_xmls}")
|
|
||||||
+string(REPLACE "_s" ";" input_gui_xmls "${input_gui_xmls}")
|
|
||||||
+string(REPLACE "_u" "_" input_gui_xmls "${input_gui_xmls}")
|
|
||||||
|
|
||||||
set (xslt_xml)
|
|
||||||
|
|
||||||
1
etc/patches/paraview-5.5.1
Symbolic link
1
etc/patches/paraview-5.5.1
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
paraview-5.5.2
|
||||||
780
etc/patches/paraview-5.5.2
Normal file
780
etc/patches/paraview-5.5.2
Normal file
@ -0,0 +1,780 @@
|
|||||||
|
--- ParaView-git/CMake/ParaViewMacros.cmake.orig 2018-07-22 17:38:33.933614131 +0200
|
||||||
|
+++ ParaView-git/CMake/ParaViewMacros.cmake 2018-07-22 17:42:12.457612519 +0200
|
||||||
|
@@ -353,8 +353,9 @@
|
||||||
|
set(qt_binary_dir_hints "${Qt5_DIR}/../../../bin")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
+ # The qhelpgenerator program may be installed as qhelpgenerator-qt5
|
||||||
|
find_program(QT_HELP_GENERATOR
|
||||||
|
- qhelpgenerator
|
||||||
|
+ NAMES qhelpgenerator qhelpgenerator-qt5
|
||||||
|
HINTS "${qt_binary_dir_hints}"
|
||||||
|
DOC "qhelpgenerator used to compile Qt help project files")
|
||||||
|
mark_as_advanced(QT_HELP_GENERATOR)
|
||||||
|
--- ParaView-v5.5.2/VTK/ThirdParty/hdf5/vtkhdf5/src/H5detect.c.orig 2018-06-15 21:09:45.000000000 +0200
|
||||||
|
+++ ParaView-v5.5.2/VTK/ThirdParty/hdf5/vtkhdf5/src/H5detect.c 2018-07-07 13:20:40.641815285 +0200
|
||||||
|
@@ -1360,8 +1360,8 @@
|
||||||
|
*
|
||||||
|
*-------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
-static void
|
||||||
|
-detect_C89_integers(void) HDF_NO_UBSAN
|
||||||
|
+static void HDF_NO_UBSAN
|
||||||
|
+detect_C89_integers(void)
|
||||||
|
{
|
||||||
|
DETECT_BYTE(signed char, SCHAR, d_g[nd_g]); nd_g++;
|
||||||
|
DETECT_BYTE(unsigned char, UCHAR, d_g[nd_g]); nd_g++;
|
||||||
|
@@ -1388,8 +1388,8 @@
|
||||||
|
*
|
||||||
|
*-------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
-static void
|
||||||
|
-detect_C89_floats(void) HDF_NO_UBSAN
|
||||||
|
+static void HDF_NO_UBSAN
|
||||||
|
+detect_C89_floats(void)
|
||||||
|
{
|
||||||
|
DETECT_F(float, FLOAT, d_g[nd_g]); nd_g++;
|
||||||
|
DETECT_F(double, DOUBLE, d_g[nd_g]); nd_g++;
|
||||||
|
@@ -1410,8 +1410,8 @@
|
||||||
|
*
|
||||||
|
*-------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
-static void
|
||||||
|
-detect_C99_integers8(void) HDF_NO_UBSAN
|
||||||
|
+static void HDF_NO_UBSAN
|
||||||
|
+detect_C99_integers8(void)
|
||||||
|
{
|
||||||
|
#if H5_SIZEOF_INT8_T>0
|
||||||
|
#if H5_SIZEOF_INT8_T==1
|
||||||
|
@@ -1472,8 +1472,8 @@
|
||||||
|
*
|
||||||
|
*-------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
-static void
|
||||||
|
-detect_C99_integers16(void) HDF_NO_UBSAN
|
||||||
|
+static void HDF_NO_UBSAN
|
||||||
|
+detect_C99_integers16(void)
|
||||||
|
{
|
||||||
|
#if H5_SIZEOF_INT16_T>0
|
||||||
|
DETECT_I(int16_t, INT16, d_g[nd_g]); nd_g++;
|
||||||
|
@@ -1510,8 +1510,8 @@
|
||||||
|
*
|
||||||
|
*-------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
-static void
|
||||||
|
-detect_C99_integers32(void) HDF_NO_UBSAN
|
||||||
|
+static void HDF_NO_UBSAN
|
||||||
|
+detect_C99_integers32(void)
|
||||||
|
{
|
||||||
|
#if H5_SIZEOF_INT32_T>0
|
||||||
|
DETECT_I(int32_t, INT32, d_g[nd_g]); nd_g++;
|
||||||
|
@@ -1548,8 +1548,8 @@
|
||||||
|
*
|
||||||
|
*-------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
-static void
|
||||||
|
-detect_C99_integers64(void) HDF_NO_UBSAN
|
||||||
|
+static void HDF_NO_UBSAN
|
||||||
|
+detect_C99_integers64(void)
|
||||||
|
{
|
||||||
|
#if H5_SIZEOF_INT64_T>0
|
||||||
|
DETECT_I(int64_t, INT64, d_g[nd_g]); nd_g++;
|
||||||
|
@@ -1599,8 +1599,8 @@
|
||||||
|
*
|
||||||
|
*-------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
-static void
|
||||||
|
-detect_C99_integers(void) HDF_NO_UBSAN
|
||||||
|
+static void HDF_NO_UBSAN
|
||||||
|
+detect_C99_integers(void)
|
||||||
|
{
|
||||||
|
/* break it down to more subroutines so that each module subroutine */
|
||||||
|
/* is smaller and takes less time to compile with optimization on. */
|
||||||
|
@@ -1625,8 +1625,8 @@
|
||||||
|
*
|
||||||
|
*-------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
-static void
|
||||||
|
-detect_C99_floats(void) HDF_NO_UBSAN
|
||||||
|
+static void HDF_NO_UBSAN
|
||||||
|
+detect_C99_floats(void)
|
||||||
|
{
|
||||||
|
#if H5_SIZEOF_DOUBLE == H5_SIZEOF_LONG_DOUBLE
|
||||||
|
/*
|
||||||
|
@@ -1656,8 +1656,8 @@
|
||||||
|
*
|
||||||
|
*-------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
-static void
|
||||||
|
-detect_alignments(void) HDF_NO_UBSAN
|
||||||
|
+static void HDF_NO_UBSAN
|
||||||
|
+detect_alignments(void)
|
||||||
|
{
|
||||||
|
/* Detect structure alignment for pointers, hvl_t, hobj_ref_t, hdset_reg_ref_t */
|
||||||
|
DETECT_M(void *, POINTER, m_g[na_g]); na_g++;
|
||||||
|
@@ -1744,8 +1744,8 @@
|
||||||
|
*
|
||||||
|
*-------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
-int
|
||||||
|
-main(void) HDF_NO_UBSAN
|
||||||
|
+int HDF_NO_UBSAN
|
||||||
|
+main(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
#if defined(H5_HAVE_SETSYSINFO) && defined(SSI_NVPAIRS)
|
||||||
|
--- ParaView-v5.5.0/VTK/ThirdParty/vtkm/vtk-m/CMake/VTKmDetermineVersion.cmake.orig 2018-04-06 22:03:33.000000000 +0200
|
||||||
|
+++ ParaView-v5.5.0/VTK/ThirdParty/vtkm/vtk-m/CMake/VTKmDetermineVersion.cmake 2018-04-23 12:00:23.708544206 +0200
|
||||||
|
@@ -51,6 +51,8 @@
|
||||||
|
ERROR_QUIET
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
ERROR_STRIP_TRAILING_WHITESPACE)
|
||||||
|
+ else()
|
||||||
|
+ set(output)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
set(result 0)
|
||||||
|
@@ -75,7 +77,7 @@
|
||||||
|
|
||||||
|
# Extracts components from a version string. See determine_version() for usage.
|
||||||
|
function(extract_version_components version_string var_prefix)
|
||||||
|
- string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)[-]*(.*)"
|
||||||
|
+ string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)[-]*(.*)$"
|
||||||
|
version_matches "${version_string}")
|
||||||
|
if(CMAKE_MATCH_0)
|
||||||
|
set(full ${CMAKE_MATCH_0})
|
||||||
|
--- ParaView-v5.5.0/CoProcessing/Catalyst/vtkCPProcessor.cxx.orig 2018-04-06 22:03:33.000000000 +0200
|
||||||
|
+++ ParaView-v5.5.0/CoProcessing/Catalyst/vtkCPProcessor.cxx 2018-05-11 12:02:26.894772713 +0200
|
||||||
|
@@ -38,6 +38,7 @@
|
||||||
|
#include "vtkStringArray.h"
|
||||||
|
|
||||||
|
#include <list>
|
||||||
|
+#include <vtksys/SystemTools.hxx>
|
||||||
|
|
||||||
|
struct vtkCPProcessorInternals
|
||||||
|
{
|
||||||
|
@@ -47,12 +48,13 @@
|
||||||
|
};
|
||||||
|
|
||||||
|
vtkStandardNewMacro(vtkCPProcessor);
|
||||||
|
-vtkMultiProcessController* vtkCPProcessor::Controller = NULL;
|
||||||
|
+vtkMultiProcessController* vtkCPProcessor::Controller = nullptr;
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
vtkCPProcessor::vtkCPProcessor()
|
||||||
|
{
|
||||||
|
this->Internal = new vtkCPProcessorInternals;
|
||||||
|
- this->InitializationHelper = NULL;
|
||||||
|
+ this->InitializationHelper = nullptr;
|
||||||
|
+ this->WorkingDirectory = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
@@ -61,14 +63,15 @@
|
||||||
|
if (this->Internal)
|
||||||
|
{
|
||||||
|
delete this->Internal;
|
||||||
|
- this->Internal = NULL;
|
||||||
|
+ this->Internal = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this->InitializationHelper)
|
||||||
|
{
|
||||||
|
this->InitializationHelper->Delete();
|
||||||
|
- this->InitializationHelper = NULL;
|
||||||
|
+ this->InitializationHelper = nullptr;
|
||||||
|
}
|
||||||
|
+ this->SetWorkingDirectory(nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
@@ -95,7 +98,7 @@
|
||||||
|
{
|
||||||
|
if (which < 0 || which >= this->GetNumberOfPipelines())
|
||||||
|
{
|
||||||
|
- return NULL;
|
||||||
|
+ return nullptr;
|
||||||
|
}
|
||||||
|
int counter = 0;
|
||||||
|
vtkCPProcessorInternals::PipelineListIterator iter = this->Internal->Pipelines.begin();
|
||||||
|
@@ -108,7 +111,7 @@
|
||||||
|
counter++;
|
||||||
|
iter++;
|
||||||
|
}
|
||||||
|
- return NULL;
|
||||||
|
+ return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
@@ -130,17 +133,41 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
-int vtkCPProcessor::Initialize()
|
||||||
|
+int vtkCPProcessor::Initialize(const char* workingDirectory)
|
||||||
|
{
|
||||||
|
- if (this->InitializationHelper == NULL)
|
||||||
|
+ if (this->InitializationHelper == nullptr)
|
||||||
|
{
|
||||||
|
this->InitializationHelper = this->NewInitializationHelper();
|
||||||
|
}
|
||||||
|
+ // make sure the directory exists here so that we only do it once
|
||||||
|
+ if (workingDirectory)
|
||||||
|
+ {
|
||||||
|
+ vtkMultiProcessController* controller = vtkMultiProcessController::GetGlobalController();
|
||||||
|
+ int success = 1;
|
||||||
|
+ if (controller == nullptr || controller->GetLocalProcessId() == 0)
|
||||||
|
+ {
|
||||||
|
+ success = vtksys::SystemTools::MakeDirectory(workingDirectory) == true ? 1 : 0;
|
||||||
|
+ if (success == 0)
|
||||||
|
+ {
|
||||||
|
+ vtkWarningMacro("Could not make "
|
||||||
|
+ << workingDirectory << " directory. "
|
||||||
|
+ << "Results will be generated in current working directory instead.");
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ if (controller)
|
||||||
|
+ {
|
||||||
|
+ controller->Broadcast(&success, 1, 0);
|
||||||
|
+ }
|
||||||
|
+ if (success)
|
||||||
|
+ {
|
||||||
|
+ this->SetWorkingDirectory(workingDirectory);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
-int vtkCPProcessor::Initialize(vtkMPICommunicatorOpaqueComm& comm)
|
||||||
|
+int vtkCPProcessor::Initialize(vtkMPICommunicatorOpaqueComm& comm, const char* workingDirectory)
|
||||||
|
{
|
||||||
|
#ifdef PARAVIEW_USE_MPI
|
||||||
|
if (vtkCPProcessor::Controller)
|
||||||
|
@@ -148,7 +175,7 @@
|
||||||
|
vtkErrorMacro("Can only initialize with a communicator once per process.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
- if (this->InitializationHelper == NULL)
|
||||||
|
+ if (this->InitializationHelper == nullptr)
|
||||||
|
{
|
||||||
|
vtkMPICommunicator* communicator = vtkMPICommunicator::New();
|
||||||
|
communicator->InitializeExternal(&comm);
|
||||||
|
@@ -157,12 +184,12 @@
|
||||||
|
this->Controller = controller;
|
||||||
|
this->Controller->SetGlobalController(controller);
|
||||||
|
communicator->Delete();
|
||||||
|
- return this->Initialize();
|
||||||
|
+ return this->Initialize(workingDirectory);
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
#else
|
||||||
|
static_cast<void>(&comm); // get rid of variable not used warning
|
||||||
|
- return this->Initialize();
|
||||||
|
+ return this->Initialize(workingDirectory);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -225,6 +252,13 @@
|
||||||
|
input->GetFieldData()->AddArray(catalystChannel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ std::string originalWorkingDirectory;
|
||||||
|
+ if (this->WorkingDirectory)
|
||||||
|
+ {
|
||||||
|
+ originalWorkingDirectory = vtksys::SystemTools::GetCurrentWorkingDirectory();
|
||||||
|
+ vtksys::SystemTools::ChangeDirectory(this->WorkingDirectory);
|
||||||
|
+ }
|
||||||
|
for (vtkCPProcessorInternals::PipelineListIterator iter = this->Internal->Pipelines.begin();
|
||||||
|
iter != this->Internal->Pipelines.end(); iter++)
|
||||||
|
{
|
||||||
|
@@ -248,6 +282,10 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+ if (originalWorkingDirectory.empty() == false)
|
||||||
|
+ {
|
||||||
|
+ vtksys::SystemTools::ChangeDirectory(originalWorkingDirectory);
|
||||||
|
+ }
|
||||||
|
// we want to reset everything here to make sure that new information
|
||||||
|
// is properly passed in the next time.
|
||||||
|
dataDescription->ResetAll();
|
||||||
|
@@ -259,7 +297,7 @@
|
||||||
|
{
|
||||||
|
if (this->Controller)
|
||||||
|
{
|
||||||
|
- this->Controller->SetGlobalController(NULL);
|
||||||
|
+ this->Controller->SetGlobalController(nullptr);
|
||||||
|
this->Controller->Finalize(1);
|
||||||
|
this->Controller->Delete();
|
||||||
|
}
|
||||||
|
--- ParaView-v5.5.0/CoProcessing/Catalyst/vtkCPProcessor.h.orig 2018-04-06 22:03:33.000000000 +0200
|
||||||
|
+++ ParaView-v5.5.0/CoProcessing/Catalyst/vtkCPProcessor.h 2018-05-11 12:02:26.894772713 +0200
|
||||||
|
@@ -76,14 +76,16 @@
|
||||||
|
virtual void RemoveAllPipelines();
|
||||||
|
|
||||||
|
/// Initialize the co-processor. Returns 1 if successful and 0
|
||||||
|
- /// otherwise.
|
||||||
|
/// otherwise. If Catalyst is built with MPI then Initialize()
|
||||||
|
/// can also be called with a specific MPI communicator if
|
||||||
|
/// MPI_COMM_WORLD isn't the proper one. Catalyst is initialized
|
||||||
|
- /// to use MPI_COMM_WORLD by default.
|
||||||
|
- virtual int Initialize();
|
||||||
|
+ /// to use MPI_COMM_WORLD by default. Both methods have an optional
|
||||||
|
+ /// workingDirectory argument which will set *WorkingDirectory* so
|
||||||
|
+ /// that files will be put relative to this directory.
|
||||||
|
+ virtual int Initialize(const char* workingDirectory = nullptr);
|
||||||
|
#ifndef __WRAP__
|
||||||
|
- virtual int Initialize(vtkMPICommunicatorOpaqueComm& comm);
|
||||||
|
+ virtual int Initialize(
|
||||||
|
+ vtkMPICommunicatorOpaqueComm& comm, const char* workingDirectory = nullptr);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/// The Catalyst input field data string array name. This array will
|
||||||
|
@@ -111,6 +113,13 @@
|
||||||
|
/// implementation an opportunity to clean up, before it is destroyed.
|
||||||
|
virtual int Finalize();
|
||||||
|
|
||||||
|
+ /// Get the current working directory for outputting Catalyst files.
|
||||||
|
+ /// If not set then Catalyst output files will be relative to the
|
||||||
|
+ /// current working directory. This will not affect where Catalyst
|
||||||
|
+ /// looks for Python scripts. *WorkingDirectory* gets set through
|
||||||
|
+ /// the *Initialize()* methods.
|
||||||
|
+ vtkGetStringMacro(WorkingDirectory);
|
||||||
|
+
|
||||||
|
protected:
|
||||||
|
vtkCPProcessor();
|
||||||
|
virtual ~vtkCPProcessor();
|
||||||
|
@@ -118,6 +127,11 @@
|
||||||
|
/// Create a new instance of the InitializationHelper.
|
||||||
|
virtual vtkObject* NewInitializationHelper();
|
||||||
|
|
||||||
|
+ /// Set the current working directory for outputting Catalyst files.
|
||||||
|
+ /// This is a protected method since simulation code adaptors should
|
||||||
|
+ /// set this through the *Initialize()* methods.
|
||||||
|
+ vtkSetStringMacro(WorkingDirectory);
|
||||||
|
+
|
||||||
|
private:
|
||||||
|
vtkCPProcessor(const vtkCPProcessor&) = delete;
|
||||||
|
void operator=(const vtkCPProcessor&) = delete;
|
||||||
|
@@ -125,6 +139,7 @@
|
||||||
|
vtkCPProcessorInternals* Internal;
|
||||||
|
vtkObject* InitializationHelper;
|
||||||
|
static vtkMultiProcessController* Controller;
|
||||||
|
+ char* WorkingDirectory;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
--- ParaView-v5.5.0/CoProcessing/Catalyst/vtkCPXMLPWriterPipeline.cxx.orig 2018-04-06 22:03:33.000000000 +0200
|
||||||
|
+++ ParaView-v5.5.0/CoProcessing/Catalyst/vtkCPXMLPWriterPipeline.cxx 2018-05-11 12:02:26.894772713 +0200
|
||||||
|
@@ -31,6 +31,7 @@
|
||||||
|
#include <vtkSmartPointer.h>
|
||||||
|
#include <vtkUnstructuredGrid.h>
|
||||||
|
|
||||||
|
+#include <algorithm>
|
||||||
|
#include <sstream>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
@@ -174,7 +175,7 @@
|
||||||
|
|
||||||
|
for (unsigned int i = 0; i < dataDescription->GetNumberOfInputDescriptions(); i++)
|
||||||
|
{
|
||||||
|
- const char* inputName = dataDescription->GetInputDescriptionName(i);
|
||||||
|
+ std::string inputName = dataDescription->GetInputDescriptionName(i);
|
||||||
|
vtkCPInputDataDescription* idd = dataDescription->GetInputDescription(i);
|
||||||
|
vtkDataObject* grid = idd->GetGrid();
|
||||||
|
if (grid == nullptr)
|
||||||
|
@@ -206,6 +207,8 @@
|
||||||
|
vtkSMStringVectorProperty* fileName =
|
||||||
|
vtkSMStringVectorProperty::SafeDownCast(writer->GetProperty("FileName"));
|
||||||
|
|
||||||
|
+ // If we have a / in the channel name we take it out of the filename we're going to write to
|
||||||
|
+ inputName.erase(std::remove(inputName.begin(), inputName.end(), '/'), inputName.end());
|
||||||
|
std::ostringstream o;
|
||||||
|
if (this->Path.empty() == false)
|
||||||
|
{
|
||||||
|
--- ParaView-v5.5.0/Wrapping/Python/paraview/coprocessing.py.orig 2018-04-06 22:03:33.000000000 +0200
|
||||||
|
+++ ParaView-v5.5.0/Wrapping/Python/paraview/coprocessing.py 2018-05-11 12:02:27.038772408 +0200
|
||||||
|
@@ -11,22 +11,12 @@
|
||||||
|
from paraview.vtk.vtkPVVTKExtensionsCore import *
|
||||||
|
import math
|
||||||
|
|
||||||
|
-# -----------------------------------------------------------------------------
|
||||||
|
-def IsInModulo(timestep, frequencyArray):
|
||||||
|
- """
|
||||||
|
- Return True if the given timestep is in one of the provided frequency.
|
||||||
|
- This can be interpreted as follow::
|
||||||
|
-
|
||||||
|
- isFM = IsInModulo(timestep, [2,3,7])
|
||||||
|
-
|
||||||
|
- is similar to::
|
||||||
|
+# If the user created a filename in a location that doesn't exist by default we'll
|
||||||
|
+# make the directory for them. This can be changed though by setting createDirectoriesIfNeeded
|
||||||
|
+# to False.
|
||||||
|
+createDirectoriesIfNeeded = True
|
||||||
|
|
||||||
|
- isFM = (timestep % 2 == 0) or (timestep % 3 == 0) or (timestep % 7 == 0)
|
||||||
|
- """
|
||||||
|
- for frequency in frequencyArray:
|
||||||
|
- if frequency > 0 and (timestep % frequency == 0):
|
||||||
|
- return True
|
||||||
|
- return False
|
||||||
|
+# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class CoProcessor(object):
|
||||||
|
"""Base class for co-processing Pipelines.
|
||||||
|
@@ -68,6 +58,9 @@
|
||||||
|
self.__CinemaTracks = {}
|
||||||
|
self.__InitialFrequencies = {}
|
||||||
|
self.__PrintEnsightFormatString = False
|
||||||
|
+ self.__TimeStepToStartOutputAt=0
|
||||||
|
+ self.__ForceOutputAtFirstCall=False
|
||||||
|
+ self.__FirstTimeStepIndex = None
|
||||||
|
|
||||||
|
def SetPrintEnsightFormatString(self, enable):
|
||||||
|
"""If outputting ExodusII files with the purpose of reading them into
|
||||||
|
@@ -87,6 +80,17 @@
|
||||||
|
"Incorrect argument type: %s, must be a dict" % type(frequencies))
|
||||||
|
self.__InitialFrequencies = frequencies
|
||||||
|
|
||||||
|
+ def SetInitialOutputOptions(self, timeStepToStartOutputAt, forceOutputAtFirstCall):
|
||||||
|
+ """Set the frequencies at which the pipeline needs to be updated.
|
||||||
|
+ Typically, this is called by the subclass once it has determined what
|
||||||
|
+ timesteps co-processing will be needed to be done.
|
||||||
|
+ frequencies is a map, with key->string name of for the simulation
|
||||||
|
+ input, and value is a list of frequencies.
|
||||||
|
+ """
|
||||||
|
+
|
||||||
|
+ self.__TimeStepToStartOutputAt=timeStepToStartOutputAt
|
||||||
|
+ self.__ForceOutputAtFirstCall=forceOutputAtFirstCall
|
||||||
|
+
|
||||||
|
def EnableLiveVisualization(self, enable, frequency = 1):
|
||||||
|
"""Call this method to enable live-visualization. When enabled,
|
||||||
|
DoLiveVisualization() will communicate with ParaView server if possible
|
||||||
|
@@ -115,7 +119,7 @@
|
||||||
|
# if this is a time step to do live then all of the inputs
|
||||||
|
# must be made available. note that we want the pipeline built
|
||||||
|
# before we do the actual first live connection.
|
||||||
|
- if self.__EnableLiveVisualization and timestep % self.__LiveVisualizationFrequency == 0 \
|
||||||
|
+ if self.__EnableLiveVisualization and self.NeedToOutput(timestep, self.__LiveVisualizationFrequency) \
|
||||||
|
and self.__LiveVisualizationLink:
|
||||||
|
if self.__LiveVisualizationLink.Initialize(servermanager.ActiveConnection.Session.GetSessionProxyManager()):
|
||||||
|
num_inputs = datadescription.GetNumberOfInputDescriptions()
|
||||||
|
@@ -132,13 +136,13 @@
|
||||||
|
# hasn't been set up yet). If we don't have live enabled
|
||||||
|
# we know that the output frequencies aren't changed and can
|
||||||
|
# just use the initial frequencies.
|
||||||
|
- if self.__InitialFrequencies or not self.__EnableLiveVisualization:
|
||||||
|
+ if self.__ForceOutputAtFirstCall or self.__InitialFrequencies or not self.__EnableLiveVisualization:
|
||||||
|
num_inputs = datadescription.GetNumberOfInputDescriptions()
|
||||||
|
for cc in range(num_inputs):
|
||||||
|
input_name = datadescription.GetInputDescriptionName(cc)
|
||||||
|
|
||||||
|
freqs = self.__InitialFrequencies.get(input_name, [])
|
||||||
|
- if self.__EnableLiveVisualization or ( self and IsInModulo(timestep, freqs) ):
|
||||||
|
+ if self.__EnableLiveVisualization or ( self and self.IsInModulo(timestep, freqs) ):
|
||||||
|
datadescription.GetInputDescription(cc).AllFieldsOn()
|
||||||
|
datadescription.GetInputDescription(cc).GenerateMeshOn()
|
||||||
|
else:
|
||||||
|
@@ -149,15 +153,14 @@
|
||||||
|
for writer in self.__WritersList:
|
||||||
|
frequency = writer.parameters.GetProperty(
|
||||||
|
"WriteFrequency").GetElement(0)
|
||||||
|
- if (timestep % frequency) == 0 or \
|
||||||
|
- datadescription.GetForceOutput() == True:
|
||||||
|
+ if self.NeedToOutput(timestep, frequency) or datadescription.GetForceOutput() == True:
|
||||||
|
writerinputs = cpstate.locate_simulation_inputs(writer)
|
||||||
|
for writerinput in writerinputs:
|
||||||
|
datadescription.GetInputDescriptionByName(writerinput).AllFieldsOn()
|
||||||
|
datadescription.GetInputDescriptionByName(writerinput).GenerateMeshOn()
|
||||||
|
|
||||||
|
for view in self.__ViewsList:
|
||||||
|
- if (view.cpFrequency and timestep % view.cpFrequency == 0) or \
|
||||||
|
+ if (view.cpFrequency and self.NeedToOutput(timestep, view.cpFrequency)) or \
|
||||||
|
datadescription.GetForceOutput() == True:
|
||||||
|
viewinputs = cpstate.locate_simulation_inputs_for_view(view)
|
||||||
|
for viewinput in viewinputs:
|
||||||
|
@@ -192,8 +195,7 @@
|
||||||
|
for writer in self.__WritersList:
|
||||||
|
frequency = writer.parameters.GetProperty(
|
||||||
|
"WriteFrequency").GetElement(0)
|
||||||
|
- if (timestep % frequency) == 0 or \
|
||||||
|
- datadescription.GetForceOutput() == True:
|
||||||
|
+ if self.NeedToOutput(timestep, frequency) or datadescription.GetForceOutput() == True:
|
||||||
|
fileName = writer.parameters.GetProperty("FileName").GetElement(0)
|
||||||
|
paddingamount = writer.parameters.GetProperty("PaddingAmount").GetElement(0)
|
||||||
|
helperName = writer.GetXMLName()
|
||||||
|
@@ -203,6 +205,23 @@
|
||||||
|
else:
|
||||||
|
ts = str(timestep).rjust(paddingamount, '0')
|
||||||
|
writer.FileName = fileName.replace("%t", ts)
|
||||||
|
+ if '/' in writer.FileName and createDirectoriesIfNeeded:
|
||||||
|
+ oktowrite = [1.]
|
||||||
|
+ import vtk
|
||||||
|
+ comm = vtk.vtkMultiProcessController.GetGlobalController()
|
||||||
|
+ if comm.GetLocalProcessId() == 0:
|
||||||
|
+ import os
|
||||||
|
+ newDir = writer.FileName[0:writer.FileName.rfind('/')]
|
||||||
|
+ try:
|
||||||
|
+ os.makedirs(newDir)
|
||||||
|
+ except OSError:
|
||||||
|
+ if not os.path.isdir(newDir):
|
||||||
|
+ print ("ERROR: Cannot make directory for", writer.FileName, ". No data will be written.")
|
||||||
|
+ oktowrite[0] = 0.
|
||||||
|
+ comm.Broadcast(oktowrite, 1, 0)
|
||||||
|
+ if oktowrite[0] == 0:
|
||||||
|
+ # we can't make the directory so no reason to update the pipeline
|
||||||
|
+ return
|
||||||
|
writer.UpdatePipeline(datadescription.GetTime())
|
||||||
|
|
||||||
|
def WriteImages(self, datadescription, rescale_lookuptable=False,
|
||||||
|
@@ -240,7 +259,7 @@
|
||||||
|
|
||||||
|
cinema_dirs = []
|
||||||
|
for view in self.__ViewsList:
|
||||||
|
- if (view.cpFrequency and timestep % view.cpFrequency == 0) or \
|
||||||
|
+ if (view.cpFrequency and self.NeedToOutput(timestep, view.cpFrequency)) or \
|
||||||
|
datadescription.GetForceOutput() == True:
|
||||||
|
fname = view.cpFileName
|
||||||
|
ts = str(timestep).rjust(padding_amount, '0')
|
||||||
|
@@ -267,6 +286,24 @@
|
||||||
|
if dirname:
|
||||||
|
cinema_dirs.append(dirname)
|
||||||
|
else:
|
||||||
|
+ if '/' in fname and createDirectoriesIfNeeded:
|
||||||
|
+ oktowrite = [1.]
|
||||||
|
+ import vtk
|
||||||
|
+ comm = vtk.vtkMultiProcessController.GetGlobalController()
|
||||||
|
+ if comm.GetLocalProcessId() == 0:
|
||||||
|
+ import os
|
||||||
|
+ newDir = fname[0:fname.rfind('/')]
|
||||||
|
+ try:
|
||||||
|
+ os.makedirs(newDir)
|
||||||
|
+ except OSError:
|
||||||
|
+ if not os.path.isdir(newDir):
|
||||||
|
+ print ("ERROR: Cannot make directory for", fname, ". No image will be output.")
|
||||||
|
+ oktowrite[0] = 0.
|
||||||
|
+ comm.Broadcast(oktowrite, 1, 0)
|
||||||
|
+ if oktowrite[0] == 0:
|
||||||
|
+ # we can't make the directory so no reason to update the pipeline
|
||||||
|
+ return
|
||||||
|
+
|
||||||
|
if image_quality is None and fname.endswith('png'):
|
||||||
|
# for png quality = 0 means no compression. compression can be a potentially
|
||||||
|
# very costly serial operation on process 0
|
||||||
|
@@ -307,7 +344,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
timeStep = datadescription.GetTimeStep()
|
||||||
|
- if self.__EnableLiveVisualization and timeStep % self.__LiveVisualizationFrequency == 0:
|
||||||
|
+ if self.__EnableLiveVisualization and self.NeedToOutput(timeStep, self.__LiveVisualizationFrequency):
|
||||||
|
if not self.__LiveVisualizationLink.Initialize(servermanager.ActiveConnection.Session.GetSessionProxyManager()):
|
||||||
|
return
|
||||||
|
|
||||||
|
@@ -412,7 +449,7 @@
|
||||||
|
"""
|
||||||
|
controller = servermanager.ParaViewPipelineController()
|
||||||
|
# assume that a client only proxy with the same name as a writer
|
||||||
|
- # is available in "insitu_writer_paramters"
|
||||||
|
+ # is available in "insitu_writer_parameters"
|
||||||
|
|
||||||
|
# Since coprocessor sometimes pass writer as a custom object and not
|
||||||
|
# a proxy, we need to handle that. Just creating any arbitrary writer
|
||||||
|
@@ -666,3 +703,42 @@
|
||||||
|
#restore what we showed
|
||||||
|
pv_introspect.restore_visibility(pxystate)
|
||||||
|
return os.path.basename(vfname)
|
||||||
|
+
|
||||||
|
+ def IsInModulo(self, timestep, frequencies):
|
||||||
|
+ """
|
||||||
|
+ Return True if the given timestep is in one of the provided frequency.
|
||||||
|
+ This can be interpreted as follow::
|
||||||
|
+
|
||||||
|
+ isFM = IsInModulo(timestep-timeStepToStartOutputAt, [2,3,7])
|
||||||
|
+
|
||||||
|
+ is similar to::
|
||||||
|
+
|
||||||
|
+ isFM = (timestep-timeStepToStartOutputAt % 2 == 0) or (timestep-timeStepToStartOutputAt % 3 == 0) or (timestep-timeStepToStartOutputAt % 7 == 0)
|
||||||
|
+
|
||||||
|
+ The timeStepToStartOutputAt is the first timestep that will potentially be output.
|
||||||
|
+ """
|
||||||
|
+ if timestep < self.__TimeStepToStartOutputAt and not self.__ForceOutputAtFirstCall:
|
||||||
|
+ return False
|
||||||
|
+ for frequency in frequencies:
|
||||||
|
+ if frequency > 0 and self.NeedToOutput(timestep, frequency):
|
||||||
|
+ return True
|
||||||
|
+
|
||||||
|
+ return False
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+ def NeedToOutput(self, timestep, frequency):
|
||||||
|
+ """
|
||||||
|
+ Return True if we need to output based on the input timestep and frequency. Checks based
|
||||||
|
+ __FirstTimeStepIndex, __FirstTimeStepIndex, __ForceOutputAtFirstCall and __TimeStepToStartOutputAt
|
||||||
|
+ member variables.
|
||||||
|
+ """
|
||||||
|
+ if self.__FirstTimeStepIndex == None:
|
||||||
|
+ self.__FirstTimeStepIndex = timestep
|
||||||
|
+
|
||||||
|
+ if self.__ForceOutputAtFirstCall and self.__FirstTimeStepIndex == timestep:
|
||||||
|
+ return True
|
||||||
|
+
|
||||||
|
+ if self.__TimeStepToStartOutputAt <= timestep and (timestep-self.__TimeStepToStartOutputAt) % frequency == 0:
|
||||||
|
+ return True
|
||||||
|
+
|
||||||
|
+ return False
|
||||||
|
--- ParaView-v5.5.1/ParaViewCore/ServerManager/SMApplication/Resources/readers.xml.orig 2018-06-01 21:23:15.000000000 +0200
|
||||||
|
+++ ParaView-v5.5.1/ParaViewCore/ServerManager/SMApplication/Resources/readers.xml 2018-06-19 20:50:55.128914062 +0200
|
||||||
|
@@ -3769,7 +3769,7 @@
|
||||||
|
<Documentation>Available timestep values.</Documentation>
|
||||||
|
</DoubleVectorProperty>
|
||||||
|
<Hints>
|
||||||
|
- <ReaderFactory extensions="vtm vtmb"
|
||||||
|
+ <ReaderFactory extensions="vtm vtm.series vtmb vtmb.series"
|
||||||
|
file_description="VTK MultiBlock Data Files" />
|
||||||
|
</Hints>
|
||||||
|
<!-- end of XMLMultiBlockDataReader -->
|
||||||
|
@@ -3824,7 +3824,7 @@
|
||||||
|
<Documentation>Available timestep values.</Documentation>
|
||||||
|
</DoubleVectorProperty>
|
||||||
|
<Hints>
|
||||||
|
- <ReaderFactory extensions="vthb vth"
|
||||||
|
+ <ReaderFactory extensions="vthb vthb.series vth vth.series"
|
||||||
|
file_description="VTK Hierarchical Box Data Files" />
|
||||||
|
</Hints>
|
||||||
|
<!-- end of XMLUniformGridAMRReader -->
|
||||||
|
@@ -3933,7 +3933,7 @@
|
||||||
|
<Documentation>Available timestep values.</Documentation>
|
||||||
|
</DoubleVectorProperty>
|
||||||
|
<Hints>
|
||||||
|
- <ReaderFactory extensions="vtp"
|
||||||
|
+ <ReaderFactory extensions="vtp vtp.series"
|
||||||
|
file_description="VTK PolyData Files" />
|
||||||
|
</Hints>
|
||||||
|
</SourceProxy>
|
||||||
|
@@ -3990,7 +3990,7 @@
|
||||||
|
<Documentation>Available timestep values.</Documentation>
|
||||||
|
</DoubleVectorProperty>
|
||||||
|
<Hints>
|
||||||
|
- <ReaderFactory extensions="vtt"
|
||||||
|
+ <ReaderFactory extensions="vtt vtt.series"
|
||||||
|
file_description="VTK Table Files" />
|
||||||
|
</Hints>
|
||||||
|
</SourceProxy>
|
||||||
|
@@ -4050,7 +4050,7 @@
|
||||||
|
<Documentation>Available timestep values.</Documentation>
|
||||||
|
</DoubleVectorProperty>
|
||||||
|
<Hints>
|
||||||
|
- <ReaderFactory extensions="vtu"
|
||||||
|
+ <ReaderFactory extensions="vtu vtu.series"
|
||||||
|
file_description="VTK UnstructuredGrid Files" />
|
||||||
|
</Hints>
|
||||||
|
</SourceProxy>
|
||||||
|
@@ -4108,7 +4108,7 @@
|
||||||
|
<Documentation>Available timestep values.</Documentation>
|
||||||
|
</DoubleVectorProperty>
|
||||||
|
<Hints>
|
||||||
|
- <ReaderFactory extensions="vti"
|
||||||
|
+ <ReaderFactory extensions="vti vti.series"
|
||||||
|
file_description="VTK ImageData Files" />
|
||||||
|
</Hints>
|
||||||
|
</SourceProxy>
|
||||||
|
@@ -4166,7 +4166,7 @@
|
||||||
|
<Documentation>Available timestep values.</Documentation>
|
||||||
|
</DoubleVectorProperty>
|
||||||
|
<Hints>
|
||||||
|
- <ReaderFactory extensions="vts"
|
||||||
|
+ <ReaderFactory extensions="vts vts.series"
|
||||||
|
file_description="VTK StructuredGrid Files" />
|
||||||
|
</Hints>
|
||||||
|
</SourceProxy>
|
||||||
|
@@ -4224,7 +4224,7 @@
|
||||||
|
<Documentation>Available timestep values.</Documentation>
|
||||||
|
</DoubleVectorProperty>
|
||||||
|
<Hints>
|
||||||
|
- <ReaderFactory extensions="vtr"
|
||||||
|
+ <ReaderFactory extensions="vtr vtr.series"
|
||||||
|
file_description="VTK RectilinearGrid Files" />
|
||||||
|
</Hints>
|
||||||
|
</SourceProxy>
|
||||||
|
@@ -4284,7 +4284,7 @@
|
||||||
|
<Documentation>Available timestep values.</Documentation>
|
||||||
|
</DoubleVectorProperty>
|
||||||
|
<Hints>
|
||||||
|
- <ReaderFactory extensions="pvtp"
|
||||||
|
+ <ReaderFactory extensions="pvtp pvtp.series"
|
||||||
|
file_description="VTK PolyData Files (partitioned)" />
|
||||||
|
</Hints>
|
||||||
|
</SourceProxy>
|
||||||
|
@@ -4346,7 +4346,7 @@
|
||||||
|
<Documentation>Available timestep values.</Documentation>
|
||||||
|
</DoubleVectorProperty>
|
||||||
|
<Hints>
|
||||||
|
- <ReaderFactory extensions="pvtu"
|
||||||
|
+ <ReaderFactory extensions="pvtu pvtu.series"
|
||||||
|
file_description="VTK UnstructuredGrid Files (partitioned)" />
|
||||||
|
</Hints>
|
||||||
|
</SourceProxy>
|
||||||
|
@@ -4406,7 +4406,7 @@
|
||||||
|
<Documentation>Available timestep values.</Documentation>
|
||||||
|
</DoubleVectorProperty>
|
||||||
|
<Hints>
|
||||||
|
- <ReaderFactory extensions="pvtt"
|
||||||
|
+ <ReaderFactory extensions="pvtt pvtt.series"
|
||||||
|
file_description="VTK Table (partitioned)" />
|
||||||
|
</Hints>
|
||||||
|
</SourceProxy>
|
||||||
|
@@ -4467,7 +4467,7 @@
|
||||||
|
<Documentation>Available timestep values.</Documentation>
|
||||||
|
</DoubleVectorProperty>
|
||||||
|
<Hints>
|
||||||
|
- <ReaderFactory extensions="pvti"
|
||||||
|
+ <ReaderFactory extensions="pvti pvti.series"
|
||||||
|
file_description="VTK ImageData Files (partitioned)" />
|
||||||
|
</Hints>
|
||||||
|
</SourceProxy>
|
||||||
|
@@ -4529,7 +4529,7 @@
|
||||||
|
<Documentation>Available timestep values.</Documentation>
|
||||||
|
</DoubleVectorProperty>
|
||||||
|
<Hints>
|
||||||
|
- <ReaderFactory extensions="pvts"
|
||||||
|
+ <ReaderFactory extensions="pvts pvts.series"
|
||||||
|
file_description="VTK StructuredGrid Files (partitioned)" />
|
||||||
|
</Hints>
|
||||||
|
</SourceProxy>
|
||||||
|
@@ -4591,7 +4591,7 @@
|
||||||
|
<Documentation>Available timestep values.</Documentation>
|
||||||
|
</DoubleVectorProperty>
|
||||||
|
<Hints>
|
||||||
|
- <ReaderFactory extensions="pvtr"
|
||||||
|
+ <ReaderFactory extensions="pvtr pvtr.series"
|
||||||
|
file_description="VTK RectilinearGrid Files (partitioned)" />
|
||||||
|
</Hints>
|
||||||
|
</SourceProxy>
|
||||||
|
@@ -4702,7 +4702,7 @@
|
||||||
|
Partitioned Legacy VTK reader.</Documentation>
|
||||||
|
</StringVectorProperty>
|
||||||
|
<Hints>
|
||||||
|
- <ReaderFactory extensions="pvtk"
|
||||||
|
+ <ReaderFactory extensions="pvtk pvtk.series"
|
||||||
|
file_description="Legacy VTK Files (partitioned)" />
|
||||||
|
</Hints>
|
||||||
|
<!-- End pvtkfile -->
|
||||||
|
@@ -5102,7 +5102,7 @@
|
||||||
|
<Documentation>Available timestep values.</Documentation>
|
||||||
|
</DoubleVectorProperty>
|
||||||
|
<Hints>
|
||||||
|
- <ReaderFactory extensions="ply"
|
||||||
|
+ <ReaderFactory extensions="ply ply.series"
|
||||||
|
file_description="PLY Polygonal File Format" />
|
||||||
|
</Hints>
|
||||||
|
</SourceProxy>
|
||||||
|
@@ -5230,7 +5230,7 @@
|
||||||
|
<Documentation>Available timestep values.</Documentation>
|
||||||
|
</DoubleVectorProperty>
|
||||||
|
<Hints>
|
||||||
|
- <ReaderFactory extensions="stl"
|
||||||
|
+ <ReaderFactory extensions="stl stl.series"
|
||||||
|
file_description="Stereo Lithography" />
|
||||||
|
</Hints>
|
||||||
|
<!-- End stlreader-->
|
||||||
48
etc/patches/scotch-v7.0.1
Normal file
48
etc/patches/scotch-v7.0.1
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
--- scotch_6.0.6/src/libscotch/Makefile.orig 2019-04-29 14:59:53.957103493 +0200
|
||||||
|
+++ scotch_6.0.6/src/libscotch/Makefile 2019-04-29 18:50:42.560080675 +0200
|
||||||
|
@@ -51,6 +51,12 @@
|
||||||
|
|
||||||
|
.PHONY : ptscotch scotch ptinstall install clean realclean
|
||||||
|
|
||||||
|
+ifeq ($(WM_OSTYPE),MSwindows)
|
||||||
|
+
|
||||||
|
+libscotch : libscotch$(LIB) scotch.h
|
||||||
|
+
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
scotch :
|
||||||
|
$(MAKE) CC="$(CCS)" CCD="$(CCS)" \
|
||||||
|
scotch.h \
|
||||||
|
@@ -438,6 +444,11 @@
|
||||||
|
wgraph_part_zr$(OBJ) \
|
||||||
|
wgraph_store$(OBJ)
|
||||||
|
|
||||||
|
+ifeq ($(WM_OSTYPE),MSwindows)
|
||||||
|
+## Add into libscotch instead of having a separate library
|
||||||
|
+LIBSCOTCHDEPS += library_error_exit$(OBJ)
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
##
|
||||||
|
## Todo list.
|
||||||
|
##
|
||||||
|
--- scotch_6.0.6/src/Makefile.orig 2018-07-14 17:24:49.000000000 +0200
|
||||||
|
+++ scotch_6.0.6/src/Makefile 2019-04-29 18:39:16.365132864 +0200
|
||||||
|
@@ -89,9 +89,18 @@
|
||||||
|
$(mandir)/man1 : $(mandir)
|
||||||
|
-$(MKDIR) $(mandir)/man1
|
||||||
|
|
||||||
|
+ifeq ($(WM_OSTYPE),MSwindows)
|
||||||
|
+
|
||||||
|
+libscotch : required
|
||||||
|
+ (cd libscotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) libscotch && $(MAKE) install)
|
||||||
|
+
|
||||||
|
+else
|
||||||
|
+
|
||||||
|
libscotch : required
|
||||||
|
(cd libscotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install)
|
||||||
|
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
scotch : libscotch
|
||||||
|
(cd scotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install)
|
||||||
|
(cd libscotchmetis ; $(MAKE) scotch && $(MAKE) install)
|
||||||
48
etc/patches/scotch_6.0.6
Normal file
48
etc/patches/scotch_6.0.6
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
--- scotch_6.0.6/src/libscotch/Makefile.orig 2019-04-29 14:59:53.957103493 +0200
|
||||||
|
+++ scotch_6.0.6/src/libscotch/Makefile 2019-04-29 18:50:42.560080675 +0200
|
||||||
|
@@ -51,6 +51,12 @@
|
||||||
|
|
||||||
|
.PHONY : ptscotch scotch ptinstall install clean realclean
|
||||||
|
|
||||||
|
+ifeq ($(WM_OSTYPE),MSwindows)
|
||||||
|
+
|
||||||
|
+libscotch : libscotch$(LIB) scotch.h
|
||||||
|
+
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
scotch :
|
||||||
|
$(MAKE) CC="$(CCS)" CCD="$(CCS)" \
|
||||||
|
scotch.h \
|
||||||
|
@@ -438,6 +444,11 @@
|
||||||
|
wgraph_part_zr$(OBJ) \
|
||||||
|
wgraph_store$(OBJ)
|
||||||
|
|
||||||
|
+ifeq ($(WM_OSTYPE),MSwindows)
|
||||||
|
+## Add into libscotch instead of having a separate library
|
||||||
|
+LIBSCOTCHDEPS += library_error_exit$(OBJ)
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
##
|
||||||
|
## Todo list.
|
||||||
|
##
|
||||||
|
--- scotch_6.0.6/src/Makefile.orig 2018-07-14 17:24:49.000000000 +0200
|
||||||
|
+++ scotch_6.0.6/src/Makefile 2019-04-29 18:39:16.365132864 +0200
|
||||||
|
@@ -89,9 +89,18 @@
|
||||||
|
$(mandir)/man1 : $(mandir)
|
||||||
|
-$(MKDIR) $(mandir)/man1
|
||||||
|
|
||||||
|
+ifeq ($(WM_OSTYPE),MSwindows)
|
||||||
|
+
|
||||||
|
+libscotch : required
|
||||||
|
+ (cd libscotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) libscotch && $(MAKE) install)
|
||||||
|
+
|
||||||
|
+else
|
||||||
|
+
|
||||||
|
libscotch : required
|
||||||
|
(cd libscotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install)
|
||||||
|
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
scotch : libscotch
|
||||||
|
(cd scotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install)
|
||||||
|
(cd libscotchmetis ; $(MAKE) scotch && $(MAKE) install)
|
||||||
48
etc/patches/scotch_6.0.7
Normal file
48
etc/patches/scotch_6.0.7
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
--- scotch_6.0.6/src/libscotch/Makefile.orig 2019-04-29 14:59:53.957103493 +0200
|
||||||
|
+++ scotch_6.0.6/src/libscotch/Makefile 2019-04-29 18:50:42.560080675 +0200
|
||||||
|
@@ -51,6 +51,12 @@
|
||||||
|
|
||||||
|
.PHONY : ptscotch scotch ptinstall install clean realclean
|
||||||
|
|
||||||
|
+ifeq ($(WM_OSTYPE),MSwindows)
|
||||||
|
+
|
||||||
|
+libscotch : libscotch$(LIB) scotch.h
|
||||||
|
+
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
scotch :
|
||||||
|
$(MAKE) CC="$(CCS)" CCD="$(CCS)" \
|
||||||
|
scotch.h \
|
||||||
|
@@ -438,6 +444,11 @@
|
||||||
|
wgraph_part_zr$(OBJ) \
|
||||||
|
wgraph_store$(OBJ)
|
||||||
|
|
||||||
|
+ifeq ($(WM_OSTYPE),MSwindows)
|
||||||
|
+## Add into libscotch instead of having a separate library
|
||||||
|
+LIBSCOTCHDEPS += library_error_exit$(OBJ)
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
##
|
||||||
|
## Todo list.
|
||||||
|
##
|
||||||
|
--- scotch_6.0.6/src/Makefile.orig 2018-07-14 17:24:49.000000000 +0200
|
||||||
|
+++ scotch_6.0.6/src/Makefile 2019-04-29 18:39:16.365132864 +0200
|
||||||
|
@@ -89,9 +89,18 @@
|
||||||
|
$(mandir)/man1 : $(mandir)
|
||||||
|
-$(MKDIR) $(mandir)/man1
|
||||||
|
|
||||||
|
+ifeq ($(WM_OSTYPE),MSwindows)
|
||||||
|
+
|
||||||
|
+libscotch : required
|
||||||
|
+ (cd libscotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) libscotch && $(MAKE) install)
|
||||||
|
+
|
||||||
|
+else
|
||||||
|
+
|
||||||
|
libscotch : required
|
||||||
|
(cd libscotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install)
|
||||||
|
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
scotch : libscotch
|
||||||
|
(cd scotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install)
|
||||||
|
(cd libscotchmetis ; $(MAKE) scotch && $(MAKE) install)
|
||||||
48
etc/patches/scotch_6.0.8
Normal file
48
etc/patches/scotch_6.0.8
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
--- scotch_6.0.6/src/libscotch/Makefile.orig 2019-04-29 14:59:53.957103493 +0200
|
||||||
|
+++ scotch_6.0.6/src/libscotch/Makefile 2019-04-29 18:50:42.560080675 +0200
|
||||||
|
@@ -51,6 +51,12 @@
|
||||||
|
|
||||||
|
.PHONY : ptscotch scotch ptinstall install clean realclean
|
||||||
|
|
||||||
|
+ifeq ($(WM_OSTYPE),MSwindows)
|
||||||
|
+
|
||||||
|
+libscotch : libscotch$(LIB) scotch.h
|
||||||
|
+
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
scotch :
|
||||||
|
$(MAKE) CC="$(CCS)" CCD="$(CCS)" \
|
||||||
|
scotch.h \
|
||||||
|
@@ -438,6 +444,11 @@
|
||||||
|
wgraph_part_zr$(OBJ) \
|
||||||
|
wgraph_store$(OBJ)
|
||||||
|
|
||||||
|
+ifeq ($(WM_OSTYPE),MSwindows)
|
||||||
|
+## Add into libscotch instead of having a separate library
|
||||||
|
+LIBSCOTCHDEPS += library_error_exit$(OBJ)
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
##
|
||||||
|
## Todo list.
|
||||||
|
##
|
||||||
|
--- scotch_6.0.6/src/Makefile.orig 2018-07-14 17:24:49.000000000 +0200
|
||||||
|
+++ scotch_6.0.6/src/Makefile 2019-04-29 18:39:16.365132864 +0200
|
||||||
|
@@ -89,9 +89,18 @@
|
||||||
|
$(mandir)/man1 : $(mandir)
|
||||||
|
-$(MKDIR) $(mandir)/man1
|
||||||
|
|
||||||
|
+ifeq ($(WM_OSTYPE),MSwindows)
|
||||||
|
+
|
||||||
|
+libscotch : required
|
||||||
|
+ (cd libscotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) libscotch && $(MAKE) install)
|
||||||
|
+
|
||||||
|
+else
|
||||||
|
+
|
||||||
|
libscotch : required
|
||||||
|
(cd libscotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install)
|
||||||
|
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
scotch : libscotch
|
||||||
|
(cd scotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install)
|
||||||
|
(cd libscotchmetis ; $(MAKE) scotch && $(MAKE) install)
|
||||||
48
etc/patches/scotch_6.0.9
Normal file
48
etc/patches/scotch_6.0.9
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
--- scotch_6.0.6/src/libscotch/Makefile.orig 2019-04-29 14:59:53.957103493 +0200
|
||||||
|
+++ scotch_6.0.6/src/libscotch/Makefile 2019-04-29 18:50:42.560080675 +0200
|
||||||
|
@@ -51,6 +51,12 @@
|
||||||
|
|
||||||
|
.PHONY : ptscotch scotch ptinstall install clean realclean
|
||||||
|
|
||||||
|
+ifeq ($(WM_OSTYPE),MSwindows)
|
||||||
|
+
|
||||||
|
+libscotch : libscotch$(LIB) scotch.h
|
||||||
|
+
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
scotch :
|
||||||
|
$(MAKE) CC="$(CCS)" CCD="$(CCS)" \
|
||||||
|
scotch.h \
|
||||||
|
@@ -438,6 +444,11 @@
|
||||||
|
wgraph_part_zr$(OBJ) \
|
||||||
|
wgraph_store$(OBJ)
|
||||||
|
|
||||||
|
+ifeq ($(WM_OSTYPE),MSwindows)
|
||||||
|
+## Add into libscotch instead of having a separate library
|
||||||
|
+LIBSCOTCHDEPS += library_error_exit$(OBJ)
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
##
|
||||||
|
## Todo list.
|
||||||
|
##
|
||||||
|
--- scotch_6.0.6/src/Makefile.orig 2018-07-14 17:24:49.000000000 +0200
|
||||||
|
+++ scotch_6.0.6/src/Makefile 2019-04-29 18:39:16.365132864 +0200
|
||||||
|
@@ -89,9 +89,18 @@
|
||||||
|
$(mandir)/man1 : $(mandir)
|
||||||
|
-$(MKDIR) $(mandir)/man1
|
||||||
|
|
||||||
|
+ifeq ($(WM_OSTYPE),MSwindows)
|
||||||
|
+
|
||||||
|
+libscotch : required
|
||||||
|
+ (cd libscotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) libscotch && $(MAKE) install)
|
||||||
|
+
|
||||||
|
+else
|
||||||
|
+
|
||||||
|
libscotch : required
|
||||||
|
(cd libscotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install)
|
||||||
|
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
scotch : libscotch
|
||||||
|
(cd scotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install)
|
||||||
|
(cd libscotchmetis ; $(MAKE) scotch && $(MAKE) install)
|
||||||
48
etc/patches/scotch_6.1.0
Normal file
48
etc/patches/scotch_6.1.0
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
--- scotch_6.0.6/src/libscotch/Makefile.orig 2019-04-29 14:59:53.957103493 +0200
|
||||||
|
+++ scotch_6.0.6/src/libscotch/Makefile 2019-04-29 18:50:42.560080675 +0200
|
||||||
|
@@ -51,6 +51,12 @@
|
||||||
|
|
||||||
|
.PHONY : ptscotch scotch ptinstall install clean realclean
|
||||||
|
|
||||||
|
+ifeq ($(WM_OSTYPE),MSwindows)
|
||||||
|
+
|
||||||
|
+libscotch : libscotch$(LIB) scotch.h
|
||||||
|
+
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
scotch :
|
||||||
|
$(MAKE) CC="$(CCS)" CCD="$(CCS)" \
|
||||||
|
scotch.h \
|
||||||
|
@@ -438,6 +444,11 @@
|
||||||
|
wgraph_part_zr$(OBJ) \
|
||||||
|
wgraph_store$(OBJ)
|
||||||
|
|
||||||
|
+ifeq ($(WM_OSTYPE),MSwindows)
|
||||||
|
+## Add into libscotch instead of having a separate library
|
||||||
|
+LIBSCOTCHDEPS += library_error_exit$(OBJ)
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
##
|
||||||
|
## Todo list.
|
||||||
|
##
|
||||||
|
--- scotch_6.0.6/src/Makefile.orig 2018-07-14 17:24:49.000000000 +0200
|
||||||
|
+++ scotch_6.0.6/src/Makefile 2019-04-29 18:39:16.365132864 +0200
|
||||||
|
@@ -89,9 +89,18 @@
|
||||||
|
$(mandir)/man1 : $(mandir)
|
||||||
|
-$(MKDIR) $(mandir)/man1
|
||||||
|
|
||||||
|
+ifeq ($(WM_OSTYPE),MSwindows)
|
||||||
|
+
|
||||||
|
+libscotch : required
|
||||||
|
+ (cd libscotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) libscotch && $(MAKE) install)
|
||||||
|
+
|
||||||
|
+else
|
||||||
|
+
|
||||||
|
libscotch : required
|
||||||
|
(cd libscotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install)
|
||||||
|
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
scotch : libscotch
|
||||||
|
(cd scotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install)
|
||||||
|
(cd libscotchmetis ; $(MAKE) scotch && $(MAKE) install)
|
||||||
76
etc/pkgconfigAdjust
Executable file
76
etc/pkgconfigAdjust
Executable file
@ -0,0 +1,76 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | www.openfoam.com
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# etc/pkgconfigAdjust
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Adjust pkgconfig information to use '${prefix} where possible instead of
|
||||||
|
# directory paths. This makes it easier when relocating software.
|
||||||
|
# Adjusts includedir=, libdir=, -I/... and -L/... entries.
|
||||||
|
#
|
||||||
|
# The specified directory can be any of the following:
|
||||||
|
# - base-dir
|
||||||
|
# - base-dir/bin
|
||||||
|
# - base-dir/lib
|
||||||
|
# - base-dir/lib64
|
||||||
|
# - base-dir/lib/pkgconfig
|
||||||
|
# - base-dir/lib64/pkgconfig
|
||||||
|
#
|
||||||
|
# This allows this type of shell command
|
||||||
|
#
|
||||||
|
# etc/pkgconfigAdjust $(find platforms -type d -name pkgconfig)
|
||||||
|
#
|
||||||
|
# ----------------------------------------------
|
||||||
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Run from third-party directory only
|
||||||
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
|
echo "Error (${0##*/}) : current directory is not \$WM_THIRD_PARTY_DIR"
|
||||||
|
echo " Check your OpenFOAM environment and installation"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
printHelp() {
|
||||||
|
cat<<USAGE
|
||||||
|
|
||||||
|
Usage: ${0##*/} [OPTION] [dir1 [... dirN]]
|
||||||
|
options:
|
||||||
|
-help
|
||||||
|
|
||||||
|
Adjust pkgconfig files after relocating third-party files.
|
||||||
|
Locates pkgconfig files under the lib/ or lib64/ directories and adjusts them
|
||||||
|
to use '\${prefix}' instead of absolute directory paths where possible.
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
exit 0 # Clean exit
|
||||||
|
}
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Process options/arguments
|
||||||
|
while [ "$#" -gt 0 ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
'') ;; # Ignore empty
|
||||||
|
-h | -help*) printHelp;;
|
||||||
|
-*) echo "Ignore unknown option" 1>&2 ;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
pkgconfigAdjust "$1"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
72
etc/pkgconfigPrefix
Executable file
72
etc/pkgconfigPrefix
Executable file
@ -0,0 +1,72 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | www.openfoam.com
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# etc/pkgconfigPrefix
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Set the prefix= entry for pkgconfig files to account for a new location.
|
||||||
|
#
|
||||||
|
# The specified directory can be any of the following:
|
||||||
|
# - base-dir
|
||||||
|
# - base-dir/bin
|
||||||
|
# - base-dir/lib
|
||||||
|
# - base-dir/lib64
|
||||||
|
# - base-dir/lib/pkgconfig
|
||||||
|
# - base-dir/lib64/pkgconfig
|
||||||
|
#
|
||||||
|
# This allows this type of shell command
|
||||||
|
#
|
||||||
|
# etc/pkgconfigPrefix $(find platforms -name pkgconfig -type d)
|
||||||
|
#
|
||||||
|
# ----------------------------------------------
|
||||||
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Run from third-party directory only
|
||||||
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
|
echo "Error (${0##*/}) : current directory is not \$WM_THIRD_PARTY_DIR"
|
||||||
|
echo " Check your OpenFOAM environment and installation"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
printHelp() {
|
||||||
|
cat<<USAGE
|
||||||
|
|
||||||
|
Usage: ${0##*/} [OPTION] [dir1 [... dirN]]
|
||||||
|
options:
|
||||||
|
-help
|
||||||
|
|
||||||
|
Set the 'prefix=' entry for pkgconfig files.
|
||||||
|
The pkgconfig files are located under lib/pkgconfig or lib64/pkgconfig.
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
exit 0 # Clean exit
|
||||||
|
}
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Process options/arguments
|
||||||
|
while [ "$#" -gt 0 ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
'') ;; # Ignore empty
|
||||||
|
-h | -help*) printHelp;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
pkgconfigNewPrefix "$1"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
@ -3,24 +3,14 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
# \\ / A nd | www.openfoam.com
|
||||||
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2011 OpenFOAM Foundation
|
||||||
|
# Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
#
|
|
||||||
# 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
|
# Script
|
||||||
# etc/relocateQt
|
# etc/relocateQt
|
||||||
@ -28,27 +18,22 @@
|
|||||||
# Description
|
# Description
|
||||||
# Change prefix when relocating QT installation
|
# Change prefix when relocating QT installation
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
# ----------------------------------------------
|
||||||
qtVERSION=4.8.7
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
# Run from third-party directory only
|
||||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
|
echo "Error (${0##*/}) : current directory is not \$WM_THIRD_PARTY_DIR"
|
||||||
echo " The environment variables are inconsistent with the installation."
|
echo " Check your OpenFOAM environment and installation"
|
||||||
echo " Check the OpenFOAM entries in your dot-files and source them."
|
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
. etc/tools/ThirdPartyFunctions
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
. etc/tools/QtFunctions
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/QtFunctions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
printHelp() {
|
||||||
usage() {
|
|
||||||
exec 1>&2
|
|
||||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
|
||||||
cat<<USAGE
|
cat<<USAGE
|
||||||
|
|
||||||
usage: ${0##*/} [OPTION] [VERSION]
|
Usage: ${0##*/} [OPTION] [qt-VERSION]
|
||||||
options:
|
options:
|
||||||
-force Create qt.conf and edit pkgconfig to use \${prefix}
|
-force Create qt.conf and edit pkgconfig to use \${prefix}
|
||||||
-help
|
-help
|
||||||
@ -59,22 +44,22 @@ with a QT installation.
|
|||||||
* adjust relocation prefix for $qtVERSION
|
* adjust relocation prefix for $qtVERSION
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
exit 1
|
exit 0 # Clean exit
|
||||||
}
|
}
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
unset optForce
|
||||||
|
|
||||||
unset forceOpt
|
# Parse options
|
||||||
# parse options
|
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
-h | -help*) printHelp;;
|
||||||
;;
|
|
||||||
-f | -force)
|
-f | -force)
|
||||||
forceOpt=true
|
optForce=true
|
||||||
;;
|
;;
|
||||||
-qt-[1-9]* | [1-9]* | qt-*)
|
-qt-[0-9]* | [0-9]* | qt-*)
|
||||||
# -qt-VERSION, VERSION, qt-VERSION, qt-everywhere-opensource-src-VERSION
|
# -qt-VERSION, VERSION, qt-VERSION, qt-everywhere-opensource-src-VERSION
|
||||||
qtVERSION="${1%%/}";
|
qtVERSION="${1%%/}";
|
||||||
qtVERSION="${qtVERSION##*-}"
|
qtVERSION="${qtVERSION##*-}"
|
||||||
@ -87,13 +72,17 @@ do
|
|||||||
done
|
done
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
QT_ARCH_PATH=$installBASE/qt-$qtVERSION
|
|
||||||
|
|
||||||
if [ "${forceOpt:-false}" = true ]
|
PKG_PREFIX="$installBASE/qt-$qtVERSION"
|
||||||
|
|
||||||
|
[ -n "$qtVERSION" ] || die "No QT version specified"
|
||||||
|
[ -d "$PKG_PREFIX" ] || die "No QT installation"
|
||||||
|
|
||||||
|
if [ "${optForce:-false}" = true ]
|
||||||
then
|
then
|
||||||
finalizeQt
|
# Create qt.conf and adjust locations to use '${prefix}' internally
|
||||||
|
finalizeQt "$PKG_PREFIX"
|
||||||
fi
|
fi
|
||||||
changePrefix
|
pkgconfigNewPrefix "$PKG_PREFIX"
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
# ----------------------------------------------------------------- end-of-file
|
|
||||||
|
|||||||
46
etc/testThirdPartyFunctions
Executable file
46
etc/testThirdPartyFunctions
Executable file
@ -0,0 +1,46 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | www.openfoam.com
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# etc/testThirdPartyFunctions
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Simple ad hoc tests of etc/tools/ThirdPartyFunctions
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
echo ========================================
|
||||||
|
echo "Calling environment"
|
||||||
|
echo "CC=$CC"
|
||||||
|
echo "CXX=$CXX"
|
||||||
|
echo
|
||||||
|
echo ========================================
|
||||||
|
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
echo "CC=$(whichCC)"
|
||||||
|
echo "CXX=$(whichCXX)"
|
||||||
|
echo "mpicc=$(whichMpicc)"
|
||||||
|
echo "mpicxx=$(whichMpicxx)"
|
||||||
|
|
||||||
|
exportCompiler
|
||||||
|
|
||||||
|
echo ========================================
|
||||||
|
echo "using: $CC $CFLAGS"
|
||||||
|
echo "using: $CXX $CXXFLAGS"
|
||||||
|
echo
|
||||||
|
echo ========================================
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
57
etc/tools/CMakeFunctions
Normal file
57
etc/tools/CMakeFunctions
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
#---------------------------------*- sh -*-------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | www.openfoam.com
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2023 OpenCFD Ltd.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
|
#
|
||||||
|
# File
|
||||||
|
# etc/tools/CMakeFunction
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# CMake make/install helper functions
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Variables referenced by the functions. Initialization at the end of the file.
|
||||||
|
unset CMAKE_VARIABLES
|
||||||
|
unset withVERBOSE
|
||||||
|
BUILD_TYPE=Release # The cmake build type
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#
|
||||||
|
# Set CMake cache variables.
|
||||||
|
# Automatically adds -D prefix it needed
|
||||||
|
#
|
||||||
|
addCMakeVariable()
|
||||||
|
{
|
||||||
|
local i
|
||||||
|
for i
|
||||||
|
do
|
||||||
|
case "$i" in
|
||||||
|
('') ;; # empty
|
||||||
|
(-*) CMAKE_VARIABLES="${CMAKE_VARIABLES} ${i}" ;;
|
||||||
|
(*) CMAKE_VARIABLES="${CMAKE_VARIABLES} -D${i}" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Verbose makefiles
|
||||||
|
#
|
||||||
|
addVerbosity()
|
||||||
|
{
|
||||||
|
if [ "${withVERBOSE:=false}" = true ]
|
||||||
|
then
|
||||||
|
addCMakeVariable "CMAKE_VERBOSE_MAKEFILE=TRUE"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
@ -2,80 +2,110 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
# \\ / A nd | www.openfoam.com
|
||||||
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
# Copyright (C) 2016-2023 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
#
|
|
||||||
# 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/>.
|
|
||||||
#
|
#
|
||||||
# File
|
# File
|
||||||
# etc/tools/ParaViewFunctions
|
# etc/tools/ParaViewFunctions
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# ParaView make/install helper functions
|
# ParaView make/install helper functions
|
||||||
|
# To be loaded *after* etc/tools/CMakeFunctions
|
||||||
|
#
|
||||||
|
# Note
|
||||||
|
# Obtaining paths via 'python-config' may not always resolve properly:
|
||||||
|
#
|
||||||
|
# python-config --includes
|
||||||
|
# >>
|
||||||
|
# -I/usr/include/python2.7 -I/usr/include/python2.7
|
||||||
|
#
|
||||||
|
# python-config --libs
|
||||||
|
# >>
|
||||||
|
# -lpython2.7 -lpthread -ldl -lutil -lm
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# sourceBASE, buildBASE, installBASE defined in tools/ThirdPartyFunctions
|
# Variables referenced by the functions. Initialization at the end of the file.
|
||||||
|
unset CMAKE_VARIABLES
|
||||||
|
unset withVERBOSE
|
||||||
|
unset withMPI MPI_MAX_PROCS
|
||||||
|
unset withQT QT_VERSION QMAKE_PATH
|
||||||
|
unset withMESA MESA_INCLUDE MESA_LIBRARY withOSMESA
|
||||||
|
unset withPYTHON PYTHON_INCLUDE PYTHON_LIBRARY
|
||||||
|
unset withPYTHON3
|
||||||
|
unset withGL2
|
||||||
|
BUILD_TYPE=Release # The cmake build type
|
||||||
|
|
||||||
|
# sourceBASE, buildBASE, installBASE and BUILD_SUFFIX
|
||||||
|
# are defined in tools/ThirdPartyFunctions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
#
|
#
|
||||||
# Where things are or should be put
|
# Where things are or should be put
|
||||||
# ParaView_VERSION and ParaView_MAJOR should already have been set
|
# ParaView_VERSION and ParaView_MAJOR should already have been set
|
||||||
#
|
#
|
||||||
# ParaView_SOURCE_DIR : location of the original sources
|
# PARAVIEW_SOURCEDIR : location of the original sources
|
||||||
# ParaView_BINARY_DIR : location of the build
|
# PARAVIEW_BUILDDIR : location of the build
|
||||||
# ParaView_DIR : location of the installed program
|
# ParaView_DIR : location of the installed program
|
||||||
#
|
#
|
||||||
setParaViewDirs()
|
setParaViewDirs()
|
||||||
{
|
{
|
||||||
set -- "ParaView-$ParaView_VERSION" "ParaView-v$ParaView_VERSION"
|
set -- "ParaView-$ParaView_VERSION" "ParaView-v$ParaView_VERSION"
|
||||||
|
unset PARAVIEW_SOURCEDIR PARAVIEW_BUILDDIR
|
||||||
|
|
||||||
unset ParaView_SOURCE_DIR
|
# search
|
||||||
for i
|
# - ThirdParty/PACKAGE
|
||||||
|
# - ThirdParty/sources/PACKAGE
|
||||||
|
# - ThirdParty/sources/paraview/PACKAGE
|
||||||
|
# - ThirdParty/sources/vtk/PACKAGE
|
||||||
|
for package in "$@"
|
||||||
do
|
do
|
||||||
ParaView_SOURCE_DIR="$sourceBASE/$i"
|
for check in \
|
||||||
[ -d "$ParaView_SOURCE_DIR" ] && break
|
"$package" \
|
||||||
|
"sources/$package" \
|
||||||
|
"sources/paraview/$package" \
|
||||||
|
"sources/vtk/$package" \
|
||||||
|
;
|
||||||
|
do
|
||||||
|
if [ -d "$sourceBASE/$check" ]
|
||||||
|
then
|
||||||
|
echo "Found sources: $check" 1>&2
|
||||||
|
PARAVIEW_SOURCEDIR="$sourceBASE/$check"
|
||||||
|
break 2
|
||||||
|
fi
|
||||||
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
[ -d "$ParaView_SOURCE_DIR" ] || {
|
[ -d "$PARAVIEW_SOURCEDIR" ] || {
|
||||||
echo "Did not locate ParaView version:"
|
echo "Did not locate ParaView version:"
|
||||||
while [ "$#" -ge 1 ]; do echo " $1"; shift; done
|
while [ "$#" -ge 1 ]; do echo " $1"; shift; done
|
||||||
echo
|
echo
|
||||||
echo "In the directory:"
|
echo "In the directory:"
|
||||||
echo " $sourceBASE"
|
echo " $sourceBASE"
|
||||||
|
echo " \-- sources/paraview"
|
||||||
|
echo " |-- paraview"
|
||||||
|
echo " \\-- vtk"
|
||||||
echo
|
echo
|
||||||
echo "abort build"
|
echo "abort build"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION${OBJ_ADD:+-$OBJ_ADD}
|
PARAVIEW_BUILDDIR="$buildBASE/ParaView-$ParaView_VERSION$BUILD_SUFFIX"
|
||||||
ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION
|
ParaView_DIR="$installBASE/ParaView-$ParaView_VERSION$BUILD_SUFFIX"
|
||||||
|
export GIT_DIR="$PARAVIEW_SOURCEDIR/.git" # Avoid seeing our own git-repo
|
||||||
|
|
||||||
# ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION${OBJ_ADD:+-$OBJ_ADD}
|
export PARAVIEW_SOURCEDIR PARAVIEW_BUILDDIR ParaView_DIR
|
||||||
ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION
|
|
||||||
|
|
||||||
export ParaView_SOURCE_DIR ParaView_BINARY_DIR ParaView_DIR
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "ParaView_SOURCE_DIR=$ParaView_SOURCE_DIR"
|
|
||||||
echo "ParaView_BINARY_DIR=$ParaView_BINARY_DIR"
|
|
||||||
echo "ParaView_DIR=$ParaView_DIR"
|
echo "ParaView_DIR=$ParaView_DIR"
|
||||||
|
echo "PARAVIEW_SOURCEDIR=$PARAVIEW_SOURCEDIR"
|
||||||
# Forcefully override the .git path for the ParaView source code directory
|
echo "PARAVIEW_BUILDDIR=$PARAVIEW_BUILDDIR"
|
||||||
export GIT_DIR=$ParaView_SOURCE_DIR/.git
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -103,53 +133,26 @@ setParaViewVersion()
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
#
|
# addCMakeVariable : defined in etc/tools/CMakeFunctions
|
||||||
# Compare version information (specified vs what is found in CMakeLists.txt)
|
# addVerbosity : defined in etc/tools/CMakeFunctions
|
||||||
# Parse this type of content:
|
|
||||||
# set (PARAVIEW_VERSION_FULL "5.0.1")
|
|
||||||
#
|
|
||||||
checkVersion()
|
|
||||||
{
|
|
||||||
local ver=$(
|
|
||||||
sed -ne 's/^ *set *( *PARAVIEW_VERSION_FULL[ "]*\([.0-9]*\).*$/\1/ip' \
|
|
||||||
$ParaView_SOURCE_DIR/CMakeLists.txt
|
|
||||||
)
|
|
||||||
|
|
||||||
if [ "$ParaView_VERSION" != "$ver" ]
|
#
|
||||||
|
# General settings (version-dependent)
|
||||||
|
#
|
||||||
|
addGeneral()
|
||||||
|
{
|
||||||
|
if printf "${ParaView_MAJOR}"'\n%s\n' 5.6 | sort -V -C
|
||||||
then
|
then
|
||||||
echo "(${ver:-none}) mismatch?"
|
# Paraview 5.6 and older
|
||||||
|
addCMakeVariable "BUILD_SHARED_LIBS=ON"
|
||||||
else
|
else
|
||||||
echo "(${ver:-none})"
|
addCMakeVariable "PARAVIEW_BUILD_SHARED_LIBS=ON"
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Set CMake cache variables
|
|
||||||
#
|
|
||||||
addCMakeVariable()
|
|
||||||
{
|
|
||||||
while [ -n "$1" ]
|
|
||||||
do
|
|
||||||
CMAKE_VARIABLES="$CMAKE_VARIABLES -D$1"
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Verbose makefiles
|
|
||||||
#
|
|
||||||
addVerbosity()
|
|
||||||
{
|
|
||||||
if [ "${withVERBOSE:=false}" = true ]
|
|
||||||
then
|
|
||||||
addCMakeVariable "CMAKE_VERBOSE_MAKEFILE=TRUE"
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Define options for mpi support
|
# MPI support for PARAVIEW
|
||||||
#
|
#
|
||||||
addMpiSupport()
|
addMpiSupport()
|
||||||
{
|
{
|
||||||
@ -158,13 +161,15 @@ addMpiSupport()
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
OBJ_ADD="$OBJ_ADD-mpi"
|
addCMakeVariable "PARAVIEW_USE_MPI=ON"
|
||||||
|
|
||||||
addCMakeVariable "PARAVIEW_USE_MPI=ON VTK_USE_MPI=ON"
|
|
||||||
if [ "${MPI_MAX_PROCS:=0}" -gt 1 ]
|
if [ "${MPI_MAX_PROCS:=0}" -gt 1 ]
|
||||||
then
|
then
|
||||||
addCMakeVariable "VTK_MPI_MAX_NUMPROCS=$MPI_MAX_PROCS"
|
addCMakeVariable "VTK_MPI_MAX_NUMPROCS=$MPI_MAX_PROCS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "----"
|
||||||
|
echo "MPI information:"
|
||||||
|
echo " home : $MPI_HOME"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -173,70 +178,105 @@ addMpiSupport()
|
|||||||
#
|
#
|
||||||
addPythonSupport()
|
addPythonSupport()
|
||||||
{
|
{
|
||||||
if [ "${withPYTHON:=false}" != true ]
|
if [ "${withPYTHON:-false}" != true ]
|
||||||
then
|
then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
OBJ_ADD="$OBJ_ADD-py"
|
local pythonBin="python"
|
||||||
|
local pythonConfig="python-config"
|
||||||
|
local pythonMajor
|
||||||
|
|
||||||
if pythonBin=$(which python 2>/dev/null)
|
if [ "$withPYTHON3" = true ]
|
||||||
then
|
then
|
||||||
if [ -n "$PYTHON_LIBRARY" ]
|
pythonBin="python3"
|
||||||
then
|
pythonConfig="python3-config"
|
||||||
# Check $PYTHON_LIBRARY if it has been set
|
fi
|
||||||
if [ ! -e "$PYTHON_LIBRARY" ]
|
|
||||||
then
|
|
||||||
echo "*** Error: libpython not found at location specified " \
|
|
||||||
"by -pythnon-lib input: PYTHON_LIBRARY=$PYTHON_LIBRARY"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
# Try to get $PYTHON_LIBRARY from dynamically linked binary
|
|
||||||
PYTHON_LIBRARY=$(ldd $pythonBin | \
|
|
||||||
sed -ne '/libpython/s/.* => \(.*\) (.*/\1/p')
|
|
||||||
|
|
||||||
[ -e "$PYTHON_LIBRARY" ] || {
|
pythonBin=$(which "$pythonBin" 2>/dev/null) || {
|
||||||
echo "*** Error: Unable to determine path to python library."
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ -e "$PYTHON_LIBRARY" ] || {
|
|
||||||
echo " Please set the full path to the python library "
|
|
||||||
echo " (including libpython) using the -python-lib option, "
|
|
||||||
echo " or deactivate python support by not using the -python "
|
|
||||||
echo " option"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
pythonMajor=$(echo $PYTHON_LIBRARY | sed 's/.*libpython\(.*\)\.so.*/\1/')
|
|
||||||
pythonInclude=/usr/include/python$pythonMajor
|
|
||||||
|
|
||||||
# Note - we could also allow for a PYTHON_INCLUDE variable ...
|
|
||||||
[ -d "$pythonInclude" -a -f "$pythonInclude/Python.h" ] || {
|
|
||||||
echo " No python headers found in $pythonInclude/"
|
|
||||||
echo " Please install python headers or deactivate "
|
|
||||||
echo " python support by not using the -python option"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
addCMakeVariable "PARAVIEW_ENABLE_PYTHON=ON"
|
|
||||||
addCMakeVariable "PYTHON_INCLUDE_DIRS=$pythonInclude"
|
|
||||||
addCMakeVariable "PYTHON_LIBRARY=$PYTHON_LIBRARY"
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
echo "Python information:"
|
|
||||||
echo " executable : $pythonBin"
|
|
||||||
echo " version : $pythonMajor"
|
|
||||||
echo " include path : $pythonInclude"
|
|
||||||
echo " library : $PYTHON_LIBRARY"
|
|
||||||
|
|
||||||
unset pythonBin pythonInclude pythonMajor
|
|
||||||
else
|
|
||||||
echo "*** Error: python not found"
|
echo "*** Error: python not found"
|
||||||
echo "*** Deactivate python support by not using the -python "
|
echo "*** Deactivate python support by not using the -python "
|
||||||
echo "*** option"
|
echo "*** option"
|
||||||
exit 1
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$PYTHON_LIBRARY" ]
|
||||||
|
then
|
||||||
|
|
||||||
|
# PYTHON_LIBRARY set:
|
||||||
|
[ -e "$PYTHON_LIBRARY" ] || \
|
||||||
|
echo "*** Error: libpython not found at location specified " \
|
||||||
|
"by -python-lib : PYTHON_LIBRARY=$PYTHON_LIBRARY"
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
# Fallback: get PYTHON_LIBRARY from dynamically linked binary
|
||||||
|
|
||||||
|
PYTHON_LIBRARY=$(ldd "$pythonBin" | \
|
||||||
|
sed -ne '/libpython/s/^.* => \(.*\) (.*/\1/p')
|
||||||
|
|
||||||
|
[ -e "$PYTHON_LIBRARY" ] || {
|
||||||
|
echo "*** Error: Unable to determine path to python library."
|
||||||
|
}
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
[ -e "$PYTHON_LIBRARY" ] || {
|
||||||
|
echo " Please set the full path to the python library "
|
||||||
|
echo " (including libpython) using the -python-lib option, "
|
||||||
|
echo " or deactivate python support by not using the -python "
|
||||||
|
echo " option"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Guess major from library
|
||||||
|
pythonMajor=$(echo "$PYTHON_LIBRARY" | sed 's/.*libpython\(.*\)\.so.*/\1/')
|
||||||
|
|
||||||
|
if [ -n "$PYTHON_INCLUDE" ]
|
||||||
|
then
|
||||||
|
|
||||||
|
# PYTHON_INCLUDE set:
|
||||||
|
[ -d "$PYTHON_INCLUDE" -a -f "$PYTHON_INCLUDE/Python.h" ] || \
|
||||||
|
echo "*** Error: Python.h not found at location specified " \
|
||||||
|
"by -python-include : PYTHON_INCLUDE=$PYTHON_INCLUDE"
|
||||||
|
|
||||||
|
elif pythonConfig=$(which "$pythonConfig" 2>/dev/null)
|
||||||
|
then
|
||||||
|
# Guess from python-config
|
||||||
|
# parse '-I/usr/include/python2.7 -I/usr/include/python2.7'
|
||||||
|
# -> '/usr/include/python2.7'
|
||||||
|
PYTHON_INCLUDE=$("$pythonConfig" --includes | sed -ne 's/^-I\([^ ][^ ]*\).*$/\1/p')
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
# Fallback to system headers
|
||||||
|
PYTHON_INCLUDE=/usr/include/python$pythonMajor
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ -d "$PYTHON_INCLUDE" -a -f "$PYTHON_INCLUDE/Python.h" ] || {
|
||||||
|
echo " No python headers found in $PYTHON_INCLUDE/"
|
||||||
|
echo " Please install python headers or deactivate "
|
||||||
|
echo " python support by not using the -python option"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if printf "${ParaView_MAJOR}"'\n%s\n' 5.7 | sort -V -C
|
||||||
|
then
|
||||||
|
# Paraview 5.7 and older
|
||||||
|
addCMakeVariable "PARAVIEW_ENABLE_PYTHON=ON"
|
||||||
|
else
|
||||||
|
addCMakeVariable "PARAVIEW_USE_PYTHON=ON"
|
||||||
|
fi
|
||||||
|
addCMakeVariable "PYTHON_INCLUDE_DIRS=$PYTHON_INCLUDE"
|
||||||
|
addCMakeVariable "PYTHON_LIBRARY=$PYTHON_LIBRARY"
|
||||||
|
|
||||||
|
echo "----"
|
||||||
|
echo "Python information:"
|
||||||
|
echo " executable : $pythonBin"
|
||||||
|
echo " version : $pythonMajor"
|
||||||
|
echo " include path : $PYTHON_INCLUDE"
|
||||||
|
echo " library : $PYTHON_LIBRARY"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -250,21 +290,19 @@ addMesaSupport()
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "$MESA_INCLUDE" -a -f "$MESA_LIBRARY" ]
|
if [ -d "$MESA_INCLUDE" ] && [ -f "$MESA_LIBRARY" ]
|
||||||
then
|
then
|
||||||
OBJ_ADD="$OBJ_ADD-mesa"
|
addCMakeVariable "VTK_OPENGL_HAS_OSMESA=ON"
|
||||||
|
addCMakeVariable "OSMESA_INCLUDE_DIR=$MESA_INCLUDE"
|
||||||
addCMakeVariable "VTK_OPENGL_HAS_OSMESA:BOOL=ON"
|
addCMakeVariable "OSMESA_LIBRARY=$MESA_LIBRARY"
|
||||||
addCMakeVariable "OSMESA_INCLUDE_DIR=$MESA_INCLUDE"
|
|
||||||
addCMakeVariable "OSMESA_LIBRARY=$MESA_LIBRARY"
|
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "*** Error: no MESA information found"
|
echo "*** Error: no MESA information found"
|
||||||
echo "*** Deactivate MESA support by not using the -mesa option, "
|
echo "*** Deactivate MESA support by not using the -mesa option, "
|
||||||
echo "*** or set the correct paths for:"
|
echo "*** or set the correct paths for:"
|
||||||
echo "*** -mesa-include ($MESA_INCLUDE)"
|
echo "*** -mesa-include ($MESA_INCLUDE)"
|
||||||
echo "*** -mesa-lib ($MESA_LIBRARY)"
|
echo "*** -mesa-lib ($MESA_LIBRARY)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -276,45 +314,49 @@ addGL2Support()
|
|||||||
{
|
{
|
||||||
if [ "${withGL2:=false}" = true ]
|
if [ "${withGL2:=false}" = true ]
|
||||||
then
|
then
|
||||||
addCMakeVariable "VTK_RENDERING_BACKEND=OpenGL2"
|
addCMakeVariable "VTK_RENDERING_BACKEND=OpenGL2"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Qt 4/5 support
|
||||||
|
#
|
||||||
addQtSupport()
|
addQtSupport()
|
||||||
{
|
{
|
||||||
QtVersion=none
|
QT_VERSION=none
|
||||||
|
: ${withQT:=true} # default is on
|
||||||
|
|
||||||
if [ "${withQT:=false}" != true ]
|
local qmake qtLib
|
||||||
|
local cmakeVarName="PARAVIEW_USE_QT"
|
||||||
|
|
||||||
|
if printf "${ParaView_MAJOR}"'\n%s\n' 5.7 | sort -V -C
|
||||||
then
|
then
|
||||||
|
# Paraview 5.7 and older
|
||||||
|
cmakeVarName="PARAVIEW_BUILD_QT_GUI"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$withQT" = false ]
|
||||||
|
then
|
||||||
|
# Explicitly disabled
|
||||||
|
addCMakeVariable "$cmakeVarName=OFF"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
addCMakeVariable "PARAVIEW_BUILD_QT_GUI=ON"
|
# Check qmake can be found and handle version differences
|
||||||
|
qmake=$(findQMake)
|
||||||
local qmake=$(findQtMake)
|
if QT_VERSION=$($qmake -query QT_VERSION 2>/dev/null)
|
||||||
|
|
||||||
# From somewhere other than in the path
|
|
||||||
if [ "${qmake:=qmake}" != qmake ]
|
|
||||||
then
|
then
|
||||||
addCMakeVariable "QT_QMAKE_EXECUTABLE:FILEPATH=$qmake"
|
addCMakeVariable "$cmakeVarName=ON"
|
||||||
fi
|
|
||||||
|
|
||||||
# Check qmake can be found
|
case "$QT_VERSION" in
|
||||||
if type $qmake >/dev/null 2>&1
|
(3.* | 4.[0-4]*)
|
||||||
then
|
|
||||||
# Check the Qt version selected
|
|
||||||
# parse -> "Using Qt version X.Y.Z in ..."
|
|
||||||
QtVersion=$($qmake -query QT_VERSION)
|
|
||||||
|
|
||||||
case "$QtVersion" in
|
|
||||||
3.* | 4.[0-4]*)
|
|
||||||
# QT is too old
|
# QT is too old
|
||||||
cat <<ERROR
|
cat <<ERROR
|
||||||
----
|
----
|
||||||
Error: ${0##*/}
|
Error: ${0##*/}
|
||||||
|
|
||||||
QT version ($QtVersion) provided < 4.5
|
QT version ($QT_VERSION) provided < 4.5
|
||||||
Please use the -qmake option to specify the location of a newer QT version
|
Please use the -qmake option to specify the location of a newer QT version
|
||||||
For example,
|
For example,
|
||||||
... -qmake /usr/local/qt-4.6.2/bin/qmake
|
... -qmake /usr/local/qt-4.6.2/bin/qmake
|
||||||
@ -324,12 +366,32 @@ ERROR
|
|||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
5.*)
|
(4.*)
|
||||||
# QT4 is the default, must specify QT5 explicitly
|
# Default changed to Qt5 with paraview 5.2.1, so specify explicitly
|
||||||
addCMakeVariable "PARAVIEW_QT_VERSION:STRING=5"
|
addCMakeVariable "PARAVIEW_QT_VERSION=4"
|
||||||
|
|
||||||
|
# Non-system installation - specify location of qmake
|
||||||
|
if [ "$qmake" != /usr/bin/qmake ]
|
||||||
|
then
|
||||||
|
addCMakeVariable "QT_QMAKE_EXECUTABLE=$qmake"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
(5.*)
|
||||||
|
# Default changed to Qt5 with paraview 5.2.1, so specify explicitly
|
||||||
|
addCMakeVariable "PARAVIEW_QT_VERSION=5"
|
||||||
|
|
||||||
|
# Non-system installation - find CMake config files
|
||||||
|
if [ "$qmake" != /usr/bin/qmake ] \
|
||||||
|
&& qtLib="$($qmake -query QT_INSTALL_LIBS)/cmake/Qt5" \
|
||||||
|
&& [ -d "$qtLib" ]
|
||||||
|
then
|
||||||
|
addCMakeVariable "Qt5_DIR=$qtLib"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
|
QT_VERSION=none
|
||||||
echo "Error: cannot find qmake either at \$QMAKE_PATH or in current \$PATH"
|
echo "Error: cannot find qmake either at \$QMAKE_PATH or in current \$PATH"
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
@ -342,7 +404,7 @@ ERROR
|
|||||||
#
|
#
|
||||||
patchParaView()
|
patchParaView()
|
||||||
{
|
{
|
||||||
applyPatch "paraview-$ParaView_VERSION" "$ParaView_SOURCE_DIR"
|
applyPatch "paraview-$ParaView_VERSION" "$PARAVIEW_SOURCEDIR"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -354,17 +416,17 @@ configParaView()
|
|||||||
local cmake=$(findCMake)
|
local cmake=$(findCMake)
|
||||||
|
|
||||||
# Remove any existing build folder and recreate
|
# Remove any existing build folder and recreate
|
||||||
if [ -d $ParaView_BINARY_DIR ]
|
if [ -d "$PARAVIEW_BUILDDIR" ]
|
||||||
then
|
then
|
||||||
echo "removing old build directory"
|
echo "removing old build directory"
|
||||||
echo " $ParaView_BINARY_DIR"
|
echo " $PARAVIEW_BUILDDIR"
|
||||||
rm -rf $ParaView_BINARY_DIR
|
rm -rf "$PARAVIEW_BUILDDIR"
|
||||||
fi
|
fi
|
||||||
mkdir -p $ParaView_BINARY_DIR
|
mkdir -p "$PARAVIEW_BUILDDIR"
|
||||||
|
|
||||||
addCMakeVariable "CMAKE_BUILD_TYPE:STRING=$buildType"
|
addCMakeVariable "CMAKE_BUILD_TYPE=$BUILD_TYPE"
|
||||||
|
|
||||||
cd $ParaView_BINARY_DIR || exit 1 # Change to build folder
|
cd "$PARAVIEW_BUILDDIR" || exit # Change to build folder
|
||||||
|
|
||||||
echo "----"
|
echo "----"
|
||||||
echo "Configuring paraview-$ParaView_VERSION (major version: $ParaView_MAJOR)"
|
echo "Configuring paraview-$ParaView_VERSION (major version: $ParaView_MAJOR)"
|
||||||
@ -372,27 +434,27 @@ configParaView()
|
|||||||
echo " Python support : ${withPYTHON:-false}"
|
echo " Python support : ${withPYTHON:-false}"
|
||||||
echo " MESA support : ${withMESA:-false}"
|
echo " MESA support : ${withMESA:-false}"
|
||||||
echo " GL2 rendering : ${withGL2:-false}"
|
echo " GL2 rendering : ${withGL2:-false}"
|
||||||
echo " Qt dev support : ${withQT:-false}"
|
echo " QT dev support : ${withQT:-true}"
|
||||||
echo " Source : $ParaView_SOURCE_DIR"
|
echo " Source : $PARAVIEW_SOURCEDIR"
|
||||||
echo " Build : $ParaView_BINARY_DIR"
|
echo " Build : $PARAVIEW_BUILDDIR"
|
||||||
echo " Target : $ParaView_DIR"
|
echo " Target : $ParaView_DIR"
|
||||||
echo " Build type : $buildType"
|
echo " cmake : $cmake"
|
||||||
echo " Cmake : $cmake"
|
echo " Build suffix : ${BUILD_SUFFIX:-none}"
|
||||||
echo "----"
|
echo "----"
|
||||||
echo
|
echo
|
||||||
echo "$cmake" \
|
echo "$cmake" \
|
||||||
-DCMAKE_INSTALL_PREFIX:PATH=$ParaView_DIR \
|
-DCMAKE_INSTALL_PREFIX="$ParaView_DIR" \
|
||||||
$CMAKE_VARIABLES \
|
$CMAKE_VARIABLES \
|
||||||
$ParaView_SOURCE_DIR
|
"$PARAVIEW_SOURCEDIR"
|
||||||
echo
|
echo
|
||||||
echo "----"
|
echo "----"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Run cmake to create Makefiles
|
# Run cmake to create Makefiles
|
||||||
$cmake \
|
$cmake \
|
||||||
-DCMAKE_INSTALL_PREFIX:PATH=$ParaView_DIR \
|
-DCMAKE_INSTALL_PREFIX="$ParaView_DIR" \
|
||||||
$CMAKE_VARIABLES \
|
$CMAKE_VARIABLES \
|
||||||
$ParaView_SOURCE_DIR
|
"$PARAVIEW_SOURCEDIR"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -402,7 +464,7 @@ configParaView()
|
|||||||
#
|
#
|
||||||
makeParaView()
|
makeParaView()
|
||||||
{
|
{
|
||||||
cd $ParaView_BINARY_DIR || exit 1 # Change to build folder
|
cd "$PARAVIEW_BUILDDIR" || exit # Change to build folder
|
||||||
echo " Starting make"
|
echo " Starting make"
|
||||||
time make -j $WM_NCOMPPROCS
|
time make -j $WM_NCOMPPROCS
|
||||||
echo " Done make"
|
echo " Done make"
|
||||||
@ -421,43 +483,53 @@ makeParaView()
|
|||||||
#
|
#
|
||||||
installParaView()
|
installParaView()
|
||||||
{
|
{
|
||||||
cd $ParaView_BINARY_DIR || exit 1 # Change to build folder
|
cd "$PARAVIEW_BUILDDIR" || exit # Change to build folder
|
||||||
echo " Installing ParaView to $ParaView_DIR"
|
echo " Installing ParaView to $ParaView_DIR"
|
||||||
|
|
||||||
make install
|
make install
|
||||||
|
|
||||||
cat<< INFO
|
# System or non-system installation of QT?
|
||||||
|
local qmake qtLib QT_VERSION
|
||||||
|
if qmake=$(findQMake 2>/dev/null)
|
||||||
|
then
|
||||||
|
qtLib=$($qmake -query QT_INSTALL_LIBS)
|
||||||
|
QT_VERSION=$($qmake -query QT_VERSION 2>/dev/null)
|
||||||
|
fi
|
||||||
|
|
||||||
---
|
/bin/cat<<INFO
|
||||||
Installation complete for paraview-$ParaView_VERSION
|
|
||||||
|
====
|
||||||
|
Installation complete for paraview-$ParaView_VERSION with qt-${QT_VERSION:-none}
|
||||||
ParaView_DIR=$ParaView_DIR
|
ParaView_DIR=$ParaView_DIR
|
||||||
|
|
||||||
You may need to update the OpenFOAM environment by running:
|
You may need to update the OpenFOAM environment by running:
|
||||||
wmRefresh
|
wmRefresh
|
||||||
---
|
|
||||||
INFO
|
INFO
|
||||||
|
|
||||||
|
# Non-system installation of QT?
|
||||||
|
case "$qtLib" in (/usr/lib | /usr/lib64) unset qtLib ;; esac
|
||||||
|
|
||||||
|
if [ "${qmake%/*}" != /usr/bin ] && [ -d "$qtLib" ]
|
||||||
|
then
|
||||||
|
/bin/cat<<INFO
|
||||||
|
|
||||||
|
Your LD_LIBRARY_PATH may require adjustment to include the following:
|
||||||
|
$qtLib
|
||||||
|
INFO
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "===="
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Clear the referenced variables before using any of the functions
|
|
||||||
unset withMPI withVERBOSE
|
|
||||||
unset withQT QMAKE_PATH
|
|
||||||
unset withMESA MESA_INCLUDE MESA_LIBRARY
|
|
||||||
unset withPYTHON PYTHON_INCLUDE PYTHON_LIBRARY
|
|
||||||
unset CMAKE_VARIABLES
|
|
||||||
unset OBJ_ADD
|
|
||||||
unset buildType
|
|
||||||
|
|
||||||
# Start with these general settings
|
# Start with these general settings
|
||||||
addCMakeVariable "BUILD_SHARED_LIBS:BOOL=ON VTK_USE_RPATH:BOOL=OFF"
|
|
||||||
|
# No testing
|
||||||
|
addCMakeVariable "BUILD_TESTING=OFF"
|
||||||
|
|
||||||
# Include development files in "make install"
|
# Include development files in "make install"
|
||||||
addCMakeVariable "PARAVIEW_INSTALL_DEVELOPMENT_FILES:BOOL=ON"
|
addCMakeVariable "PARAVIEW_INSTALL_DEVELOPMENT_FILES=ON"
|
||||||
|
|
||||||
# Don't build test tree
|
|
||||||
addCMakeVariable "BUILD_TESTING:BOOL=OFF"
|
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -2,147 +2,64 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
# \\ / A nd | www.openfoam.com
|
||||||
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2011 OpenFOAM Foundation
|
||||||
|
# Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
#
|
|
||||||
# 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/>.
|
|
||||||
#
|
#
|
||||||
# File
|
# File
|
||||||
# etc/tools/QtFunction
|
# etc/tools/QtFunction
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Functions for helping relocate a QT installation
|
# Functions for helping relocate a QT installation
|
||||||
|
# To be loaded *after* etc/tools/ThirdPartyFunctions
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Qt-related variables. Initialization at the end of the file.
|
||||||
|
|
||||||
|
qtTYPE=qt-everywhere-opensource-src
|
||||||
|
unset qtVERSION # No default version
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
#
|
#
|
||||||
# Create a qt.conf file in the QT bin/
|
# Create a qt.conf file in the QT bin/
|
||||||
# - this can be modified easily if the qt installation is relocated
|
# - this can be modified easily if the qt installation is relocated
|
||||||
#
|
#
|
||||||
createQtConf()
|
createQtConf()
|
||||||
{
|
{
|
||||||
echo "create:"
|
local prefix="$1"
|
||||||
echo " $QT_ARCH_PATH/bin/qt.conf"
|
if [ -n "$prefix" ] && [ -d "$prefix/bin" ]
|
||||||
|
then
|
||||||
|
/bin/cat << QT_CONF > "$prefix/bin/qt.conf"
|
||||||
|
[Paths]
|
||||||
|
Prefix="$prefix"
|
||||||
|
QT_CONF
|
||||||
|
echo " created qt.conf"
|
||||||
|
|
||||||
[ -n "$QT_ARCH_PATH" -a -d "$QT_ARCH_PATH/bin" ] || {
|
else
|
||||||
echo "Error: QT_ARCH_PATH not correctly set"
|
echo "Error: qt-prefix <$prefix> not correctly set"
|
||||||
return
|
fi
|
||||||
}
|
|
||||||
|
|
||||||
echo "[Paths]" > $QT_ARCH_PATH/bin/qt.conf
|
|
||||||
echo "Prefix=$QT_ARCH_PATH" >> $QT_ARCH_PATH/bin/qt.conf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Adjust pkgconfig information
|
|
||||||
# to generalize *location=, -L/... and -I/...
|
|
||||||
# to use ${prefix}
|
|
||||||
#
|
|
||||||
adjustPkgConfig()
|
|
||||||
{
|
|
||||||
echo "edit pkgconfig:"
|
|
||||||
echo " $QT_ARCH_PATH/lib/pkgconfig/*.pc"
|
|
||||||
|
|
||||||
[ -n "$QT_ARCH_PATH" -a -d "$QT_ARCH_PATH/lib/pkgconfig" ] || {
|
|
||||||
echo "Error: QT_ARCH_PATH not correctly set"
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
(
|
|
||||||
cd $QT_ARCH_PATH/lib/pkgconfig || exit
|
|
||||||
|
|
||||||
unset nfiles
|
|
||||||
for i in *.pc
|
|
||||||
do
|
|
||||||
if [ -f "$i" ]
|
|
||||||
then
|
|
||||||
nfiles="x$nfiles"
|
|
||||||
sed -i \
|
|
||||||
-e 's@\(location=\)'"$QT_ARCH_PATH/"'@\1${prefix}/@' \
|
|
||||||
-e 's@\(-[IL]\)'"$QT_ARCH_PATH/"'@\1${prefix}/@g' \
|
|
||||||
$i
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
echo " edited ${#nfiles} files"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Change prefix=... and Prefix=... to use ${prefix}
|
|
||||||
#
|
|
||||||
changePrefix()
|
|
||||||
{
|
|
||||||
echo "relocate QT installation to new prefix directory:"
|
|
||||||
echo " $QT_ARCH_PATH"
|
|
||||||
echo "edit:"
|
|
||||||
echo " $QT_ARCH_PATH/bin/qt.conf"
|
|
||||||
echo " $QT_ARCH_PATH/lib/pkgconfig/*.pc"
|
|
||||||
|
|
||||||
[ -n "$QT_ARCH_PATH" -a -d "$QT_ARCH_PATH/bin" -a -d "$QT_ARCH_PATH/lib/pkgconfig" ] || {
|
|
||||||
echo "Error: QT_ARCH_PATH not correctly set"
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
# adjust qt.conf
|
|
||||||
for i in $QT_ARCH_PATH/bin/qt.conf
|
|
||||||
do
|
|
||||||
if [ -f "$i" ]
|
|
||||||
then
|
|
||||||
nfiles="x$nfiles"
|
|
||||||
sed -i \
|
|
||||||
-e 's@^\([Pp]refix=\).*$@\1'"$QT_ARCH_PATH@" \
|
|
||||||
$i
|
|
||||||
echo " edited 1 file"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# adjust pkgconfig files
|
|
||||||
(
|
|
||||||
cd $QT_ARCH_PATH/lib/pkgconfig || exit
|
|
||||||
|
|
||||||
unset nfiles
|
|
||||||
for i in *.pc
|
|
||||||
do
|
|
||||||
if [ -f "$i" ]
|
|
||||||
then
|
|
||||||
nfiles="x$nfiles"
|
|
||||||
sed -i \
|
|
||||||
-e 's@^\([Pp]refix=\).*$@\1'"$QT_ARCH_PATH@" \
|
|
||||||
$i
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
echo " edited ${#nfiles} files"
|
|
||||||
)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
#
|
#
|
||||||
# create qt.conf and adjustPkgConfig to use ${prefix} internally
|
# create qt.conf and adjust locations to use ${prefix} internally
|
||||||
#
|
#
|
||||||
finalizeQt()
|
finalizeQt()
|
||||||
{
|
{
|
||||||
|
local prefix="$1"
|
||||||
echo "Create/Edit files to ease later relocation of a QT installation"
|
echo "Create/Edit files to ease later relocation of a QT installation"
|
||||||
createQtConf
|
createQtConf "$prefix"
|
||||||
adjustPkgConfig
|
pkgconfigAdjust "$prefix"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# -----------------------------------------------------------------------------
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -2,81 +2,90 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / 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 OpenCFD Ltd.
|
# \\ / A nd | www.openfoam.com
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2016-2023 OpenCFD Ltd.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
#
|
|
||||||
# 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/>.
|
|
||||||
#
|
#
|
||||||
# File
|
# File
|
||||||
# etc/tools/vtkFunctions
|
# etc/tools/vtkFunctions
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# VTK (library) make/install helper functions.
|
# VTK (library) make/install helper functions.
|
||||||
# To be loaded *after* etc/tools/ParaViewFunctions
|
# To be loaded *after* etc/tools/CMakeFunctions, ParaViewFunctions
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# sourceBASE, buildBASE, installBASE defined in tools/ThirdPartyFunctions
|
# Variables referenced by the functions. Initialization at the end of the file.
|
||||||
|
unset CMAKE_VARIABLES
|
||||||
|
|
||||||
|
# sourceBASE, buildBASE, installBASE and BUILD_SUFFIX
|
||||||
|
# are defined in tools/ThirdPartyFunctions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
#
|
#
|
||||||
# Where things are or should be put
|
# Where things are or should be put
|
||||||
# VTK_VERSION and VTK_MAJOR should already have been set
|
# VTK_VERSION and VTK_MAJOR should already have been set
|
||||||
#
|
#
|
||||||
# VTK_SOURCE_DIR : location of the original sources
|
# VTK_SOURCEDIR : location of the original sources
|
||||||
# VTK_BINARY_DIR : location of the build
|
# VTK_BUILDDIR : location of the build
|
||||||
# VTK_DIR : location of the installed program
|
# VTK_DIR : location of the installed program
|
||||||
#
|
#
|
||||||
setVtkDirs()
|
setVtkDirs()
|
||||||
{
|
{
|
||||||
set -- "VTK-$VTK_VERSION" "VTK-v$VTK_VERSION"
|
set -- "VTK-$VTK_VERSION" "VTK-v$VTK_VERSION"
|
||||||
unset VTK_SOURCE_DIR
|
unset VTK_SOURCEDIR VTK_BUILDDIR
|
||||||
|
|
||||||
for i
|
# search
|
||||||
|
# - ThirdParty/PACKAGE
|
||||||
|
# - ThirdParty/sources/PACKAGE
|
||||||
|
# - ThirdParty/sources/vtk/PACKAGE
|
||||||
|
# - ThirdParty/sources/paraview/PACKAGE
|
||||||
|
for package in "$@"
|
||||||
do
|
do
|
||||||
VTK_SOURCE_DIR="$sourceBASE/$i"
|
for check in \
|
||||||
[ -d "$VTK_SOURCE_DIR" ] && break
|
"$package" \
|
||||||
|
"sources/$package" \
|
||||||
|
"sources/vtk/$package" \
|
||||||
|
"sources/paraview/$package" \
|
||||||
|
;
|
||||||
|
do
|
||||||
|
if [ -d "$sourceBASE/$check" ]
|
||||||
|
then
|
||||||
|
echo "Found sources: $check" 1>&2
|
||||||
|
VTK_SOURCEDIR="$sourceBASE/$check"
|
||||||
|
break 2
|
||||||
|
fi
|
||||||
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
[ -d "$VTK_SOURCE_DIR" ] || {
|
[ -d "$VTK_SOURCEDIR" ] || {
|
||||||
echo "Did not locate VTK version:"
|
echo "Did not locate VTK version:"
|
||||||
while [ "$#" -ge 1 ]; do echo " $1"; shift; done
|
while [ "$#" -ge 1 ]; do echo " $1"; shift; done
|
||||||
echo
|
echo
|
||||||
echo "In the directory:"
|
echo "In the directory:"
|
||||||
echo " $sourceBASE"
|
echo " $sourceBASE"
|
||||||
|
echo " \-- sources/paraview"
|
||||||
|
echo " |-- vtk"
|
||||||
|
echo " \\-- paraview"
|
||||||
echo
|
echo
|
||||||
echo "abort build"
|
echo "abort build"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# VTK_BINARY_DIR=$buildBASE/VTK-$VTK_VERSION${OBJ_ADD:+-$OBJ_ADD}
|
VTK_BUILDDIR="$buildBASE/VTK-$VTK_VERSION$BUILD_SUFFIX"
|
||||||
VTK_BINARY_DIR=$buildBASE/VTK-$VTK_VERSION
|
VTK_DIR="$installBASE/VTK-$VTK_VERSION$BUILD_SUFFIX"
|
||||||
|
export GIT_DIR="$VTK_SOURCEDIR/.git" # Avoid seeing our own git-repo
|
||||||
|
|
||||||
# VTK_DIR=$installBASE/VTK-$VTK_VERSION${OBJ_ADD:+-$OBJ_ADD}
|
export VTK_SOURCEDIR VTK_BUILDDIR VTK_DIR
|
||||||
VTK_DIR=$installBASE/VTK-$VTK_VERSION
|
|
||||||
|
|
||||||
export VTK_SOURCE_DIR VTK_BINARY_DIR VTK_DIR
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "VTK_SOURCE_DIR=$VTK_SOURCE_DIR"
|
|
||||||
echo "VTK_BINARY_DIR=$VTK_BINARY_DIR"
|
|
||||||
echo "VTK_DIR=$VTK_DIR"
|
echo "VTK_DIR=$VTK_DIR"
|
||||||
|
echo "VTK_SOURCEDIR=$VTK_SOURCEDIR"
|
||||||
# Forcefully override the .git path for the VTK source code directory
|
echo "VTK_BUILDDIR=$VTK_BUILDDIR"
|
||||||
export GIT_DIR=$ParaView_SOURCE_DIR/.git
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -109,7 +118,7 @@ setVtkVersion()
|
|||||||
#
|
#
|
||||||
patchVTK()
|
patchVTK()
|
||||||
{
|
{
|
||||||
applyPatch "vtk-$VTK_VERSION" "$VTK_SOURCE_DIR"
|
applyPatch "vtk-$VTK_VERSION" "$VTK_SOURCEDIR"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -121,41 +130,67 @@ configVTK()
|
|||||||
local cmake=$(findCMake)
|
local cmake=$(findCMake)
|
||||||
|
|
||||||
# Remove any existing build folder and recreate
|
# Remove any existing build folder and recreate
|
||||||
if [ -d $VTK_BINARY_DIR ]
|
if [ -d "$VTK_BUILDDIR" ]
|
||||||
then
|
then
|
||||||
echo "removing old build directory"
|
echo "removing old build directory"
|
||||||
echo " $VTK_BINARY_DIR"
|
echo " $VTK_BUILDDIR"
|
||||||
rm -rf $VTK_BINARY_DIR
|
rm -rf "$VTK_BUILDDIR"
|
||||||
fi
|
fi
|
||||||
mkdir -p $VTK_BINARY_DIR
|
mkdir -p "$VTK_BUILDDIR"
|
||||||
|
|
||||||
addCMakeVariable "CMAKE_BUILD_TYPE:STRING=$buildType"
|
addCMakeVariable "CMAKE_BUILD_TYPE=$BUILD_TYPE"
|
||||||
|
|
||||||
cd $VTK_BINARY_DIR || exit 1 # change to build folder
|
cd "$VTK_BUILDDIR" || exit # Change to build folder
|
||||||
|
|
||||||
echo "----"
|
echo "----"
|
||||||
echo "Configuring VTK-$VTK_VERSION"
|
echo "Configuring VTK-$VTK_VERSION"
|
||||||
echo " MESA support : ${withMESA:-false}"
|
echo " MESA support : ${withMESA:-false}"
|
||||||
echo " Source : $VTK_SOURCE_DIR"
|
echo " Source : $VTK_SOURCEDIR"
|
||||||
echo " Build : $VTK_BINARY_DIR"
|
echo " Build : $VTK_BUILDDIR"
|
||||||
echo " Target : $VTK_DIR"
|
echo " Target : $VTK_DIR"
|
||||||
echo " Build type : $buildType"
|
echo " cmake : $cmake"
|
||||||
echo " Cmake : $cmake"
|
echo " Build suffix : ${BUILD_SUFFIX:-none}"
|
||||||
echo "----"
|
echo "----"
|
||||||
echo
|
echo
|
||||||
echo "$cmake" \
|
echo "$cmake" \
|
||||||
-DCMAKE_INSTALL_PREFIX:PATH=$VTK_DIR \
|
-DCMAKE_INSTALL_PREFIX="$VTK_DIR" \
|
||||||
$CMAKE_VARIABLES \
|
$CMAKE_VARIABLES \
|
||||||
$VTK_SOURCE_DIR
|
"$VTK_SOURCEDIR"
|
||||||
echo
|
echo
|
||||||
echo "----"
|
echo "----"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Run cmake to create Makefiles
|
# Run cmake to create Makefiles
|
||||||
$cmake \
|
$cmake \
|
||||||
-DCMAKE_INSTALL_PREFIX:PATH=$VTK_DIR \
|
-DCMAKE_INSTALL_PREFIX="$VTK_DIR" \
|
||||||
$CMAKE_VARIABLES \
|
$CMAKE_VARIABLES \
|
||||||
$VTK_SOURCE_DIR
|
"$VTK_SOURCEDIR"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# MPI support for VTK
|
||||||
|
#
|
||||||
|
unset -f addMpiSupport 2>/dev/null
|
||||||
|
addMpiSupport()
|
||||||
|
{
|
||||||
|
if [ "${withMPI:=false}" != true ]
|
||||||
|
then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
addCMakeVariable "VTK_Group_MPI=ON"
|
||||||
|
addCMakeVariable "Module_vtkRenderingParallel=ON"
|
||||||
|
addCMakeVariable "Module_vtkParallelMPI=ON"
|
||||||
|
|
||||||
|
if [ "${MPI_MAX_PROCS:=0}" -gt 1 ]
|
||||||
|
then
|
||||||
|
addCMakeVariable "VTK_MPI_MAX_NUMPROCS=$MPI_MAX_PROCS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "----"
|
||||||
|
echo "MPI information:"
|
||||||
|
echo " home : $MPI_HOME"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -165,17 +200,15 @@ configVTK()
|
|||||||
#
|
#
|
||||||
makeVTK()
|
makeVTK()
|
||||||
{
|
{
|
||||||
cd $VTK_BINARY_DIR || exit 1 # change to build folder
|
cd "$VTK_BUILDDIR" || exit # Change to build folder
|
||||||
echo " Starting make"
|
echo " Starting make"
|
||||||
time make -j $WM_NCOMPPROCS
|
time make -j $WM_NCOMPPROCS
|
||||||
echo " Done make"
|
|
||||||
|
|
||||||
# Remove lib if it is a link
|
# Remove lib if it is a link
|
||||||
# (how this was previously handled before 'make install' worked)
|
# (how this was previously handled before 'make install' worked)
|
||||||
if [ -L lib ]
|
[ -L lib ] && rm -f lib 2>/dev/null
|
||||||
then
|
|
||||||
rm lib 2>/dev/null
|
echo " Done make" # Last statement for clean return code
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -184,31 +217,25 @@ makeVTK()
|
|||||||
#
|
#
|
||||||
installVTK()
|
installVTK()
|
||||||
{
|
{
|
||||||
cd $VTK_BINARY_DIR || exit 1 # Change to build folder
|
cd "$VTK_BUILDDIR" || exit # Change to build folder
|
||||||
echo " Installing VTK to $VTK_DIR"
|
echo " Installing VTK to $VTK_DIR"
|
||||||
|
|
||||||
make install
|
make install
|
||||||
|
|
||||||
cat<< INFO
|
/bin/cat<<INFO
|
||||||
|
|
||||||
---
|
====
|
||||||
Installation complete for vtk-$VTK_VERSION
|
Installation complete for vtk-$VTK_VERSION as
|
||||||
VTK_DIR=$VTK_DIR
|
VTK_DIR=$VTK_DIR
|
||||||
---
|
====
|
||||||
INFO
|
INFO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Clear the referenced variables before using any of the functions
|
|
||||||
unset CMAKE_VARIABLES
|
|
||||||
|
|
||||||
# Start with these general settings
|
# Start with these general settings
|
||||||
addCMakeVariable "BUILD_SHARED_LIBS:BOOL=ON VTK_USE_RPATH:BOOL=OFF"
|
addCMakeVariable "BUILD_SHARED_LIBS=ON" "BUILD_TESTING=OFF"
|
||||||
|
|
||||||
# Don't build test tree
|
|
||||||
addCMakeVariable "BUILD_TESTING:BOOL=OFF"
|
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -1,27 +0,0 @@
|
|||||||
/* NOTE: make any changes to this file in etc/wmakeFiles/ */
|
|
||||||
|
|
||||||
adf = libadf
|
|
||||||
$(adf)/ADF_fortran_2_c.c
|
|
||||||
$(adf)/ADF_interface.c
|
|
||||||
$(adf)/ADF_internals.c
|
|
||||||
|
|
||||||
ccmio = libccmio
|
|
||||||
$(ccmio)/ccmio.c
|
|
||||||
$(ccmio)/ccmiocore.c
|
|
||||||
$(ccmio)/ccmioprivate.c
|
|
||||||
$(ccmio)/ccmioutility.c
|
|
||||||
$(ccmio)/ccmioversion.c
|
|
||||||
|
|
||||||
/*
|
|
||||||
* the cgns library is not used by ccmio
|
|
||||||
* retain for documentation purposes only
|
|
||||||
*
|
|
||||||
cgns = libcgns
|
|
||||||
$(cgns)/adf_cond.c
|
|
||||||
$(cgns)/adf_ftoc.c
|
|
||||||
$(cgns)/cgns_error.c
|
|
||||||
$(cgns)/cgns_internals.c
|
|
||||||
$(cgns)/cgnslib.c
|
|
||||||
*/
|
|
||||||
|
|
||||||
LIB = $(FOAM_EXT_LIBBIN)/libccmio
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
/* NOTE: make any changes to this file in etc/wmakeFiles/ */
|
|
||||||
|
|
||||||
/* EXE_INC = */
|
|
||||||
@ -1,33 +0,0 @@
|
|||||||
# openfoam notes:
|
|
||||||
# WM_CFLAGS, WM_LDFLAGS contain "-m32 -fPIC" etc
|
|
||||||
# WM_LABEL_SIZE == 64 for 'long' instead of 'int' for OpenFOAM labels
|
|
||||||
|
|
||||||
# compiled without pthread
|
|
||||||
|
|
||||||
EXE =
|
|
||||||
LIB = .so
|
|
||||||
OBJ = .o
|
|
||||||
|
|
||||||
MAKE = make
|
|
||||||
AR = gcc
|
|
||||||
ARFLAGS = $(WM_CFLAGS) -shared -o
|
|
||||||
CAT = cat
|
|
||||||
CCS = gcc
|
|
||||||
CCP = mpicc
|
|
||||||
CCD = mpicc
|
|
||||||
CFLAGS = $(WM_CFLAGS) -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -Drestrict=__restrict
|
|
||||||
|
|
||||||
# 32-bit vs. 64-bit labels
|
|
||||||
ifeq ($(WM_LABEL_SIZE),64)
|
|
||||||
CFLAGS += -DINTSIZE64
|
|
||||||
endif
|
|
||||||
|
|
||||||
CLIBFLAGS = -shared
|
|
||||||
LDFLAGS = -Xlinker --no-as-needed $(WM_LDFLAGS) -lz -lm -lrt
|
|
||||||
CP = cp
|
|
||||||
LEX = flex -Pscotchyy -olex.yy.c
|
|
||||||
LN = ln
|
|
||||||
MKDIR = mkdir
|
|
||||||
MV = mv
|
|
||||||
RANLIB = echo
|
|
||||||
YACC = bison -pscotchyy -y -b y
|
|
||||||
368
makeADIOS
368
makeADIOS
@ -1,368 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
# ========= |
|
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
# \\ / O peration |
|
|
||||||
# \\ / A nd | Copyright (C) 2016 OpenCFD Ltd.
|
|
||||||
# \\/ 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
|
|
||||||
# makeADIOS
|
|
||||||
#
|
|
||||||
# Description
|
|
||||||
# Build script for ADIOS
|
|
||||||
#
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
# Get version info
|
|
||||||
. $WM_PROJECT_DIR/etc/config.sh/functions
|
|
||||||
unset -f _foamAddPath _foamAddLib _foamAddMan # get settings only
|
|
||||||
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/ADIOS)
|
|
||||||
|
|
||||||
adiosPACKAGE=${adios_version:-adios-none}
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
# Run from third-party directory only
|
|
||||||
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
|
|
||||||
}
|
|
||||||
. etc/tools/ThirdPartyFunctions
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
usage() {
|
|
||||||
exec 1>&2
|
|
||||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
|
||||||
cat<<USAGE
|
|
||||||
|
|
||||||
usage: ${0##*/} [OPTION] [adios-VERSION]
|
|
||||||
options:
|
|
||||||
-cmake PATH With cmake from the path given
|
|
||||||
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
|
||||||
-help
|
|
||||||
|
|
||||||
* Build ADIOS
|
|
||||||
$adiosPACKAGE
|
|
||||||
|
|
||||||
USAGE
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
# Export WM settings in a form that GNU configure recognizes
|
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
|
||||||
[ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS"
|
|
||||||
[ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS"
|
|
||||||
|
|
||||||
# Parse options
|
|
||||||
while [ "$#" -gt 0 ]
|
|
||||||
do
|
|
||||||
case "$1" in
|
|
||||||
-h | -help)
|
|
||||||
usage
|
|
||||||
;;
|
|
||||||
-gcc)
|
|
||||||
export CC=gcc # use gcc/g++
|
|
||||||
export CXX=g++
|
|
||||||
;;
|
|
||||||
-cmake)
|
|
||||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
|
||||||
CMAKE_PATH="${2%%/}"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
ADIOS-[1-9]* | adios-[1-9]* | ADIOS-git* | adios-git*)
|
|
||||||
adiosPACKAGE="${1%%/}"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
die "unknown option/argument: '$1'"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
[ -n "$adiosPACKAGE" ] || die "The adios-VERSION was not specified"
|
|
||||||
|
|
||||||
# nothing to build
|
|
||||||
if _foamIsNone "$adiosPACKAGE"
|
|
||||||
then
|
|
||||||
echo "Using adios-none (skip ThirdParty build of ADIOS)"
|
|
||||||
exit 0
|
|
||||||
elif _foamIsSystem "$adiosPACKAGE"
|
|
||||||
then
|
|
||||||
echo "Using adios-system"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# Build ADIOS
|
|
||||||
# ADIOS_SOURCE_DIR : location of the original sources
|
|
||||||
# ADIOS_ARCH_PATH : installation directory
|
|
||||||
|
|
||||||
ADIOS_SOURCE_DIR=$sourceBASE/$adiosPACKAGE
|
|
||||||
ADIOS_ARCH_PATH=$installBASE/$adiosPACKAGE
|
|
||||||
|
|
||||||
: ${FOAM_MPI:=dummy}
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo ========================================
|
|
||||||
echo "Build adios library $adiosPACKAGE for $FOAM_MPI"
|
|
||||||
echo
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Manual adjustments to adios config
|
|
||||||
#
|
|
||||||
adjustADIOS()
|
|
||||||
{
|
|
||||||
# Rename libraries according to FOAM_MPI
|
|
||||||
(
|
|
||||||
cd $ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH || exit 1
|
|
||||||
|
|
||||||
if [ "$FOAM_MPI" != dummy ]
|
|
||||||
then
|
|
||||||
\mv -f libadios.a libadios_$FOAM_MPI.a
|
|
||||||
\mv -f libadiosread.a libadiosread_$FOAM_MPI.a
|
|
||||||
fi
|
|
||||||
\mv -f libadios_nompi.a libadios_dummy.a
|
|
||||||
\mv -f libadiosread_nompi.a libadiosread_dummy.a
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "ADIOS library renamed to libadios_$FOAM_MPI"
|
|
||||||
echo
|
|
||||||
)
|
|
||||||
|
|
||||||
# We don't need/use XML things
|
|
||||||
\rm -f $ADIOS_ARCH_PATH/bin/adios_lint
|
|
||||||
|
|
||||||
# Replace resolved paths with variables
|
|
||||||
echo "Adjust prefix for ADIOS"
|
|
||||||
for i in \
|
|
||||||
$ADIOS_ARCH_PATH/bin/adios_config \
|
|
||||||
$ADIOS_ARCH_PATH/etc/adios_config.flags \
|
|
||||||
;
|
|
||||||
do
|
|
||||||
[ -f "$i" ] || {
|
|
||||||
echo " no such file - '$i'"
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
if sed -i -e 's|'"$WM_THIRD_PARTY_DIR"'|$WM_THIRD_PARTY_DIR|g' $i
|
|
||||||
then
|
|
||||||
echo " '$i'"
|
|
||||||
else
|
|
||||||
echo " problems with '$i'"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Adjust the config flags file:
|
|
||||||
# * Remove references to Fortran libraries (disabled in configure)
|
|
||||||
# * Remove references to deprecated version 1 API
|
|
||||||
# * Cleanup excessive whitespace
|
|
||||||
# * Handle renamed libraries:
|
|
||||||
# - libadios -> libadios_$FOAM_MPI
|
|
||||||
# - libadios_nompi -> libadios_dummy
|
|
||||||
#
|
|
||||||
echo "Adjust library names for ADIOS"
|
|
||||||
for i in \
|
|
||||||
$ADIOS_ARCH_PATH/etc/adios_config.flags \
|
|
||||||
;
|
|
||||||
do
|
|
||||||
[ -f "$i" ] || {
|
|
||||||
echo " no such file - '$i'"
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
if sed -i \
|
|
||||||
-e '/_FLIB=/d' \
|
|
||||||
-e '/_V1_INC=/d' \
|
|
||||||
-e 's| *| |g' \
|
|
||||||
-e 's|\(-ladios[a-z]*_\)nompi |\1dummy |g' \
|
|
||||||
$i
|
|
||||||
then
|
|
||||||
echo " '$i'"
|
|
||||||
else
|
|
||||||
echo " problems with '$i'"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$FOAM_MPI" != dummy ]
|
|
||||||
then
|
|
||||||
sed -i -e 's|\(-ladios[a-z]*\) |\1_'"$FOAM_MPI |g" $i || \
|
|
||||||
echo " problems with '$i'"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# List ADIOS methods/configuration
|
|
||||||
#
|
|
||||||
listMethods()
|
|
||||||
{
|
|
||||||
[ -f $ADIOS_ARCH_PATH/bin/adios_config ] || {
|
|
||||||
echo "Warning: no adios_config"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "==============="
|
|
||||||
|
|
||||||
# May have problems listing parallel methods (eg, transport key missing)
|
|
||||||
if $ADIOS_ARCH_PATH/bin/adios_config -m >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
$ADIOS_ARCH_PATH/bin/adios_config -m 2>/dev/null
|
|
||||||
else
|
|
||||||
echo "Warning: could not list parallel methods"
|
|
||||||
# Fallback to serial methods
|
|
||||||
$ADIOS_ARCH_PATH/bin/adios_config -s -m 2>/dev/null
|
|
||||||
fi || echo "Warning: could not list configured methods"
|
|
||||||
echo "==============="
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# Needs future adjustment
|
|
||||||
# - for shared library
|
|
||||||
# - for mpi-specific library locations
|
|
||||||
if [ -f $ADIOS_ARCH_PATH/include/adios.h \
|
|
||||||
-a -r $ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libadios_${FOAM_MPI}.a ]
|
|
||||||
then
|
|
||||||
echo " ADIOS header in $ADIOS_ARCH_PATH/include"
|
|
||||||
### echo " ADIOS libs in $FOAM_EXT_LIBBIN" # dynamic
|
|
||||||
echo " ADIOS libs in $ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" # static
|
|
||||||
listMethods
|
|
||||||
elif [ -z "$CMAKE_PATH" ]
|
|
||||||
then
|
|
||||||
echo "Starting build: $adiosPACKAGE (using configure)"
|
|
||||||
echo
|
|
||||||
(
|
|
||||||
# configuration options:
|
|
||||||
unset configOpt
|
|
||||||
|
|
||||||
# Add InfiniBand support
|
|
||||||
ibDir=/usr/local/ofed
|
|
||||||
if [ -d "$ibDir" -a "$FOAM_MPI" != dummy ]
|
|
||||||
then
|
|
||||||
configOpt="$configOpt --with-infiniband=$ibDir"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Transport layers
|
|
||||||
if [ -f "/usr/include/bzlib.h" ]
|
|
||||||
then
|
|
||||||
configOpt="$configOpt --with-bzip2"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f "/usr/include/zlib.h" ]
|
|
||||||
then
|
|
||||||
configOpt="$configOpt --with-zlib"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Other types of support
|
|
||||||
## $configOpt="$configOpt --with-hdf5=..."
|
|
||||||
## $configOpt="$configOpt --with-lustre=..."
|
|
||||||
## configOpt="$configOpt --enable-research-transports"
|
|
||||||
|
|
||||||
# end of configuration options
|
|
||||||
# ----------------------------
|
|
||||||
buildDIR=$buildBASE/$adiosPACKAGE
|
|
||||||
|
|
||||||
cd $ADIOS_SOURCE_DIR || exit 1
|
|
||||||
[ -e Makefile ] && make distclean 2>/dev/null
|
|
||||||
|
|
||||||
export GIT_DIR=$ADIOS_SOURCE_DIR/.git
|
|
||||||
|
|
||||||
applyPatch $adiosPACKAGE $ADIOS_SOURCE_DIR
|
|
||||||
|
|
||||||
# Remove any existing build folder and recreate
|
|
||||||
rm -rf $ADIOS_ARCH_DIR
|
|
||||||
rm -rf $buildDIR 2>/dev/null
|
|
||||||
mkdir -p $buildDIR
|
|
||||||
|
|
||||||
[ -f configure ] || {
|
|
||||||
echo "no configure for $adiosPACKAGE ... trying autogen"
|
|
||||||
./autogen.sh
|
|
||||||
}
|
|
||||||
|
|
||||||
# May not work properly with FOAM_MPI = dummy
|
|
||||||
if [ "$FOAM_MPI" = dummy ]
|
|
||||||
then
|
|
||||||
configOpt="$configOpt --without-mpi"
|
|
||||||
else
|
|
||||||
CC=mpicc
|
|
||||||
CXX=mpicxx
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Install into lib64/
|
|
||||||
cd $buildDIR && $ADIOS_SOURCE_DIR/configure \
|
|
||||||
--prefix=$ADIOS_ARCH_PATH \
|
|
||||||
--libdir=$ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH \
|
|
||||||
--disable-fortran \
|
|
||||||
--with-pic \
|
|
||||||
--without-fastbit \
|
|
||||||
$configOpt \
|
|
||||||
&& make -j $WM_NCOMPPROCS all \
|
|
||||||
&& make install \
|
|
||||||
&& echo "Built: $adiosPACKAGE" \
|
|
||||||
&& adjustADIOS \
|
|
||||||
&& listMethods
|
|
||||||
) || {
|
|
||||||
echo "Error building: $adiosPACKAGE"
|
|
||||||
}
|
|
||||||
else
|
|
||||||
# CMake options often lag the configure ones
|
|
||||||
echo "Starting build: $adiosPACKAGE (using cmake)"
|
|
||||||
echo
|
|
||||||
(
|
|
||||||
buildDIR=$buildBASE/$adiosPACKAGE
|
|
||||||
cd $ADIOS_SOURCE_DIR || exit 1
|
|
||||||
|
|
||||||
export GIT_DIR=$ADIOS_SOURCE_DIR/.git
|
|
||||||
|
|
||||||
applyPatch $adiosPACKAGE $ADIOS_SOURCE_DIR
|
|
||||||
|
|
||||||
# Remove any existing build folder and recreate
|
|
||||||
rm -rf $ADIOS_ARCH_DIR
|
|
||||||
rm -rf $buildDIR 2>/dev/null
|
|
||||||
mkdir -p $buildDIR
|
|
||||||
|
|
||||||
# May not work properly with FOAM_MPI = dummy
|
|
||||||
if [ "$FOAM_MPI" = dummy ]
|
|
||||||
then
|
|
||||||
configOpt="$configOpt --without-mpi"
|
|
||||||
else
|
|
||||||
CC=mpicc
|
|
||||||
CXX=mpicxx
|
|
||||||
fi
|
|
||||||
|
|
||||||
cmake=$(findCMake)
|
|
||||||
|
|
||||||
# Install into lib64/
|
|
||||||
cd $buildDIR && $cmake \
|
|
||||||
-DCMAKE_INSTALL_PREFIX=$ADIOS_ARCH_PATH \
|
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
|
||||||
-DBUILD_FORTRAN:BOOL=FALSE \
|
|
||||||
$ADIOS_SOURCE_DIR \
|
|
||||||
&& make -j $WM_NCOMPPROCS all \
|
|
||||||
&& make install \
|
|
||||||
&& echo "Built: $adiosPACKAGE" \
|
|
||||||
&& adjustADIOS \
|
|
||||||
&& listMethods
|
|
||||||
) || {
|
|
||||||
echo "Error building: $adiosPACKAGE"
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
|
||||||
232
makeAdios2
Executable file
232
makeAdios2
Executable file
@ -0,0 +1,232 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | www.openfoam.com
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2018-2023 OpenCFD Ltd.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# makeAdios2
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Build script for ADIOS2
|
||||||
|
#
|
||||||
|
# ----------------------------------------------
|
||||||
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Dynamic library ending (default is .so)
|
||||||
|
[ "$(uname -s)" = Darwin ] && EXT_SO=.dylib || EXT_SO=.so
|
||||||
|
|
||||||
|
# Short-circuit test for an installation
|
||||||
|
if [ "$1" = "-test" ]
|
||||||
|
then
|
||||||
|
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
|
||||||
|
dir="${2%/}" # <- *_ARCH_PATH
|
||||||
|
[ -d "$dir/include" ] || exit 2
|
||||||
|
|
||||||
|
package="adios2"
|
||||||
|
libName="libadios2"
|
||||||
|
libName2="libadios2_cxx11_mpi"
|
||||||
|
for lib in \
|
||||||
|
"$dir/lib/$libName$EXT_SO" \
|
||||||
|
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName$EXT_SO" \
|
||||||
|
"$dir/lib/$libName2$EXT_SO" \
|
||||||
|
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName2$EXT_SO" \
|
||||||
|
;
|
||||||
|
do
|
||||||
|
if [ -r "$lib" ]
|
||||||
|
then
|
||||||
|
echo " $package include: $dir/include"
|
||||||
|
echo " $package library: ${lib%/*}"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
if : # Run from third-party directory
|
||||||
|
then
|
||||||
|
cd "${0%/*}" || exit
|
||||||
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
|
echo " Check your OpenFOAM environment and installation"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/CMakeFunctions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Obtain version from OpenFOAM etc/config.sh file:
|
||||||
|
_foamConfig adios2
|
||||||
|
|
||||||
|
PACKAGE="${adios2_version:-none}"
|
||||||
|
|
||||||
|
# Hint for cmake findMPI
|
||||||
|
if [ -d "$MPI_ARCH_PATH" ]
|
||||||
|
then
|
||||||
|
export MPI_HOME="$MPI_ARCH_PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
printVersions() { listPackageVersions adios; exit 0; }
|
||||||
|
printHelp() {
|
||||||
|
cat<<USAGE
|
||||||
|
|
||||||
|
Usage: ${0##*/} [OPTION] [adios-VERSION]
|
||||||
|
options:
|
||||||
|
-force Force compilation, even if include/library already exists
|
||||||
|
-gcc Force use of gcc/g++
|
||||||
|
-cmake PATH With cmake from the given path
|
||||||
|
-mpi-home PATH With hint for MPI_HOME
|
||||||
|
-DNAME=VALUE add cmake variable
|
||||||
|
-list List available unpacked source versions
|
||||||
|
-help Display usage help
|
||||||
|
|
||||||
|
* Build ADIOS2
|
||||||
|
${PACKAGE:-[unspecified]}
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
showDownloadHint adios2
|
||||||
|
exit 0 # Clean exit
|
||||||
|
}
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
exportCompiler minimal # Minimal compiler info for CMake/configure
|
||||||
|
|
||||||
|
unset optForce
|
||||||
|
|
||||||
|
# Parse options
|
||||||
|
while [ "$#" -gt 0 ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
'') ;; # Ignore empty
|
||||||
|
-h | -help*) printHelp;;
|
||||||
|
-list) printVersions;;
|
||||||
|
-gcc) useGcc ;;
|
||||||
|
-force) optForce=true ;;
|
||||||
|
|
||||||
|
-cmake)
|
||||||
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
CMAKE_PATH="${2%%/}"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-mpi-home) # mpi with hint
|
||||||
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
export MPI_HOME="${2%%/}"
|
||||||
|
case "${MPI_HOME:-none}" in (false|none) unset MPI_HOME;; esac
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
|
||||||
|
adios/* | sources/ADIOS* | sources/adios* | \
|
||||||
|
ADIOS2-[0-9]* | ADIOS2-git* | ADIOS-[0-9]* | ADIOS-git* | \
|
||||||
|
adios2-[0-9]* | adios2-git* | adios-[0-9]* | adios-git*)
|
||||||
|
PACKAGE="${1%%/}"
|
||||||
|
;;
|
||||||
|
-D[A-Z]*=* | [A-Z]*=*) # cmake variables
|
||||||
|
addCMakeVariable "$1"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
die "unknown option/argument: '$1'"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z "$PACKAGE" ]
|
||||||
|
then
|
||||||
|
die "The ADIOS package/version not specified"
|
||||||
|
elif _foamIsNone "$PACKAGE" || _foamIsSystem "$PACKAGE"
|
||||||
|
then
|
||||||
|
echo "Using none/system (skip ThirdParty build of ADIOS)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Known build issues for mingw (various things)
|
||||||
|
case "$WM_COMPILER" in
|
||||||
|
(Mingw*)
|
||||||
|
if [ "$optForce" = true ]
|
||||||
|
then
|
||||||
|
echo "Warning: adios2 - known compilation issues with $WM_COMPILER"
|
||||||
|
else
|
||||||
|
echo "Skipping adios2 - known compilation issues with $WM_COMPILER"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Build ADIOS
|
||||||
|
# *PACKAGE : name-version of the package
|
||||||
|
# *SOURCE : location of original sources
|
||||||
|
# *PREFIX : installation directory
|
||||||
|
|
||||||
|
PKG_SOURCE="$(findSourceDir "$PACKAGE")"
|
||||||
|
PACKAGE="$(basename "$PACKAGE")"
|
||||||
|
PKG_PREFIX="$installBASE/$PACKAGE"
|
||||||
|
export GIT_DIR="$PKG_SOURCE/.git"
|
||||||
|
|
||||||
|
: "${FOAM_MPI:=dummy}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo ========================================
|
||||||
|
echo "Build adios library $PACKAGE for $FOAM_MPI"
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Needs future adjustment
|
||||||
|
# - for mpi-specific library locations
|
||||||
|
if [ -z "$optForce" ] \
|
||||||
|
&& [ -f "$PKG_PREFIX/include/adios2.h" ] \
|
||||||
|
&& {
|
||||||
|
[ -r "$PKG_PREFIX/lib/libadios2$EXT_SO" ] \
|
||||||
|
|| [ -r "$PKG_PREFIX/lib$WM_COMPILER_LIB_ARCH/libadios2$EXT_SO" ]
|
||||||
|
}
|
||||||
|
then
|
||||||
|
echo " ADIOS2 already built : $PKG_PREFIX"
|
||||||
|
else
|
||||||
|
# CMake options often lag the configure ones
|
||||||
|
echo "Starting build: $PACKAGE (using cmake)"
|
||||||
|
echo
|
||||||
|
(
|
||||||
|
PKG_BUILD="$buildBASE/$PACKAGE"
|
||||||
|
cd "$PKG_SOURCE" || exit
|
||||||
|
|
||||||
|
applyPatch "$PACKAGE" "$PKG_SOURCE"
|
||||||
|
|
||||||
|
# Remove any existing build folder and recreate
|
||||||
|
rm -rf "$PKG_PREFIX"
|
||||||
|
rm -rf "$PKG_BUILD"
|
||||||
|
mkdir -p "$PKG_BUILD"
|
||||||
|
|
||||||
|
# May not work properly with FOAM_MPI = dummy
|
||||||
|
if [ "$FOAM_MPI" != dummy ]
|
||||||
|
then
|
||||||
|
CC=mpicc
|
||||||
|
CXX=mpicxx
|
||||||
|
fi
|
||||||
|
|
||||||
|
cmake=$(findCMake)
|
||||||
|
|
||||||
|
# Installs into lib64/
|
||||||
|
cd "$PKG_BUILD" && set -x && \
|
||||||
|
${cmake:?} \
|
||||||
|
-DCMAKE_INSTALL_PREFIX="$PKG_PREFIX" \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DADIOS2_USE_Fortran=FALSE \
|
||||||
|
-DADIOS2_BUILD_EXAMPLES=FALSE \
|
||||||
|
${WM_QUIET:+-DCMAKE_RULE_MESSAGES=OFF} \
|
||||||
|
"$PKG_SOURCE" \
|
||||||
|
&& make -j $WM_NCOMPPROCS all \
|
||||||
|
&& make install \
|
||||||
|
&& echo "Built: $PACKAGE"
|
||||||
|
) || {
|
||||||
|
echo "Error building: $PACKAGE"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
180
makeCCMIO
180
makeCCMIO
@ -3,95 +3,88 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
# \\ / A nd | www.openfoam.com
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
# Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
#
|
|
||||||
# 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
|
# Script
|
||||||
# makeCCMIO
|
# makeCCMIO
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Build CD-adapco's ccmio library
|
# Build the libccmio library
|
||||||
#
|
#
|
||||||
|
# ----------------------------------------------
|
||||||
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
if : # Run from third-party directory
|
||||||
|
then
|
||||||
|
cd "${0%/*}" || exit
|
||||||
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
|
echo " Check your OpenFOAM environment and installation"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Get version info
|
|
||||||
. $WM_PROJECT_DIR/etc/config.sh/functions
|
|
||||||
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/ccmio)
|
|
||||||
|
|
||||||
ccmioPACKAGE=${ccmio_version:-libccmio-2.6.1}
|
# libccmio version from OpenFOAM etc/config.sh file:
|
||||||
targetType=lib
|
_foamConfig ccmio
|
||||||
|
|
||||||
|
PACKAGE="${ccmio_version:-libccmio-2.6.1}"
|
||||||
|
targetType=lib # Default is static linkage
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
printVersions() { listPackageVersions ccmio libccmio; exit 0; }
|
||||||
cd ${0%/*} || exit 1
|
printHelp() {
|
||||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
cat<<USAGE
|
||||||
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
|
|
||||||
}
|
|
||||||
[ -n "$FOAM_EXT_LIBBIN" ] || {
|
|
||||||
echo "Error: FOAM_EXT_LIBBIN not set"
|
|
||||||
echo " Check the OpenFOAM entries in your dot-files and source them."
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
. etc/tools/ThirdPartyFunctions
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
usage()
|
|
||||||
{
|
|
||||||
exec 1>&2
|
|
||||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
|
||||||
/bin/cat<<USAGE
|
|
||||||
|
|
||||||
Usage: ${0##*/} [OPTION] [lib|libso] [libccmio-VERSION]
|
Usage: ${0##*/} [OPTION] [lib|libso] [libccmio-VERSION]
|
||||||
options:
|
options:
|
||||||
-help
|
-gcc Force use of gcc/g++
|
||||||
|
-list List available unpacked source versions
|
||||||
|
-help Display usage help
|
||||||
|
|
||||||
* Compile the proprietary libccmio library
|
* Compile the proprietary libccmio library
|
||||||
$ccmioPACKAGE
|
$PACKAGE
|
||||||
|
|
||||||
Users wishing to make use of the library should contact cd-adapco
|
Users wishing to obtain the library should contact Siemens PLM (cd-adapco)
|
||||||
(Siemens PLM) for possible download and terms of use.
|
for terms of use.
|
||||||
|
|
||||||
After obtaining the $ccmioPACKAGE library, place in folder
|
After obtaining the $PACKAGE library, place in folder
|
||||||
|
|
||||||
$WM_THIRD_PARTY_DIR/$ccmioPACKAGE/
|
$sourceBASE/$PACKAGE/
|
||||||
|
or $sourceBASE/sources/$PACKAGE/
|
||||||
|
|
||||||
prior to running this script.
|
prior to running this script.
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
exit 1
|
showDownloadHint ccmio
|
||||||
|
exit 0 # Clean exit
|
||||||
}
|
}
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
# Parse options
|
# Parse options
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
-h | -help*) printHelp;;
|
||||||
;;
|
-list) printVersions;;
|
||||||
|
-gcc) useGccWmake ;;
|
||||||
|
|
||||||
lib|libso)
|
lib|libso)
|
||||||
targetType="$1"
|
targetType="$1"
|
||||||
;;
|
;;
|
||||||
libccmio-[1-9]*)
|
|
||||||
ccmioPACKAGE="${1%%/}"
|
libccmio/* | sources/libccmio* | \
|
||||||
|
libccmio-[0-9]*)
|
||||||
|
PACKAGE="${1%%/}"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
die "unknown option/argument: '$1'"
|
die "unknown option/argument: '$1'"
|
||||||
@ -100,38 +93,69 @@ do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
# assert: directory must be available
|
requireWMakeToolchain
|
||||||
[ -d "$ccmioPACKAGE" ] || die "missing source directory '$ccmioPACKAGE'"
|
requireExtLibBin
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
CCMIO_SOURCE_DIR=$sourceBASE/$ccmioPACKAGE
|
|
||||||
CCMIO_ARCH_PATH=$installBASE/$ccmioPACKAGE
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Build LIBCCMIO
|
# Build LIBCCMIO
|
||||||
#
|
# *PACKAGE : name-version of the package
|
||||||
echo "---------------"
|
# *SOURCE : location of original sources
|
||||||
(
|
# *PREFIX : installation directory
|
||||||
cd $CCMIO_SOURCE_DIR || exit 1
|
|
||||||
incDIR=$CCMIO_ARCH_PATH/include/libccmio
|
|
||||||
libDIR=$CCMIO_ARCH_PATH/lib
|
|
||||||
|
|
||||||
mkdir -p $incDIR 2>/dev/null
|
PKG_SOURCE="$(findSourceDir "$PACKAGE")"
|
||||||
mkdir -p $libDIR 2>/dev/null
|
PACKAGE="$(basename "$PACKAGE")"
|
||||||
|
PKG_PREFIX="$installBASE/$PACKAGE"
|
||||||
|
export GIT_DIR="$PKG_SOURCE/.git"
|
||||||
|
|
||||||
|
# Sources must be available
|
||||||
|
[ -d "$PKG_SOURCE" ] || die "Missing sources: '$PACKAGE'"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Manual installation
|
||||||
|
#
|
||||||
|
install()
|
||||||
|
{
|
||||||
|
local incdir="$PKG_PREFIX"/include/libccmio
|
||||||
|
|
||||||
|
# Remove build artifacts from the source directory
|
||||||
|
# (for a clean build next time)
|
||||||
|
wclean
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Adjusting installation"
|
||||||
|
echo "Installing headers: $incdir"
|
||||||
|
|
||||||
|
# Make headers available
|
||||||
|
mkdir -m 0755 -p "$incdir"
|
||||||
|
/bin/cp -pv "$PKG_SOURCE"/libccmio/ccmio*.h "$incdir"
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "Starting build: $PACKAGE ($targetType)"
|
||||||
|
echo
|
||||||
|
(
|
||||||
|
cd "$PKG_SOURCE" || exit
|
||||||
|
rm -rf "$PKG_PREFIX"
|
||||||
|
rm -f "$FOAM_EXT_LIBBIN/libccmio$EXT_SO"
|
||||||
|
|
||||||
cpMakeFiles libccmio 2>/dev/null
|
cpMakeFiles libccmio 2>/dev/null
|
||||||
set +x
|
|
||||||
if wmake $targetType
|
|
||||||
then
|
|
||||||
# make headers available:
|
|
||||||
/bin/cp -pv libccmio/ccmio*.h $incDIR
|
|
||||||
|
|
||||||
# relocate static libraries to sub-directory:
|
# Static libraries in sub-directory
|
||||||
if [ "$targetType" = lib ]
|
export CCMIO_LIB_DIR="$PKG_PREFIX/lib$WM_COMPILER_LIB_ARCH"
|
||||||
then
|
|
||||||
/bin/mv -v $FOAM_EXT_LIBBIN/libccmio.a $libDIR
|
# Dynamic libraries directly into FOAM_EXT_LIBBIN
|
||||||
fi
|
if [ "$targetType" = libso ]
|
||||||
|
then
|
||||||
|
CCMIO_LIB_DIR="$FOAM_EXT_LIBBIN"
|
||||||
fi
|
fi
|
||||||
)
|
mkdir -m 0755 -p "$CCMIO_LIB_DIR" 2>/dev/null
|
||||||
|
|
||||||
|
wmake -j $WM_NCOMPPROCS -s $targetType \
|
||||||
|
&& echo "Built: $PACKAGE" \
|
||||||
|
&& install
|
||||||
|
) || {
|
||||||
|
echo "Error building: $PACKAGE"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
750
makeCGAL
750
makeCGAL
@ -3,24 +3,14 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
# \\ / A nd | www.openfoam.com
|
||||||
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||||
|
# Copyright (C) 2016-2022 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
#
|
|
||||||
# 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
|
# Script
|
||||||
# makeCGAL
|
# makeCGAL
|
||||||
@ -34,109 +24,189 @@
|
|||||||
# simply specify a 'system' version. For example,
|
# simply specify a 'system' version. For example,
|
||||||
# makeCGAL boost-system gmp-system
|
# makeCGAL boost-system gmp-system
|
||||||
#
|
#
|
||||||
|
# ----------------------------------------------
|
||||||
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Get CGAL, boost and gmp/mpfr versions
|
# Dynamic library ending (default is .so)
|
||||||
. $WM_PROJECT_DIR/etc/config.sh/functions
|
[ "$(uname -s)" = Darwin ] && EXT_SO=.dylib || EXT_SO=.so
|
||||||
unset -f _foamAddPath _foamAddLib _foamAddMan # get settings only
|
|
||||||
unset BOOST_ARCH_PATH CGAL_ARCH_PATH # purge current values
|
|
||||||
|
|
||||||
# compiler first, let CGAL config override GMP (eg, when there is no GMP)
|
# Short-circuit test for an installation
|
||||||
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/compiler)
|
if [ "$1" = "-test" ]
|
||||||
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/CGAL)
|
then
|
||||||
|
[ "$#" -eq 3 ] || { echo "${0##*/} -test : needs 2 argument"; exit 1; }
|
||||||
|
dir="${2%/}" # <- *_ARCH_PATH
|
||||||
|
[ -d "$dir/include" ] || exit 2
|
||||||
|
|
||||||
boostPACKAGE=${boost_version:-boost-system}
|
# CGAL
|
||||||
gmpPACKAGE=${gmp_version:-gmp-system}
|
[ -f "$dir"/include/CGAL/version.h ] || exit 2
|
||||||
mpfrPACKAGE=${mpfr_version:-mpfr-system}
|
|
||||||
cgalPACKAGE=$cgal_version
|
unset _my_cgal_libdir
|
||||||
|
_cacheinfo="$dir"/share/openfoam-build
|
||||||
|
if [ -f "$_cacheinfo" ]
|
||||||
|
then
|
||||||
|
_my_cgal_libdir="$(sed -ne 's#^CGAL_HEADER_ONLY=##p' "$_cacheinfo" 2>/dev/null)"
|
||||||
|
if [ "$_my_cgal_libdir" = true ]
|
||||||
|
then
|
||||||
|
_my_cgal_libdir=header
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$_my_cgal_libdir" != header ]
|
||||||
|
then
|
||||||
|
unset _my_cgal_libdir
|
||||||
|
libName="libCGAL"
|
||||||
|
for libdirName in "lib$WM_COMPILER_LIB_ARCH" lib
|
||||||
|
do
|
||||||
|
if [ -r "$dir/$libdirName/$libName$EXT_SO" ]
|
||||||
|
then
|
||||||
|
_my_cgal_libdir="$dir/$libdirName"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
[ -n "$_my_cgal_libdir" ] || exit 2
|
||||||
|
|
||||||
|
echo " CGAL include: $dir/include"
|
||||||
|
echo " CGAL library: $_my_cgal_libdir"
|
||||||
|
|
||||||
|
# Additional information about boost
|
||||||
|
dir="${3%/}" # <- BOOST_ARCH_PATH
|
||||||
|
libName="libboost_system"
|
||||||
|
for root in "$dir" /usr
|
||||||
|
do
|
||||||
|
[ -d "$root/include/boost" ] || continue
|
||||||
|
for libdirName in "lib$WM_COMPILER_LIB_ARCH" lib
|
||||||
|
do
|
||||||
|
if [ -r "$root/$libdirName/$libName$EXT_SO" ]
|
||||||
|
then
|
||||||
|
echo " boost include: $root/include"
|
||||||
|
echo " boost library: $root/$libdirName"
|
||||||
|
exit 0 # Success
|
||||||
|
break 2
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
if : # Run from third-party directory
|
||||||
|
then
|
||||||
|
cd "${0%/*}" || exit
|
||||||
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
|
echo " Check your OpenFOAM environment and installation"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
unset BOOST_ARCH_PATH CGAL_ARCH_PATH GMP_ARCH_PATH MPFR_ARCH_PATH # Purge old
|
||||||
|
unset GMP_DIR MPFR_DIR # Purge hints used by CGAL cmake
|
||||||
|
|
||||||
|
# CGAL, boost and gmp/mpfr versions from OpenFOAM etc/config.sh files.
|
||||||
|
# Get compiler first and let CGAL config override GMP and MPFR
|
||||||
|
_foamConfig compiler
|
||||||
|
_foamConfig CGAL
|
||||||
|
|
||||||
|
BOOST_PACKAGE="${boost_version:-boost-system}"
|
||||||
|
GMP_PACKAGE="${gmp_version:-gmp-system}"
|
||||||
|
MPFR_PACKAGE="${mpfr_version:-mpfr-system}"
|
||||||
|
CGAL_PACKAGE="$cgal_version"
|
||||||
|
|
||||||
|
if nonStandardPlatforms # Possibly unreliable inherited values
|
||||||
|
then
|
||||||
|
unset BOOST_ARCH_PATH CGAL_ARCH_PATH
|
||||||
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
printVersions() { listPackageVersions boost cgal; exit 0; }
|
||||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
printHelp() {
|
||||||
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
|
|
||||||
}
|
|
||||||
. etc/tools/ThirdPartyFunctions
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
Script="${0##*/}"
|
|
||||||
usage() {
|
|
||||||
exec 1>&2
|
|
||||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
|
||||||
cat<<USAGE
|
cat<<USAGE
|
||||||
|
|
||||||
usage: $Script [OPTION] [CGAL-VERSION] [boost-VERSION] [gmp-VERSION] [mpfr-VERSION]
|
Usage: ${0##*/} [OPTION] [CGAL-VERSION] [boost-VERSION] [gmp-VERSION] [mpfr-VERSION]
|
||||||
options:
|
options:
|
||||||
-cmake PATH with cmake from the path given
|
-gcc Force use of gcc/g++
|
||||||
-gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
-cmake PATH Use cmake from the given path
|
||||||
-no-lib compile CGAL for use in headers only mode (since CGAL 4.9)
|
-no-lib Configure CGAL for headers-only mode (default OpenFOAM >= 2006)
|
||||||
-system use system versions for boost/gmp/mpfr
|
-with-lib Configure CGAL with library
|
||||||
-help
|
-toolset=NAME Use named toolset in bootstrap
|
||||||
|
(use 'none' to let boost determine everything).
|
||||||
|
-system Use system versions for boost/gmp/mpfr
|
||||||
|
-list List available unpacked source versions
|
||||||
|
-help Display usage help
|
||||||
|
|
||||||
* build CGAL with
|
* build CGAL with
|
||||||
${cgalPACKAGE:-'unspecified CGAL version'}
|
${CGAL_PACKAGE:-[cgal unspecified]}
|
||||||
$boostPACKAGE
|
${BOOST_PACKAGE:-[boost unspecified]}
|
||||||
$gmpPACKAGE
|
${GMP_PACKAGE:-[gmp unspecified]}
|
||||||
$mpfrPACKAGE
|
${MPFR_PACKAGE:-[mpfr unspecified]}
|
||||||
|
|
||||||
Normally builds against ThirdParty boost and gmp/mpfr when possible.
|
Normally builds against ThirdParty boost and gmp/mpfr when possible.
|
||||||
To override this behaviour (and use the system boost and/or gmp/mpfr),
|
To override this behaviour (and use the system boost and/or gmp/mpfr),
|
||||||
simply specify a 'system' version. For example,
|
simply specify a 'system' version. For example,
|
||||||
$Script boost-system gmp-system
|
${0##*/} boost-system gmp-system
|
||||||
|
|
||||||
Use gmp-none to disable use of gmp/mpfr (eg, not available)
|
Use gmp-none to disable use of gmp/mpfr (eg, not available)
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
exit 1
|
showDownloadHint boost
|
||||||
|
showDownloadHint cgal
|
||||||
|
exit 0 # Clean exit
|
||||||
}
|
}
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Ensure CMake gets the correct C/C++ compiler
|
exportCompiler # Compiler info for CMake/configure
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
|
||||||
|
|
||||||
unset optHeadersOnly
|
unset optForce optHeadersOnly optToolset
|
||||||
|
|
||||||
# Parse options
|
# Parse options
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
-h | -help*) printHelp;;
|
||||||
;;
|
-list) printVersions;;
|
||||||
'')
|
-gcc) useGcc ;;
|
||||||
# discard empty arguments
|
-force) optForce=true ;;
|
||||||
;;
|
|
||||||
-gcc)
|
|
||||||
export CC=gcc # use gcc/g++
|
|
||||||
export CXX=g++
|
|
||||||
;;
|
|
||||||
-cmake)
|
-cmake)
|
||||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
CMAKE_PATH="${2%%/}"
|
CMAKE_PATH="${2%%/}"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
-toolset=*)
|
||||||
|
optToolset="${1#*=}"
|
||||||
|
;;
|
||||||
-sys*)
|
-sys*)
|
||||||
gmpPACKAGE="gmp-system"
|
GMP_PACKAGE="gmp-system"
|
||||||
mpfrPACKAGE="mpfr-system"
|
MPFR_PACKAGE="mpfr-system"
|
||||||
boostPACKAGE="boost-system"
|
BOOST_PACKAGE="boost-system"
|
||||||
unset BOOST_ARCH_PATH # avoid inconsistency
|
unset BOOST_ARCH_PATH GMP_ARCH_PATH MPFR_ARCH_PATH
|
||||||
;;
|
;;
|
||||||
-no-lib)
|
-no-lib)
|
||||||
optHeadersOnly=true
|
optHeadersOnly=true
|
||||||
;;
|
;;
|
||||||
gmp-[4-9]* | gmp-system | gmp-none)
|
-with-lib)
|
||||||
gmpPACKAGE="${1%%/}"
|
optHeadersOnly=false
|
||||||
;;
|
;;
|
||||||
mpfr-[2-9]* | mpfr-system | mpfr-none)
|
gmp-[0-9]* | gmp-system | gmp-none)
|
||||||
mpfrPACKAGE="${1%%/}"
|
GMP_PACKAGE="${1%%/}"
|
||||||
|
unset GMP_ARCH_PATH
|
||||||
;;
|
;;
|
||||||
CGAL-[0-9]*)
|
mpfr-[0-9]* | mpfr-system | mpfr-none)
|
||||||
cgalPACKAGE="${1%%/}"
|
MPFR_PACKAGE="${1%%/}"
|
||||||
unset CGAL_ARCH_PATH # avoid inconsistency
|
unset MPFR_ARCH_PATH
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
boost/* | sources/boost* | \
|
||||||
boost-[0-9]* | boost_[0-9]* | boost-system )
|
boost-[0-9]* | boost_[0-9]* | boost-system )
|
||||||
boostPACKAGE="${1%%/}"
|
BOOST_PACKAGE="${1%%/}"
|
||||||
unset BOOST_ARCH_PATH # avoid inconsistency
|
unset BOOST_ARCH_PATH
|
||||||
|
;;
|
||||||
|
|
||||||
|
cgal/* | sources/cgal* | \
|
||||||
|
CGAL-[0-9]*)
|
||||||
|
CGAL_PACKAGE="${1%%/}"
|
||||||
|
unset CGAL_ARCH_PATH
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
die "unknown option/argument: '$1'"
|
die "unknown option/argument: '$1'"
|
||||||
@ -145,75 +215,229 @@ do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
[ -n "$cgalPACKAGE" ] || die "The cgal-VERSION was not specified"
|
[ -n "$CGAL_PACKAGE" ] || die "The cgal-VERSION was not specified"
|
||||||
|
|
||||||
# Nothing to build
|
# Nothing to build
|
||||||
if _foamIsNone $boostPACKAGE
|
if _foamIsNone "$BOOST_PACKAGE"
|
||||||
then
|
then
|
||||||
echo "Using boost-none (skip ThirdParty build of BOOST/CGAL)"
|
echo "Using boost-none (skip ThirdParty build of BOOST/CGAL)"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
if _foamIsNone $cgalPACKAGE
|
if _foamIsNone "$CGAL_PACKAGE"
|
||||||
then
|
then
|
||||||
echo "Using cgal-none (skip ThirdParty build of CGAL)"
|
echo "Using cgal-none (skip ThirdParty build of CGAL)"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# For OpenFOAM 1912 and earlier, no predefined default.
|
||||||
|
# Force headers-only *after* starting with OpenFOAM-v2006
|
||||||
|
if [ -z "$optHeadersOnly" ] && foamVersion=$(wmake -version 2>/dev/null)
|
||||||
|
then
|
||||||
|
if [ "${foamVersion:-0}" -gt 1912 ]
|
||||||
|
then
|
||||||
|
optHeadersOnly=true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Headers-only - might be able to avoid gmp/mpfr?
|
||||||
|
## if [ "${optHeadersOnly:-false}" = true ]
|
||||||
|
## then
|
||||||
|
## GMP_PACKAGE=none
|
||||||
|
## MPFR_PACKAGE=none
|
||||||
|
## unset GMP_ARCH_PATH MPFR_ARCH_PATH
|
||||||
|
## fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Build Boost
|
# Build Boost
|
||||||
|
# BOOST_ARCH_PATH : installation directory (as per config file)
|
||||||
|
#
|
||||||
|
# *PACKAGE : name-version of the package
|
||||||
|
# *SOURCE : location of original sources
|
||||||
|
# *PREFIX : installation directory
|
||||||
|
#
|
||||||
# For 64-bit:
|
# For 64-bit:
|
||||||
# - system is normally built into 'lib64'
|
# - system is normally built into 'lib64'
|
||||||
# - use Third-Party 'lib64' for consistency.
|
# - use Third-Party 'lib64' for consistency.
|
||||||
# Boost 1_62_0 and older normally build into 'lib'.
|
# Boost 1_62_0 and older normally build into 'lib'.
|
||||||
#
|
|
||||||
# BOOST_ARCH_PATH : installation directory
|
|
||||||
# BOOST_SOURCE_DIR : location of the original sources
|
|
||||||
|
|
||||||
BOOST_SOURCE_DIR=$sourceBASE/$boostPACKAGE
|
BOOST_SOURCE="$(findSourceDir "$BOOST_PACKAGE")"
|
||||||
: ${BOOST_ARCH_PATH:=$installBASE/$boostPACKAGE} # Fallback
|
BOOST_PACKAGE="$(basename "$BOOST_PACKAGE")"
|
||||||
|
BOOST_PREFIX="$installBASE/$BOOST_PACKAGE"
|
||||||
|
|
||||||
boostInc="$BOOST_ARCH_PATH/include"
|
# Override as per config file (if any)
|
||||||
boostLib="$BOOST_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH"
|
[ -n "$BOOST_ARCH_PATH" ] && BOOST_PREFIX="$BOOST_ARCH_PATH"
|
||||||
|
|
||||||
if _foamIsSystem $boostPACKAGE
|
boostInc="$BOOST_PREFIX/include"
|
||||||
|
boostLib="$BOOST_PREFIX/lib$WM_COMPILER_LIB_ARCH"
|
||||||
|
|
||||||
|
if _foamIsSystem "$BOOST_PACKAGE"
|
||||||
then
|
then
|
||||||
echo "Using boost-system (skip ThirdParty build of BOOST)"
|
echo "Using boost-system (skip ThirdParty build of BOOST)"
|
||||||
|
|
||||||
# Tagged as 'system' but could actually point to a central location
|
# Tagged as 'system' but could actually point to a central location
|
||||||
[ -d "$BOOST_ARCH_PATH/include" ] || {
|
|
||||||
|
if [ -d "$boostInc" ]
|
||||||
|
then
|
||||||
|
if BOOST_PREFIX=$(cd "$BOOST_PREFIX" 2>/dev/null && pwd -P)
|
||||||
|
then
|
||||||
|
BOOST_PACKAGE="$(basename "$BOOST_PREFIX")"
|
||||||
|
else
|
||||||
|
echo "ERROR: bad path for BOOST_PREFIX"
|
||||||
|
echo "stopping build"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
libdir="$BOOST_PREFIX/lib"
|
||||||
|
else
|
||||||
boostInc="/usr/include"
|
boostInc="/usr/include"
|
||||||
boostLib="/usr/lib$WM_COMPILER_LIB_ARCH"
|
boostLib="/usr/lib$WM_COMPILER_LIB_ARCH"
|
||||||
}
|
libdir="/usr/lib"
|
||||||
|
fi
|
||||||
|
|
||||||
elif [ -f "$boostInc/boost/version.hpp" ]
|
# Use lib/ when lib64/ does not exist
|
||||||
|
[ -d "$libdir" -a ! -d "$boostLib" ] && boostLib="$libdir"
|
||||||
|
|
||||||
|
elif [ -z "$optForce" ] \
|
||||||
|
&& [ -f "$boostInc/boost/version.hpp" ]
|
||||||
then
|
then
|
||||||
echo "Using $boostPACKAGE"
|
echo "Using $BOOST_PACKAGE"
|
||||||
|
|
||||||
|
libdir="$BOOST_PREFIX/lib"
|
||||||
|
|
||||||
|
# Use lib when lib64 does not exist
|
||||||
|
[ -d "$libdir" -a ! -d "$boostLib" ] && boostLib="$libdir"
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "Starting build: $boostPACKAGE"
|
echo "Starting build: $BOOST_PACKAGE"
|
||||||
echo
|
echo
|
||||||
# Absolute path for --libdir
|
# Absolute path for --libdir
|
||||||
|
|
||||||
(
|
(
|
||||||
cd $BOOST_SOURCE_DIR || exit 1
|
# Write user-config.jam into source directory
|
||||||
|
# this is not great, but project-config.jam is written there too
|
||||||
|
cd "$BOOST_SOURCE" || exit
|
||||||
|
export GIT_DIR="$PWD/.git" # Avoid seeing our own git-repo
|
||||||
|
|
||||||
rm -rf $BOOST_ARCH_PATH
|
# Configuration options:
|
||||||
|
unset buildOpt
|
||||||
|
|
||||||
|
if [ "$optToolset" = none ]
|
||||||
|
then
|
||||||
|
# Let boost determine everything
|
||||||
|
unset optToolset
|
||||||
|
|
||||||
|
elif [ -n "$optToolset" ]
|
||||||
|
then
|
||||||
|
# Assume same toolset for bootstrap and build
|
||||||
|
buildOpt="toolset=$optToolset"
|
||||||
|
|
||||||
|
else
|
||||||
|
# No toolset specified, attempt some guesses
|
||||||
|
c_compiler="$(whichCC)"
|
||||||
|
|
||||||
|
# Compiler-specific adjustments
|
||||||
|
case "$WM_COMPILER" in
|
||||||
|
(Arm*)
|
||||||
|
optToolset=gcc # For boostrap
|
||||||
|
|
||||||
|
# For build
|
||||||
|
echo "using clang : arm : ${c_compiler} ;" > user-config.jam
|
||||||
|
echo "using mpi ;" >> user-config.jam
|
||||||
|
buildOpt="--user-config=user-config.jam toolset=clang"
|
||||||
|
;;
|
||||||
|
|
||||||
|
(Mingw*)
|
||||||
|
optToolset=gcc # For boostrap
|
||||||
|
|
||||||
|
# For build
|
||||||
|
echo "using gcc : mingw : ${c_compiler} ;" > user-config.jam
|
||||||
|
buildOpt="--user-config=user-config.jam toolset=gcc"
|
||||||
|
buildOpt="$buildOpt address-model=64 target-os=windows release"
|
||||||
|
;;
|
||||||
|
|
||||||
|
(*)
|
||||||
|
# For gcc-8, clang-9 etc.
|
||||||
|
|
||||||
|
case "${c_compiler}" in
|
||||||
|
(clang*)
|
||||||
|
optToolset=clang # For boostrap
|
||||||
|
|
||||||
|
# For build
|
||||||
|
echo "using clang : : ${c_compiler} ;" > user-config.jam
|
||||||
|
buildOpt="--user-config=user-config.jam toolset=clang"
|
||||||
|
;;
|
||||||
|
(gcc* | g++*)
|
||||||
|
optToolset=gcc # For boostrap
|
||||||
|
|
||||||
|
# For build
|
||||||
|
echo "using gcc : : ${c_compiler} ;" > user-config.jam
|
||||||
|
buildOpt="--user-config=user-config.jam toolset=gcc"
|
||||||
|
;;
|
||||||
|
(ic[cx]* | icp[cx]*) # intel
|
||||||
|
optToolset=gcc # For boostrap
|
||||||
|
|
||||||
|
# For build
|
||||||
|
echo "using intel : : ${c_compiler} ;" > user-config.jam
|
||||||
|
buildOpt="--user-config=user-config.jam toolset=intel"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# End of configuration options
|
||||||
|
# ----------------------------
|
||||||
|
|
||||||
|
rm -rf "$BOOST_PREFIX"
|
||||||
|
|
||||||
./bootstrap.sh \
|
./bootstrap.sh \
|
||||||
--prefix=$BOOST_ARCH_PATH \
|
--prefix="$BOOST_PREFIX" \
|
||||||
--libdir=$boostLib \
|
--libdir="$boostLib" \
|
||||||
--with-libraries=thread \
|
--with-libraries=thread \
|
||||||
--with-libraries=system \
|
--with-libraries=system \
|
||||||
&& ./bjam toolset=$WM_CC -j $WM_NCOMPPROCS install \
|
${optToolset:+--with-toolset="$optToolset"} \
|
||||||
&& echo "Built: boost"
|
&& ./b2 $buildOpt -j $WM_NCOMPPROCS install \
|
||||||
|
&& echo "Built: $BOOST_PACKAGE"
|
||||||
) || {
|
) || {
|
||||||
echo "Error building: boost"
|
echo "Error building: $BOOST_PACKAGE"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Cleanup in-source build artifacts
|
||||||
|
(
|
||||||
|
set +e # Ignore errors
|
||||||
|
cd "$BOOST_SOURCE" 2>/dev/null || exit 0
|
||||||
|
|
||||||
|
echo "Cleanup in-source build artifacts: $BOOST_PACKAGE"
|
||||||
|
rm -f project-config.jam* user-config.jam*
|
||||||
|
rm -f b2 bjam bootstrap.log
|
||||||
|
rm -rf \
|
||||||
|
bin.v2 stage \
|
||||||
|
libs/config/checks/architecture/bin \
|
||||||
|
tools/build/src/engine/bootstrap \
|
||||||
|
tools/build/src/engine/bin.* \
|
||||||
|
;
|
||||||
|
true
|
||||||
|
)
|
||||||
|
|
||||||
|
# Unneeded generated files
|
||||||
|
for dir in share/doc share/info share/man
|
||||||
|
do
|
||||||
|
if [ -d "$BOOST_PREFIX/$dir" ]
|
||||||
|
then
|
||||||
|
echo "Discard $dir files to save space: $BOOST_PACKAGE"
|
||||||
|
rm -rf "$BOOST_PREFIX/$dir"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
rmdir "$BOOST_PREFIX"/share 2>/dev/null || true
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# nothing left to build
|
|
||||||
if _foamIsSystem $cgalPACKAGE
|
# Nothing left to build
|
||||||
|
if _foamIsSystem "$CGAL_PACKAGE"
|
||||||
then
|
then
|
||||||
echo "Using cgal-system (skip ThirdParty build of CGAL)"
|
echo "Using cgal-system (skip ThirdParty build of CGAL)"
|
||||||
exit 0
|
exit 0
|
||||||
@ -233,18 +457,6 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
cat<<SUMMARY
|
|
||||||
CGAL configuration
|
|
||||||
------------------
|
|
||||||
CGAL = $cgalPACKAGE
|
|
||||||
BOOST = $boostPACKAGE
|
|
||||||
GMP = $gmpPACKAGE
|
|
||||||
MPFR = $mpfrPACKAGE
|
|
||||||
------------------
|
|
||||||
SUMMARY
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Build CGAL
|
# Build CGAL
|
||||||
@ -253,59 +465,127 @@ SUMMARY
|
|||||||
# - use Third-Party 'lib64' for consistency.
|
# - use Third-Party 'lib64' for consistency.
|
||||||
# CGAL-4.9 normally builds into 'lib64', older versions into 'lib'.
|
# CGAL-4.9 normally builds into 'lib64', older versions into 'lib'.
|
||||||
#
|
#
|
||||||
# CGAL_SOURCE_DIR : location of the original sources
|
# *PACKAGE : name-version of the package
|
||||||
# CGAL_BINARY_DIR : location of the build
|
# *SOURCE : location of original sources
|
||||||
# CGAL_ARCH_PATH : installation directory
|
# *PREFIX : installation directory
|
||||||
|
# CGAL_ARCH_PATH : installation directory (as per config file)
|
||||||
|
|
||||||
|
CGAL_SOURCE="$(findSourceDir "$CGAL_PACKAGE")"
|
||||||
|
CGAL_PACKAGE="$(basename "$CGAL_PACKAGE")"
|
||||||
|
CGAL_PREFIX="$installBASE/$CGAL_PACKAGE"
|
||||||
|
|
||||||
|
# Override as per config file (if any)
|
||||||
|
[ -n "$CGAL_ARCH_PATH" ] && CGAL_PREFIX="$CGAL_ARCH_PATH"
|
||||||
|
|
||||||
CGAL_SOURCE_DIR=$sourceBASE/$cgalPACKAGE
|
|
||||||
CGAL_BINARY_DIR=$buildBASE/$cgalPACKAGE
|
|
||||||
: ${CGAL_ARCH_PATH:=$installBASE/$cgalPACKAGE} # Fallback
|
|
||||||
|
|
||||||
# gmp/mpfr are installed without compiler name
|
# gmp/mpfr are installed without compiler name
|
||||||
installBASE=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
archBASE="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH"
|
||||||
|
|
||||||
GMP_ARCH_PATH=$installBASE/$gmpPACKAGE
|
|
||||||
MPFR_ARCH_PATH=$installBASE/$mpfrPACKAGE
|
|
||||||
|
|
||||||
# Enable/disable gmp/mpfr together
|
# Enable/disable gmp/mpfr together
|
||||||
if _foamIsNone $gmpPACKAGE || _foamIsNone $mpfrPACKAGE
|
if _foamIsNone "$GMP_PACKAGE" || _foamIsNone "$MPFR_PACKAGE"
|
||||||
then
|
then
|
||||||
GMP_ARCH_PATH=none
|
GMP_ARCH_PATH=none
|
||||||
MPFR_ARCH_PATH=none
|
MPFR_ARCH_PATH=none
|
||||||
elif _foamIsSystem $GMP_ARCH_PATH || _foamIsSystem $MPFR_ARCH_PATH
|
elif _foamIsSystem "$GMP_PACKAGE" || _foamIsSystem "$MPFR_PACKAGE"
|
||||||
then
|
then
|
||||||
GMP_ARCH_PATH=system # for an accurate record
|
# May really be system, but could also by a central installation
|
||||||
MPFR_ARCH_PATH=system
|
# Ensure everything is accurately recorded. Resolve paths etc.
|
||||||
|
|
||||||
|
if [ -d "$GMP_ARCH_PATH" ]
|
||||||
|
then
|
||||||
|
if GMP_ARCH_PATH=$(cd "$GMP_ARCH_PATH" 2>/dev/null && pwd -P)
|
||||||
|
then
|
||||||
|
GMP_PACKAGE="${GMP_ARCH_PATH##*/}"
|
||||||
|
else
|
||||||
|
echo "ERROR: bad path for GMP_ARCH_PATH"
|
||||||
|
echo "stopping build"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
GMP_ARCH_PATH=system
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d "$MPFR_ARCH_PATH" ]
|
||||||
|
then
|
||||||
|
if MPFR_ARCH_PATH=$(cd "$MPFR_ARCH_PATH" 2>/dev/null && pwd -P)
|
||||||
|
then
|
||||||
|
MPFR_PACKAGE="${MPFR_ARCH_PATH##*/}"
|
||||||
|
else
|
||||||
|
echo "ERROR: bad path for MPFR_ARCH_PATH"
|
||||||
|
echo "stopping build"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
MPFR_ARCH_PATH=system
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
|
||||||
|
# Respect the *ARCH_PATH if set
|
||||||
|
[ -d "$GMP_ARCH_PATH" ] || GMP_ARCH_PATH="$archBASE/$GMP_PACKAGE"
|
||||||
|
[ -d "$MPFR_ARCH_PATH" ] || MPFR_ARCH_PATH="$archBASE/$MPFR_PACKAGE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
cat<<SUMMARY
|
||||||
|
CGAL configuration
|
||||||
|
------------------
|
||||||
|
CGAL = $CGAL_PACKAGE
|
||||||
|
BOOST = $BOOST_PACKAGE
|
||||||
|
GMP = $GMP_PACKAGE
|
||||||
|
MPFR = $MPFR_PACKAGE
|
||||||
|
------------------
|
||||||
|
SUMMARY
|
||||||
|
|
||||||
#
|
#
|
||||||
# build information recorded for later use
|
# build information recorded for later use
|
||||||
#
|
#
|
||||||
buildInfoFile=$CGAL_ARCH_PATH/share/openfoam-build
|
buildInfoFile="$CGAL_PREFIX"/share/openfoam-build
|
||||||
|
|
||||||
recordCGALinfo()
|
recordCGALinfo()
|
||||||
{
|
{
|
||||||
CGAL_VERSION=$(sed -ne 's/^ *# *define *CGAL_VERSION_NR *\([0-9][0-9]*\).*$/\1/p' $CGAL_ARCH_PATH/include/CGAL/version.h 2>/dev/null)
|
CGAL_VERSION=$(sed -ne 's/^ *# *define *CGAL_VERSION_NR *\([0-9][0-9]*\).*$/\1/p' $CGAL_PREFIX/include/CGAL/version.h 2>/dev/null)
|
||||||
|
|
||||||
cat<<BUILD_INFO > $buildInfoFile
|
# which libdirName?
|
||||||
|
_my_cgal_libdir=unknown
|
||||||
|
for libdirName in "lib$WM_COMPILER_LIB_ARCH" lib
|
||||||
|
do
|
||||||
|
if [ -d "$CGAL_PREFIX/$libdirName" ]
|
||||||
|
then
|
||||||
|
_my_cgal_libdir="$libdirName"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# which libdirName?
|
||||||
|
_my_boost_libdir=unknown
|
||||||
|
for libdirName in "lib$WM_COMPILER_LIB_ARCH" lib
|
||||||
|
do
|
||||||
|
if [ -d "$BOOST_PREFIX/$libdirName" ]
|
||||||
|
then
|
||||||
|
_my_boost_libdir="$libdirName"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
cat<<BUILD_INFO > "$buildInfoFile"
|
||||||
# Information from OpenFOAM build on '$(date)'
|
# Information from OpenFOAM build on '$(date)'
|
||||||
#
|
#
|
||||||
CGAL=${CGAL_ARCH_PATH##*/}
|
CGAL=${CGAL_PREFIX##*/}
|
||||||
BOOST=${BOOST_ARCH_PATH##*/}
|
BOOST=${BOOST_PREFIX##*/}
|
||||||
GMP=${GMP_ARCH_PATH##*/}
|
GMP=${GMP_ARCH_PATH##*/}
|
||||||
MPFR=${MPFR_ARCH_PATH##*/}
|
MPFR=${MPFR_ARCH_PATH##*/}
|
||||||
CGAL_VERSION=$CGAL_VERSION
|
CGAL_VERSION=$CGAL_VERSION
|
||||||
BOOST_VERSION=$BOOST_VERSION
|
BOOST_VERSION=$BOOST_VERSION
|
||||||
|
|
||||||
CGAL_lib=lib$WM_COMPILER_LIB_ARCH
|
CGAL_lib=$_my_cgal_libdir
|
||||||
BOOST_lib=lib$WM_COMPILER_LIB_ARCH
|
BOOST_lib=$_my_boost_libdir
|
||||||
CGAL_HEADER_ONLY=${optHeadersOnly:-false}
|
CGAL_HEADER_ONLY=${optHeadersOnly:-default}
|
||||||
BUILD_INFO
|
BUILD_INFO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# compare expected vs what is extracted as KEY=... in text
|
# Compare expected vs what is extracted as KEY=... in text
|
||||||
# $1 = key
|
# $1 = key
|
||||||
# $2 = expected
|
# $2 = expected
|
||||||
# $3 = text to extract from
|
# $3 = text to extract from
|
||||||
@ -321,19 +601,23 @@ infoValueEq()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# needs build
|
# Needs build
|
||||||
cgalIsCurrent()
|
cgalIsCurrent()
|
||||||
{
|
{
|
||||||
local info=$(cat $buildInfoFile 2>/dev/null)
|
# Only need VAR=... (also avoids embedded '#' that bothers some shells)
|
||||||
|
local info=$(sed -n -e '/^[A-Z]/p' $buildInfoFile 2>/dev/null)
|
||||||
[ -n "$info" ] || return 1
|
[ -n "$info" ] || return 1
|
||||||
|
|
||||||
|
# Check of lib/ vs lib64/ could be spurious...
|
||||||
local libDirName="lib$WM_COMPILER_LIB_ARCH"
|
local libDirName="lib$WM_COMPILER_LIB_ARCH"
|
||||||
|
|
||||||
echo "checking information from existing build ..."
|
echo "checking information from existing build ..."
|
||||||
echo " ${CGAL_ARCH_PATH}"
|
echo " ${CGAL_PREFIX}"
|
||||||
|
|
||||||
infoValueEq CGAL "${CGAL_ARCH_PATH##*/}" "$info" || return 1
|
[ -f "$CGAL_PREFIX"/include/CGAL/version.h ] || return 1
|
||||||
infoValueEq BOOST "${BOOST_ARCH_PATH##*/}" "$info" || return 1
|
|
||||||
|
infoValueEq CGAL "${CGAL_PREFIX##*/}" "$info" || return 1
|
||||||
|
infoValueEq BOOST "${BOOST_PREFIX##*/}" "$info" || return 1
|
||||||
infoValueEq GMP "${GMP_ARCH_PATH##*/}" "$info" || return 1
|
infoValueEq GMP "${GMP_ARCH_PATH##*/}" "$info" || return 1
|
||||||
infoValueEq MPFR "${MPFR_ARCH_PATH##*/}" "$info" || return 1
|
infoValueEq MPFR "${MPFR_ARCH_PATH##*/}" "$info" || return 1
|
||||||
infoValueEq BOOST_VERSION "${BOOST_VERSION}" "$info" || return 1
|
infoValueEq BOOST_VERSION "${BOOST_VERSION}" "$info" || return 1
|
||||||
@ -344,138 +628,194 @@ cgalIsCurrent()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if cgalIsCurrent
|
if [ -z "$optForce" ] \
|
||||||
|
&& cgalIsCurrent
|
||||||
then
|
then
|
||||||
echo " ${CGAL_ARCH_PATH##*/} build appears to be up-to-date - skipping"
|
echo " ${CGAL_PREFIX##*/} build appears to be up-to-date - skipping"
|
||||||
echo
|
echo
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
else
|
||||||
|
|
||||||
(
|
(
|
||||||
# Remove any existing build folder and recreate
|
export GIT_DIR="$CGAL_SOURCE/.git"
|
||||||
if [ -d $CGAL_BINARY_DIR ]
|
PKG_BUILD="$buildBASE/$CGAL_PACKAGE"
|
||||||
then
|
|
||||||
echo "removing old build directory"
|
|
||||||
echo " $CGAL_BINARY_DIR"
|
|
||||||
rm -rf $CGAL_BINARY_DIR
|
|
||||||
fi
|
|
||||||
mkdir -p $CGAL_BINARY_DIR
|
|
||||||
|
|
||||||
cd $CGAL_BINARY_DIR || exit 1
|
# Remove existing build
|
||||||
|
rm -rf "$PKG_BUILD"
|
||||||
|
mkdir -p "$PKG_BUILD"
|
||||||
|
cd "$PKG_BUILD" || exit
|
||||||
|
|
||||||
unset configBoost configGmp configMpfr
|
unset configBoost configGmp configMpfr
|
||||||
echo "----"
|
echo "----"
|
||||||
echo "Configuring $cgalPACKAGE with boost $BOOST_VERSION"
|
echo "Configuring $CGAL_PACKAGE with boost $BOOST_VERSION"
|
||||||
echo " Source : $CGAL_SOURCE_DIR"
|
echo " Source : $CGAL_SOURCE"
|
||||||
echo " Build : $CGAL_BINARY_DIR"
|
echo " Build : $CGAL_BUILD"
|
||||||
echo " Target : $CGAL_ARCH_PATH"
|
echo " Target : $CGAL_PREFIX"
|
||||||
|
|
||||||
|
|
||||||
# See http://doc.cgal.org/latest/Manual/installation.html
|
# See http://doc.cgal.org/latest/Manual/installation.html
|
||||||
if _foamIsSystem $boostPACKAGE
|
if _foamIsSystem "$BOOST_PACKAGE"
|
||||||
then
|
then
|
||||||
echo " system : boost"
|
|
||||||
# Tagged as 'system' but could actually point to a central location
|
# Tagged as 'system' but could actually point to a central location
|
||||||
if [ -d "$BOOST_ARCH_PATH/include" ]
|
if [ -d "$BOOST_PREFIX/include" ]
|
||||||
then
|
then
|
||||||
configBoost="-DBOOST_ROOT=$BOOST_ARCH_PATH"
|
echo " boost : ${BOOST_PREFIX##*/}"
|
||||||
|
configBoost="-DBOOST_ROOT=$BOOST_PREFIX"
|
||||||
|
else
|
||||||
|
echo " boost : system"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## For system - possible that /usr/lib64 not being found?
|
## For system - possible that /usr/lib64 not being found?
|
||||||
## configBoost="-DBoost_LIBRARY_DIRS=$boostLib"
|
## configBoost="-DBoost_LIBRARY_DIRS=$boostLib"
|
||||||
elif [ -d "$BOOST_ARCH_PATH" ]
|
elif [ -d "$BOOST_PREFIX" ]
|
||||||
then
|
then
|
||||||
echo " ThirdParty : boost"
|
echo " boost : $BOOST_PACKAGE"
|
||||||
configBoost=$(cat <<CMAKE_OPTIONS
|
configBoost=$(cat <<CMAKE_OPTIONS
|
||||||
-DBoost_INCLUDE_DIR=$boostInc
|
-DBoost_INCLUDE_DIR=$boostInc
|
||||||
-DBoost_LIBRARY_DIRS=$boostLib
|
-DBoost_LIBRARY_DIRS=$boostLib
|
||||||
-DBoost_THREAD_LIBRARY=$boostLib/libboost_thread.so
|
-DBoost_THREAD_LIBRARY=$boostLib/libboost_thread$EXT_SO
|
||||||
-DBoost_THREAD_LIBRARY_RELEASE=$boostLib/libboost_thread.so
|
-DBoost_THREAD_LIBRARY_RELEASE=$boostLib/libboost_thread$EXT_SO
|
||||||
-DBoost_SYSTEM_LIBRARY=$boostLib/libboost_system.so
|
-DBoost_SYSTEM_LIBRARY=$boostLib/libboost_system$EXT_SO
|
||||||
-DBoost_SYSTEM_LIBRARY_RELEASE=$boostLib/libboost_system.so
|
-DBoost_SYSTEM_LIBRARY_RELEASE=$boostLib/libboost_system$EXT_SO
|
||||||
-DBoost_VERSION=$BOOST_VERSION
|
-DBoost_VERSION=$BOOST_VERSION
|
||||||
CMAKE_OPTIONS
|
CMAKE_OPTIONS
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if _foamIsSystem $GMP_ARCH_PATH
|
if _foamIsSystem "$GMP_ARCH_PATH"
|
||||||
then
|
then
|
||||||
echo " system : gmp"
|
echo " gmp : system"
|
||||||
elif _foamIsNone $GMP_ARCH_PATH
|
elif _foamIsNone "$GMP_ARCH_PATH"
|
||||||
then
|
then
|
||||||
echo " disabled : gmp"
|
echo " gmp : disabled"
|
||||||
configGmp="-DCGAL_DISABLE_GMP:BOOL=TRUE" # Also used for mpfr
|
configGmp="-DCGAL_DISABLE_GMP=TRUE" # Also used for mpfr
|
||||||
elif [ -d "$GMP_ARCH_PATH" ]
|
elif [ -d "$GMP_ARCH_PATH" ]
|
||||||
then
|
then
|
||||||
echo " ThirdParty : gmp"
|
echo " gmp : $GMP_PACKAGE"
|
||||||
configGmp=$(cat <<CMAKE_OPTIONS
|
|
||||||
|
# Alternative: export GMP_DIR=... hint
|
||||||
|
for libdir in \
|
||||||
|
"$GMP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" \
|
||||||
|
"$GMP_ARCH_PATH"/lib \
|
||||||
|
;
|
||||||
|
do
|
||||||
|
if [ -f "$libdir/libgmp$EXT_SO" ]
|
||||||
|
then
|
||||||
|
configGmp=$(cat <<CMAKE_OPTIONS
|
||||||
-DGMP_INCLUDE_DIR=$GMP_ARCH_PATH/include
|
-DGMP_INCLUDE_DIR=$GMP_ARCH_PATH/include
|
||||||
-DGMP_LIBRARIES_DIR=$GMP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
|
-DGMP_LIBRARIES_DIR=$libdir
|
||||||
-DGMP_LIBRARIES=$GMP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libgmp.so
|
-DGMP_LIBRARIES=$libdir/libgmp$EXT_SO
|
||||||
-DGMPXX_INCLUDE_DIR=$GMP_ARCH_PATH/include
|
|
||||||
-DGMPXX_LIBRARIES=$GMP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libgmpxx.so
|
|
||||||
CMAKE_OPTIONS
|
CMAKE_OPTIONS
|
||||||
)
|
)
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
else
|
else
|
||||||
echo " system : gmp (did not find $GMP_ARCH_PATH)"
|
echo " system : gmp (did not find $GMP_ARCH_PATH)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if _foamIsSystem $MPFR_ARCH_PATH
|
if _foamIsSystem "$MPFR_ARCH_PATH"
|
||||||
then
|
then
|
||||||
echo " system : mpfr"
|
echo " mpfr : system"
|
||||||
elif _foamIsNone $MPFR_ARCH_PATH
|
elif _foamIsNone "$MPFR_ARCH_PATH"
|
||||||
then
|
then
|
||||||
echo " disabled : mpfr"
|
echo " mpfr : disabled"
|
||||||
configGmp="-DCGAL_DISABLE_GMP:BOOL=TRUE" # Also used for mpfr
|
configGmp="-DCGAL_DISABLE_GMP=TRUE" # Also used for mpfr
|
||||||
elif [ -d "$MPFR_ARCH_PATH" ]
|
elif [ -d "$MPFR_ARCH_PATH" ]
|
||||||
then
|
then
|
||||||
echo " ThirdParty : mpfr"
|
echo " mpfr : $MPFR_PACKAGE"
|
||||||
configMpfr=$(cat <<CMAKE_OPTIONS
|
|
||||||
|
# Alternative: export MPFR_DIR=... hint
|
||||||
|
for libdir in \
|
||||||
|
"$MPFR_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" \
|
||||||
|
"$MPFR_ARCH_PATH/lib" \
|
||||||
|
;
|
||||||
|
do
|
||||||
|
if [ -f "$libdir/libmpfr$EXT_SO" ]
|
||||||
|
then
|
||||||
|
configMpfr=$(cat <<CMAKE_OPTIONS
|
||||||
-DMPFR_INCLUDE_DIR=$MPFR_ARCH_PATH/include
|
-DMPFR_INCLUDE_DIR=$MPFR_ARCH_PATH/include
|
||||||
-DMPFR_LIBRARIES_DIR=$MPFR_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
|
-DMPFR_LIBRARIES_DIR=$libdir
|
||||||
-DMPFR_LIBRARIES=$MPFR_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpfr.so
|
-DMPFR_LIBRARIES=$libdir/libmpfr$EXT_SO
|
||||||
CMAKE_OPTIONS
|
CMAKE_OPTIONS
|
||||||
)
|
)
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
else
|
else
|
||||||
echo " system : mpfr (did not find $MPFR_ARCH_PATH)"
|
echo " mpfr : system (did not find $MPFR_ARCH_PATH)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cmake=$(findCMake)
|
cmake=$(findCMake)
|
||||||
|
|
||||||
|
unset cmakeDefs
|
||||||
|
|
||||||
|
# Compiler-specific adjustments
|
||||||
|
case "$WM_COMPILER" in
|
||||||
|
(Mingw*)
|
||||||
|
cmakeDefs="$cmakeDefs -DCMAKE_SYSTEM_NAME=Windows"
|
||||||
|
cmakeDefs="$cmakeDefs -DCMAKE_C_COMPILER=$(wmake -show-c)"
|
||||||
|
cmakeDefs="$cmakeDefs -DCMAKE_CXX_COMPILER=$(wmake -show-cxx)"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Headers/library decision
|
||||||
|
case "$optHeadersOnly" in
|
||||||
|
(true | false)
|
||||||
|
cmakeDefs="$cmakeDefs -DCGAL_HEADER_ONLY=${optHeadersOnly}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# For CGAL < 4.9, for installation into lib64/, not lib/
|
# For CGAL < 4.9, for installation into lib64/, not lib/
|
||||||
# Name only (not path) for CGAL_INSTALL_LIB_DIR
|
# Name only (not path) for CGAL_INSTALL_LIB_DIR
|
||||||
echo "----"
|
echo "----"
|
||||||
set -x
|
rm -rf "$CGAL_PREFIX"
|
||||||
$cmake \
|
set -x && \
|
||||||
-DCMAKE_INSTALL_PREFIX=$CGAL_ARCH_PATH \
|
${cmake:?} \
|
||||||
-DCGAL_INSTALL_LIB_DIR=lib$WM_COMPILER_LIB_ARCH \
|
-DCMAKE_INSTALL_PREFIX="$CGAL_PREFIX" \
|
||||||
|
-DCGAL_INSTALL_LIB_DIR="lib$WM_COMPILER_LIB_ARCH" \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DWITH_CGAL_Core=OFF \
|
||||||
|
-DWITH_CGAL_ImageIO=OFF \
|
||||||
-DWITH_CGAL_Qt5=OFF \
|
-DWITH_CGAL_Qt5=OFF \
|
||||||
${optHeadersOnly:+-DCGAL_HEADER_ONLY=TRUE} \
|
$cmakeDefs \
|
||||||
$configBoost $configGmp $configMpfr \
|
$configBoost $configGmp $configMpfr \
|
||||||
$CGAL_SOURCE_DIR \
|
${WM_QUIET:+-DCMAKE_RULE_MESSAGES=OFF} \
|
||||||
|
"$CGAL_SOURCE" \
|
||||||
&& make -j $WM_NCOMPPROCS \
|
&& make -j $WM_NCOMPPROCS \
|
||||||
|
&& set +x \
|
||||||
&& make install || exit 1
|
&& make install || exit 1
|
||||||
set +x
|
|
||||||
|
|
||||||
echo "----"
|
echo "----"
|
||||||
echo "create '\$CGAL_ARCH_PATH/share/files'"
|
echo "create '\$CGAL_ARCH_PATH/share/files'"
|
||||||
echo "----"
|
echo "----"
|
||||||
mkdir -p $CGAL_ARCH_PATH/share/src
|
mkdir -p "$CGAL_PREFIX"/share/src
|
||||||
rm -f $CGAL_ARCH_PATH/share/files
|
rm -f "$CGAL_PREFIX"/share/files
|
||||||
|
|
||||||
for i in assertions.cpp io.cpp MP_Float.cpp Random.cpp
|
for i in assertions.cpp io.cpp MP_Float.cpp Random.cpp
|
||||||
do
|
do
|
||||||
if [ -e "$CGAL_SOURCE_DIR/src/CGAL/$i" ]
|
if [ -e "$CGAL_SOURCE/src/CGAL/$i" ]
|
||||||
then
|
then
|
||||||
\cp $CGAL_SOURCE_DIR/src/CGAL/$i $CGAL_ARCH_PATH/share/src/
|
\cp "$CGAL_SOURCE/src/CGAL/$i" "$CGAL_PREFIX"/share/src/
|
||||||
echo "\${CGAL_ARCH_PATH}/share/src/$i" >> $CGAL_ARCH_PATH/share/files
|
echo "\${CGAL_PREFIX}/share/src/$i" >> "$CGAL_PREFIX"/share/files
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# record our build-status
|
# Unneeded generated files
|
||||||
|
for dir in share/doc share/info share/man
|
||||||
|
do
|
||||||
|
if [ -d "$CGAL_PREFIX/$dir" ]
|
||||||
|
then
|
||||||
|
echo "Discard $dir files to save space: $CGAL_PACKAGE"
|
||||||
|
rm -rf "$CGAL_PREFIX/$dir"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
## Leave: rmdir "$CGAL_PREFIX"/share 2>/dev/null || true
|
||||||
|
|
||||||
|
# Record our build-status
|
||||||
recordCGALinfo
|
recordCGALinfo
|
||||||
|
|
||||||
echo "Done CGAL"
|
echo "Done CGAL"
|
||||||
)
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
166
makeCmake
166
makeCmake
@ -3,79 +3,81 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
# \\ / A nd | www.openfoam.com
|
||||||
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2011 OpenFOAM Foundation
|
||||||
|
# Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
#
|
|
||||||
# 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
|
# Script
|
||||||
# makeCmake
|
# makeCmake
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Build script for cmake
|
# Build script for cmake.
|
||||||
#
|
#
|
||||||
|
# The '-link' option can be used to create a 'cmake-system' pointing
|
||||||
|
# to this version.
|
||||||
|
#
|
||||||
|
# ----------------------------------------------
|
||||||
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Special purpose script, no default version.
|
if : # Run from third-party directory
|
||||||
unset cmakePACKAGE
|
then
|
||||||
|
cd "${0%/*}" || exit
|
||||||
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
|
echo " Check your OpenFOAM environment and installation"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Special purpose script - no default version
|
||||||
|
unset PACKAGE
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
printVersions() { listPackageVersions cmake; exit 0; }
|
||||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
printHelp() {
|
||||||
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
|
|
||||||
}
|
|
||||||
. etc/tools/ThirdPartyFunctions
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
usage() {
|
|
||||||
exec 1>&2
|
|
||||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
|
||||||
cat<<USAGE
|
cat<<USAGE
|
||||||
|
|
||||||
usage: ${0##*/} [OPTION] cmake-VERSION
|
Usage: ${0##*/} [OPTION] cmake-VERSION
|
||||||
options:
|
options:
|
||||||
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
-force Force compilation, even if binary already exists
|
||||||
-help
|
-gcc Force use of gcc/g++
|
||||||
|
-link Create additional symlink as 'cmake-system'
|
||||||
|
-list List available unpacked source versions
|
||||||
|
-help Display usage help
|
||||||
|
|
||||||
* build cmake
|
* Build cmake
|
||||||
${cmakePACKAGE:-'unspecified version'}
|
${PACKAGE:-[unspecified]}
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
exit 1
|
showDownloadHint cmake
|
||||||
|
exit 0 # Clean exit
|
||||||
}
|
}
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Ensure CMake gets the correct C/CC++ compiler
|
exportCompiler # Compiler info for CMake/configure
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
unset optForce optLink
|
||||||
|
|
||||||
# Parse options
|
# Parse options
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
-h | -help*) printHelp;;
|
||||||
;;
|
-list) printVersions;;
|
||||||
-gcc)
|
-gcc) useGcc ;;
|
||||||
export CC=gcc # use gcc/g++
|
-force) optForce=true ;;
|
||||||
export CXX=g++
|
-link) optLink=true ;;
|
||||||
;;
|
|
||||||
cmake-[1-9]*)
|
cmake/* | sources/cmake* | \
|
||||||
cmakePACKAGE="${1%%/}"
|
cmake-[0-9]*)
|
||||||
|
PACKAGE="${1%%/}"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
die "unknown option/argument: '$1'"
|
die "unknown option/argument: '$1'"
|
||||||
@ -84,41 +86,69 @@ do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
[ -n "$cmakePACKAGE" ] || die "The cmake-VERSION was not specified"
|
if [ -z "$PACKAGE" ]
|
||||||
|
then
|
||||||
|
die "The CMAKE package/version not specified"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if _foamIsSystem "$PACKAGE"
|
||||||
|
then
|
||||||
|
unset optLink # basic sanity - cannot create a link
|
||||||
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Build CMAKE
|
# Build CMAKE
|
||||||
# CMAKE_SOURCE_DIR : location of the original sources
|
# *PACKAGE : name-version of the package
|
||||||
# CMAKE_ARCH_PATH : installation directory
|
# *SOURCE : location of original sources
|
||||||
|
# *PREFIX : installation directory
|
||||||
|
|
||||||
CMAKE_SOURCE_DIR=$sourceBASE/$cmakePACKAGE
|
PKG_SOURCE="$(findSourceDir "$PACKAGE")"
|
||||||
CMAKE_ARCH_PATH=$installBASE/$cmakePACKAGE
|
PACKAGE="$(basename "$PACKAGE")"
|
||||||
|
PKG_PREFIX="$installBASE/$PACKAGE"
|
||||||
|
export GIT_DIR="$PKG_SOURCE/.git"
|
||||||
|
|
||||||
if [ -d "$CMAKE_ARCH_PATH" -a -r "$CMAKE_ARCH_PATH/bin/cmake" ]
|
|
||||||
|
if [ -z "$optForce" ] \
|
||||||
|
&& [ -d "$PKG_PREFIX" ] \
|
||||||
|
&& [ -r "$PKG_PREFIX/bin/cmake" ]
|
||||||
then
|
then
|
||||||
echo "Already built: $cmakePACKAGE"
|
echo "Already built: $PACKAGE"
|
||||||
else
|
else
|
||||||
echo "Starting build: $cmakePACKAGE"
|
echo "Starting build: $PACKAGE"
|
||||||
(
|
(
|
||||||
buildDIR=$buildBASE/$cmakePACKAGE
|
PKG_BUILD="$buildBASE/$PACKAGE"
|
||||||
|
cd "$PKG_SOURCE" || exit
|
||||||
|
make distclean 2>/dev/null || true
|
||||||
|
|
||||||
cd $CMAKE_SOURCE_DIR || exit 1
|
rm -rf "$PKG_BUILD"
|
||||||
make distclean 2>/dev/null
|
mkdir -p "$PKG_BUILD"
|
||||||
|
|
||||||
rm -rf $buildDIR
|
cd "$PKG_BUILD" && \
|
||||||
mkdir -p $buildDIR
|
"$PKG_SOURCE"/bootstrap \
|
||||||
cd $buildDIR
|
--prefix="$PKG_PREFIX" \
|
||||||
|
|
||||||
$CMAKE_SOURCE_DIR/bootstrap \
|
|
||||||
--prefix=$CMAKE_ARCH_PATH \
|
|
||||||
&& time make -j $WM_NCOMPPROCS \
|
&& time make -j $WM_NCOMPPROCS \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& echo "Built: $cmakePACKAGE"
|
&& echo "Built: $PACKAGE"
|
||||||
) || {
|
) || {
|
||||||
echo "Error building: $cmakePACKAGE"
|
echo "Error building: $PACKAGE"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$optLink" = true ] && [ -x "$PKG_PREFIX/bin/cmake" ]
|
||||||
|
then
|
||||||
|
(
|
||||||
|
cd "${PKG_PREFIX%/*}" || exit
|
||||||
|
if [ -L cmake-system ]
|
||||||
|
then
|
||||||
|
rm cmake-system
|
||||||
|
elif [ -d cmake-system ]
|
||||||
|
then
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
ln -svf "$PACKAGE" cmake-system
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
225
makeFFTW
225
makeFFTW
@ -3,24 +3,13 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / 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 OpenCFD Ltd.
|
# \\ / A nd | www.openfoam.com
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
#
|
|
||||||
# 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
|
# Script
|
||||||
# makeFFTW
|
# makeFFTW
|
||||||
@ -28,62 +17,90 @@
|
|||||||
# Description
|
# Description
|
||||||
# Build script for FFTW
|
# Build script for FFTW
|
||||||
#
|
#
|
||||||
|
# ----------------------------------------------
|
||||||
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Get FFTW versions
|
# Dynamic library ending (default is .so)
|
||||||
. $WM_PROJECT_DIR/etc/config.sh/functions
|
[ "$(uname -s)" = Darwin ] && EXT_SO=.dylib || EXT_SO=.so
|
||||||
unset -f _foamAddPath _foamAddLib _foamAddMan # get settings only
|
|
||||||
|
|
||||||
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/FFTW)
|
# Short-circuit test for an installation
|
||||||
|
if [ "$1" = "-test" ]
|
||||||
|
then
|
||||||
|
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
|
||||||
|
dir="${2%/}" # <- *_ARCH_PATH
|
||||||
|
[ -d "$dir/include" ] || exit 2
|
||||||
|
|
||||||
fftwPACKAGE=${fftw_version:-fftw-system}
|
package="fftw"
|
||||||
|
libName="libfftw3"
|
||||||
|
for lib in \
|
||||||
|
"$dir/lib/$libName$EXT_SO" \
|
||||||
|
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName$EXT_SO" \
|
||||||
|
;
|
||||||
|
do
|
||||||
|
if [ -r "$lib" ]
|
||||||
|
then
|
||||||
|
echo " $package include: $dir/include"
|
||||||
|
echo " $package library: ${lib%/*}"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
if : # Run from third-party directory
|
||||||
|
then
|
||||||
|
cd "${0%/*}" || exit
|
||||||
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
|
echo " Check your OpenFOAM environment and installation"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Obtain version from OpenFOAM etc/config.sh file:
|
||||||
|
_foamConfig FFTW
|
||||||
|
|
||||||
|
PACKAGE="${fftw_version:-none}"
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
printVersions() { listPackageVersions fftw; exit 0; }
|
||||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
printHelp() {
|
||||||
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
|
|
||||||
}
|
|
||||||
. etc/tools/ThirdPartyFunctions
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
usage() {
|
|
||||||
exec 1>&2
|
|
||||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
|
||||||
cat<<USAGE
|
cat<<USAGE
|
||||||
|
|
||||||
usage: ${0##*/} [OPTION] [fftw-VERSION]
|
Usage: ${0##*/} [OPTION] [fftw-VERSION] [-- configure-options]
|
||||||
options:
|
options:
|
||||||
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
-force Force compilation, even if include/library already exists
|
||||||
-help
|
-gcc Force use of gcc/g++
|
||||||
|
-list List available unpacked source versions
|
||||||
|
-help Display usage help
|
||||||
|
|
||||||
* build FFTW with
|
* build FFTW with
|
||||||
${fftwPACKAGE:-'unspecified FFTW version'}
|
${PACKAGE:-[unspecified]}
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
exit 1
|
showDownloadHint fftw
|
||||||
|
exit 0 # Clean exit
|
||||||
}
|
}
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Ensure configure gets the correct C/C++ compiler
|
exportCompiler # Compiler info for CMake/configure
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
unset optForce
|
||||||
|
|
||||||
# Parse options
|
# Parse options
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
--) break;; # Extra configure options (leave on $@ for later detection)
|
||||||
;;
|
-h | -help*) printHelp;;
|
||||||
'')
|
-list) printVersions;;
|
||||||
# discard empty arguments
|
-gcc) useGcc ;;
|
||||||
;;
|
-force) optForce=true ;;
|
||||||
-gcc)
|
|
||||||
export CC=gcc # use gcc/g++
|
fftw/* | sources/fftw* | \
|
||||||
export CXX=g++
|
|
||||||
;;
|
|
||||||
fftw-[0-9]* | fftw_[0-9]* | fftw-system )
|
fftw-[0-9]* | fftw_[0-9]* | fftw-system )
|
||||||
fftwPACKAGE="${1%%/}"
|
PACKAGE="${1%%/}"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
die "unknown option/argument: '$1'"
|
die "unknown option/argument: '$1'"
|
||||||
@ -92,64 +109,104 @@ do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
[ -n "$fftwPACKAGE" ] || die "The fftw-VERSION was not specified"
|
if [ -z "$PACKAGE" ]
|
||||||
|
|
||||||
# Nothing to build
|
|
||||||
if _foamIsNone "$fftwPACKAGE"
|
|
||||||
then
|
then
|
||||||
echo "Using fftw-none (skip ThirdParty build of FFTW)"
|
die "The FFTW package/version not specified"
|
||||||
exit 0
|
elif _foamIsNone "$PACKAGE" || _foamIsSystem "$PACKAGE"
|
||||||
elif _foamIsSystem "$fftwPACKAGE"
|
|
||||||
then
|
then
|
||||||
echo "Using fftw-system (skip ThirdParty build of FFTW)"
|
echo "Using none/system (skip ThirdParty build of FFTW)"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Build FFTW
|
# Build FFTW
|
||||||
|
# *PACKAGE : name-version of the package
|
||||||
|
# *SOURCE : location of original sources
|
||||||
|
# *PREFIX : installation directory
|
||||||
|
#
|
||||||
# For 64-bit
|
# For 64-bit
|
||||||
# - FFTW itself will normally build into 'lib64',
|
# - FFTW itself will normally build into 'lib64',
|
||||||
# but provide --libdir on configure to be 100% certain
|
|
||||||
# - Third-Party builds into 'lib64'
|
|
||||||
# - system is normally built into 'lib64'
|
|
||||||
#
|
|
||||||
# FFTW_SOURCE_DIR : location of the original sources
|
|
||||||
# FFTW_ARCH_PATH : installation directory
|
|
||||||
|
|
||||||
FFTW_SOURCE_DIR=$sourceBASE/$fftwPACKAGE
|
PKG_SOURCE="$(findSourceDir "$PACKAGE")"
|
||||||
FFTW_ARCH_PATH=$installBASE/$fftwPACKAGE
|
PACKAGE="$(basename "$PKG_SOURCE")"
|
||||||
|
PKG_PREFIX="$installBASE/$PACKAGE"
|
||||||
|
export GIT_DIR="$PKG_SOURCE/.git"
|
||||||
|
|
||||||
if [ -r "$FFTW_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libfftw3.so" ]
|
if [ -z "$optForce" ] \
|
||||||
|
&& {
|
||||||
|
[ -r "$PKG_PREFIX/lib/libfftw3$EXT_SO" ] \
|
||||||
|
|| [ -r "$PKG_PREFIX/lib$WM_COMPILER_LIB_ARCH/libfftw3$EXT_SO" ] \
|
||||||
|
|| [ -r "$PKG_PREFIX/bin/libfftw3-3$EXT_SO" ] # Windows
|
||||||
|
}
|
||||||
then
|
then
|
||||||
echo "Already has FFTW shared library"
|
echo "FFTW already built : $PKG_PREFIX"
|
||||||
else
|
else
|
||||||
echo "Starting build: FFTW ($fftwPACKAGE)"
|
echo "Starting build: FFTW ($PACKAGE)"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
(
|
(
|
||||||
buildDIR=$buildBASE/$fftwPACKAGE
|
# Configuration options:
|
||||||
|
unset configOpt
|
||||||
|
|
||||||
cd $FFTW_SOURCE_DIR || exit 1
|
# Compiler-specific adjustments
|
||||||
|
case "$WM_COMPILER" in
|
||||||
|
(Mingw*)
|
||||||
|
# Cross-compiling
|
||||||
|
# See http://www.fftw.org/install/windows.html
|
||||||
|
configOpt="
|
||||||
|
--host=x86_64-w64-mingw32
|
||||||
|
--with-our-malloc
|
||||||
|
--enable-threads --with-combined-threads
|
||||||
|
--enable-sse2
|
||||||
|
--with-incoming-stack-boundary=2
|
||||||
|
"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
rm -rf $FFTW_ARCH_PATH
|
# Additional configure options
|
||||||
rm -rf $buildDIR
|
if [ "$1" = "--" ]
|
||||||
mkdir -p $buildDIR
|
then
|
||||||
cd $buildDIR
|
shift
|
||||||
|
configOpt="$configOpt $@"
|
||||||
|
fi
|
||||||
|
|
||||||
set -x
|
# End of configuration options
|
||||||
$FFTW_SOURCE_DIR/configure \
|
# ----------------------------
|
||||||
--prefix=$FFTW_ARCH_PATH \
|
PKG_BUILD="$buildBASE/$PACKAGE"
|
||||||
--libdir=$FFTW_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH \
|
cd "$PKG_SOURCE" || exit
|
||||||
|
|
||||||
|
rm -rf "$PKG_PREFIX"
|
||||||
|
rm -rf "$PKG_BUILD"
|
||||||
|
mkdir -p "$PKG_BUILD"
|
||||||
|
|
||||||
|
cd "$PKG_BUILD" && set -x && \
|
||||||
|
"$PKG_SOURCE"/configure \
|
||||||
|
--prefix="$PKG_PREFIX" \
|
||||||
--enable-shared --disable-static \
|
--enable-shared --disable-static \
|
||||||
--disable-fortran \
|
--disable-fortran \
|
||||||
&& make -j $WM_NCOMPPROCS \
|
$configOpt \
|
||||||
&& make install \
|
&& set +x \
|
||||||
&& echo "Built $fftwPACKAGE"
|
&& make -j $WM_NCOMPPROCS \
|
||||||
|
&& make install \
|
||||||
|
&& echo "Built: $PACKAGE" \
|
||||||
|
&& pkgconfigAdjust "$PKG_PREFIX"
|
||||||
) || {
|
) || {
|
||||||
echo "Error building: FFTW"
|
echo "Error building: $PACKAGE"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Unneeded generated files
|
||||||
|
for dir in share/doc share/info share/man
|
||||||
|
do
|
||||||
|
if [ -d "$PKG_PREFIX/$dir" ]
|
||||||
|
then
|
||||||
|
echo "Discard $dir files to save space: $PACKAGE"
|
||||||
|
rm -rf "$PKG_PREFIX/$dir"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
rmdir "$PKG_PREFIX"/share 2>/dev/null || true
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
388
makeGcc
388
makeGcc
@ -3,24 +3,14 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
# \\ / A nd | www.openfoam.com
|
||||||
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
# Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
#
|
|
||||||
# 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
|
# Script
|
||||||
# makeGcc
|
# makeGcc
|
||||||
@ -40,54 +30,65 @@
|
|||||||
#
|
#
|
||||||
# WM_COMPILER=Gcc51 ./makeGcc -system
|
# WM_COMPILER=Gcc51 ./makeGcc -system
|
||||||
#
|
#
|
||||||
|
# ----------------------------------------------
|
||||||
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# get default GCC, mpfr, gmp and mpc versions
|
if : # Run from third-party directory
|
||||||
WM_COMPILER_TYPE=ThirdParty # ensure we get the correct compiler settings
|
then
|
||||||
: ${WM_COMPILER:=Gcc} # this will still fail if 'Clang' was set
|
cd "${0%/*}" || exit
|
||||||
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
|
echo " Check your OpenFOAM environment and installation"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
unset GMP_ARCH_PATH MPFR_ARCH_PATH # Purge old
|
||||||
|
|
||||||
. $WM_PROJECT_DIR/etc/config.sh/functions
|
[ "${WM_COMPILER#Gcc}" = "$WM_COMPILER" ] && WM_COMPILER=Gcc # Force gcc
|
||||||
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/compiler)
|
WM_COMPILER_TYPE=ThirdParty # Ensure we get the correct settings
|
||||||
|
|
||||||
gmpPACKAGE=${gmp_version:-gmp-system}
|
# Default GCC, mpfr, gmp and mpc versions from OpenFOAM etc/config.sh file:
|
||||||
mpfrPACKAGE=${mpfr_version:-mpfr-system}
|
_foamConfig compiler
|
||||||
mpcPACKAGE=${mpc_version:-mpc-system}
|
|
||||||
gccPACKAGE=$gcc_version
|
GMP_PACKAGE="${gmp_version:-gmp-system}"
|
||||||
|
MPFR_PACKAGE="${mpfr_version:-mpfr-system}"
|
||||||
|
MPC_PACKAGE="${mpc_version:-mpc-system}"
|
||||||
|
GCC_PACKAGE="$gcc_version"
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
printVersions() { listPackageVersions gcc gmp mpfr mpc; exit 0; }
|
||||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
printHelp() {
|
||||||
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
|
|
||||||
}
|
|
||||||
. etc/tools/ThirdPartyFunctions
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
Script=${0##*/}
|
|
||||||
|
|
||||||
usage() {
|
|
||||||
exec 1>&2
|
|
||||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
|
||||||
cat<<USAGE
|
cat<<USAGE
|
||||||
|
|
||||||
usage: $Script [OPTION] [gcc-VERSION] [gmp-VERSION] [mpfr-VERSION] [mpc-VERSION]
|
Usage: ${0##*/} [OPTION] [gcc-VERSION] [gmp-VERSION] [mpfr-VERSION] [mpc-VERSION]
|
||||||
options:
|
options:
|
||||||
|
-clang Force clang/clang++ for building
|
||||||
|
-m32 | -m64 32-bit or 64-bit (default) ABI
|
||||||
-multilib for 64-bit systems with 32-bit support required
|
-multilib for 64-bit systems with 32-bit support required
|
||||||
-no-multilib for 64-bit systems without 32-bit support (DEFAULT)
|
-no-multilib for 64-bit systems without 32-bit support (DEFAULT)
|
||||||
-no-threadsafe disable mpfr thread-safe (default is auto-detect)
|
-no-threadsafe disable mpfr thread-safe (default is auto-detect)
|
||||||
-system use system versions for gmp/mpfr/mpc
|
-system use system versions for gmp/mpfr/mpc
|
||||||
-help
|
-list List available unpacked source versions
|
||||||
|
-help Display usage help
|
||||||
|
|
||||||
* build combinations of gmp, mpfr, mpc and gcc
|
* Build combinations of gmp, mpfr, mpc and gcc
|
||||||
$gmpPACKAGE
|
${GMP_PACKAGE:-[gmp unspecified]}
|
||||||
$mpfrPACKAGE
|
${MPFR_PACKAGE:-[mpfr unspecified]}
|
||||||
$mpcPACKAGE
|
${MPC_PACKAGE:-[mpc unspecified]}
|
||||||
${gccPACKAGE:-'unspecified GCC version'}
|
${GCC_PACKAGE:-[gcc unspecified]}
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
exit 1
|
showDownloadHint gcc
|
||||||
|
showDownloadHint gmp
|
||||||
|
showDownloadHint mpfr
|
||||||
|
showDownloadHint mpc
|
||||||
|
exit 0 # Clean exit
|
||||||
}
|
}
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
optArch=64 # Use 64-bit ABI
|
||||||
|
|
||||||
# Build 32-bit libraries on 64-bit systems (normally not needed)
|
# Build 32-bit libraries on 64-bit systems (normally not needed)
|
||||||
optMultilib=disable
|
optMultilib=disable
|
||||||
unset optThreadSafe # unset=auto
|
unset optThreadSafe # unset=auto
|
||||||
@ -96,8 +97,16 @@ unset optThreadSafe # unset=auto
|
|||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
-h | -help*) printHelp;;
|
||||||
|
-list) printVersions;;
|
||||||
|
-clang) # Force use of clang/clang++ for building
|
||||||
|
export CC=clang
|
||||||
|
export CXX=clang++
|
||||||
|
;;
|
||||||
|
|
||||||
|
-m32 | -m64)
|
||||||
|
optArch="${1#*m}"
|
||||||
;;
|
;;
|
||||||
-multi*)
|
-multi*)
|
||||||
optMultilib=enable
|
optMultilib=enable
|
||||||
@ -109,21 +118,35 @@ do
|
|||||||
optThreadSafe=disable
|
optThreadSafe=disable
|
||||||
;;
|
;;
|
||||||
-sys*)
|
-sys*)
|
||||||
gmpPACKAGE="gmp-system"
|
GMP_PACKAGE="gmp-system"
|
||||||
mpfrPACKAGE="mpfr-system"
|
MPFR_PACKAGE="mpfr-system"
|
||||||
mpcPACKAGE="mpc-system"
|
MPC_PACKAGE="mpc-system"
|
||||||
|
unset GMP_ARCH_PATH MPFR_ARCH_PATH
|
||||||
;;
|
;;
|
||||||
gmp-[4-9]* | gmp-system)
|
|
||||||
gmpPACKAGE="${1%%/}"
|
gmp/* | sources/gmp* |\
|
||||||
|
gmp-[0-9]* | gmp-system)
|
||||||
|
GMP_PACKAGE="${1%%/}"
|
||||||
|
unset GMP_ARCH_PATH
|
||||||
;;
|
;;
|
||||||
mpfr-[2-9]* | mpfr-system)
|
|
||||||
mpfrPACKAGE="${1%%/}"
|
mpfr/* | sources/mpfr* |\
|
||||||
|
mpfr-[0-9]* | mpfr-system)
|
||||||
|
MPFR_PACKAGE="${1%%/}"
|
||||||
|
unset MPFR_ARCH_PATH
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
mpc/* | sources/mpc* |\
|
||||||
mpc-[0-9]* | mpc-system)
|
mpc-[0-9]* | mpc-system)
|
||||||
mpcPACKAGE="${1%%/}"
|
MPC_PACKAGE="${1%%/}"
|
||||||
;;
|
;;
|
||||||
gcc-[4-9]* | gcc-system)
|
|
||||||
gccPACKAGE="${1%%/}"
|
gcc/* | sources/gcc* |\
|
||||||
|
gcc-[0-9]* | gcc-system)
|
||||||
|
GCC_PACKAGE="${1%%/}"
|
||||||
|
;;
|
||||||
|
[0-9]*)
|
||||||
|
GCC_PACKAGE="gcc-${1%%/}"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
die "unknown option/argument: '$1'"
|
die "unknown option/argument: '$1'"
|
||||||
@ -132,85 +155,110 @@ do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
[ -n "$gccPACKAGE" ] || die "The gcc-VERSION was not specified"
|
[ -n "$GCC_PACKAGE" ] || die "The gcc-VERSION was not specified"
|
||||||
|
|
||||||
cat<<SUMMARY
|
cat<<SUMMARY
|
||||||
GCC configuration
|
GCC configuration
|
||||||
------------------
|
------------------
|
||||||
GCC = $gccPACKAGE
|
ABI = $optArch
|
||||||
GMP = $gmpPACKAGE
|
GCC = $GCC_PACKAGE
|
||||||
MPFR = $mpfrPACKAGE
|
GMP = $GMP_PACKAGE
|
||||||
MPC = $mpcPACKAGE
|
MPFR = $MPFR_PACKAGE
|
||||||
|
MPC = $MPC_PACKAGE
|
||||||
------------------
|
------------------
|
||||||
|
Using CC = $CC $CFLAGS
|
||||||
|
Using CXX = $CXX $CXXFLAGS
|
||||||
SUMMARY
|
SUMMARY
|
||||||
|
|
||||||
# Set 32 or 64 bit ABI
|
|
||||||
case "$WM_ARCH_OPTION" in
|
|
||||||
32 | 64)
|
|
||||||
ABI=$WM_ARCH_OPTION
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
die "The WM_ARCH_OPTION ($WM_ARCH_OPTION) must be 32 or 64"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Build/install without compiler name
|
# !Build/install locations with arch name only (NO compiler name)!
|
||||||
buildBASE=$WM_THIRD_PARTY_DIR/build/$WM_ARCH$WM_COMPILER_ARCH
|
buildBASE="$(dirname "$buildBASE")/$WM_ARCH$WM_COMPILER_ARCH"
|
||||||
installBASE=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
installBASE="$(dirname "$installBASE")/$WM_ARCH$WM_COMPILER_ARCH"
|
||||||
|
|
||||||
GCC_ARCH_PATH=$installBASE/$gccPACKAGE
|
# gcc
|
||||||
GMP_ARCH_PATH=$installBASE/$gmpPACKAGE
|
GCC_SOURCE="$(findSourceDir "$GCC_PACKAGE")"
|
||||||
MPFR_ARCH_PATH=$installBASE/$mpfrPACKAGE
|
GCC_PACKAGE="$(basename "$GCC_PACKAGE")"
|
||||||
MPC_ARCH_PATH=$installBASE/$mpcPACKAGE
|
GCC_PREFIX="$installBASE/$GCC_PACKAGE"
|
||||||
|
|
||||||
|
# gmp
|
||||||
|
GMP_SOURCE="$(findSourceDir "$GMP_PACKAGE")"
|
||||||
|
GMP_PACKAGE="$(basename "$GMP_PACKAGE")"
|
||||||
|
GMP_PREFIX="$installBASE/$GMP_PACKAGE"
|
||||||
|
|
||||||
|
# mpc
|
||||||
|
MPC_SOURCE="$(findSourceDir "$MPC_PACKAGE")"
|
||||||
|
MPC_PACKAGE="$(basename "$MPC_PACKAGE")"
|
||||||
|
MPC_PREFIX="$installBASE/$MPC_PACKAGE"
|
||||||
|
|
||||||
|
# mpfr
|
||||||
|
MPFR_SOURCE="$(findSourceDir "$MPFR_PACKAGE")"
|
||||||
|
MPFR_PACKAGE="$(basename "$MPFR_PACKAGE")"
|
||||||
|
MPFR_PREFIX="$installBASE/$MPFR_PACKAGE"
|
||||||
|
|
||||||
|
|
||||||
|
# Override as per config file (if any)
|
||||||
|
[ -n "$GMP_ARCH_PATH" ] && GMP_PREFIX="$GMP_ARCH_PATH"
|
||||||
|
[ -n "$MPFR_ARCH_PATH" ] && MPFR_PREFIX="$MPFR_ARCH_PATH"
|
||||||
|
|
||||||
|
|
||||||
|
# Prefix <dir> to LD_LIBRARY_PATH, if it exists. 0 on success, 1 on failure
|
||||||
|
addLib()
|
||||||
|
{
|
||||||
|
if [ -d "$1" ]
|
||||||
|
then
|
||||||
|
export LD_LIBRARY_PATH="$1:$LD_LIBRARY_PATH"
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# ================
|
# ================
|
||||||
# Build GMP
|
# Build GMP
|
||||||
# ================
|
# ================
|
||||||
echo "---------------"
|
echo "---------------"
|
||||||
if [ -d $GMP_ARCH_PATH ]
|
if [ -d "$GMP_PREFIX" ]
|
||||||
then
|
then
|
||||||
echo "Already built: $gmpPACKAGE"
|
echo "Already built: $GMP_PREFIX"
|
||||||
elif _foamIsSystem $GMP_ARCH_PATH
|
elif _foamIsSystem "$GMP_PREFIX"
|
||||||
then
|
then
|
||||||
echo "Using gmp-system"
|
echo "Using system gmp"
|
||||||
else
|
else
|
||||||
echo "Starting build: $gmpPACKAGE"
|
echo "Starting build: $GMP_PACKAGE"
|
||||||
echo
|
echo
|
||||||
(
|
(
|
||||||
sourceDIR=$sourceBASE/$gmpPACKAGE
|
PKG_SOURCE="$GMP_SOURCE"
|
||||||
buildDIR=$buildBASE/$gmpPACKAGE
|
PKG_PREFIX="$GMP_PREFIX"
|
||||||
|
PKG_BUILD="$buildBASE/$GMP_PACKAGE"
|
||||||
|
export GIT_DIR="$PKG_SOURCE/.git"
|
||||||
|
|
||||||
cd $sourceDIR || exit 1
|
cd "$PKG_SOURCE" || exit
|
||||||
make distclean 2>/dev/null
|
make distclean 2>/dev/null || true
|
||||||
|
|
||||||
rm -rf $buildDIR
|
rm -rf "$PKG_BUILD"
|
||||||
mkdir -p $buildDIR
|
mkdir -p "$PKG_BUILD"
|
||||||
cd $buildDIR
|
|
||||||
|
|
||||||
set -x
|
cd "$PKG_BUILD" && set -x && \
|
||||||
$sourceDIR/configure ABI=$ABI \
|
"$PKG_SOURCE"/configure ABI="$optArch" \
|
||||||
--prefix=$GMP_ARCH_PATH \
|
--prefix="$PKG_PREFIX" \
|
||||||
--libdir=$GMP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH \
|
--libdir="$PKG_PREFIX/lib$WM_COMPILER_LIB_ARCH" \
|
||||||
--enable-cxx \
|
--enable-cxx \
|
||||||
|
&& set +x \
|
||||||
&& make -j $WM_NCOMPPROCS \
|
&& make -j $WM_NCOMPPROCS \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& echo "Built: $gmpPACKAGE"
|
&& echo "Built: $GMP_PACKAGE"
|
||||||
) || {
|
) || {
|
||||||
echo "Error building: $gmpPACKAGE"
|
echo "Error building: $GMP_PACKAGE"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "$GMP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" ]
|
if addLib "$GMP_PREFIX/lib$WM_COMPILER_LIB_ARCH"
|
||||||
then
|
then
|
||||||
_foamAddLib "$GMP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH"
|
|
||||||
|
|
||||||
configGMP=$(cat <<CONFIG_OPTIONS
|
configGMP=$(cat <<CONFIG_OPTIONS
|
||||||
--with-gmp-include=$GMP_ARCH_PATH/include
|
--with-gmp-include=$GMP_PREFIX/include
|
||||||
--with-gmp-lib=$GMP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
|
--with-gmp-lib=$GMP_PREFIX/lib$WM_COMPILER_LIB_ARCH
|
||||||
CONFIG_OPTIONS
|
CONFIG_OPTIONS
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
@ -222,51 +270,51 @@ fi
|
|||||||
# Build MPFR
|
# Build MPFR
|
||||||
# ================
|
# ================
|
||||||
echo "---------------"
|
echo "---------------"
|
||||||
if [ -d $MPFR_ARCH_PATH ]
|
if [ -d "$MPFR_PREFIX" ]
|
||||||
then
|
then
|
||||||
echo "Already built: $mpfrPACKAGE"
|
echo "Already built: $MPFR_PACKAGE"
|
||||||
elif _foamIsSystem $MPFR_ARCH_PATH
|
elif _foamIsSystem "$MPFR_PREFIX"
|
||||||
then
|
then
|
||||||
echo "Using mpfr-system"
|
echo "Using system mpfr"
|
||||||
else
|
else
|
||||||
echo "Starting build: $mpfrPACKAGE"
|
echo "Starting build: $MPFR_PACKAGE"
|
||||||
echo
|
echo
|
||||||
(
|
(
|
||||||
sourceDIR=$sourceBASE/$mpfrPACKAGE
|
PKG_SOURCE="$MPFR_SOURCE"
|
||||||
buildDIR=$buildBASE/$mpfrPACKAGE
|
PKG_PREFIX="$MPFR_PREFIX"
|
||||||
|
PKG_BUILD="$buildBASE/$MPFR_PACKAGE"
|
||||||
|
export GIT_DIR="$PKG_SOURCE/.git"
|
||||||
|
|
||||||
cd $sourceDIR || exit 1
|
cd "$PKG_SOURCE" || exit
|
||||||
make distclean 2>/dev/null
|
make distclean 2>/dev/null || true
|
||||||
|
|
||||||
rm -rf $buildDIR
|
rm -rf "$PKG_BUILD"
|
||||||
mkdir -p $buildDIR
|
mkdir -p "$PKG_BUILD"
|
||||||
cd $buildDIR
|
|
||||||
|
|
||||||
unset configOpt
|
unset configOpt
|
||||||
# explicitly enable/disable thread-safe
|
# explicitly enable/disable thread-safe
|
||||||
[ -n "$optThreadSafe" ] && configOpt="--${optThreadSafe}-thread-safe"
|
[ -n "$optThreadSafe" ] && configOpt="--${optThreadSafe}-thread-safe"
|
||||||
|
|
||||||
set -x
|
cd "$PKG_BUILD" && set -x && \
|
||||||
$sourceDIR/configure ABI=$ABI \
|
"$PKG_SOURCE"/configure ABI="$optArch" \
|
||||||
--prefix=$MPFR_ARCH_PATH \
|
--prefix="$PKG_PREFIX" \
|
||||||
--libdir=$MPFR_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH \
|
--libdir="$PKG_PREFIX/lib$WM_COMPILER_LIB_ARCH" \
|
||||||
$configGMP $configOpt \
|
$configGMP $configOpt \
|
||||||
|
&& set +x \
|
||||||
&& make -j $WM_NCOMPPROCS \
|
&& make -j $WM_NCOMPPROCS \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& echo "Built: $mpfrPACKAGE"
|
&& echo "Built: $MPFR_PACKAGE"
|
||||||
) || {
|
) || {
|
||||||
echo "Error building: $mpfrPACKAGE"
|
echo "Error building: $MPFR_PACKAGE"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "$MPFR_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" ]
|
if addLib "$MPFR_PREFIX/lib$WM_COMPILER_LIB_ARCH"
|
||||||
then
|
then
|
||||||
_foamAddLib "$MPFR_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH"
|
|
||||||
|
|
||||||
configMPFR=$(cat <<CONFIG_OPTIONS
|
configMPFR=$(cat <<CONFIG_OPTIONS
|
||||||
--with-mpfr-include=$MPFR_ARCH_PATH/include \
|
--with-mpfr-include=$MPFR_PREFIX/include \
|
||||||
--with-mpfr-lib=$MPFR_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
|
--with-mpfr-lib=$MPFR_PREFIX/lib$WM_COMPILER_LIB_ARCH
|
||||||
CONFIG_OPTIONS
|
CONFIG_OPTIONS
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
@ -278,47 +326,47 @@ fi
|
|||||||
# Build MPC
|
# Build MPC
|
||||||
# ================
|
# ================
|
||||||
echo "---------------"
|
echo "---------------"
|
||||||
if [ -d $MPC_ARCH_PATH ]
|
if [ -d "$MPC_PREFIX" ]
|
||||||
then
|
then
|
||||||
echo "Already built: $mpcPACKAGE"
|
echo "Already built: $MPC_PACKAGE"
|
||||||
elif _foamIsSystem $MPC_ARCH_PATH
|
elif _foamIsSystem "$MPC_PREFIX"
|
||||||
then
|
then
|
||||||
echo "Using mpc-system"
|
echo "Using system mpc"
|
||||||
else
|
else
|
||||||
echo "Starting build: $mpcPACKAGE"
|
echo "Starting build: $MPC_PACKAGE"
|
||||||
echo
|
echo
|
||||||
(
|
(
|
||||||
sourceDIR=$sourceBASE/$mpcPACKAGE
|
PKG_SOURCE="$MPC_SOURCE"
|
||||||
buildDIR=$buildBASE/$mpcPACKAGE
|
PKG_PREFIX="$MPC_PREFIX"
|
||||||
|
PKG_BUILD="$buildBASE/$MPC_PACKAGE"
|
||||||
|
export GIT_DIR="$PKG_SOURCE/.git"
|
||||||
|
|
||||||
cd $sourceDIR || exit 1
|
cd "$PKG_SOURCE" || exit
|
||||||
make distclean 2>/dev/null
|
make distclean 2>/dev/null || true
|
||||||
|
|
||||||
rm -rf $buildDIR
|
rm -rf "$PKG_BUILD"
|
||||||
mkdir -p $buildDIR
|
mkdir -p "$PKG_BUILD"
|
||||||
cd $buildDIR
|
|
||||||
|
|
||||||
set -x
|
cd "$PKG_BUILD" && set -x && \
|
||||||
$sourceDIR/configure ABI=$ABI \
|
"$PKG_SOURCE"/configure ABI="$optArch" \
|
||||||
--prefix=$MPC_ARCH_PATH \
|
--prefix="$PKG_PREFIX" \
|
||||||
--libdir=$MPC_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH \
|
--libdir="$PKG_PREFIX/lib$WM_COMPILER_LIB_ARCH" \
|
||||||
$configGMP $configMPFR \
|
$configGMP $configMPFR \
|
||||||
|
&& set +x \
|
||||||
&& make -j $WM_NCOMPPROCS \
|
&& make -j $WM_NCOMPPROCS \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& echo "Built: $mpcPACKAGE"
|
&& echo "Built: $MPC_PACKAGE"
|
||||||
) || {
|
) || {
|
||||||
echo "Error building: $mpcPACKAGE"
|
echo "Error building: $MPC_PACKAGE"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "$MPC_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" ]
|
if addLib "$MPC_PREFIX/lib$WM_COMPILER_LIB_ARCH"
|
||||||
then
|
then
|
||||||
_foamAddLib "$MPC_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH"
|
|
||||||
|
|
||||||
configMPC=$(cat <<CONFIG_OPTIONS
|
configMPC=$(cat <<CONFIG_OPTIONS
|
||||||
--with-mpc-include=$MPC_ARCH_PATH/include \
|
--with-mpc-include=$MPC_PREFIX/include \
|
||||||
--with-mpc-lib=$MPC_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
|
--with-mpc-lib=$MPC_PREFIX/lib$WM_COMPILER_LIB_ARCH
|
||||||
CONFIG_OPTIONS
|
CONFIG_OPTIONS
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
@ -334,45 +382,47 @@ fi
|
|||||||
# or specify -no-multilib on the command-line
|
# or specify -no-multilib on the command-line
|
||||||
#
|
#
|
||||||
echo "---------------"
|
echo "---------------"
|
||||||
if [ -d $GCC_ARCH_PATH ]
|
if [ -d "$GCC_PREFIX" ]
|
||||||
then
|
then
|
||||||
echo "Already built: $gccPACKAGE"
|
echo "Already built: $GCC_PACKAGE"
|
||||||
elif _foamIsSystem $GCC_ARCH_PATH
|
elif _foamIsSystem "$GCC_PREFIX"
|
||||||
then
|
then
|
||||||
echo "Using gcc-system"
|
echo "Using system gcc"
|
||||||
else
|
else
|
||||||
echo "Starting build: $gccPACKAGE"
|
echo "Starting build: $GCC_PACKAGE"
|
||||||
echo
|
echo
|
||||||
(
|
(
|
||||||
sourceDIR=$sourceBASE/$gccPACKAGE
|
PKG_SOURCE="$GCC_SOURCE"
|
||||||
buildDIR=$buildBASE/$gccPACKAGE
|
PKG_PREFIX="$GCC_PREFIX"
|
||||||
|
PKG_BUILD="$buildBASE/$GCC_PACKAGE"
|
||||||
|
export GIT_DIR="$PKG_SOURCE/.git"
|
||||||
|
|
||||||
cd $sourceDIR || exit 1
|
cd "$PKG_SOURCE" || exit
|
||||||
make distclean 2>/dev/null
|
make distclean 2>/dev/null || true
|
||||||
|
|
||||||
rm -rf $buildDIR
|
rm -rf "$PKG_BUILD"
|
||||||
mkdir -p $buildDIR
|
mkdir -p "$PKG_BUILD"
|
||||||
cd $buildDIR
|
|
||||||
|
|
||||||
unset configOpt
|
unset configOpt
|
||||||
# with/without multi-lib (32-bit support on 64-bit systems)
|
# with/without multi-lib (32-bit support on 64-bit systems)
|
||||||
[ -n "$optMultilib" ] && configOpt="--${optMultilib}-multilib"
|
[ -n "$optMultilib" ] && configOpt="--${optMultilib}-multilib"
|
||||||
|
|
||||||
set -x
|
cd "$PKG_BUILD" && set -x && \
|
||||||
$sourceDIR/configure \
|
"$PKG_SOURCE"/configure \
|
||||||
--prefix=$GCC_ARCH_PATH \
|
--prefix="$PKG_PREFIX" \
|
||||||
--with-pkgversion=OpenFOAM \
|
--with-pkgversion=www.openfoam.com \
|
||||||
--enable-languages=c,c++ \
|
--enable-languages=c,c++ \
|
||||||
--enable-__cxa_atexit \
|
--enable-__cxa_atexit \
|
||||||
--enable-libstdcxx-allocator=new \
|
--enable-libstdcxx-allocator=new \
|
||||||
--with-system-zlib \
|
--with-system-zlib \
|
||||||
$configGMP $configMPFR $configMPC $configOpt \
|
$configGMP $configMPFR $configMPC $configOpt \
|
||||||
MAKEINFO=missing \
|
MAKEINFO=missing \
|
||||||
|
&& set +x \
|
||||||
&& make -j $WM_NCOMPPROCS \
|
&& make -j $WM_NCOMPPROCS \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& echo "Built: $gccPACKAGE"
|
&& echo "Built: $GCC_PACKAGE"
|
||||||
) || {
|
) || {
|
||||||
echo "Error building: $gccPACKAGE"
|
echo "Error building: $GCC_PACKAGE"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|||||||
162
makeGperftools
162
makeGperftools
@ -3,24 +3,14 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
# \\ / A nd | www.openfoam.com
|
||||||
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2012 OpenFOAM Foundation
|
||||||
|
# Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
#
|
|
||||||
# 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
|
# Script
|
||||||
# makeGperftools
|
# makeGperftools
|
||||||
@ -28,59 +18,62 @@
|
|||||||
# Description
|
# Description
|
||||||
# Build script for gperftools
|
# Build script for gperftools
|
||||||
#
|
#
|
||||||
|
# ----------------------------------------------
|
||||||
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Get gperftools version
|
if : # Run from third-party directory
|
||||||
. $WM_PROJECT_DIR/etc/config.sh/functions
|
then
|
||||||
unset -f _foamAddPath _foamAddLib _foamAddMan # get settings only
|
cd "${0%/*}" || exit
|
||||||
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
|
echo " Check your OpenFOAM environment and installation"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Obtain version from OpenFOAM etc/config.sh file:
|
||||||
|
_foamConfig gperftools
|
||||||
|
|
||||||
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/gperftools)
|
PACKAGE="${gperftools_version:-none}"
|
||||||
|
|
||||||
gperftoolsPACKAGE=${gperftools_version:-gperftools-system}
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
printVersions() { listPackageVersions gperf; exit 0; }
|
||||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
printHelp() {
|
||||||
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
|
|
||||||
}
|
|
||||||
. etc/tools/ThirdPartyFunctions
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
usage() {
|
|
||||||
exec 1>&2
|
|
||||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
|
||||||
cat<<USAGE
|
cat<<USAGE
|
||||||
|
|
||||||
usage: ${0##*/} [gperftools-VERSION]
|
Usage: ${0##*/} [gperftools-VERSION]
|
||||||
options:
|
options:
|
||||||
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
-force Force compilation, even if include/library already exists
|
||||||
-help
|
-gcc Force use of gcc/g++
|
||||||
|
-list List available unpacked source versions
|
||||||
|
-help Display usage help
|
||||||
|
|
||||||
* build gperftools
|
* Build gperftools
|
||||||
$gperftoolsPACKAGE
|
${PACKAGE:-[unspecified]}
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
exit 1
|
showDownloadHint gperftools
|
||||||
|
exit 0 # Clean exit
|
||||||
}
|
}
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Ensure configure gets the correct C/C++ compiler
|
exportCompiler # Compiler info for CMake/configure
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
unset optForce
|
||||||
|
|
||||||
# Parse options
|
# Parse options
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
-h | -help*) printHelp;;
|
||||||
;;
|
-list) printVersions;;
|
||||||
-gcc)
|
-gcc) useGcc ;;
|
||||||
export CC=gcc # use gcc/g++
|
-force) optForce=true ;;
|
||||||
export CXX=g++
|
|
||||||
;;
|
gperftools/* | sources/gperftools* |\
|
||||||
gperftools-[0-9]* | gperftools-svn* | gperftools-git)
|
gperftools-[0-9]* | gperftools-svn* | gperftools-git)
|
||||||
gperftoolsPACKAGE="${1%%/}"
|
PACKAGE="${1%%/}"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
die "unknown option/argument: '$1'"
|
die "unknown option/argument: '$1'"
|
||||||
@ -89,54 +82,67 @@ do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
[ -n "$gperftoolsPACKAGE" ] || die "The gperftools-VERSION was not specified"
|
if [ -z "$PACKAGE" ]
|
||||||
|
|
||||||
# Nothing to build
|
|
||||||
if _foamIsNone $gperftoolsPACKAGE
|
|
||||||
then
|
then
|
||||||
echo "Using gperftools-none (skip ThirdParty build of gperftools)"
|
die "The GPERFTOOLS package/version not specified"
|
||||||
exit 0
|
elif _foamIsNone "$PACKAGE" || _foamIsSystem "$PACKAGE"
|
||||||
elif _foamIsSystem $gperftoolsPACKAGE
|
|
||||||
then
|
then
|
||||||
echo "Using gperftools-system (skip ThirdParty build of gperftools)"
|
echo "Using none/system (skip ThirdParty build of GPERFTOOLS)"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Build gperftools
|
# Build gperftools
|
||||||
#
|
# *PACKAGE : name-version of the package
|
||||||
GPERFTOOLS_SOURCE_DIR=$sourceBASE/$gperftoolsPACKAGE
|
# *SOURCE : location of original sources
|
||||||
GPERFTOOLS_ARCH_PATH=$installBASE/$gperftoolsPACKAGE
|
# *PREFIX : installation directory
|
||||||
|
|
||||||
|
PKG_SOURCE="$(findSourceDir "$PACKAGE")"
|
||||||
|
PACKAGE="$(basename "$PACKAGE")"
|
||||||
|
PKG_PREFIX="$installBASE/$PACKAGE"
|
||||||
|
export GIT_DIR="$PKG_SOURCE/.git"
|
||||||
|
|
||||||
echo "---------------"
|
echo "---------------"
|
||||||
if [ -d "$GPERFTOOLS_ARCH_PATH" ]
|
if [ -z "$optForce" ] \
|
||||||
|
&& [ -d "$PKG_PREFIX" ]
|
||||||
then
|
then
|
||||||
echo "Already built: $gperftoolsPACKAGE"
|
echo "Already built: $PACKAGE"
|
||||||
else
|
else
|
||||||
echo "Starting build: $gperftoolsPACKAGE"
|
echo "Starting build: $PACKAGE"
|
||||||
(
|
(
|
||||||
buildDIR=$buildBASE/$gperftoolsPACKAGE
|
PKG_BUILD="$buildBASE/$PACKAGE"
|
||||||
|
cd "$PKG_SOURCE" || exit
|
||||||
|
|
||||||
cd $GPERFTOOLS_SOURCE_DIR || exit 1
|
make distclean 2>/dev/null || true
|
||||||
|
|
||||||
make distclean 2>/dev/null
|
rm -rf "$PKG_PREFIX"
|
||||||
|
rm -rf "$PKG_BUILD"
|
||||||
|
mkdir -p "$PKG_BUILD"
|
||||||
|
|
||||||
rm -rf $GPERFTOOLS_ARCH_PATH
|
cd "$PKG_BUILD" && set -x && \
|
||||||
rm -rf $buildDIR
|
"$PKG_SOURCE"/configure \
|
||||||
mkdir -p $buildDIR
|
--prefix="$PKG_PREFIX" \
|
||||||
cd $buildDIR
|
&& set +x \
|
||||||
|
|
||||||
set -x
|
|
||||||
$GPERFTOOLS_SOURCE_DIR/configure \
|
|
||||||
--prefix=$GPERFTOOLS_ARCH_PATH \
|
|
||||||
&& make -j $WM_NCOMPPROCS \
|
&& make -j $WM_NCOMPPROCS \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& echo "Built: $gperftoolsPACKAGE" \
|
&& echo "Built: $PACKAGE" \
|
||||||
) || {
|
) || {
|
||||||
echo "Error building: $gperftoolsPACKAGE"
|
echo "Error building: $PACKAGE"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Unneeded generated files
|
||||||
|
for dir in share/doc share/info share/man
|
||||||
|
do
|
||||||
|
if [ -d "$PKG_PREFIX/$dir" ]
|
||||||
|
then
|
||||||
|
echo "Discard $dir files to save space: $PACKAGE"
|
||||||
|
rm -rf "$PKG_PREFIX/$dir"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
rmdir "$PKG_PREFIX"/share 2>/dev/null || true
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
235
makeHDF5
Executable file
235
makeHDF5
Executable file
@ -0,0 +1,235 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | www.openfoam.com
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2024 OpenCFD Ltd.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# makeHDF5
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Build script for HDF5
|
||||||
|
#
|
||||||
|
# ----------------------------------------------
|
||||||
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Dynamic library ending (default is .so)
|
||||||
|
[ "$(uname -s)" = Darwin ] && EXT_SO=.dylib || EXT_SO=.so
|
||||||
|
|
||||||
|
# Short-circuit test for an installation
|
||||||
|
if [ "$1" = "-test" ]
|
||||||
|
then
|
||||||
|
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
|
||||||
|
dir="${2%/}" # <- *_ARCH_PATH
|
||||||
|
[ -d "$dir/include" ] || exit 2
|
||||||
|
|
||||||
|
package="hdf5"
|
||||||
|
libName="hdf5"
|
||||||
|
for lib in \
|
||||||
|
"$dir/lib/$libName$EXT_SO" \
|
||||||
|
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName$EXT_SO" \
|
||||||
|
;
|
||||||
|
do
|
||||||
|
if [ -r "$lib" ]
|
||||||
|
then
|
||||||
|
echo " $package include: $dir/include"
|
||||||
|
echo " $package library: ${lib%/*}"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
if : # Run from third-party directory
|
||||||
|
then
|
||||||
|
cd "${0%/*}" || exit
|
||||||
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
|
echo " Check your OpenFOAM environment and installation"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/CMakeFunctions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Obtain version from OpenFOAM etc/config.sh file:
|
||||||
|
_foamConfig hdf5
|
||||||
|
|
||||||
|
PACKAGE="${hdf5_version:-none}"
|
||||||
|
|
||||||
|
# Hint for cmake findMPI
|
||||||
|
if [ -d "$MPI_ARCH_PATH" ]
|
||||||
|
then
|
||||||
|
export MPI_HOME="$MPI_ARCH_PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
printVersions() { listPackageVersions hdf5; exit 0; }
|
||||||
|
printHelp() {
|
||||||
|
cat<<USAGE
|
||||||
|
|
||||||
|
Usage: ${0##*/} [OPTION] [HDF5-VERSION]
|
||||||
|
options:
|
||||||
|
-force Force compilation, even if include/library already exists
|
||||||
|
-gcc Force use of gcc/g++
|
||||||
|
-cmake PATH With cmake from the given path
|
||||||
|
-mpi-home PATH With hint for MPI_HOME
|
||||||
|
-DNAME=VALUE add cmake variable
|
||||||
|
-list List available unpacked source versions
|
||||||
|
-help Display usage help
|
||||||
|
|
||||||
|
* Build HDF5
|
||||||
|
${PACKAGE:-[unspecified]}
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
showDownloadHint hdf5
|
||||||
|
exit 0 # Clean exit
|
||||||
|
}
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
exportCompiler minimal # Minimal compiler info for CMake/configure
|
||||||
|
|
||||||
|
unset optForce
|
||||||
|
|
||||||
|
# Parse options
|
||||||
|
while [ "$#" -gt 0 ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
'') ;; # Ignore empty
|
||||||
|
-h | -help*) printHelp;;
|
||||||
|
-list) printVersions;;
|
||||||
|
-gcc) useGcc ;;
|
||||||
|
-force) optForce=true ;;
|
||||||
|
|
||||||
|
-cmake)
|
||||||
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
CMAKE_PATH="${2%%/}"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-mpi-home) # mpi with hint
|
||||||
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
export MPI_HOME="${2%%/}"
|
||||||
|
case "${MPI_HOME:-none}" in (false|none) unset MPI_HOME;; esac
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
|
||||||
|
hdf/* | hdf5/* | sources/hdf* | \
|
||||||
|
hdf5[-_][0-9]* | hdf5-git* )
|
||||||
|
PACKAGE="${1%%/}"
|
||||||
|
;;
|
||||||
|
-D[A-Z]*=* | [A-Z]*=*) # cmake variables
|
||||||
|
addCMakeVariable "$1"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
die "unknown option/argument: '$1'"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z "$PACKAGE" ]
|
||||||
|
then
|
||||||
|
die "The HDF5 package/version not specified"
|
||||||
|
elif _foamIsNone "$PACKAGE" || _foamIsSystem "$PACKAGE"
|
||||||
|
then
|
||||||
|
echo "Using none/system (skip ThirdParty build of HDF5)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Known build issues for mingw (various things)
|
||||||
|
case "$WM_COMPILER" in
|
||||||
|
(Mingw*)
|
||||||
|
if [ "$optForce" = true ]
|
||||||
|
then
|
||||||
|
echo "Warning: hdf5 - likely compilation issues with $WM_COMPILER"
|
||||||
|
else
|
||||||
|
echo "Skipping hdf5 - likely compilation issues with $WM_COMPILER"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Build HDF5
|
||||||
|
# *PACKAGE : name-version of the package
|
||||||
|
# *SOURCE : location of original sources
|
||||||
|
# *PREFIX : installation directory
|
||||||
|
|
||||||
|
PKG_SOURCE="$(findSourceDir "$PACKAGE")"
|
||||||
|
PACKAGE="$(basename "$PACKAGE")"
|
||||||
|
PKG_PREFIX="$installBASE/$PACKAGE"
|
||||||
|
export GIT_DIR="$PKG_SOURCE/.git"
|
||||||
|
|
||||||
|
: "${FOAM_MPI:=dummy}"
|
||||||
|
|
||||||
|
# FUTURE:
|
||||||
|
#
|
||||||
|
# Manual installation of parallel libraries
|
||||||
|
# from libdir to -> $FOAM_EXT_LIBBIN/$FOAM_MPI
|
||||||
|
#
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo ========================================
|
||||||
|
echo "Build hdf5 library $PACKAGE for $FOAM_MPI"
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Needs future adjustment
|
||||||
|
# - for mpi-specific library locations
|
||||||
|
if [ -z "$optForce" ] \
|
||||||
|
&& [ -f "$PKG_PREFIX/include/hdf5.h" ] \
|
||||||
|
&& {
|
||||||
|
[ -r "$PKG_PREFIX/lib/libhdf5$EXT_SO" ] \
|
||||||
|
|| [ -r "$PKG_PREFIX/lib$WM_COMPILER_LIB_ARCH/libhdf5$EXT_SO" ]
|
||||||
|
}
|
||||||
|
then
|
||||||
|
echo " HDF5 already built : $PKG_PREFIX"
|
||||||
|
else
|
||||||
|
# CMake options often lag the configure ones
|
||||||
|
echo "Starting build: $PACKAGE (using cmake)"
|
||||||
|
echo
|
||||||
|
(
|
||||||
|
PKG_BUILD="$buildBASE/$PACKAGE"
|
||||||
|
cd "$PKG_SOURCE" || exit
|
||||||
|
|
||||||
|
applyPatch "$PACKAGE" "$PKG_SOURCE"
|
||||||
|
|
||||||
|
# Remove any existing build folder and recreate
|
||||||
|
rm -rf "$PKG_PREFIX"
|
||||||
|
rm -rf "$PKG_BUILD"
|
||||||
|
mkdir -p "$PKG_BUILD"
|
||||||
|
|
||||||
|
# May not work properly with FOAM_MPI = dummy
|
||||||
|
if [ "$FOAM_MPI" != dummy ]
|
||||||
|
then
|
||||||
|
CC=mpicc
|
||||||
|
CXX=mpicxx
|
||||||
|
fi
|
||||||
|
|
||||||
|
cmake=$(findCMake)
|
||||||
|
|
||||||
|
# Installs into lib64/
|
||||||
|
cd "$PKG_BUILD" && set -x && \
|
||||||
|
${cmake:?} \
|
||||||
|
-DCMAKE_INSTALL_PREFIX="$PKG_PREFIX" \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DHDF5_BUILD_FORTRAN=FALSE \
|
||||||
|
-DHDF5_BUILD_TESTING=FALSE \
|
||||||
|
-DHDF5_BUILD_STATIC_LIBS=FALSE \
|
||||||
|
${WM_QUIET:+-DCMAKE_RULE_MESSAGES=OFF} \
|
||||||
|
"$PKG_SOURCE" \
|
||||||
|
&& make -j $WM_NCOMPPROCS all \
|
||||||
|
&& make install \
|
||||||
|
&& echo "Built: $PACKAGE"
|
||||||
|
) || {
|
||||||
|
echo "Error building: $PACKAGE"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
167
makeHYPRE
Executable file
167
makeHYPRE
Executable file
@ -0,0 +1,167 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | www.openfoam.com
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2018-2021 OpenCFD Ltd.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# makeHYPRE
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Build script for HYPRE
|
||||||
|
#
|
||||||
|
# ----------------------------------------------
|
||||||
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
if : # Run from third-party directory
|
||||||
|
then
|
||||||
|
cd "${0%/*}" || exit
|
||||||
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
|
echo " Check your OpenFOAM environment and installation"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Obtain version from etc/config.sh file:
|
||||||
|
_foamConfig hypre
|
||||||
|
|
||||||
|
PACKAGE="${hypre_version:-none}"
|
||||||
|
targetType=libso
|
||||||
|
|
||||||
|
if nonStandardPlatforms # Possibly unreliable inherited values
|
||||||
|
then
|
||||||
|
unset HYPRE_ARCH_PATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
printVersions() { listPackageVersions hypre; exit 0; }
|
||||||
|
printHelp() {
|
||||||
|
cat<<USAGE
|
||||||
|
|
||||||
|
Usage: ${0##*/} [OPTION] [lib|libso] [HYPRE-VERSION] [-- configure-options]
|
||||||
|
options:
|
||||||
|
-force Force compilation, even if include/library already exists
|
||||||
|
-gcc Force use of gcc/g++
|
||||||
|
-list List available unpacked source versions
|
||||||
|
-help Display usage help
|
||||||
|
|
||||||
|
* Build HYPRE with
|
||||||
|
${PACKAGE:-[unspecified]}
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
showDownloadHint hypre
|
||||||
|
exit 0 # Clean exit
|
||||||
|
}
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
exportCompiler # Compiler info for CMake/configure
|
||||||
|
|
||||||
|
unset optForce
|
||||||
|
|
||||||
|
# Parse options
|
||||||
|
while [ "$#" -gt 0 ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
'') ;; # Ignore empty
|
||||||
|
--) break;; # Extra configure options (leave on $@ for later detection)
|
||||||
|
-h | -help*) printHelp;;
|
||||||
|
-list) printVersions;;
|
||||||
|
-gcc) useGcc ;;
|
||||||
|
-force) optForce=true ;;
|
||||||
|
|
||||||
|
lib|libso)
|
||||||
|
targetType="$1"
|
||||||
|
;;
|
||||||
|
|
||||||
|
hypre/* | sources/hypre* |\
|
||||||
|
hypre-[0-9]* | hypre-git)
|
||||||
|
PACKAGE="${1%%/}"
|
||||||
|
unset HYPRE_ARCH_PATH # Avoid inconsistency
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
die "unknown option/argument: '$1'"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z "$PACKAGE" ]
|
||||||
|
then
|
||||||
|
die "The HYPRE package/version not specified"
|
||||||
|
elif _foamIsNone "$PACKAGE" || _foamIsSystem "$PACKAGE"
|
||||||
|
then
|
||||||
|
echo "Using none/system (skip ThirdParty build of HYPRE)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Build HYPRE
|
||||||
|
#
|
||||||
|
# HYPRE_ARCH_PATH : installation directory (as per config file)
|
||||||
|
#
|
||||||
|
# *PACKAGE : name-version of the package
|
||||||
|
# *SOURCE : location of original sources
|
||||||
|
# *PREFIX : installation directory
|
||||||
|
|
||||||
|
PKG_SOURCE="$(findSourceDir "$PACKAGE")"
|
||||||
|
PACKAGE="$(basename "$PACKAGE")"
|
||||||
|
PKG_PREFIX="$installBASE$WM_SIZE_OPTIONS/$PACKAGE"
|
||||||
|
export GIT_DIR="$PKG_SOURCE/.git"
|
||||||
|
|
||||||
|
# Override as per config file (if any)
|
||||||
|
[ -n "$HYPRE_ARCH_PATH" ] && PKG_PREFIX="$HYPRE_ARCH_PATH"
|
||||||
|
|
||||||
|
[ -d "$PKG_SOURCE" ] || {
|
||||||
|
echo "Missing sources: '$PACKAGE'"
|
||||||
|
showDownloadHint hypre
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Compilers
|
||||||
|
CC="$(whichMpicc)"
|
||||||
|
CXX="$(whichMpicxx)"
|
||||||
|
|
||||||
|
echo "Starting build: $PACKAGE ($targetType)"
|
||||||
|
echo
|
||||||
|
(
|
||||||
|
# Configuration options
|
||||||
|
unset configOpt
|
||||||
|
|
||||||
|
# Additional configure options
|
||||||
|
if [ "$1" = "--" ]
|
||||||
|
then
|
||||||
|
shift
|
||||||
|
configOpt="$configOpt $@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "$PKG_SOURCE/src" || exit
|
||||||
|
|
||||||
|
rm -rf "$PKG_PREFIX"
|
||||||
|
make distclean 2>/dev/null || true
|
||||||
|
|
||||||
|
set -x && \
|
||||||
|
./configure \
|
||||||
|
--prefix="$PKG_PREFIX" \
|
||||||
|
--disable-fortran \
|
||||||
|
--enable-shared \
|
||||||
|
$configOpt \
|
||||||
|
&& make -j $WM_NCOMPPROCS \
|
||||||
|
&& echo "Built: hypre" \
|
||||||
|
&& make install \
|
||||||
|
&& echo "Installed: $PACKAGE"
|
||||||
|
) || {
|
||||||
|
echo "Error building: $PACKAGE"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
475
makeKAHIP
Executable file
475
makeKAHIP
Executable file
@ -0,0 +1,475 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | www.openfoam.com
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# makeKAHIP
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Build the KaHIP library (int32 only).
|
||||||
|
#
|
||||||
|
# ----------------------------------------------
|
||||||
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Dynamic library ending (default is .so)
|
||||||
|
[ "$(uname -s)" = Darwin ] && EXT_SO=.dylib || EXT_SO=.so
|
||||||
|
|
||||||
|
# Short-circuit test for an installation
|
||||||
|
if [ "$1" = "-test" ]
|
||||||
|
then
|
||||||
|
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
|
||||||
|
dir="${2%/}" # <- *_ARCH_PATH
|
||||||
|
[ -d "$dir/include" ] || exit 2
|
||||||
|
|
||||||
|
package="kahip"
|
||||||
|
libName="libkahip"
|
||||||
|
for lib in \
|
||||||
|
"$FOAM_EXT_LIBBIN/$libName$EXT_SO" \
|
||||||
|
"$dir/lib/$libName.a" \
|
||||||
|
"$dir/lib/$libName$EXT_SO" \
|
||||||
|
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName.a" \
|
||||||
|
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName$EXT_SO" \
|
||||||
|
;
|
||||||
|
do
|
||||||
|
if [ -r "$lib" ]
|
||||||
|
then
|
||||||
|
echo " $package include: $dir/include"
|
||||||
|
echo " $package library: ${lib%/*}"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
if : # Run from third-party directory
|
||||||
|
then
|
||||||
|
cd "${0%/*}" || exit
|
||||||
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
|
echo " Check your OpenFOAM environment and installation"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Obtain version from OpenFOAM etc/config.sh file:
|
||||||
|
_foamConfig kahip
|
||||||
|
|
||||||
|
PACKAGE="${KAHIP_VERSION:-system}"
|
||||||
|
targetType=libso
|
||||||
|
|
||||||
|
# Hint for cmake findMPI
|
||||||
|
if [ -d "$MPI_ARCH_PATH" ]
|
||||||
|
then
|
||||||
|
export MPI_HOME="$MPI_ARCH_PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if nonStandardPlatforms # Possibly unreliable inherited values
|
||||||
|
then
|
||||||
|
unset KAHIP_ARCH_PATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
printVersions() { listPackageVersions kahip; exit 0; }
|
||||||
|
printHelp() {
|
||||||
|
/bin/cat<<USAGE
|
||||||
|
|
||||||
|
Usage: ${0##*/} [OPTION] [lib|libso] [kahip-VERSION]
|
||||||
|
options:
|
||||||
|
-gcc Force use of gcc/g++
|
||||||
|
-force Force build attempt (mingw)
|
||||||
|
-cmake PATH With cmake from the given path
|
||||||
|
-bin Create kahip binaries as well
|
||||||
|
-no-bin Suppress creation of kahip binaries (default)
|
||||||
|
-mpi-home PATH With hint for MPI_HOME
|
||||||
|
-no-mpi Compile without MPI
|
||||||
|
-list List available unpacked source versions
|
||||||
|
-help Display usage help
|
||||||
|
|
||||||
|
* Build kahip (int32_t only)
|
||||||
|
${PACKAGE:-[unspecified]}
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
showDownloadHint kahip
|
||||||
|
exit 0 # Clean exit
|
||||||
|
}
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
exportCompiler minimal # Minimal compiler info for CMake/configure
|
||||||
|
|
||||||
|
unset optForce optNoExtlib
|
||||||
|
optBinaries=false
|
||||||
|
optWithMPI=true
|
||||||
|
optLabelSize="${WM_LABEL_SIZE:-32}"
|
||||||
|
|
||||||
|
# Parse options
|
||||||
|
while [ "$#" -gt 0 ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
'') ;; # Ignore empty
|
||||||
|
-h | -help*) printHelp;;
|
||||||
|
-list) printVersions;;
|
||||||
|
-gcc) useGccWmake ;;
|
||||||
|
-force) optForce=true ;;
|
||||||
|
-int32 | -int64) echo "ignoring $1" ;;
|
||||||
|
-bin) optBinaries=true ;;
|
||||||
|
-no-bin) optBinaries=false ;;
|
||||||
|
-no-mpi) optWithMPI=false ;;
|
||||||
|
-no-extlib) optNoExtlib=true ;; # Hidden option (experimental)
|
||||||
|
|
||||||
|
-cmake)
|
||||||
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
CMAKE_PATH="${2%%/}"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-mpi-home) # mpi with hint
|
||||||
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
export MPI_HOME="${2%%/}"
|
||||||
|
case "${MPI_HOME:-none}" in (false|none) unset MPI_HOME;; esac
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
|
||||||
|
lib|libso)
|
||||||
|
targetType="$1"
|
||||||
|
;;
|
||||||
|
|
||||||
|
kahip/* | sources/kahip* | sources/KaHIP* |\
|
||||||
|
kahip-[0-9]* | kahip-git | KaHIP_* | KaHIP-[0-9]*)
|
||||||
|
PACKAGE="${1%%/}"
|
||||||
|
unset KAHIP_ARCH_PATH # Avoid inconsistency
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
die "unknown option/argument: '$1'"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z "$PACKAGE" ]
|
||||||
|
then
|
||||||
|
die "The KAHIP package/version not specified"
|
||||||
|
elif _foamIsNone "$PACKAGE" || _foamIsSystem "$PACKAGE"
|
||||||
|
then
|
||||||
|
echo "Using none/system (skip ThirdParty build of KAHIP)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Known build issues for mingw (uses some non-portable headers)
|
||||||
|
case "$WM_COMPILER" in
|
||||||
|
(Mingw*)
|
||||||
|
if [ "$optForce" = true ]
|
||||||
|
then
|
||||||
|
echo "Warning: kahip - known compilation issues with $WM_COMPILER"
|
||||||
|
else
|
||||||
|
echo "Skipping kahip - known compilation issues with $WM_COMPILER"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ "$optNoExtlib" = true ]
|
||||||
|
then
|
||||||
|
unset FOAM_EXT_LIBBIN
|
||||||
|
else
|
||||||
|
requireExtLibBin
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Build KaHIP
|
||||||
|
#
|
||||||
|
# KAHIP_ARCH_PATH : installation directory (as per config file)
|
||||||
|
#
|
||||||
|
# *PACKAGE : name-version of the package
|
||||||
|
# *SOURCE : location of original sources
|
||||||
|
# *PREFIX : installation directory
|
||||||
|
|
||||||
|
PKG_SOURCE="$(findSourceDir "$PACKAGE")"
|
||||||
|
PACKAGE="$(basename "$PACKAGE")"
|
||||||
|
# Future: PKG_PREFIX="$installBASE$WM_SIZE_OPTIONS/$PACKAGE"
|
||||||
|
PKG_PREFIX="$installBASE/$PACKAGE"
|
||||||
|
export GIT_DIR="$PKG_SOURCE/.git"
|
||||||
|
|
||||||
|
# Override as per config file (if any)
|
||||||
|
[ -n "$KAHIP_ARCH_PATH" ] && PKG_PREFIX="$KAHIP_ARCH_PATH"
|
||||||
|
|
||||||
|
[ -d "$PKG_SOURCE" ] || {
|
||||||
|
echo "Missing sources: '$PACKAGE'"
|
||||||
|
showDownloadHint kahip
|
||||||
|
exit 2
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# - newer versions use CMake.
|
||||||
|
# - intermediate versions (eg, kahip-2.11) had CMakeLists but didn't install
|
||||||
|
# include/ which means the scons workaround is probably better.
|
||||||
|
# - very old versions only had scons.
|
||||||
|
|
||||||
|
# NB: the flags for 64bit indices in the header seem to be missing.
|
||||||
|
|
||||||
|
unset useWmakeWorkaround
|
||||||
|
if [ -f "$PKG_SOURCE/SConstruct" ]
|
||||||
|
then
|
||||||
|
# Use wmake for old scons builds
|
||||||
|
echo "Using wmake for the build..."
|
||||||
|
useWmakeWorkaround=true
|
||||||
|
requireWMakeToolchain
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Manual installation of serial libraries
|
||||||
|
# from libdir to -> $FOAM_EXT_LIBBIN
|
||||||
|
#
|
||||||
|
install()
|
||||||
|
{
|
||||||
|
local bindir="$PKG_PREFIX"/bin
|
||||||
|
local libdir_source="$1"
|
||||||
|
local libdir_serial="$FOAM_EXT_LIBBIN"
|
||||||
|
local libdir_parallel="$FOAM_EXT_LIBBIN/$FOAM_MPI"
|
||||||
|
local libname_suffix="-int$WM_LABEL_SIZE"
|
||||||
|
|
||||||
|
[ -n "$FOAM_EXT_LIBBIN" ] || unset libdir_serial libdir_parallel
|
||||||
|
[ -n "$WM_LABEL_SIZE" ] || unset libname_suffix
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Adjusting installation"
|
||||||
|
|
||||||
|
if [ "$optBinaries" = false ]
|
||||||
|
then
|
||||||
|
echo "Removing binaries: $bindir"
|
||||||
|
rm -rf "$bindir" 2>/dev/null # Failed removal is uncritical
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$libdir_source" ]
|
||||||
|
then
|
||||||
|
libdir_source="$PKG_PREFIX/lib$WM_COMPILER_LIB_ARCH"
|
||||||
|
if [ ! -d "$libdir_source" ]
|
||||||
|
then
|
||||||
|
libdir_source="$PKG_PREFIX/lib"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Before kahip-v3.12 built 'libinterface'. Rename this to 'libkahip'
|
||||||
|
(
|
||||||
|
cd "$libdir_source" || exit
|
||||||
|
libname="libkahip"
|
||||||
|
|
||||||
|
for name in libinterface
|
||||||
|
do
|
||||||
|
if [ -f "$name$EXT_SO" ]
|
||||||
|
then
|
||||||
|
rm -f "$libname$EXT_SO" "$libname$libname_suffix$EXT_SO"
|
||||||
|
mv "$name$EXT_SO" "$libname$EXT_SO"
|
||||||
|
echo "Renamed $name -> $libname"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
)
|
||||||
|
|
||||||
|
# Rename lib as xxx-intNN qualified library names (non-windows)
|
||||||
|
if [ -n "$libname_suffix" ] && [ "${EXT_SO:-.dll}" != ".dll" ]
|
||||||
|
then
|
||||||
|
(
|
||||||
|
cd "$libdir_source" || exit
|
||||||
|
echo "Tagging libraries with $libname_suffix"
|
||||||
|
for name in libkahip libparhip_interface
|
||||||
|
do
|
||||||
|
if [ -f "$name$EXT_SO" ]
|
||||||
|
then
|
||||||
|
mv "$name$EXT_SO" "$name$libname_suffix$EXT_SO"
|
||||||
|
ln -sf "$name$libname_suffix$EXT_SO" "$name$EXT_SO"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
|
local libdir_target
|
||||||
|
|
||||||
|
# Serial
|
||||||
|
libdir_target="$libdir_serial"
|
||||||
|
if [ -n "$libdir_target" ]
|
||||||
|
then
|
||||||
|
# Remove old libraries/links
|
||||||
|
for name in libkahip libkahip_interface libparhip_interface
|
||||||
|
do
|
||||||
|
rm -f "$libdir_target/$name$EXT_SO"
|
||||||
|
rm -f "$libdir_target/$name$libname_suffix$EXT_SO"
|
||||||
|
done
|
||||||
|
mkdir -p "$libdir_target"
|
||||||
|
echo "Relocating serial libraries"
|
||||||
|
|
||||||
|
# echo "Installing: $libdir_target/libkahip$libname_suffix"
|
||||||
|
mv -f "$libdir_source"/libkahip*"$EXT_SO" "$libdir_target" 2>/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Parallel
|
||||||
|
libdir_target="$libdir_parallel"
|
||||||
|
if [ -n "$libdir_target" ]
|
||||||
|
then
|
||||||
|
# Remove old libraries/links
|
||||||
|
for name in libkahip libkahip_interface libparhip_interface
|
||||||
|
do
|
||||||
|
rm -f "$libdir_target/$name$EXT_SO"
|
||||||
|
rm -f "$libdir_target/$name$libname_suffix$EXT_SO"
|
||||||
|
done
|
||||||
|
mkdir -p "$libdir_target"
|
||||||
|
echo "Relocating parallel libraries"
|
||||||
|
|
||||||
|
# echo "Installing: $libdir_target/libparhip$libname_suffix"
|
||||||
|
mv -f "$libdir_source"/libparhip*"$EXT_SO" "$libdir_target" 2>/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
rmdir "$libdir_source" 2>/dev/null # Failed rmdir is uncritical
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Manual installation
|
||||||
|
#
|
||||||
|
install_wmake()
|
||||||
|
{
|
||||||
|
local bindir="$PKG_PREFIX"/bin
|
||||||
|
local incdir="$PKG_PREFIX"/include
|
||||||
|
local libdir_source="$PKG_PREFIX/lib$WM_COMPILER_LIB_ARCH"
|
||||||
|
local libdir_target="$FOAM_EXT_LIBBIN"
|
||||||
|
local libname_suffix="-int$WM_LABEL_SIZE"
|
||||||
|
|
||||||
|
[ -n "$WM_LABEL_SIZE" ] || unset libname_suffix
|
||||||
|
|
||||||
|
# Leave static libraries in sub-directory
|
||||||
|
if [ "$targetType" = lib ] || [ -z "$FOAM_EXT_LIBBIN" ]
|
||||||
|
then
|
||||||
|
unset libdir_target
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove build artifacts from the source directory
|
||||||
|
# (for a clean build next time)
|
||||||
|
wclean
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Adjusting installation"
|
||||||
|
echo "Installing headers: $incdir"
|
||||||
|
|
||||||
|
mkdir -m 0755 -p "$incdir"
|
||||||
|
/bin/cp -pv \
|
||||||
|
"$PKG_SOURCE"/interface/kaHIP_interface.h \
|
||||||
|
"$incdir"
|
||||||
|
|
||||||
|
# Rename lib as xxx-intNN qualified library names (non-windows)
|
||||||
|
if [ -n "$libname_suffix" ] && [ "${EXT_SO:-.dll}" != ".dll" ]
|
||||||
|
then
|
||||||
|
(
|
||||||
|
cd "$libdir_source" || exit
|
||||||
|
echo "Tagging libraries with $libname_suffix"
|
||||||
|
for name in libkahip libparhip_interface
|
||||||
|
do
|
||||||
|
if [ -f "$name$EXT_SO" ]
|
||||||
|
then
|
||||||
|
mv "$name$EXT_SO" "$name$libname_suffix$EXT_SO"
|
||||||
|
ln -sf "$name$libname_suffix$EXT_SO" "$name$EXT_SO"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$libdir_target" ]
|
||||||
|
then
|
||||||
|
# Remove old libraries/links
|
||||||
|
for name in libkahip libkahip_interface libparhip_interface
|
||||||
|
do
|
||||||
|
rm -f "$libdir_target/$name$EXT_SO"
|
||||||
|
rm -f "$libdir_target/$name$libname_suffix$EXT_SO"
|
||||||
|
done
|
||||||
|
mkdir -p "$libdir_target"
|
||||||
|
echo "Relocating serial libraries"
|
||||||
|
|
||||||
|
# echo "Installing: $libdir_target/libkahip$libname_suffix"
|
||||||
|
mv -f "$libdir_source"/libkahip*"$EXT_SO" "$libdir_target" 2>/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
rmdir "$libdir_source" 2>/dev/null # Failed rmdir is uncritical
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "${useWmakeWorkaround:-false}" = false ]
|
||||||
|
then
|
||||||
|
(
|
||||||
|
echo "Starting build: $PACKAGE using cmake"
|
||||||
|
echo
|
||||||
|
|
||||||
|
PKG_BUILD="$buildBASE/$PACKAGE"
|
||||||
|
cd "$PKG_SOURCE" || exit
|
||||||
|
|
||||||
|
# Remove any existing build folder and recreate
|
||||||
|
rm -rf "$PKG_PREFIX"
|
||||||
|
rm -rf "$PKG_BUILD"
|
||||||
|
mkdir -p "$PKG_BUILD"
|
||||||
|
|
||||||
|
unset buildOpt
|
||||||
|
if [ "$optWithMPI" = false ]
|
||||||
|
then
|
||||||
|
buildOpt="${buildOpt} -DPARHIP=OFF"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cmake=$(findCMake)
|
||||||
|
|
||||||
|
cd "$PKG_BUILD" && set -x && \
|
||||||
|
${cmake:?} \
|
||||||
|
-B "$PKG_BUILD" \
|
||||||
|
-S "$PKG_SOURCE" \
|
||||||
|
-DCMAKE_INSTALL_PREFIX="$PKG_PREFIX" \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
$buildOpt \
|
||||||
|
${WM_QUIET:+-DCMAKE_RULE_MESSAGES=OFF} \
|
||||||
|
&& set +x \
|
||||||
|
&& make -j $WM_NCOMPPROCS \
|
||||||
|
&& make install \
|
||||||
|
&& install \
|
||||||
|
&& echo "Built: $PACKAGE"
|
||||||
|
) || {
|
||||||
|
echo "Error building: $PACKAGE"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
elif true
|
||||||
|
then
|
||||||
|
(
|
||||||
|
echo "Starting build: $PACKAGE ($targetType) using wmake"
|
||||||
|
echo
|
||||||
|
|
||||||
|
cd "$PKG_SOURCE/lib" || exit
|
||||||
|
|
||||||
|
rm -rf "$PKG_PREFIX"
|
||||||
|
rm -f "$FOAM_EXT_LIBBIN/libkahip"*
|
||||||
|
|
||||||
|
export KAHIP_LIB_DIR="$PKG_PREFIX/lib$WM_COMPILER_LIB_ARCH"
|
||||||
|
mkdir -m 0755 -p "$KAHIP_LIB_DIR" 2>/dev/null
|
||||||
|
|
||||||
|
cpMakeFiles kahip 2>/dev/null
|
||||||
|
|
||||||
|
if [ -e ../interface ] && [ ! -e interface ]
|
||||||
|
then
|
||||||
|
ln -s ../interface interface
|
||||||
|
fi
|
||||||
|
|
||||||
|
wmake -j $WM_NCOMPPROCS -s $targetType \
|
||||||
|
&& echo "Built: $PACKAGE" \
|
||||||
|
&& install_wmake
|
||||||
|
) || {
|
||||||
|
echo "Error building: $PACKAGE"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
223
makeLLVM
223
makeLLVM
@ -3,24 +3,14 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
# \\ / A nd | www.openfoam.com
|
||||||
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
# Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
#
|
|
||||||
# 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
|
# Script
|
||||||
# makeLLVM
|
# makeLLVM
|
||||||
@ -30,86 +20,88 @@
|
|||||||
#
|
#
|
||||||
# Note
|
# Note
|
||||||
# - Ensure that you always use matching versions between llvm and clang.
|
# - Ensure that you always use matching versions between llvm and clang.
|
||||||
# - The LLVM components reside in the LLVM tools/ subdirectory
|
# - LLVM components such as clang reside in the LLVM tools/ subdirectory
|
||||||
#
|
#
|
||||||
# Example, building from svn repository:
|
# For example, when building from tar files (version 4.0.0)
|
||||||
# 1) Checkout LLVM:
|
|
||||||
# svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm-svn
|
|
||||||
#
|
#
|
||||||
# 2) Checkout Clang, in the correct location
|
# 1) Unpack LLVM:
|
||||||
# cd llvm-svn/tools
|
# tar -xJf llvm-4.0.1.src.tar.xz
|
||||||
# svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
|
# mv llvm-4.0.1.src llvm-4.0.1
|
||||||
# cd -
|
|
||||||
#
|
#
|
||||||
# Example, building from tar files (version 3.8.0)
|
# 2) Unpack Clang (also know as cfe):
|
||||||
# - Unpack LLVM:
|
# tar -xJf cfe-4.0.1.src.tar.xz
|
||||||
# tar -Jvf llvm-3.8.0.src.tar.xz
|
# mv cfe-4.0.1.src llvm-4.0.1/tools/clang
|
||||||
# mv llvm-3.8.0.src llvm-3.8.0
|
|
||||||
#
|
#
|
||||||
# - Unpack Clang (also know as cfe):
|
# 3) Unpack openmp (optional):
|
||||||
# tar -Jvf cfe-3.8.0.src.tar.xz
|
# tar -xJf openmp-4.0.1.src.tar.xz
|
||||||
# mv cfe-3.8.0.src llvm-3.8.0/tools/clang
|
# mv openmp-4.0.1.src llvm-4.0.1/tools/openmp
|
||||||
#
|
#
|
||||||
|
# ----------------------------------------------
|
||||||
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
if : # Run from third-party directory
|
||||||
|
then
|
||||||
|
cd "${0%/*}" || exit
|
||||||
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
|
echo " Check your OpenFOAM environment and installation"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Get default llvm/clang version
|
|
||||||
WM_COMPILER_TYPE=ThirdParty # ensure we get the correct compiler settings
|
|
||||||
WM_COMPILER=Clang # force values for 'clang'
|
|
||||||
|
|
||||||
. $WM_PROJECT_DIR/etc/config.sh/functions
|
[ "${WM_COMPILER#Clang}" = "$WM_COMPILER" ] && WM_COMPILER=Clang # Force clang
|
||||||
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/compiler)
|
WM_COMPILER_TYPE=ThirdParty # Ensure we get the correct settings
|
||||||
|
|
||||||
llvmPACKAGE=$clang_version
|
# LLVM/Clang version from OpenFOAM etc/config.sh file:
|
||||||
|
_foamConfig compiler
|
||||||
|
|
||||||
|
PACKAGE="$clang_version"
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# run from third-party directory only
|
printVersions() { listPackageVersions llvm; exit 0; }
|
||||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
printHelp() {
|
||||||
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
|
|
||||||
}
|
|
||||||
. etc/tools/ThirdPartyFunctions
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
usage() {
|
|
||||||
exec 1>&2
|
|
||||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
|
||||||
cat<<USAGE
|
cat<<USAGE
|
||||||
|
|
||||||
usage: ${0##*/} [OPTION] [llvm-VERSION]
|
Usage: ${0##*/} [OPTION] [llvm-VERSION]
|
||||||
options:
|
options:
|
||||||
-cmake PATH with cmake from the path given
|
-gcc Force use of gcc/g++
|
||||||
-gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
-cmake PATH with cmake from the given path
|
||||||
-help
|
-list List available unpacked source versions
|
||||||
|
-help Display usage help
|
||||||
|
|
||||||
* build llvm/clang
|
* Build llvm/clang
|
||||||
${llvmPACKAGE:-'unspecified LLVM version'}
|
${PACKAGE:-[unspecified]}
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
exit 1
|
showDownloadHint llvm
|
||||||
|
exit 0 # Clean exit
|
||||||
}
|
}
|
||||||
#-----------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Ensure CMake gets the correct C/C++ compiler
|
exportCompiler # Compiler info for CMake/configure
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
|
||||||
|
|
||||||
# Parse options
|
# Parse options
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
-h | -help*) printHelp;;
|
||||||
;;
|
-list) printVersions;;
|
||||||
-gcc)
|
-gcc) useGcc ;;
|
||||||
export CC=gcc # use gcc/g++
|
|
||||||
export CXX=g++
|
|
||||||
;;
|
|
||||||
-cmake)
|
-cmake)
|
||||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
CMAKE_PATH="${2%%/}"
|
CMAKE_PATH="${2%%/}"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
llvm/* | sources/llvm* |\
|
||||||
llvm-[0-9]* | llvm-svn*)
|
llvm-[0-9]* | llvm-svn*)
|
||||||
llvmPACKAGE="${1%%/}"
|
PACKAGE="${1%%/}"
|
||||||
|
;;
|
||||||
|
[0-9]*)
|
||||||
|
PACKAGE="llvm-${1%%/}"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
die "unknown option/argument: '$1'"
|
die "unknown option/argument: '$1'"
|
||||||
@ -118,84 +110,97 @@ do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
[ -n "$llvmPACKAGE" ] || die "The llvm-VERSION was not specified"
|
if [ -z "$PACKAGE" ]
|
||||||
|
then
|
||||||
|
die "The LLVM package/version not specified"
|
||||||
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Build/install locations without a compiler name
|
# !Build/install locations with arch name only (NO compiler name)!
|
||||||
buildBASE=$WM_THIRD_PARTY_DIR/build/$WM_ARCH$WM_COMPILER_ARCH
|
buildBASE="$(dirname "$buildBASE")/$WM_ARCH$WM_COMPILER_ARCH"
|
||||||
installBASE=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
installBASE="$(dirname "$installBASE")/$WM_ARCH$WM_COMPILER_ARCH"
|
||||||
|
|
||||||
# Build LLVM (clang)
|
# Build LLVM (clang)
|
||||||
# LLVM_SOURCE_DIR : location of the original sources
|
# *PACKAGE : name-version of the package
|
||||||
# LLVM_BINARY_DIR : location of the build
|
# *SOURCEDIR : location of original sources
|
||||||
# LLVM_ARCH_PATH : location of the installed program
|
# *PREFIXDIR : installation directory
|
||||||
# - Strip any trailing '.src' from the proper names
|
# Note: strip trailing '.src' from package name
|
||||||
|
|
||||||
LLVM_SOURCE_DIR=$sourceBASE/$llvmPACKAGE
|
PKG_SOURCE="$(findSourceDir "$PACKAGE")"
|
||||||
LLVM_BINARY_DIR=$buildBASE/${llvmPACKAGE%%.src}
|
PACKAGE="$(basename "$PACKAGE" .src)" # Strip of trailing .src
|
||||||
LLVM_ARCH_PATH=$installBASE/${llvmPACKAGE%%.src}
|
PKG_PREFIX="$installBASE/$PACKAGE"
|
||||||
|
export GIT_DIR="$PKG_SOURCE/.git" # Avoid seeing our own git-repo
|
||||||
|
|
||||||
#
|
|
||||||
# Build LLVM
|
# Building...
|
||||||
#
|
|
||||||
echo "---------------"
|
echo "---------------"
|
||||||
if [ -d $LLVM_ARCH_PATH ]
|
if [ -d "$PKG_PREFIX" ]
|
||||||
then
|
then
|
||||||
echo "Already built: $llvmPACKAGE"
|
echo "Already built: $PACKAGE"
|
||||||
elif [ -z "$CMAKE_PATH" ] && $LLVM_SOURCE_DIR/configure -help >/dev/null 2>&1
|
elif [ -z "$CMAKE_PATH" ] && "$PKG_SOURCE"/configure -help >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
# configure can be used prior to 3.9.0
|
# configure can be used prior to 3.9.0
|
||||||
# but use cmake if someone explicitly mentioned -cmake on the command-line
|
# but use cmake if someone explicitly mentioned -cmake on the command-line
|
||||||
|
|
||||||
echo "Starting build: $llvmPACKAGE (using configure)"
|
echo "Starting build: $PACKAGE (using configure)"
|
||||||
echo
|
echo
|
||||||
(
|
(
|
||||||
cd $LLVM_SOURCE_DIR || exit 1
|
PKG_BUILD="$buildBASE/$PACKAGE"
|
||||||
make distclean 2>/dev/null
|
cd "$PKG_SOURCE" || exit
|
||||||
|
make distclean 2>/dev/null || true
|
||||||
|
|
||||||
rm -rf $LLVM_BINARY_DIR
|
rm -rf "$PKG_BUILD"
|
||||||
mkdir -p $LLVM_BINARY_DIR
|
mkdir -p "$PKG_BUILD"
|
||||||
cd $LLVM_BINARY_DIR
|
|
||||||
|
|
||||||
set -x
|
cd "$PKG_BUILD" && set -x && \
|
||||||
$LLVM_SOURCE_DIR/configure \
|
"$PKG_SOURCE"/configure \
|
||||||
--prefix=$LLVM_ARCH_PATH \
|
--prefix="$PKG_PREFIX" \
|
||||||
--with-gcc-toolchain=$(which gcc | sed s%/bin/gcc%%) \
|
--with-gcc-toolchain="$(command -v gcc | sed 's%/bin/gcc%%')" \
|
||||||
--enable-optimized \
|
--enable-optimized \
|
||||||
--enable-shared \
|
--enable-shared \
|
||||||
|
&& set +x \
|
||||||
&& make -j $WM_NCOMPPROCS \
|
&& make -j $WM_NCOMPPROCS \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& echo "Built: $llvmPACKAGE"
|
&& echo "Built: $PACKAGE"
|
||||||
) || {
|
) || {
|
||||||
echo "Error building: $llvmPACKAGE"
|
echo "Error building: $PACKAGE"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
# CMake used with 3.9.0 and later
|
# CMake used with 3.9.0 and later
|
||||||
|
|
||||||
echo "Starting build: $llvmPACKAGE (using cmake)"
|
echo "Starting build: $PACKAGE (using cmake)"
|
||||||
echo
|
echo
|
||||||
(
|
(
|
||||||
cd $LLVM_SOURCE_DIR || exit 1
|
PKG_BUILD="$buildBASE/$PACKAGE"
|
||||||
|
cd "$PKG_SOURCE" || exit
|
||||||
|
|
||||||
rm -rf $LLVM_BINARY_DIR
|
# Configuration options:
|
||||||
mkdir -p $LLVM_BINARY_DIR
|
unset configOpt
|
||||||
cd $LLVM_BINARY_DIR
|
if [ -f tools/openmp/CMakeLists.txt ]
|
||||||
|
then
|
||||||
|
configOpt="$configOpt -DLLVM_TOOL_OPENMP_BUILD=ON"
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -rf "$PKG_BUILD"
|
||||||
|
mkdir -p "$PKG_BUILD"
|
||||||
|
|
||||||
cmake=$(findCMake)
|
cmake=$(findCMake)
|
||||||
|
|
||||||
set -x
|
cd "$PKG_BUILD" && set -x && \
|
||||||
$cmake \
|
${cmake:?} \
|
||||||
-DCMAKE_INSTALL_PREFIX=$LLVM_ARCH_PATH \
|
-DCMAKE_INSTALL_PREFIX="$PKG_PREFIX" \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DBUILD_SHARED_LIBS:BOOL=ON \
|
-DBUILD_SHARED_LIBS=ON \
|
||||||
$LLVM_SOURCE_DIR \
|
$configOpt \
|
||||||
|
"$PKG_SOURCE" \
|
||||||
|
&& set +x \
|
||||||
&& make -j $WM_NCOMPPROCS \
|
&& make -j $WM_NCOMPPROCS \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& echo "Built: $llvmPACKAGE"
|
&& echo "Built: $PACKAGE"
|
||||||
) || {
|
) || {
|
||||||
echo "Error building: $llvmPACKAGE"
|
echo "Error building: $PACKAGE"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
285
makeMETIS
Executable file
285
makeMETIS
Executable file
@ -0,0 +1,285 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | www.openfoam.com
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# makeMETIS
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Build script for METIS
|
||||||
|
#
|
||||||
|
# ----------------------------------------------
|
||||||
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Dynamic library ending (default is .so)
|
||||||
|
[ "$(uname -s)" = Darwin ] && EXT_SO=.dylib || EXT_SO=.so
|
||||||
|
|
||||||
|
# Short-circuit test for an installation
|
||||||
|
if [ "$1" = "-test" ]
|
||||||
|
then
|
||||||
|
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
|
||||||
|
dir="${2%/}" # <- *_ARCH_PATH
|
||||||
|
[ -d "$dir/include" ] || exit 2
|
||||||
|
|
||||||
|
package="metis"
|
||||||
|
libName="libmetis"
|
||||||
|
for lib in \
|
||||||
|
"$FOAM_EXT_LIBBIN/$libName$EXT_SO" \
|
||||||
|
"$dir/lib/$libName.a" \
|
||||||
|
"$dir/lib/$libName$EXT_SO" \
|
||||||
|
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName.a" \
|
||||||
|
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName$EXT_SO" \
|
||||||
|
;
|
||||||
|
do
|
||||||
|
if [ -r "$lib" ]
|
||||||
|
then
|
||||||
|
echo " $package include: $dir/include"
|
||||||
|
echo " $package library: ${lib%/*}"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
if : # Run from third-party directory
|
||||||
|
then
|
||||||
|
cd "${0%/*}" || exit
|
||||||
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
|
echo " Check your OpenFOAM environment and installation"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Obtain version from OpenFOAM etc/config.sh file:
|
||||||
|
_foamConfig metis
|
||||||
|
|
||||||
|
PACKAGE="${METIS_VERSION:-system}"
|
||||||
|
targetType=libso
|
||||||
|
|
||||||
|
if nonStandardPlatforms # Possibly unreliable inherited values
|
||||||
|
then
|
||||||
|
unset METIS_ARCH_PATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
printVersions() { listPackageVersions metis; exit 0; }
|
||||||
|
printHelp() {
|
||||||
|
exec 1>&2
|
||||||
|
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||||
|
cat<<USAGE
|
||||||
|
|
||||||
|
Usage: ${0##*/} [OPTION] [lib|libso] [METIS-VERSION]
|
||||||
|
options:
|
||||||
|
-gcc Force use of gcc/g++
|
||||||
|
-int32 Use IDXTYPEWIDTH 32
|
||||||
|
-int64 Use IDXTYPEWIDTH 64
|
||||||
|
-bin Create metis binaries as well
|
||||||
|
-no-bin Suppress creation of metis binaries (default)
|
||||||
|
-list List available unpacked source versions
|
||||||
|
-help Display usage help
|
||||||
|
|
||||||
|
* Build METIS (default: -int${WM_LABEL_SIZE:-32}) with
|
||||||
|
${PACKAGE:-[unspecified]}
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
showDownloadHint metis
|
||||||
|
exit 0 # Clean exit
|
||||||
|
}
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
exportCompiler # Compiler info for CMake/configure
|
||||||
|
|
||||||
|
unset optForce optNoExtlib
|
||||||
|
optBinaries=false
|
||||||
|
optLabelSize="${WM_LABEL_SIZE:-32}"
|
||||||
|
|
||||||
|
# Parse options
|
||||||
|
while [ "$#" -gt 0 ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
'') ;; # Ignore empty
|
||||||
|
-h | -help*) printHelp;;
|
||||||
|
-list) printVersions;;
|
||||||
|
-gcc) useGcc ;;
|
||||||
|
-force) echo "ignoring $1" ;;
|
||||||
|
-int32 | -int64) optLabelSize="${1#-int}" ;;
|
||||||
|
-bin) optBinaries=true ;;
|
||||||
|
-no-bin) optBinaries=false ;;
|
||||||
|
-no-extlib) optNoExtlib=true ;; # Hidden option (experimental)
|
||||||
|
|
||||||
|
lib|libso)
|
||||||
|
targetType="$1"
|
||||||
|
;;
|
||||||
|
|
||||||
|
metis/* | sources/metis* | \
|
||||||
|
metis-[0-9]*)
|
||||||
|
PACKAGE="${1%%/}"
|
||||||
|
unset METIS_ARCH_PATH # Avoid inconsistency
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
die "unknown option/argument: '$1'"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z "$PACKAGE" ]
|
||||||
|
then
|
||||||
|
die "The METIS package/version not specified"
|
||||||
|
elif _foamIsNone "$PACKAGE" || _foamIsSystem "$PACKAGE"
|
||||||
|
then
|
||||||
|
echo "Using none/system (skip ThirdParty build of METIS)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Known build issues for mingw (various things)
|
||||||
|
case "$WM_COMPILER" in
|
||||||
|
(Mingw*)
|
||||||
|
if :
|
||||||
|
then
|
||||||
|
echo "Skipping metis - known compilation issues with $WM_COMPILER"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ "$optNoExtlib" = true ]
|
||||||
|
then
|
||||||
|
unset FOAM_EXT_LIBBIN
|
||||||
|
else
|
||||||
|
requireExtLibBin
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Build METIS
|
||||||
|
# METIS_ARCH_PATH : installation directory (as per config file)
|
||||||
|
#
|
||||||
|
# *PACKAGE : name-version of the package
|
||||||
|
# *SOURCE : location of original sources
|
||||||
|
# *PREFIX : installation directory
|
||||||
|
|
||||||
|
PKG_SOURCE="$(findSourceDir "$PACKAGE")"
|
||||||
|
PACKAGE="$(basename "$PACKAGE")"
|
||||||
|
PKG_PREFIX="$installBASE$WM_SIZE_OPTIONS/$PACKAGE"
|
||||||
|
export GIT_DIR="$PKG_SOURCE/.git"
|
||||||
|
|
||||||
|
# Override as per config file (if any)
|
||||||
|
[ -n "$METIS_ARCH_PATH" ] && PKG_PREFIX="$METIS_ARCH_PATH"
|
||||||
|
|
||||||
|
[ -d "$PKG_SOURCE" ] || {
|
||||||
|
echo "Missing sources: '$PACKAGE'"
|
||||||
|
showDownloadHint metis
|
||||||
|
exit 2
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Manual installation (of library)
|
||||||
|
#
|
||||||
|
install()
|
||||||
|
{
|
||||||
|
local bindir="$PKG_PREFIX"/bin
|
||||||
|
local libdir="$PKG_PREFIX"/lib
|
||||||
|
local libdir_target="$FOAM_EXT_LIBBIN"
|
||||||
|
local libname_suffix="-int$WM_LABEL_SIZE"
|
||||||
|
|
||||||
|
[ -n "$FOAM_EXT_LIBBIN" ] || unset libdir_target
|
||||||
|
[ -n "$WM_LABEL_SIZE" ] || unset libname_suffix
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Adjusting installation"
|
||||||
|
|
||||||
|
if [ "$optBinaries" = false ]
|
||||||
|
then
|
||||||
|
echo "Removing binaries: $bindir"
|
||||||
|
rm -rf "$bindir" 2>/dev/null # Failed removal is uncritical
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$targetType" = libso ]
|
||||||
|
then
|
||||||
|
# Rename lib as xxx-intNN qualified library names (non-windows)
|
||||||
|
if [ -n "$libname_suffix" ] && [ "${EXT_SO:-.dll}" != ".dll" ]
|
||||||
|
then
|
||||||
|
(
|
||||||
|
cd "$libdir" || exit
|
||||||
|
echo "Tagging libraries with $libname_suffix"
|
||||||
|
for name in libmetis
|
||||||
|
do
|
||||||
|
if [ -f "$name$EXT_SO" ]
|
||||||
|
then
|
||||||
|
mv "$name$EXT_SO" "$name$libname_suffix$EXT_SO"
|
||||||
|
ln -sf "$name$libname_suffix$EXT_SO" "$name$EXT_SO"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$libdir_target" ]
|
||||||
|
then
|
||||||
|
# Remove old libraries and links
|
||||||
|
for name in libmetis
|
||||||
|
do
|
||||||
|
rm -f "$libdir_target/$name$EXT_SO"
|
||||||
|
rm -f "$libdir_target/$name$libname_suffix$EXT_SO"
|
||||||
|
done
|
||||||
|
mkdir -p "$libdir_target"
|
||||||
|
echo "Relocating serial libraries"
|
||||||
|
|
||||||
|
# echo "Installing: $libdir_target/libmetis"
|
||||||
|
mv -f "$libdir"/libmetis* "$libdir_target"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
rmdir "$libdir" 2>/dev/null # Failed rmdir is uncritical
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
echo "Starting build: $PACKAGE ($targetType)"
|
||||||
|
if [ "$optLabelSize" != "$WM_LABEL_SIZE" ]
|
||||||
|
then
|
||||||
|
echo "Using int-$optLabelSize instead of int-$WM_LABEL_SIZE"
|
||||||
|
fi
|
||||||
|
export WM_LABEL_SIZE="$optLabelSize"
|
||||||
|
|
||||||
|
echo
|
||||||
|
(
|
||||||
|
# Configuration options:
|
||||||
|
unset configOpt
|
||||||
|
if [ "$targetType" = libso ]
|
||||||
|
then
|
||||||
|
configOpt="shared=1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "$PKG_SOURCE" || exit
|
||||||
|
rm -rf "$PKG_PREFIX"
|
||||||
|
rm -f "$FOAM_EXT_LIBBIN"/libmetis*
|
||||||
|
|
||||||
|
# Adjust metis IDXTYPEWIDTH (integer size)
|
||||||
|
sed -i -e 's=\(#define IDXTYPEWIDTH\).*=\1 '"$optLabelSize"'=' \
|
||||||
|
include/metis.h
|
||||||
|
|
||||||
|
# No config option for the library location.
|
||||||
|
# - build normally and use mv to relocate it
|
||||||
|
|
||||||
|
make config $configOpt prefix="$PKG_PREFIX" \
|
||||||
|
&& make -j $WM_NCOMPPROCS install \
|
||||||
|
&& echo "Built: metis" \
|
||||||
|
&& install
|
||||||
|
) || {
|
||||||
|
echo "Error building: metis"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
180
makeMGridGen
Executable file
180
makeMGridGen
Executable file
@ -0,0 +1,180 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | www.openfoam.com
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# makeMGridGen
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Build script for MGridGen (serial)
|
||||||
|
#
|
||||||
|
# ----------------------------------------------
|
||||||
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
if : # Run from third-party directory
|
||||||
|
then
|
||||||
|
cd "${0%/*}" || exit
|
||||||
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
|
echo " Check your OpenFOAM environment and installation"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Obtain version from OpenFOAM etc/config.sh file:
|
||||||
|
_foamConfig mgridgen
|
||||||
|
|
||||||
|
PACKAGE="${MGRIDGEN_VERSION:-none}"
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
printVersions() { listPackageVersions mgridgen parmgridgen; exit 0; }
|
||||||
|
printHelp() {
|
||||||
|
cat<<USAGE
|
||||||
|
|
||||||
|
Usage: ${0##*/} [OPTION] [mgridgen-VERSION]
|
||||||
|
options:
|
||||||
|
-force Force compilation, even if include/library already exists
|
||||||
|
-gcc Force use of gcc/g++
|
||||||
|
-list List available unpacked source versions
|
||||||
|
-help Display usage help
|
||||||
|
|
||||||
|
* Build MGridGen with
|
||||||
|
${PACKAGE:-[unspecified]}
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
# showDownloadHint gridgen
|
||||||
|
exit 0 # Clean exit
|
||||||
|
}
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
exportCompiler # Compiler info for CMake/configure
|
||||||
|
|
||||||
|
unset optForce
|
||||||
|
|
||||||
|
# Parse options
|
||||||
|
while [ "$#" -gt 0 ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
'') ;; # Ignore empty
|
||||||
|
-h | -help*) printHelp;;
|
||||||
|
-list) printVersions;;
|
||||||
|
-gcc) useGcc ;;
|
||||||
|
-force) optForce=true ;;
|
||||||
|
|
||||||
|
mgridgen/* | sources/*gridgen* | sources/*GridGen* | \
|
||||||
|
mgridgen-[0-9]* | MGridGen-[0-9]* | \
|
||||||
|
parmgridgen-[0-9]* | ParMGridGen-[0-9]*)
|
||||||
|
PACKAGE="${1%%/}"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
die "unknown option/argument: '$1'"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z "$PACKAGE" ]
|
||||||
|
then
|
||||||
|
die "The MGRIDGEN package/version not specified"
|
||||||
|
elif _foamIsNone "$PACKAGE" || _foamIsSystem "$PACKAGE"
|
||||||
|
then
|
||||||
|
echo "Using none/system (skip ThirdParty build of MGRIDGEN)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Build MGridGen
|
||||||
|
# *PACKAGE : name-version of the package
|
||||||
|
# *SOURCE : location of original sources
|
||||||
|
# *PREFIX : installation directory
|
||||||
|
|
||||||
|
PKG_SOURCE="$(findSourceDir "$PACKAGE")"
|
||||||
|
PACKAGE="$(basename "$PACKAGE")"
|
||||||
|
PKG_PREFIX="$installBASE$WM_SIZE_OPTIONS/$PACKAGE"
|
||||||
|
export GIT_DIR="$PKG_SOURCE/.git"
|
||||||
|
|
||||||
|
: "${FOAM_MPI:=dummy}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo ========================================
|
||||||
|
echo "Build mgridgen library $PACKAGE"
|
||||||
|
echo
|
||||||
|
|
||||||
|
#
|
||||||
|
# Manual installation
|
||||||
|
#
|
||||||
|
install()
|
||||||
|
{
|
||||||
|
echo "Install into $PKG_PREFIX"
|
||||||
|
|
||||||
|
local bindir="$PKG_PREFIX"/bin
|
||||||
|
local incdir="$PKG_PREFIX"/include
|
||||||
|
local libdir="$PKG_PREFIX/lib$WM_COMPILER_LIB_ARCH"
|
||||||
|
|
||||||
|
for dir in "$PKG_PREFIX" "$bindir" "$incdir" "$libdir"
|
||||||
|
do
|
||||||
|
mkdir -m 0755 -p "$dir"
|
||||||
|
done
|
||||||
|
|
||||||
|
cp -vf mgridgen.h "$incdir"
|
||||||
|
cp -vf libmgrid.a "$libdir"
|
||||||
|
cp -vf mgridgen "$bindir"
|
||||||
|
|
||||||
|
chmod -R 0644 "$incdir"/* "$libdir"/*
|
||||||
|
chmod -R 0755 "$bindir"/*
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Needs future adjustment
|
||||||
|
# - for shared library
|
||||||
|
# - for mpi-specific library locations
|
||||||
|
if [ -z "$optForce" ] \
|
||||||
|
&& [ -f "$PKG_PREFIX/include/mgridgen.h" ] \
|
||||||
|
&& {
|
||||||
|
[ -r "$PKG_PREFIX/lib/libmgrid.a" ] \
|
||||||
|
|| [ -r "$PKG_PREFIX/lib$WM_COMPILER_LIB_ARCH/libmgrid.a" ]
|
||||||
|
}
|
||||||
|
then
|
||||||
|
echo " MGridGen already built : $PKG_PREFIX"
|
||||||
|
else
|
||||||
|
(
|
||||||
|
cd "$PKG_SOURCE" || exit
|
||||||
|
[ -e Makefile ] && make realclean 2>/dev/null
|
||||||
|
|
||||||
|
# Remove any existing build folder and recreate
|
||||||
|
rm -rf "$PKG_PREFIX"
|
||||||
|
|
||||||
|
serial="$(whichCC)" # CC (serial compiler) default=gcc
|
||||||
|
# parallel=$(whichMpicc) # PARCC (parallel compiler) default=mpicc
|
||||||
|
# PARCC=$parallel
|
||||||
|
# PARLD=$parallel
|
||||||
|
# PARLIBS="-L../.. -lparmgrid -lmgrid -lm"
|
||||||
|
|
||||||
|
make \
|
||||||
|
COPTIONS="-fPIC" \
|
||||||
|
LDOPTIONS="-fPIC" \
|
||||||
|
CC="$serial" \
|
||||||
|
LD="$serial" \
|
||||||
|
LIBDIR="-L../.." \
|
||||||
|
LIBS="-L../.. -lmgrid -lm" \
|
||||||
|
make=make \
|
||||||
|
serial \
|
||||||
|
&& install \
|
||||||
|
&& echo "Built: $PACKAGE"
|
||||||
|
) || {
|
||||||
|
echo "Error building: $PACKAGE"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
219
makeMPICH
Executable file
219
makeMPICH
Executable file
@ -0,0 +1,219 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | www.openfoam.com
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# makeMPICH
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Build script for mpich [unmaintained]
|
||||||
|
#
|
||||||
|
# ----------------------------------------------
|
||||||
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Dynamic library ending (default is .so)
|
||||||
|
[ "$(uname -s)" = Darwin ] && EXT_SO=.dylib || EXT_SO=.so
|
||||||
|
|
||||||
|
# Short-circuit test for an installation
|
||||||
|
if [ "$1" = "-test" ]
|
||||||
|
then
|
||||||
|
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
|
||||||
|
dir="${2%/}" # <- *_ARCH_PATH
|
||||||
|
|
||||||
|
package="mpich"
|
||||||
|
libName="libmpi"
|
||||||
|
for lib in \
|
||||||
|
"$dir/lib/$libName.a" \
|
||||||
|
"$dir/lib/$libName$EXT_SO" \
|
||||||
|
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName.a" \
|
||||||
|
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName$EXT_SO" \
|
||||||
|
;
|
||||||
|
do
|
||||||
|
if [ -r "$lib" ]
|
||||||
|
then
|
||||||
|
echo "Have $package shared library (${dir##*/})"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo "No $package libraries found: ${dir:-not-specified}"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
if : # Run from third-party directory
|
||||||
|
then
|
||||||
|
cd "${0%/*}" || exit
|
||||||
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
|
echo " Check your OpenFOAM environment and installation"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
|
# Transition
|
||||||
|
_foamAddLib() { true; }
|
||||||
|
_foamAddMan() { true; }
|
||||||
|
_foamAddPath() { true; }
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Obtain version from OpenFOAM etc/config.sh file:
|
||||||
|
WM_MPLIB=MPICH # Ensure we get the correct MPI
|
||||||
|
_foamConfig mpi
|
||||||
|
|
||||||
|
PACKAGE="${FOAM_MPI:-system}"
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
printVersions() { listPackageVersions mpich; exit 0; }
|
||||||
|
printHelp() {
|
||||||
|
cat<<USAGE
|
||||||
|
|
||||||
|
Usage: ${0##*/} [OPTION] [mpich-VERSION] [-- configure-options]
|
||||||
|
options:
|
||||||
|
-force Force compilation, even if include/library already exists
|
||||||
|
-gcc Force use of gcc/g++
|
||||||
|
-list List available unpacked source versions
|
||||||
|
-help Display usage help
|
||||||
|
|
||||||
|
* build mpich with
|
||||||
|
${PACKAGE:-[unspecified]}
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
showDownloadHint mpich
|
||||||
|
exit 0 # Clean exit
|
||||||
|
}
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
exportCompiler # Compiler info for CMake/configure
|
||||||
|
|
||||||
|
unset optForce
|
||||||
|
|
||||||
|
# Parse options
|
||||||
|
while [ "$#" -gt 0 ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
'') ;; # Ignore empty
|
||||||
|
--) break;; # Extra configure options (leave on $@ for later detection)
|
||||||
|
-h | -help*) printHelp;;
|
||||||
|
-list) printVersions;;
|
||||||
|
-gcc) useGcc ;;
|
||||||
|
-force) optForce=true ;;
|
||||||
|
|
||||||
|
mpich/* | sources/mpich* | \
|
||||||
|
mpich*)
|
||||||
|
PACKAGE="${1%%/}"
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
die "unknown option/argument: '$1'"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z "$PACKAGE" ]
|
||||||
|
then
|
||||||
|
die "The MPICH package/version not specified"
|
||||||
|
elif _foamIsNone "$PACKAGE" || _foamIsSystem "$PACKAGE"
|
||||||
|
then
|
||||||
|
echo "Using none/system (skip ThirdParty build of MPICH)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Build MPICH
|
||||||
|
# *PACKAGE : name-version of the package
|
||||||
|
# *SOURCE : location of original sources
|
||||||
|
# *PREFIX : installation directory
|
||||||
|
|
||||||
|
PKG_SOURCE="$(findSourceDir "$PACKAGE")"
|
||||||
|
PACKAGE="$(basename "$PACKAGE")"
|
||||||
|
PKG_PREFIX="$installBASE/$PACKAGE"
|
||||||
|
export GIT_DIR="$PKG_SOURCE/.git"
|
||||||
|
|
||||||
|
if [ -z "$optForce" ] \
|
||||||
|
&& {
|
||||||
|
[ -r "$PKG_PREFIX/lib/libmpi$EXT_SO" ] \
|
||||||
|
|| [ -r "$PKG_PREFIX/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
|
||||||
|
}
|
||||||
|
then
|
||||||
|
echo "Already has shared library: $PKG_PREFIX"
|
||||||
|
elif [ -z "$optForce" ] \
|
||||||
|
&& {
|
||||||
|
[ -r "$PKG_PREFIX/lib/libmpi.a" ] \
|
||||||
|
|| [ -r "$PKG_PREFIX/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
|
||||||
|
}
|
||||||
|
then
|
||||||
|
echo "Already has static library: $PKG_PREFIX"
|
||||||
|
else
|
||||||
|
echo "Starting build: $WM_MPLIB ($PACKAGE)"
|
||||||
|
echo
|
||||||
|
|
||||||
|
(
|
||||||
|
# Configuration options:
|
||||||
|
unset configOpt
|
||||||
|
|
||||||
|
# Additional configure options
|
||||||
|
if [ "$1" = "--" ]
|
||||||
|
then
|
||||||
|
shift
|
||||||
|
configOpt="$configOpt $@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# End of configuration options
|
||||||
|
# ----------------------------
|
||||||
|
|
||||||
|
PKG_BUILD="$buildBASE/$PACKAGE"
|
||||||
|
|
||||||
|
cd "$PKG_SOURCE" || exit
|
||||||
|
make distclean 2>/dev/null || true
|
||||||
|
|
||||||
|
rm -rf "$PKG_PREFIX"
|
||||||
|
rm -rf "$PKG_BUILD"
|
||||||
|
mkdir -p "$PKG_BUILD"
|
||||||
|
|
||||||
|
# reproducible build naming
|
||||||
|
local_destdir="$(dirname $PKG_PREFIX)"
|
||||||
|
local_prefix="/$(basename $local_destdir)/$(basename $PKG_PREFIX)"
|
||||||
|
local_destdir="$(dirname $local_destdir)"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "configured prefix: $local_prefix"
|
||||||
|
echo "install directory: $local_destdir"
|
||||||
|
echo
|
||||||
|
|
||||||
|
cd "$PKG_BUILD" && set -x && \
|
||||||
|
"$PKG_SOURCE"/configure \
|
||||||
|
--prefix="$local_prefix" \
|
||||||
|
--disable-fortran --disable-g \
|
||||||
|
--enable-shared --disable-static \
|
||||||
|
$configOpt \
|
||||||
|
&& set +x \
|
||||||
|
&& make -j $WM_NCOMPPROCS \
|
||||||
|
&& make install DESTDIR="$local_destdir" \
|
||||||
|
&& echo "Built: $PACKAGE"
|
||||||
|
) || {
|
||||||
|
echo "Error building: $PACKAGE"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Unneeded generated files
|
||||||
|
for dir in share/doc share/info share/man
|
||||||
|
do
|
||||||
|
if [ -d "$PKG_PREFIX/$dir" ]
|
||||||
|
then
|
||||||
|
echo "Discard $dir files to save space: $PACKAGE"
|
||||||
|
rm -rf "$PKG_PREFIX/$dir"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
rmdir "$PKG_PREFIX"/share 2>/dev/null || true
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
202
makeMVAPICH
Executable file
202
makeMVAPICH
Executable file
@ -0,0 +1,202 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | www.openfoam.com
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# makeMVAPICH2
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Build script for mvapich2 [unmaintained]
|
||||||
|
#
|
||||||
|
# ----------------------------------------------
|
||||||
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Dynamic library ending (default is .so)
|
||||||
|
[ "$(uname -s)" = Darwin ] && EXT_SO=.dylib || EXT_SO=.so
|
||||||
|
|
||||||
|
# Short-circuit test for an installation
|
||||||
|
if [ "$1" = "-test" ]
|
||||||
|
then
|
||||||
|
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
|
||||||
|
dir="${2%/}" # <- *_ARCH_PATH
|
||||||
|
|
||||||
|
package="mvapich"
|
||||||
|
libName="libmpi"
|
||||||
|
for lib in \
|
||||||
|
"$dir/lib/$libName.a" \
|
||||||
|
"$dir/lib/$libName$EXT_SO" \
|
||||||
|
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName.a" \
|
||||||
|
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName$EXT_SO" \
|
||||||
|
;
|
||||||
|
do
|
||||||
|
if [ -r "$lib" ]
|
||||||
|
then
|
||||||
|
echo "Have $package library (${dir##*/})"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo "No $package libraries found: ${dir:-not-specified}"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
if : # Run from third-party directory
|
||||||
|
then
|
||||||
|
cd "${0%/*}" || exit
|
||||||
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
|
echo " Check your OpenFOAM environment and installation"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
|
# Transition
|
||||||
|
_foamAddLib() { true; }
|
||||||
|
_foamAddMan() { true; }
|
||||||
|
_foamAddPath() { true; }
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Obtain version from OpenFOAM etc/config.sh file:
|
||||||
|
WM_MPLIB=MVA2MPI # Ensure we get the correct MPI
|
||||||
|
_foamConfig mpi
|
||||||
|
|
||||||
|
PACKAGE="${FOAM_MPI:-system}"
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
printVersions() { listPackageVersions mvapich; exit 0; }
|
||||||
|
printHelp() {
|
||||||
|
cat<<USAGE
|
||||||
|
|
||||||
|
Usage: ${0##*/} [OPTION] [mvapich2-VERSION] [-- configure-options]
|
||||||
|
options:
|
||||||
|
-force Force compilation, even if include/library already exists
|
||||||
|
-gcc Force use of gcc/g++
|
||||||
|
-list List available unpacked source versions
|
||||||
|
-help Display usage help
|
||||||
|
|
||||||
|
* build mvapich2 with
|
||||||
|
${PACKAGE:-[unspecified]}
|
||||||
|
|
||||||
|
The additional configure-options could include, for example,
|
||||||
|
|
||||||
|
${0##*/} -- --disable-mcast
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
showDownloadHint mvapich
|
||||||
|
exit 0 # Clean exit
|
||||||
|
}
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
exportCompiler # Compiler info for CMake/configure
|
||||||
|
|
||||||
|
unset optForce
|
||||||
|
|
||||||
|
# Parse options
|
||||||
|
while [ "$#" -gt 0 ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
'') ;; # Ignore empty
|
||||||
|
--) break;; # Extra configure options (leave on $@ for later detection)
|
||||||
|
-h | -help*) printHelp;;
|
||||||
|
-list) printVersions;;
|
||||||
|
-gcc) useGcc ;;
|
||||||
|
-force) optForce=true ;;
|
||||||
|
|
||||||
|
mvapich/* | sources/mvapich* | \
|
||||||
|
mvapich*)
|
||||||
|
PACKAGE="${1%%/}"
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
die "unknown option/argument: '$1'"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z "$PACKAGE" ]
|
||||||
|
then
|
||||||
|
die "The MVAPICH package/version not specified"
|
||||||
|
elif _foamIsNone "$PACKAGE" || _foamIsSystem "$PACKAGE"
|
||||||
|
then
|
||||||
|
echo "Using none/system (skip ThirdParty build of MVAPICH)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Build MVAPICH
|
||||||
|
# *PACKAGE : name-version of the package
|
||||||
|
# *SOURCE : location of original sources
|
||||||
|
# *PREFIX : installation directory
|
||||||
|
|
||||||
|
PKG_SOURCE="$(findSourceDir "$PACKAGE")"
|
||||||
|
PACKAGE="$(basename "$PACKAGE")"
|
||||||
|
PKG_PREFIX="$installBASE/$PACKAGE"
|
||||||
|
export GIT_DIR="$PKG_SOURCE/.git"
|
||||||
|
|
||||||
|
if [ -z "$optForce" ] \
|
||||||
|
&& {
|
||||||
|
[ -r "$PKG_PREFIX/lib/libmpi$EXT_SO" ] \
|
||||||
|
|| [ -r "$PKG_PREFIX/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
|
||||||
|
}
|
||||||
|
then
|
||||||
|
echo "Already has shared library: $PKG_PREFIX"
|
||||||
|
elif [ -z "$optForce" ] \
|
||||||
|
&& {
|
||||||
|
[ -r "$PKG_PREFIX/lib/libmpi.a" ] \
|
||||||
|
|| [ -r "$PKG_PREFIX/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
|
||||||
|
}
|
||||||
|
then
|
||||||
|
echo "Already has static library: $PKG_PREFIX"
|
||||||
|
else
|
||||||
|
echo "Starting build: $WM_MPLIB ($PACKAGE)"
|
||||||
|
echo
|
||||||
|
|
||||||
|
(
|
||||||
|
# Configuration options:
|
||||||
|
unset configOpt
|
||||||
|
|
||||||
|
# Additional configure options
|
||||||
|
if [ "$1" = "--" ]
|
||||||
|
then
|
||||||
|
shift
|
||||||
|
configOpt="$configOpt $@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# End of configuration options
|
||||||
|
# ----------------------------
|
||||||
|
|
||||||
|
PKG_BUILD="$buildBASE/$PACKAGE"
|
||||||
|
|
||||||
|
cd "$PKG_SOURCE" || exit
|
||||||
|
make distclean 2>/dev/null || true
|
||||||
|
|
||||||
|
rm -rf "$PKG_PREFIX"
|
||||||
|
rm -rf "$PKG_BUILD"
|
||||||
|
mkdir -p "$PKG_BUILD"
|
||||||
|
|
||||||
|
cd "$PKG_BUILD" && set -x && \
|
||||||
|
"$PKG_SOURCE"/configure \
|
||||||
|
--prefix="$PKG_PREFIX" \
|
||||||
|
--disable-fortran --disable-g \
|
||||||
|
--enable-shared --disable-static \
|
||||||
|
$configOpt \
|
||||||
|
&& set +x \
|
||||||
|
&& make -j $WM_NCOMPPROCS \
|
||||||
|
&& make install \
|
||||||
|
&& echo "Built: $PACKAGE" \
|
||||||
|
&& pkgconfigAdjust "$PKG_PREFIX"
|
||||||
|
) || {
|
||||||
|
echo "Error building: $PACKAGE"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
365
makeMesa
365
makeMesa
@ -3,94 +3,122 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / 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 OpenCFD Ltd.
|
# \\ / A nd | www.openfoam.com
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
#
|
|
||||||
# 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
|
# Script
|
||||||
# makeMesa
|
# makeMesa
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Build script for Mesa
|
# Build script for MESA
|
||||||
#
|
#
|
||||||
# Note
|
# Note
|
||||||
# Building with mesa-12.x.x fails to create an include/GL directory and
|
# Building with mesa-12.x.x fails to create an include/GL directory and
|
||||||
# an "osmesa.h" file. Both make it fairly useless for off-screen VTK.
|
# an "osmesa.h" file. Both make it fairly useless for off-screen VTK.
|
||||||
#
|
#
|
||||||
# Building with mesa-11.x is fine and mesa-13.x also seems to be okay.
|
# Building with mesa-11.x, mesa-13.x and mesa-17.x seems to be okay.
|
||||||
#
|
#
|
||||||
|
# Known dependencies (likely incomplete)
|
||||||
|
#
|
||||||
|
# openSUSE 15.2:
|
||||||
|
#
|
||||||
|
# dri2proto-devel
|
||||||
|
# glproto-devel
|
||||||
|
# libxshmfence-devel
|
||||||
|
#
|
||||||
|
# ----------------------------------------------
|
||||||
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Special purpose script, no default version.
|
if : # Run from third-party directory
|
||||||
unset mesaPACKAGE
|
then
|
||||||
|
cd "${0%/*}" || exit
|
||||||
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
|
echo " Check your OpenFOAM environment and installation"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Obtain version from OpenFOAM etc/config.sh file:
|
||||||
|
unset vtk_version mesa_version mesa_llvm # Purge current values
|
||||||
|
_foamConfig vtk
|
||||||
|
|
||||||
|
PACKAGE="$mesa_version"
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
printVersions() { listPackageVersions mesa; exit 0; }
|
||||||
cd ${0%/*} || exit 1
|
printHelp() {
|
||||||
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
|
|
||||||
}
|
|
||||||
. etc/tools/ThirdPartyFunctions
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
usage() {
|
|
||||||
exec 1>&2
|
|
||||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
|
||||||
cat<<USAGE
|
cat<<USAGE
|
||||||
|
|
||||||
usage: ${0##*/} [OPTION] mesa-VERSION
|
Usage: ${0##*/} [OPTION] mesa-VERSION [-- configure-options]
|
||||||
options:
|
options:
|
||||||
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
-gcc Force use of gcc/g++
|
||||||
-help
|
-llvm VER llvm version (in ThirdParty) or 'system' to use system
|
||||||
|
-list List available unpacked source versions
|
||||||
|
-help Display usage help
|
||||||
|
|
||||||
* build Mesa with
|
* build MESA with
|
||||||
${mesaPACKAGE:-'unspecified MESA version'}
|
${PACKAGE:-[unspecified]}
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
exit 1
|
showDownloadHint mesa
|
||||||
|
exit 0 # Clean exit
|
||||||
}
|
}
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Ensure configure gets the correct C/C++ compiler
|
exportCompiler # Compiler info for CMake/configure
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
unset withLLVM
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
|
||||||
|
|
||||||
# Non-standard location for clang?
|
# Non-standard location for clang?
|
||||||
unset thirdPartyClang
|
case "$WM_COMPILER_TYPE-$WM_COMPILER" in
|
||||||
if [ "$WM_COMPILER_TYPE" = ThirdParty -a "$WM_COMPILER" = Clang ]
|
(ThirdParty-Clang*)
|
||||||
then
|
withLLVM=true # 'true' means find on path
|
||||||
thirdPartyClang=true
|
;;
|
||||||
fi
|
(system-Clang*)
|
||||||
|
withLLVM=system # 'system' means find on path
|
||||||
|
;;
|
||||||
|
(*)
|
||||||
|
if _foamIsNone "$mesa_llvm"
|
||||||
|
then
|
||||||
|
withLLVM=false
|
||||||
|
elif _foamIsSystem "$mesa_llvm"
|
||||||
|
then
|
||||||
|
withLLVM=system # 'system' means find on path
|
||||||
|
else
|
||||||
|
withLLVM="$mesa_llvm" # Take value from mesa config
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# Parse options
|
# Parse options
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
--) break;; # Extra configure options (leave on $@ for later detection)
|
||||||
;;
|
-h | -help*) printHelp;;
|
||||||
|
-list) printVersions;;
|
||||||
-gcc)
|
-gcc)
|
||||||
export CC=gcc # use gcc/g++
|
useGcc
|
||||||
export CXX=g++
|
unset withLLVM
|
||||||
unset thirdPartyClang
|
|
||||||
;;
|
;;
|
||||||
|
-llvm)
|
||||||
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
withLLVM="$2"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
llvm-*)
|
||||||
|
withLLVM="$1"
|
||||||
|
;;
|
||||||
|
|
||||||
|
mesa/* | sources/mesa* |\
|
||||||
mesa-*)
|
mesa-*)
|
||||||
mesaPACKAGE="${1%%/}"
|
PACKAGE="${1%%/}"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
die "unknown option/argument: '$1'"
|
die "unknown option/argument: '$1'"
|
||||||
@ -99,101 +127,228 @@ do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
[ -n "$mesaPACKAGE" ] || die "The mesa-VERSION was not specified"
|
if [ -z "$PACKAGE" ]
|
||||||
|
|
||||||
# Nothing to build
|
|
||||||
if _foamIsNone "$mesaPACKAGE"
|
|
||||||
then
|
then
|
||||||
echo "Using mesa-none (skip ThirdParty build of MESA)"
|
die "The MESA package/version not specified"
|
||||||
exit 0
|
elif _foamIsNone "$PACKAGE" || _foamIsSystem "$PACKAGE"
|
||||||
elif _foamIsSystem "$mesaPACKAGE"
|
|
||||||
then
|
then
|
||||||
echo "Using mesa-system (skip ThirdParty build of MESA)"
|
echo "Using none/system (skip ThirdParty build of MESA)"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Locate third-party clang as required
|
# Locate third-party clang as required
|
||||||
if [ "$thirdPartyClang" = true ]
|
case "$withLLVM" in
|
||||||
then
|
('' | none | false)
|
||||||
thirdPartyClang=$(command -v clang) || {
|
withLLVM=none
|
||||||
echo "Error: could not properly locate clang"
|
echo "Without llvm"
|
||||||
|
;;
|
||||||
|
|
||||||
|
(true | system)
|
||||||
|
LLVM_ARCH_PATH="$(command -v clang)" || {
|
||||||
|
echo "Error: could not properly locate llvm/clang"
|
||||||
exit 2
|
exit 2
|
||||||
}
|
}
|
||||||
|
|
||||||
# root installation directory
|
# Root installation directory
|
||||||
thirdPartyClang=${thirdPartyClang%/bin/clang}
|
LLVM_ARCH_PATH="${LLVM_ARCH_PATH%/bin/clang}"
|
||||||
|
|
||||||
[ -d "$thirdPartyClang" ] || {
|
if [ -d "$LLVM_ARCH_PATH" ]
|
||||||
echo "Error: could not properly locate clang"
|
then
|
||||||
|
# Add to path (for llvm-config)
|
||||||
|
PATH="$LLVM_ARCH_PATH/bin:$PATH"
|
||||||
|
else
|
||||||
|
echo "Error: could not properly locate llvm/clang"
|
||||||
exit 2
|
exit 2
|
||||||
}
|
fi
|
||||||
fi
|
;;
|
||||||
|
|
||||||
|
(llvm-*)
|
||||||
|
echo "check llvm = $withLLVM"
|
||||||
|
LLVM_ARCH_PATH="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH/$withLLVM"
|
||||||
|
|
||||||
|
if [ -d "$LLVM_ARCH_PATH" ]
|
||||||
|
then
|
||||||
|
# Add to path (for llvm-config)
|
||||||
|
PATH="$LLVM_ARCH_PATH/bin:$PATH"
|
||||||
|
else
|
||||||
|
echo "Error: could not properly locate llvm/clang"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Build MESA
|
# Build MESA
|
||||||
# For 64-bit
|
# *PACKAGE : name-version of the package
|
||||||
# - MESA itself will normally build into 'lib64'.
|
# *SOURCE : location of original sources
|
||||||
|
# *PREFIX : installation directory
|
||||||
#
|
#
|
||||||
# MESA_SOURCE_DIR : location of the original sources
|
# For 64-bit
|
||||||
# MESA_ARCH_DIR : installation directory
|
# - MESA itself will normally build into 'lib64' (depends on autoconfig).
|
||||||
|
|
||||||
MESA_SOURCE_DIR=$sourceBASE/$mesaPACKAGE
|
PKG_SOURCE="$(findSourceDir "$PACKAGE")"
|
||||||
MESA_ARCH_PATH=$installBASE/$mesaPACKAGE
|
PACKAGE="$(basename "$PACKAGE")"
|
||||||
|
PKG_PREFIX="$installBASE/$PACKAGE"
|
||||||
|
export GIT_DIR="$PKG_SOURCE/.git"
|
||||||
|
|
||||||
|
|
||||||
|
# Manual adjustments to mesa
|
||||||
|
# - avoid GLES (GLES1) since <GLES/gl.h> may mask the <GL/gl.h> header
|
||||||
|
adjustMESA()
|
||||||
|
{
|
||||||
|
pkgconfigAdjust "$PKG_PREFIX"
|
||||||
|
|
||||||
|
rm -rf "$PKG_PREFIX"/include/GLES "$PKG_PREFIX"/include/GLES1
|
||||||
|
echo "removed all gles1 includes"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Old MESA with autoconfig
|
||||||
|
|
||||||
|
if [ -e "$PKG_SOURCE"/configure ]
|
||||||
|
then
|
||||||
(
|
(
|
||||||
# configuration options:
|
# Configuration options:
|
||||||
unset configOpt
|
unset configOpt compFlags
|
||||||
|
|
||||||
if [ -d "$thirdPartyClang" ]
|
# Sometimes for LLVM issues
|
||||||
|
# compFlags="-D_GLIBCXX_USE_CXX11_ABI=0"
|
||||||
|
|
||||||
|
# Possibly for older mesa versions (see paraview wiki)
|
||||||
|
# compFlags="-O2 -DDEFAULT_SOFTWARE_DEPTH_BITS=31"
|
||||||
|
|
||||||
|
if [ -d "$LLVM_ARCH_PATH" ]
|
||||||
then
|
then
|
||||||
configOpt="$configOpt --with-llvm-prefix=$thirdPartyClang"
|
configOpt="$configOpt --with-llvm-prefix=$LLVM_ARCH_PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# end of configuration options
|
# Additional configure options
|
||||||
|
if [ "$1" = "--" ]
|
||||||
|
then
|
||||||
|
shift
|
||||||
|
configOpt="$configOpt $@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# End of configuration options
|
||||||
# ----------------------------
|
# ----------------------------
|
||||||
buildDIR=$buildBASE/$mesaPACKAGE
|
PKG_BUILD="$buildBASE/$PACKAGE"
|
||||||
|
|
||||||
cd $MESA_SOURCE_DIR || exit 1
|
cd "$PKG_SOURCE" || exit
|
||||||
|
|
||||||
# remove any existing build
|
|
||||||
rm -rf $MESA_ARCH_PATH
|
|
||||||
rm -rf $buildDIR
|
|
||||||
mkdir -p $buildDIR
|
|
||||||
cd $buildDIR
|
|
||||||
|
|
||||||
echo "----"
|
echo "----"
|
||||||
echo "Building $mesaPACKAGE"
|
echo "Building $PACKAGE (with autoconf)"
|
||||||
echo " Source : $MESA_SOURCE_DIR"
|
echo " Source : $PKG_SOURCE"
|
||||||
echo " Target : $MESA_ARCH_PATH"
|
echo " Target : $PKG_PREFIX"
|
||||||
if [ -d "$thirdPartyClang" ]
|
if [ -d "$LLVM_ARCH_PATH" ]
|
||||||
then
|
then
|
||||||
echo " Clang : $thirdPartyClang"
|
echo " llvm : $LLVM_ARCH_PATH"
|
||||||
fi
|
fi
|
||||||
echo "----"
|
echo "----"
|
||||||
|
|
||||||
# possibly for older mesa versions (see paraview wiki)
|
if [ -n "$compFlags" ]
|
||||||
# CXXFLAGS="-O2 -DDEFAULT_SOFTWARE_DEPTH_BITS=31" \
|
then
|
||||||
# CFLAGS="-O2 -DDEFAULT_SOFTWARE_DEPTH_BITS=31" \
|
CFLAGS="$CFLAGS $compFlags"
|
||||||
|
CXXFLAGS="$CXXFLAGS $compFlags"
|
||||||
|
fi
|
||||||
|
|
||||||
## autoreconf -fi
|
## autoreconf -fi
|
||||||
set -x
|
|
||||||
$MESA_SOURCE_DIR/configure \
|
rm -rf "$PKG_PREFIX"
|
||||||
--prefix=$MESA_ARCH_PATH \
|
rm -rf "$PKG_BUILD"
|
||||||
|
mkdir -p "$PKG_BUILD"
|
||||||
|
|
||||||
|
cd "$PKG_BUILD" && set -x && \
|
||||||
|
"$PKG_SOURCE"/configure \
|
||||||
|
--prefix="$PKG_PREFIX" \
|
||||||
--disable-xvmc \
|
--disable-xvmc \
|
||||||
--disable-glx \
|
--disable-glx \
|
||||||
--disable-dri \
|
--disable-dri \
|
||||||
|
--disable-gbm \
|
||||||
--disable-egl \
|
--disable-egl \
|
||||||
|
--disable-gles1 \
|
||||||
--enable-texture-float \
|
--enable-texture-float \
|
||||||
--enable-gallium-osmesa --with-gallium-drivers=swrast \
|
--enable-gallium-osmesa --with-gallium-drivers=swrast \
|
||||||
$configOpt \
|
$configOpt \
|
||||||
&& make -j $WM_NCOMPPROCS \
|
&& set +x \
|
||||||
&& make install \
|
&& make -j $WM_NCOMPPROCS \
|
||||||
&& echo "Built $mesaPACKAGE"
|
&& make install \
|
||||||
|
&& echo "Built $PACKAGE" \
|
||||||
|
&& adjustMESA
|
||||||
) || {
|
) || {
|
||||||
echo "Error building: MESA"
|
echo "Error building: MESA"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
elif [ -e "$PKG_SOURCE"/meson.build ]
|
||||||
|
then
|
||||||
|
(
|
||||||
|
# Configuration options:
|
||||||
|
unset configOpt compFlags
|
||||||
|
|
||||||
|
# Sometimes for LLVM issues
|
||||||
|
# compFlags="-D_GLIBCXX_USE_CXX11_ABI=0"
|
||||||
|
|
||||||
|
# Possibly for older mesa versions (see paraview wiki)
|
||||||
|
# compFlags="-O2 -DDEFAULT_SOFTWARE_DEPTH_BITS=31"
|
||||||
|
|
||||||
|
# Additional configure options
|
||||||
|
if [ "$1" = "--" ]
|
||||||
|
then
|
||||||
|
shift
|
||||||
|
configOpt="$configOpt $@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# End of configuration options
|
||||||
|
# ----------------------------
|
||||||
|
PKG_BUILD="$buildBASE/$PACKAGE"
|
||||||
|
cd "$PKG_SOURCE" || exit
|
||||||
|
|
||||||
|
echo "----"
|
||||||
|
echo "Building $PACKAGE (with meson)"
|
||||||
|
echo " Source : $PKG_SOURCE"
|
||||||
|
echo " Target : $PKG_PREFIX"
|
||||||
|
if [ -d "$LLVM_ARCH_PATH" ]
|
||||||
|
then
|
||||||
|
echo " llvm : $LLVM_ARCH_PATH"
|
||||||
|
fi
|
||||||
|
echo "----"
|
||||||
|
|
||||||
|
if [ -n "$compFlags" ]
|
||||||
|
then
|
||||||
|
CFLAGS="$CFLAGS $compFlags"
|
||||||
|
CXXFLAGS="$CXXFLAGS $compFlags"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Needs c++14 not c++11
|
||||||
|
CXXFLAGS="$(echo "$CXXFLAGS" | sed 's/c++11/c++14/')"
|
||||||
|
|
||||||
|
rm -rf "$PKG_PREFIX"
|
||||||
|
rm -rf "$PKG_BUILD"
|
||||||
|
mkdir -p "$PKG_BUILD"
|
||||||
|
|
||||||
|
cd "$PKG_SOURCE" && set -x && \
|
||||||
|
meson "$PKG_BUILD" \
|
||||||
|
--prefix="$PKG_PREFIX" \
|
||||||
|
-Dplatforms=x11 \
|
||||||
|
-Dosmesa=gallium \
|
||||||
|
-Dgallium-drivers=swrast \
|
||||||
|
-Ddri-drivers=[] \
|
||||||
|
-Dvulkan-drivers=[] \
|
||||||
|
$configOpt \
|
||||||
|
&& set +x \
|
||||||
|
&& ninja -j $WM_NCOMPPROCS -C "$PKG_BUILD" \
|
||||||
|
&& ninja -C "$PKG_BUILD" install \
|
||||||
|
&& echo "Built $PACKAGE" \
|
||||||
|
&& adjustMESA
|
||||||
|
) || {
|
||||||
|
echo "Error building: MESA"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
else
|
||||||
|
echo "Error building: MESA. Not autoconfig or meson?"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|||||||
12
makeMesa.example
Executable file
12
makeMesa.example
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# An example for building mesa with llvm
|
||||||
|
|
||||||
|
mesa=mesa-18.3.4
|
||||||
|
llvm=llvm-4.0.1
|
||||||
|
|
||||||
|
set -x
|
||||||
|
./makeMesa \
|
||||||
|
$mesa $llvm
|
||||||
|
"$@"
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
245
makeOPENMPI
Executable file
245
makeOPENMPI
Executable file
@ -0,0 +1,245 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | www.openfoam.com
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# makeOPENMPI
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Build script for openmpi
|
||||||
|
#
|
||||||
|
# ----------------------------------------------
|
||||||
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Dynamic library ending (default is .so)
|
||||||
|
[ "$(uname -s)" = Darwin ] && EXT_SO=.dylib || EXT_SO=.so
|
||||||
|
|
||||||
|
# Short-circuit test for an installation
|
||||||
|
if [ "$1" = "-test" ]
|
||||||
|
then
|
||||||
|
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
|
||||||
|
dir="${2%/}" # <- *_ARCH_PATH
|
||||||
|
|
||||||
|
package="openmpi"
|
||||||
|
libName="libmpi"
|
||||||
|
for lib in \
|
||||||
|
"$dir/lib/$libName.a" \
|
||||||
|
"$dir/lib/$libName$EXT_SO" \
|
||||||
|
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName.a" \
|
||||||
|
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName$EXT_SO" \
|
||||||
|
;
|
||||||
|
do
|
||||||
|
if [ -r "$lib" ]
|
||||||
|
then
|
||||||
|
echo "Have $package library (${dir##*/})"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo "No $package libraries found: ${dir:-not-specified}"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
if : # Run from third-party directory
|
||||||
|
then
|
||||||
|
cd "${0%/*}" || exit
|
||||||
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
|
echo " Check your OpenFOAM environment and installation"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
|
# Transition
|
||||||
|
_foamAddLib() { true; }
|
||||||
|
_foamAddMan() { true; }
|
||||||
|
_foamAddPath() { true; }
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Obtain version from OpenFOAM etc/config.sh file:
|
||||||
|
WM_MPLIB=OPENMPI # Ensure we get the correct MPI
|
||||||
|
_foamConfig mpi
|
||||||
|
|
||||||
|
PACKAGE="${FOAM_MPI:-system}"
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
printVersions() { listPackageVersions openmpi; exit 0; }
|
||||||
|
printHelp() {
|
||||||
|
cat<<USAGE
|
||||||
|
|
||||||
|
Usage: ${0##*/} [OPTION] [openmpi-VERSION] [-- configure-options]
|
||||||
|
options:
|
||||||
|
-force Force compilation, even if include/library already exists
|
||||||
|
-gcc Force use of gcc/g++
|
||||||
|
-memcheck Configure with --enable-memcheck (requires valgrind.h)
|
||||||
|
-threaded Configure with --enable-mpi-thread-multiple
|
||||||
|
-no-threaded Configure with --disable-mpi-thread-multiple
|
||||||
|
-list List available unpacked source versions
|
||||||
|
-help Display usage help
|
||||||
|
|
||||||
|
* build openmpi with
|
||||||
|
${PACKAGE:-[unspecified]}
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
showDownloadHint openmpi
|
||||||
|
exit 0 # Clean exit
|
||||||
|
}
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
exportCompiler # Compiler info for CMake/configure
|
||||||
|
|
||||||
|
unset optForce optMemchecker optThreaded
|
||||||
|
|
||||||
|
# Parse options
|
||||||
|
while [ "$#" -gt 0 ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
'') ;; # Ignore empty
|
||||||
|
--) break;; # Extra configure options (leave on $@ for later detection)
|
||||||
|
-h | -help*) printHelp;;
|
||||||
|
-list) printVersions;;
|
||||||
|
-gcc) useGcc ;;
|
||||||
|
-force) optForce=true ;;
|
||||||
|
-memcheck*) optMemchecker=true ;;
|
||||||
|
-thread*) optThreaded=enable ;;
|
||||||
|
-no-thread*) optThreaded=disable ;;
|
||||||
|
|
||||||
|
openmpi/* | sources/openmpi* | \
|
||||||
|
openmpi-[0-9]* | openmpi_[0-9]* | openmpi-system )
|
||||||
|
PACKAGE="${1%%/}"
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
die "unknown option/argument: '$1'"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z "$PACKAGE" ]
|
||||||
|
then
|
||||||
|
die "The OPENMPI package/version not specified"
|
||||||
|
elif _foamIsNone "$PACKAGE" || _foamIsSystem "$PACKAGE"
|
||||||
|
then
|
||||||
|
echo "Using none/system (skip ThirdParty build of OPENMPI)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Build OPENMPI
|
||||||
|
# *PACKAGE : name-version of the package
|
||||||
|
# *SOURCE : location of original sources
|
||||||
|
# *PREFIX : installation directory
|
||||||
|
|
||||||
|
PKG_SOURCE="$(findSourceDir "$PACKAGE")"
|
||||||
|
PACKAGE="$(basename "$PACKAGE")"
|
||||||
|
PKG_PREFIX="$installBASE/$PACKAGE"
|
||||||
|
export GIT_DIR="$PKG_SOURCE/.git"
|
||||||
|
|
||||||
|
if [ -z "$optForce" ] \
|
||||||
|
&& {
|
||||||
|
[ -r "$PKG_PREFIX/lib/libmpi$EXT_SO" ] \
|
||||||
|
|| [ -r "$PKG_PREFIX/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
|
||||||
|
}
|
||||||
|
then
|
||||||
|
echo "Already has shared library: $PKG_PREFIX"
|
||||||
|
elif [ -z "$optForce" ] \
|
||||||
|
&& {
|
||||||
|
[ -r "$PKG_PREFIX/lib/libmpi.a" ] \
|
||||||
|
|| [ -r "$PKG_PREFIX/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
|
||||||
|
}
|
||||||
|
then
|
||||||
|
echo "Already has static library: $PKG_PREFIX"
|
||||||
|
else
|
||||||
|
echo "Starting build: $WM_MPLIB ($PACKAGE)"
|
||||||
|
echo
|
||||||
|
|
||||||
|
(
|
||||||
|
# Configuration options:
|
||||||
|
# Start with GridEngine support - builds without external libraries
|
||||||
|
configOpt="--with-sge"
|
||||||
|
|
||||||
|
if [ -n "$optMemchecker" ]
|
||||||
|
then
|
||||||
|
configOpt="$configOpt --enable-memchecker --with-valgrind"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# --enable-mpi-thread-multiple / --disable-mpi-thread-multiple
|
||||||
|
if [ -n "$optThreaded" ]
|
||||||
|
then
|
||||||
|
configOpt="$configOpt --${optThreaded}-mpi-thread-multiple"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Additional configure options
|
||||||
|
if [ "$1" = "--" ]
|
||||||
|
then
|
||||||
|
shift
|
||||||
|
configOpt="$configOpt $@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# End of configuration options
|
||||||
|
# ----------------------------
|
||||||
|
|
||||||
|
PKG_BUILD="$buildBASE/$PACKAGE"
|
||||||
|
cd "$PKG_SOURCE" || exit
|
||||||
|
|
||||||
|
make distclean 2>/dev/null || true
|
||||||
|
|
||||||
|
rm -rf "$PKG_PREFIX"
|
||||||
|
rm -rf "$PKG_BUILD"
|
||||||
|
mkdir -p "$PKG_BUILD"
|
||||||
|
|
||||||
|
# The real prefix is /path/ThirdParty/platforms/arch/openmpi-x.y.z
|
||||||
|
# but configure with prefix="/arch/openmpi-x.y.z"
|
||||||
|
# and install into "/path/ThirdParty/platforms"
|
||||||
|
|
||||||
|
# The final binaries are then independent of the build location and
|
||||||
|
# will always require OPAL_PREFIX to run
|
||||||
|
|
||||||
|
local_destdir="$(dirname $PKG_PREFIX)"
|
||||||
|
local_prefix="/$(basename $local_destdir)/$(basename $PKG_PREFIX)"
|
||||||
|
local_destdir="$(dirname $local_destdir)"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "configured prefix: $local_prefix"
|
||||||
|
echo "install directory: $local_destdir"
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Do not specify '--libdir' or relocating becomes difficult
|
||||||
|
cd "$PKG_BUILD" && set -x && \
|
||||||
|
"$PKG_SOURCE"/configure \
|
||||||
|
--prefix="$local_prefix" \
|
||||||
|
--disable-orterun-prefix-by-default \
|
||||||
|
--enable-shared --disable-static \
|
||||||
|
--enable-mpi-fortran=none \
|
||||||
|
$configOpt \
|
||||||
|
&& set +x \
|
||||||
|
&& make -j $WM_NCOMPPROCS \
|
||||||
|
&& make install DESTDIR="$local_destdir" \
|
||||||
|
&& echo "Built: $PACKAGE"
|
||||||
|
) || {
|
||||||
|
echo "Error building: $PACKAGE"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Unneeded generated files
|
||||||
|
for dir in share/doc share/info share/man
|
||||||
|
do
|
||||||
|
if [ -d "$PKG_PREFIX/$dir" ]
|
||||||
|
then
|
||||||
|
echo "Discard $dir files to save space: $PACKAGE"
|
||||||
|
rm -rf "$PKG_PREFIX/$dir"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
rmdir "$PKG_PREFIX"/share 2>/dev/null || true
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
14
makeOPENMPI.example
Executable file
14
makeOPENMPI.example
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# An example for building OPENMPI with particular settings
|
||||||
|
|
||||||
|
openmpi=openmpi-1.10.6
|
||||||
|
|
||||||
|
# InfiniBand support
|
||||||
|
verbs="--with-verbs=/usr/local/ofed --with-verbs-lib=/usr/local/ofed/lib64"
|
||||||
|
# unset verbs
|
||||||
|
|
||||||
|
./makeOPENMPI $openmpi -- \
|
||||||
|
$verbs \
|
||||||
|
"$@"
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
300
makePETSC
Executable file
300
makePETSC
Executable file
@ -0,0 +1,300 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | www.openfoam.com
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2018-2021 OpenCFD Ltd.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# makePETSC
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Build script for PETSC
|
||||||
|
#
|
||||||
|
# ----------------------------------------------
|
||||||
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
if : # Run from third-party directory
|
||||||
|
then
|
||||||
|
cd "${0%/*}" || exit
|
||||||
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
|
echo " Check your OpenFOAM environment and installation"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
_foamConfig petsc
|
||||||
|
|
||||||
|
PETSC_PACKAGE="${petsc_version:-none}"
|
||||||
|
targetType=libso
|
||||||
|
|
||||||
|
unset HYPRE_PACKAGE
|
||||||
|
unset HYPRE_ARCH_PATH # Avoid inconsistency
|
||||||
|
|
||||||
|
if nonStandardPlatforms # Possibly unreliable inherited values
|
||||||
|
then
|
||||||
|
unset PETSC_ARCH_PATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
printVersions() { listPackageVersions petsc; exit 0; }
|
||||||
|
printHelp() {
|
||||||
|
cat<<USAGE
|
||||||
|
|
||||||
|
Usage: ${0##*/} [OPTION] [lib|libso] [HYPRE-VERSION] [PETSC-VERSION] [-- configure-options]
|
||||||
|
options:
|
||||||
|
-force Force compilation, even if include/library already exists
|
||||||
|
-gcc Force use of gcc/g++
|
||||||
|
-inplace Build/install inplace (expert option)
|
||||||
|
-debug Build with debugging enabled
|
||||||
|
-hypre=URL Specify hypre download location
|
||||||
|
-no-hypre Disable automatic hypre download/detection
|
||||||
|
-list List available unpacked source versions
|
||||||
|
-help Display usage help
|
||||||
|
|
||||||
|
* build PETSC with
|
||||||
|
${PACKAGE:-[unspecified]}
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
showDownloadHint petsc
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Many people who have downloaded PETSC have also downloaded HYPRE :"
|
||||||
|
showDownloadHint hypre
|
||||||
|
|
||||||
|
exit 0 # Clean exit
|
||||||
|
}
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
exportCompiler # Compiler info for CMake/configure
|
||||||
|
|
||||||
|
unset optDebug optForce optInplace optHypre
|
||||||
|
|
||||||
|
# Parse options
|
||||||
|
while [ "$#" -gt 0 ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
'') ;; # Ignore empty
|
||||||
|
--) break;; # Extra configure options (leave on $@ for later detection)
|
||||||
|
-h | -help*) printHelp;;
|
||||||
|
-list) printVersions;;
|
||||||
|
-gcc) useGcc ;;
|
||||||
|
-force) optForce=true ;;
|
||||||
|
-inplace) optInplace=true ;;
|
||||||
|
-debug) optDebug=true ;;
|
||||||
|
|
||||||
|
lib|libso) targetType="$1" ;;
|
||||||
|
|
||||||
|
-hypre=*)
|
||||||
|
optHypre="${1#*=}" # URL for download
|
||||||
|
unset HYPRE_PACKAGE HYPRE_ARCH_PATH
|
||||||
|
;;
|
||||||
|
|
||||||
|
-no-hypre)
|
||||||
|
optHypre=false
|
||||||
|
unset HYPRE_PACKAGE HYPRE_ARCH_PATH
|
||||||
|
;;
|
||||||
|
|
||||||
|
hypre-[0-9]* | hypre-git)
|
||||||
|
HYPRE_PACKAGE="${1%%/}"
|
||||||
|
unset optHypre
|
||||||
|
unset HYPRE_ARCH_PATH # Avoid inconsistency
|
||||||
|
;;
|
||||||
|
|
||||||
|
petsc/* | sources/petsc* |\
|
||||||
|
petsc-[0-9]* | petsc-git)
|
||||||
|
PETSC_PACKAGE="${1%%/}"
|
||||||
|
unset PETSC_ARCH_PATH # Avoid inconsistency
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
die "unknown option/argument: '$1'"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z "$PETSC_PACKAGE" ]
|
||||||
|
then
|
||||||
|
die "The PETSC package/version not specified"
|
||||||
|
elif _foamIsNone "$PETSC_PACKAGE" || _foamIsSystem "$PETSC_PACKAGE"
|
||||||
|
then
|
||||||
|
echo "Using none/system (skip ThirdParty build of PETSC)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Integrations
|
||||||
|
|
||||||
|
# Clunky
|
||||||
|
if [ -z "$optHypre" ] && [ -n "$HYPRE_PACKAGE" ] \
|
||||||
|
&& ! _foamIsNone "$HYPRE_PACKAGE"
|
||||||
|
then
|
||||||
|
echo "Using $HYPRE_PACKAGE"
|
||||||
|
: "${HYPRE_ARCH_PATH:=$installBASE$WM_SIZE_OPTIONS/$HYPRE_PACKAGE}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Build PETSC
|
||||||
|
#
|
||||||
|
# PETSC_ARCH_PATH : installation directory (as per config file)
|
||||||
|
#
|
||||||
|
# *PACKAGE : name-version of the package
|
||||||
|
# *SOURCE : location of original sources
|
||||||
|
# *PREFIX : installation directory
|
||||||
|
|
||||||
|
PETSC_SOURCE="$(findSourceDir "$PETSC_PACKAGE")"
|
||||||
|
PETSC_PACKAGE="$(basename "$PETSC_PACKAGE")"
|
||||||
|
PETSC_PREFIX="$installBASE$WM_SIZE_OPTIONS/$PETSC_PACKAGE"
|
||||||
|
|
||||||
|
# Override as per config file (if any)
|
||||||
|
[ -n "$PETSC_ARCH_PATH" ] && PETSC_PREFIX="$PETSC_ARCH_PATH"
|
||||||
|
|
||||||
|
[ -d "$PETSC_SOURCE" ] || {
|
||||||
|
echo "Missing sources: '$PETSC_PACKAGE'"
|
||||||
|
showDownloadHint petsc
|
||||||
|
exit 2
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# PETSC arch - same root as WM_OPTIONS (eg, DPInt32)
|
||||||
|
archOpt="$WM_SIZE_OPTIONS"
|
||||||
|
|
||||||
|
if [ -n "$optInplace" ]
|
||||||
|
then
|
||||||
|
# Inplace installation. No install stage required
|
||||||
|
unset PETSC_PREFIX
|
||||||
|
makeInstall() { true; }
|
||||||
|
else
|
||||||
|
# Regular installation location (PETSC_PREFIX)
|
||||||
|
|
||||||
|
makeInstall() {
|
||||||
|
make PETSC_DIR="$PETSC_SOURCE" PETSC_ARCH="$archOpt" install
|
||||||
|
pkgconfigAdjust "$PETSC_PREFIX"
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Starting build: $PETSC_PACKAGE ($targetType)"
|
||||||
|
if [ "$WM_PRECISION_OPTION" = SP ]
|
||||||
|
then
|
||||||
|
optHypre=false # No single-precision hypre
|
||||||
|
echo "No single-precision hypre"
|
||||||
|
fi
|
||||||
|
if [ -d "$PETSC_SOURCE/$archOpt/externalpackages" ]
|
||||||
|
then
|
||||||
|
echo "Removing old $archOpt/externalpackages"
|
||||||
|
rm -rf "$PETSC_SOURCE/$archOpt/externalpackages"
|
||||||
|
fi
|
||||||
|
echo
|
||||||
|
(
|
||||||
|
# Configuration options
|
||||||
|
|
||||||
|
# Compiler or MPI (but not both)
|
||||||
|
# if [ -d "$MPI_ARCH_PATH" ]
|
||||||
|
# then
|
||||||
|
# configOpt="--with-mpi-dir=$MPI_ARCH_PATH"
|
||||||
|
# else
|
||||||
|
configOpt="--with-cc=$(whichMpicc) --with-cxx=$(whichMpicxx)"
|
||||||
|
# fi
|
||||||
|
|
||||||
|
if [ "$optDebug" = true ]
|
||||||
|
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 ]
|
||||||
|
then
|
||||||
|
configOpt="$configOpt --with-shared-libraries"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$WM_LABEL_SIZE" = 64 ]
|
||||||
|
then
|
||||||
|
configOpt="$configOpt --with-64-bit-indices=1"
|
||||||
|
else
|
||||||
|
configOpt="$configOpt --with-64-bit-indices=0"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$WM_PRECISION_OPTION" = SP ]
|
||||||
|
then
|
||||||
|
configOpt="$configOpt --with-precision=single"
|
||||||
|
else
|
||||||
|
configOpt="$configOpt --with-precision=double"
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$optHypre" in
|
||||||
|
false)
|
||||||
|
configOpt="$configOpt --with-hypre=0"
|
||||||
|
;;
|
||||||
|
ftp:* | git:* | http:* | https:*)
|
||||||
|
configOpt="$configOpt --download-hypre=$optHypre"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# This is a really clunky way to use ThirdParty hypre
|
||||||
|
if [ -f "$HYPRE_ARCH_PATH/include/HYPRE.h" ]
|
||||||
|
then
|
||||||
|
echo "Has installed hypre: $HYPRE_PACKAGE"
|
||||||
|
configOpt="$configOpt --with-hypre-dir=$HYPRE_ARCH_PATH"
|
||||||
|
else
|
||||||
|
configOpt="$configOpt --download-hypre"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Additional configure options
|
||||||
|
if [ "$1" = "--" ]
|
||||||
|
then
|
||||||
|
shift
|
||||||
|
configOpt="$configOpt $@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# We export compiler settings (above) but actually use the
|
||||||
|
# --with-cc and --with-cxx. So ignore these environment variables.
|
||||||
|
|
||||||
|
unset CC CXX
|
||||||
|
unset CFLAGS CXXFLAGS
|
||||||
|
|
||||||
|
cd "$PETSC_SOURCE" || exit
|
||||||
|
unset GIT_DIR # No special git-repo handling
|
||||||
|
|
||||||
|
if [ -n "$PETSC_PREFIX" ]
|
||||||
|
then
|
||||||
|
rm -rf "$PETSC_PREFIX"
|
||||||
|
fi
|
||||||
|
# No clean here, if we have multiple arch in the same directory
|
||||||
|
|
||||||
|
echo
|
||||||
|
set -x
|
||||||
|
./configure \
|
||||||
|
${PETSC_PREFIX:+--prefix="$PETSC_PREFIX"} \
|
||||||
|
--PETSC_DIR="$PETSC_SOURCE" \
|
||||||
|
--with-petsc-arch="$archOpt" \
|
||||||
|
--with-clanguage=C \
|
||||||
|
--with-fc=0 \
|
||||||
|
--with-x=0 \
|
||||||
|
$configOpt \
|
||||||
|
&& set +x \
|
||||||
|
&& echo "Configured: petsc" \
|
||||||
|
&& make ${WM_NCOMPPROCS:+-j $WM_NCOMPPROCS} \
|
||||||
|
PETSC_DIR="$PETSC_SOURCE" PETSC_ARCH="$archOpt" all \
|
||||||
|
&& echo "Built: petsc" \
|
||||||
|
&& makeInstall \
|
||||||
|
&& echo "Installed: $PETSC_PACKAGE"
|
||||||
|
) || {
|
||||||
|
echo "Error building: $PETSC_PACKAGE"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
286
makeParaView
286
makeParaView
@ -3,134 +3,118 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
# \\ / A nd | www.openfoam.com
|
||||||
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
# Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
#
|
|
||||||
# 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
|
# Script
|
||||||
# makeParaView
|
# makeParaView
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Make and install ParaView 4 or 5.
|
# Make and install ParaView.
|
||||||
# The ParaView sources should be located under one of these locations:
|
# The ParaView sources should be located under one of these locations:
|
||||||
# - $WM_THIRD_PARTY_DIR/ParaView-VERSION
|
# - $WM_THIRD_PARTY_DIR/ParaView-VERSION
|
||||||
# - $WM_THIRD_PARTY_DIR/ParaView-vVERSION
|
# - $WM_THIRD_PARTY_DIR/ParaView-vVERSION
|
||||||
#
|
#
|
||||||
# Note the capitalization of ParaView in the directory names.
|
# Note the capitalization of ParaView in the directory names.
|
||||||
#
|
#
|
||||||
|
# ----------------------------------------------
|
||||||
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Get ParaView_VERSION location from OpenFOAM config file
|
if : # Run from third-party directory
|
||||||
. $WM_PROJECT_DIR/etc/config.sh/functions
|
then
|
||||||
unset -f _foamAddPath _foamAddLib # get settings only
|
cd "${0%/*}" || exit
|
||||||
unset ParaView_VERSION # purge current values
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/paraview)
|
echo " Check your OpenFOAM environment and installation"
|
||||||
|
exit 1
|
||||||
: ${ParaView_VERSION##*-}
|
}
|
||||||
|
fi
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/CMakeFunctions
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ParaViewFunctions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# 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
|
|
||||||
}
|
|
||||||
. etc/tools/ThirdPartyFunctions
|
|
||||||
. etc/tools/ParaViewFunctions
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# USER OPTIONS:
|
|
||||||
# ~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
# MPI support:
|
# ParaView_VERSION from etc/config.sh file:
|
||||||
# use 0 or unset MPI_MAX_PROCS for no upper-limit
|
unset ParaView_VERSION # Purge current values
|
||||||
withMPI=false
|
_foamConfig paraview
|
||||||
MPI_MAX_PROCS=32
|
|
||||||
|
|
||||||
# Python support:
|
# Avoid any potential conflicts (especially if building from git)
|
||||||
# note: script will try to determine the appropriate python library.
|
if [ -d "$ParaView_DIR" ]
|
||||||
# If it fails, specify the path using the PYTHON_LIBRARY variable
|
then
|
||||||
withPYTHON=false
|
_foamClean PATH "$ParaView_DIR"
|
||||||
PYTHON_LIBRARY=""
|
_foamClean LD_LIBRARY_PATH "$ParaView_DIR"
|
||||||
# PYTHON_LIBRARY="/usr/lib$WM_COMPILER_LIB_ARCH/libpython2.6.so.1.0"
|
fi
|
||||||
|
unset ParaView_DIR ParaView_INCLUDE_DIR PV_PLUGIN_PATH
|
||||||
|
|
||||||
# MESA graphics support:
|
case "$ParaView_VERSION" in
|
||||||
withMESA=false
|
[Pp]*)
|
||||||
MESA_INCLUDE="/usr/include/GL"
|
ParaView_VERSION="${ParaView_VERSION##*-}" # Without "ParaView-" prefix
|
||||||
MESA_LIBRARY="/usr/lib$WM_COMPILER_LIB_ARCH/libOSMesa.so"
|
;;
|
||||||
|
esac
|
||||||
|
ParaView_VERSION="${ParaView_VERSION%%-*}" # Without suffix (eg, -python)
|
||||||
|
|
||||||
# extra QT gui support (useful for some third party apps)
|
|
||||||
withQT=true
|
|
||||||
|
|
||||||
# Set the path to the Qt-4.5 (or later) qmake if the system Qt is older
|
# Set initial ParaView_MAJOR based on current value of ParaView_VERSION
|
||||||
QMAKE_PATH=""
|
setParaViewVersion ${ParaView_VERSION:-none}
|
||||||
|
|
||||||
# Set the path to cmake
|
|
||||||
CMAKE_PATH=""
|
|
||||||
|
|
||||||
# New rendering backend (starting with paraview 5.0).
|
# New rendering backend (starting with paraview 5.0).
|
||||||
# Default to auto-config based on paraview version
|
withGL2=auto # auto-config based on version
|
||||||
withGL2=auto
|
|
||||||
|
|
||||||
#
|
# Hint for cmake findMPI
|
||||||
# NO FURTHER EDITING BELOW THIS LINE
|
if [ -d "$MPI_ARCH_PATH" ]
|
||||||
#
|
then
|
||||||
#-----------------------------------------------------------------------------
|
export MPI_HOME="$MPI_ARCH_PATH"
|
||||||
Script=${0##*/}
|
fi
|
||||||
usage() {
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
printVersions() { listPackageVersions paraview; exit 0; }
|
||||||
|
printHelp() {
|
||||||
: ${ParaView_VERSION:=none} # some dummy value for usage information
|
: ${ParaView_VERSION:=none} # some dummy value for usage information
|
||||||
exec 1>&2
|
|
||||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
|
||||||
cat<<USAGE
|
cat<<USAGE
|
||||||
|
|
||||||
usage: $Script [OPTION] [paraview-VERSION] [CMAKE-OPTION]
|
Usage: ${0##*/} [OPTION] [paraview-VERSION] [CMAKE-OPTION]
|
||||||
options:
|
options:
|
||||||
|
-gcc Force use of gcc/g++
|
||||||
|
-cmake PATH with cmake from the given path
|
||||||
-rebuild for repeated builds (-make -install) *use with caution*
|
-rebuild for repeated builds (-make -install) *use with caution*
|
||||||
-gl2 with new rendering backend (if not already enabled)
|
-gl2 with new rendering backend (default: auto)
|
||||||
-mesa with mesa (if not already enabled)
|
-mesa with mesa
|
||||||
-mpi with mpi (if not already enabled)
|
-mesa-prefix DIR location of mesa installation (sets -mesa-include, -mesa-lib)
|
||||||
-mpi=NPROCS with mpi and max 'NPROCS' processes. NPROCS=0 for no
|
-mesa-include DIR location of mesa headers (current: ${MESA_INCLUDE:-none})
|
||||||
upper-limit on processes.
|
-mesa-lib PATH path to mesa library (current: ${MESA_LIBRARY:-none})
|
||||||
-python with python (if not already enabled)
|
-mpi with mpi
|
||||||
-cmake PATH with cmake from the path given
|
-mpi=N with max 'N' mpi processes. N=0 for no upper-limit.
|
||||||
-qmake PATH with the Qt version corresponding to the qmake path given
|
-mpi-home PATH with mpi and hint for MPI_HOME
|
||||||
|
-python | -python2 | -python3
|
||||||
|
with python
|
||||||
|
-python-include DIR
|
||||||
|
location of python headers (current: ${PYTHON_INCLUDE:-none})
|
||||||
|
-python-lib PATH path to python library (current: ${PYTHON_LIBRARY:-none})
|
||||||
|
-qmake PATH with QT version corresponding to the qmake in given path
|
||||||
-qt with extra Qt gui support (if not already enabled)
|
-qt with extra Qt gui support (if not already enabled)
|
||||||
-qt-VER with Qt version corresponding to
|
-qt-<VER> with QT version corresponding to
|
||||||
\$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/qt-VER/bin/qmake
|
\$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/qt-VER/bin/qmake
|
||||||
-gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
|
||||||
-verbose verbose output in Makefiles
|
-verbose verbose output in Makefiles
|
||||||
-version VER specify an alternative version (current value: $ParaView_VERSION)
|
-version VER specify an alternative version (current: $ParaView_VERSION)
|
||||||
-major VER specify an alternative major version for special builds
|
-major VER specify an alternative major version for special builds
|
||||||
-buildType NAME specify the build type (default: Release)
|
-buildType NAME specify the build type (default: Release)
|
||||||
-mesa-prefix DIR location of mesa installation (sets -mesa-include, -mesa-lib)
|
-suffix NAME specify a suffix to distinguish the build
|
||||||
-mesa-include DIR location of mesa headers (current value: ${MESA_INCLUDE:-none})
|
-DNAME=VALUE add cmake variable
|
||||||
-mesa-lib PATH path to mesa library (current value: ${MESA_LIBRARY:-none})
|
-list List available unpacked source versions
|
||||||
-python-lib PATH path to python library (current value: ${PYTHON_LIBRARY:-none})
|
-help Display usage help
|
||||||
-help
|
|
||||||
|
|
||||||
The -no-FEATURE option can be used to forcibly disable these features:
|
The -no-FEATURE option can be used to forcibly disable these features:
|
||||||
mesa mpi python qt
|
-no-gl2 | -no-mesa | -no-mpi | -no-python | -no-qt
|
||||||
|
|
||||||
CMake options start with a capital letter and contain an '='.
|
CMake options start with a capital letter and contain an '='.
|
||||||
For example,
|
For example,
|
||||||
$Script BUILD_TESTING=ON
|
${0##*/} BUILD_TESTING=ON
|
||||||
to add tests
|
to add tests
|
||||||
|
|
||||||
For finer control, the build stages can be selected or deselected individually:
|
For finer control, the build stages can be selected or deselected individually:
|
||||||
@ -142,58 +126,43 @@ For finer control, the build stages can be selected or deselected individually:
|
|||||||
|
|
||||||
* Make and install paraview-$ParaView_VERSION located under
|
* Make and install paraview-$ParaView_VERSION located under
|
||||||
\$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION
|
\$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION
|
||||||
-> \$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-$ParaView_VERSION
|
-> \$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-$ParaView_VERSION$BUILD_SUFFIX
|
||||||
|
|
||||||
To make a different paraview version, simply specify on the command-line.
|
To make a different paraview version, simply specify on the command-line.
|
||||||
For example,
|
For example,
|
||||||
|
|
||||||
./makeParaview 4.4.0
|
./makeParaview 5.4.1
|
||||||
|
|
||||||
Or change the \$WM_PROJECT_DIR/etc/config.sh/paraview settings.
|
Or change the \$WM_PROJECT_DIR/etc/config.sh/paraview settings.
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
exit 1
|
showDownloadHint paraview
|
||||||
|
exit 0 # Clean exit
|
||||||
}
|
}
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Ensure CMake gets the correct C/C++ compiler
|
exportCompiler minimal # Minimal compiler info for CMake/configure
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Add options based on script name:
|
|
||||||
#
|
|
||||||
case "$Script" in *-mesa*) withMESA=true;; esac
|
|
||||||
case "$Script" in *-mpi*) withMPI=true;; esac
|
|
||||||
case "$Script" in *-python*) withPYTHON=true;; esac
|
|
||||||
case "$Script" in *-qt*) withQT=true;; esac
|
|
||||||
|
|
||||||
# Set initial ParaView_MAJOR based on current value of ParaView_VERSION
|
|
||||||
setParaViewVersion ${ParaView_VERSION:-none}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Various building stages
|
# Various building stages
|
||||||
#
|
|
||||||
unset runPATCH runCONFIG runMAKE runINSTALL
|
unset runPATCH runCONFIG runMAKE runINSTALL
|
||||||
runDEFAULT=true
|
runDEFAULT=true
|
||||||
buildType=Release
|
|
||||||
|
|
||||||
# Parse options
|
# Parse options
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
-h | -help*) printHelp;;
|
||||||
|
-list) printVersions;;
|
||||||
|
-gcc) useGcc ;;
|
||||||
|
|
||||||
|
# paraview version
|
||||||
|
paraview/* | vtk/* | sources/paraview* | sources/vtk* |\
|
||||||
|
[0-9]* | paraview-[0-9]* | ParaView-[0-9]* | ParaView-v[0-9]*)
|
||||||
|
setParaViewVersion "$(basename "$1")"
|
||||||
;;
|
;;
|
||||||
[0-9]* | paraview-[0-9]* | ParaView-[0-9]*) # paraview version
|
-D[A-Z]*=* | [A-Z]*=*) # cmake variables
|
||||||
setParaViewVersion "${1%%/}"
|
|
||||||
;;
|
|
||||||
[A-Z]*=*) # cmake variables
|
|
||||||
addCMakeVariable "$1"
|
addCMakeVariable "$1"
|
||||||
;;
|
;;
|
||||||
-gcc)
|
|
||||||
export CC=gcc # use gcc/g++
|
|
||||||
export CXX=g++
|
|
||||||
;;
|
|
||||||
-patch) # stage 0: patch sources
|
-patch) # stage 0: patch sources
|
||||||
runPATCH=true
|
runPATCH=true
|
||||||
unset runDEFAULT
|
unset runDEFAULT
|
||||||
@ -236,23 +205,35 @@ do
|
|||||||
-mesa)
|
-mesa)
|
||||||
withMESA=true
|
withMESA=true
|
||||||
;;
|
;;
|
||||||
|
-osmesa)
|
||||||
|
echo
|
||||||
|
echo "The -osmesa option is currently ignored"
|
||||||
|
echo
|
||||||
|
# withMESA=true
|
||||||
|
# withOSMESA=true
|
||||||
|
;;
|
||||||
-no-mesa)
|
-no-mesa)
|
||||||
withMESA=false
|
withMESA=false
|
||||||
|
withOSMESA=false
|
||||||
;;
|
;;
|
||||||
-mesa-prefix)
|
-mesa-prefix)
|
||||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
withMESA=true
|
withMESA=true
|
||||||
MESA_INCLUDE="${2%%/}/include"
|
MESA_INCLUDE="${2%%/}/include"
|
||||||
|
# Could be under (lib64 | lib)
|
||||||
MESA_LIBRARY="${2%%/}/lib$WM_COMPILER_LIB_ARCH/libOSMesa.so"
|
MESA_LIBRARY="${2%%/}/lib$WM_COMPILER_LIB_ARCH/libOSMesa.so"
|
||||||
|
[ -f "$MESA_LIBRARY" ] || MESA_LIBRARY="${2%%/}/lib/libOSMesa.so"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-mesa-include)
|
-mesa-include)
|
||||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
withMESA=true
|
||||||
MESA_INCLUDE="${2%%/}"
|
MESA_INCLUDE="${2%%/}"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-mesa-lib)
|
-mesa-lib)
|
||||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
withMESA=true
|
||||||
MESA_LIBRARY="${2%%/}"
|
MESA_LIBRARY="${2%%/}"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
@ -263,17 +244,37 @@ do
|
|||||||
withMPI=true
|
withMPI=true
|
||||||
MPI_MAX_PROCS="${1##*=}"
|
MPI_MAX_PROCS="${1##*=}"
|
||||||
;;
|
;;
|
||||||
|
-mpi-home) # mpi with hint
|
||||||
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
withMPI=true
|
||||||
|
export MPI_HOME="${2%%/}"
|
||||||
|
case "${MPI_HOME:-none}" in (false|none) unset MPI_HOME;; esac
|
||||||
|
shift
|
||||||
|
;;
|
||||||
-no-mpi)
|
-no-mpi)
|
||||||
withMPI=false
|
withMPI=false
|
||||||
;;
|
;;
|
||||||
-python)
|
-python)
|
||||||
withPYTHON=true
|
withPYTHON=true
|
||||||
;;
|
;;
|
||||||
|
-python2)
|
||||||
|
withPYTHON=true; withPYTHON3=false
|
||||||
|
;;
|
||||||
|
-python3)
|
||||||
|
withPYTHON=true; withPYTHON3=true
|
||||||
|
;;
|
||||||
-no-python)
|
-no-python)
|
||||||
withPYTHON=false
|
withPYTHON=false; unset withPYTHON3
|
||||||
|
;;
|
||||||
|
-python-include)
|
||||||
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
withPYTHON=true
|
||||||
|
PYTHON_INCLUDE="${2%%/}"
|
||||||
|
shift
|
||||||
;;
|
;;
|
||||||
-python-lib)
|
-python-lib)
|
||||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
withPYTHON=true
|
||||||
PYTHON_LIBRARY="${2%%/}"
|
PYTHON_LIBRARY="${2%%/}"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
@ -293,7 +294,8 @@ do
|
|||||||
-no-qt)
|
-no-qt)
|
||||||
withQT=false
|
withQT=false
|
||||||
;;
|
;;
|
||||||
-qt-[1-9]*)
|
-qt-[0-9]*)
|
||||||
|
withQT=true
|
||||||
QMAKE_PATH="$installBASE/${1##-}"
|
QMAKE_PATH="$installBASE/${1##-}"
|
||||||
;;
|
;;
|
||||||
-verbose)
|
-verbose)
|
||||||
@ -311,7 +313,12 @@ do
|
|||||||
;;
|
;;
|
||||||
-buildType)
|
-buildType)
|
||||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
buildType="$2"
|
BUILD_TYPE="$2"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-suffix)
|
||||||
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
setBuildSuffix "$2"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@ -323,7 +330,7 @@ done
|
|||||||
|
|
||||||
[ -n "$ParaView_VERSION" ] || die "The paraview-VERSION was not specified"
|
[ -n "$ParaView_VERSION" ] || die "The paraview-VERSION was not specified"
|
||||||
|
|
||||||
# nothing to build
|
# Nothing to build
|
||||||
if _foamIsNone "$ParaView_VERSION"
|
if _foamIsNone "$ParaView_VERSION"
|
||||||
then
|
then
|
||||||
echo "Using paraview-none (skip ThirdParty build of ParaView)"
|
echo "Using paraview-none (skip ThirdParty build of ParaView)"
|
||||||
@ -341,6 +348,16 @@ then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# ParaView-5.7.0 default is python3
|
||||||
|
if [ "$withPYTHON" = true ] && [ -z "$withPYTHON3" ]
|
||||||
|
then
|
||||||
|
case "${ParaView_VERSION}" in
|
||||||
|
(5.[7-9]* | [6-9]* | [1-9][0-9].*)
|
||||||
|
withPYTHON3=true
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$runDEFAULT" = true ]
|
if [ "$runDEFAULT" = true ]
|
||||||
then
|
then
|
||||||
: ${runPATCH:=true}
|
: ${runPATCH:=true}
|
||||||
@ -349,9 +366,20 @@ then
|
|||||||
: ${runINSTALL:=true}
|
: ${runINSTALL:=true}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$withMESA" = true ]
|
||||||
|
then
|
||||||
|
: ${withQT:=false} # No QT unless explicitly requested
|
||||||
|
addCMakeVariable "VTK_USE_X=OFF"
|
||||||
|
# addCMakeVariable "OPENGL_INCLUDE_DIR=IGNORE"
|
||||||
|
# addCMakeVariable "OPENGL_gl_LIBRARY=IGNORE"
|
||||||
|
# addCMakeVariable "OPENGL_xmesa_INCLUDE_DIR=IGNORE"
|
||||||
|
## seems to be unnecessary => addCMakeVariable "VTK_USE_OFFSCREEN=OFF"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Set configure options
|
# Set configure options
|
||||||
#~~~~~~~~~~~~~~~~~~~~~~
|
#~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
addGeneral # general settings (version-dependent)
|
||||||
addVerbosity # verbose makefiles
|
addVerbosity # verbose makefiles
|
||||||
addMpiSupport # set MPI-specific options
|
addMpiSupport # set MPI-specific options
|
||||||
addPythonSupport # set Python-specific options
|
addPythonSupport # set Python-specific options
|
||||||
@ -379,11 +407,15 @@ Features selected
|
|||||||
python ${withPYTHON:-false}
|
python ${withPYTHON:-false}
|
||||||
qt ${withQT:-false}
|
qt ${withQT:-false}
|
||||||
---------------------
|
---------------------
|
||||||
|
Compiler
|
||||||
|
cxx ${CXX:-unknown}
|
||||||
|
flags ${CXXFLAGS:-none}
|
||||||
|
---------------------
|
||||||
Version information
|
Version information
|
||||||
qt ${QtVersion:-none}
|
paraview ${ParaView_VERSION:-unknown}
|
||||||
version ${ParaView_VERSION:-unknown} $(checkVersion)
|
|
||||||
major ${ParaView_MAJOR:-unknown}
|
major ${ParaView_MAJOR:-unknown}
|
||||||
build ${buildType:-Release}
|
build ${BUILD_TYPE:-unknown}
|
||||||
|
qt ${QT_VERSION:-none}
|
||||||
---------------------
|
---------------------
|
||||||
SUMMARY
|
SUMMARY
|
||||||
|
|
||||||
|
|||||||
@ -1,14 +1,27 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# An example for building particular combinations of ParaView with
|
# An example for building particular combinations of ParaView with
|
||||||
# - mpi (0 = no upper-limit on processes)
|
# - mpi (0 = no upper-limit on processes)
|
||||||
# - off-screen mesa
|
# - mesa
|
||||||
|
# - python (required for Catalyst)
|
||||||
|
# - has VTK_PYTHON_OPTIONAL_LINK=OFF to avoid
|
||||||
|
# undefined symbol: PyExc_ValueError
|
||||||
|
#
|
||||||
|
# NOTE: must modify etc/config.*/paraview to use this particular version
|
||||||
|
# and combination, or use chaining as per etc/config.*/example/paraview
|
||||||
|
|
||||||
mesa=mesa-11.2.2
|
# mesa=mesa-11.2.2
|
||||||
# mesa=mesa-13.0.2
|
# mesa=mesa-13.0.3
|
||||||
|
# mesa=mesa-17.1.1
|
||||||
|
mesa=mesa-18.3.4
|
||||||
|
|
||||||
|
set -x
|
||||||
./makeParaView \
|
./makeParaView \
|
||||||
-mpi=0 \
|
-mpi \
|
||||||
-mesa-prefix $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$mesa \
|
-mesa-prefix $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$mesa \
|
||||||
|
-python \
|
||||||
|
-suffix mesa-mpi-py \
|
||||||
|
-DPARAVIEW_ENABLE_FFMPEG=ON \
|
||||||
|
-DVTK_PYTHON_OPTIONAL_LINK=OFF \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
170
makeQt
170
makeQt
@ -3,24 +3,14 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
# \\ / A nd | www.openfoam.com
|
||||||
# \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2011 OpenFOAM Foundation
|
||||||
|
# Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
#
|
|
||||||
# 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
|
# Script
|
||||||
# makeQt
|
# makeQt
|
||||||
@ -28,94 +18,109 @@
|
|||||||
# Description
|
# Description
|
||||||
# Build script for QT (the qt-everywhere-opensource-src package)
|
# Build script for QT (the qt-everywhere-opensource-src package)
|
||||||
#
|
#
|
||||||
|
# ----------------------------------------------
|
||||||
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
qtVERSION=4.8.7
|
if : # Run from third-party directory
|
||||||
qtTYPE=qt-everywhere-opensource-src
|
then
|
||||||
|
cd "${0%/*}" || exit
|
||||||
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
|
echo " Check your OpenFOAM environment and installation"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/QtFunctions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
printVersions() { listPackageVersions qt; exit 0; }
|
||||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
printHelp() {
|
||||||
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
|
|
||||||
}
|
|
||||||
. etc/tools/ThirdPartyFunctions
|
|
||||||
. etc/tools/QtFunctions
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
usage() {
|
|
||||||
exec 1>&2
|
|
||||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
|
||||||
cat<<USAGE
|
cat<<USAGE
|
||||||
|
|
||||||
usage: ${0##*/} [OPTION] [VERSION]
|
Usage: ${0##*/} [OPTION] [qt-VERSION] [-- configure-options]
|
||||||
options:
|
options:
|
||||||
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
-force Force compilation, even if it already exists
|
||||||
-help
|
-gcc Force use of gcc/g++
|
||||||
|
-list List available unpacked source versions
|
||||||
|
-help Display usage help
|
||||||
|
|
||||||
* build $qtTYPE, version $qtVERSION
|
* build $qtTYPE, version ${qtVERSION:-undefined}
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
exit 1
|
showDownloadHint qt
|
||||||
|
exit 0 # Clean exit
|
||||||
}
|
}
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Export WM settings in a form that GNU configure recognizes
|
exportCompiler true # Compiler info + flags for CMake/configure
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
unset optForce
|
||||||
[ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS"
|
unset PACKAGE qtVERSION
|
||||||
[ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS"
|
|
||||||
|
|
||||||
# Parse options
|
# Parse options
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
--) break;; # Extra configure options (leave on $@ for later detection)
|
||||||
|
-h | -help*) printHelp;;
|
||||||
|
-list) printVersions;;
|
||||||
|
-gcc) useGcc ;;
|
||||||
|
-force) optForce=true ;;
|
||||||
|
|
||||||
|
qt/* | sources/qt*)
|
||||||
|
# -qt-VERSION, VERSION, qt-VERSION, qt-everywhere-opensource-src-VERSION
|
||||||
|
PACKAGE="${1%%/}";
|
||||||
|
qtVERSION="$(basename "$PACKAGE" | sed 's#^.*-##')"
|
||||||
;;
|
;;
|
||||||
-gcc)
|
|
||||||
export CC=gcc # use gcc/g++
|
-qt-[0-9]* | [0-9]* | qt-*)
|
||||||
export CXX=g++
|
|
||||||
;;
|
|
||||||
-qt-[1-9]* | [1-9]* | qt-*)
|
|
||||||
# -qt-VERSION, VERSION, qt-VERSION, qt-everywhere-opensource-src-VERSION
|
# -qt-VERSION, VERSION, qt-VERSION, qt-everywhere-opensource-src-VERSION
|
||||||
qtVERSION="${1%%/}";
|
qtVERSION="${1%%/}";
|
||||||
qtVERSION="${qtVERSION##*-}"
|
qtVERSION="${qtVERSION##*-}"
|
||||||
|
PACKAGE="$qtTYPE-$qtVERSION"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
die "unknown option/argument: '$1'"
|
die "unknown option/argument: '$1'"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
qtPACKAGE=$qtTYPE-$qtVERSION
|
|
||||||
|
|
||||||
# nothing to build
|
if [ -z "$PACKAGE" ]
|
||||||
if _foamIsNone "$qtPACKAGE"
|
|
||||||
then
|
then
|
||||||
echo "Using qt-none (skip ThirdParty build of QT)"
|
die "The QT package/version not specified"
|
||||||
exit 0
|
elif _foamIsNone "$PACKAGE" || _foamIsSystem "$PACKAGE"
|
||||||
elif _foamIsSystem "$qtPACKAGE"
|
|
||||||
then
|
then
|
||||||
echo "Using qt-system"
|
echo "Using none/system (skip ThirdParty build of QT)"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Build QT
|
# Build QT
|
||||||
|
#
|
||||||
|
# *PACKAGE : name-version of the package
|
||||||
|
# *SOURCE : location of original sources
|
||||||
|
# *PREFIX : installation directory
|
||||||
|
|
||||||
QT_SOURCE_DIR=$sourceBASE/$qtPACKAGE
|
PKG_SOURCE="$(findSourceDir "$PACKAGE" "$qtTYPE-$qtVERSION")"
|
||||||
QT_ARCH_PATH=$installBASE/qt-$qtVERSION
|
PACKAGE="qt-$qtVERSION"
|
||||||
|
PKG_PREFIX="$installBASE/$PACKAGE"
|
||||||
|
export GIT_DIR="$PKG_SOURCE/.git"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo ========================================
|
echo ========================================
|
||||||
echo "Build Qt $qtPACKAGE"
|
echo "Build Qt $PACKAGE"
|
||||||
echo
|
echo
|
||||||
if [ -d "$QT_ARCH_PATH" -a -r "$QT_ARCH_PATH/bin/qmake" ]
|
|
||||||
|
if [ -z "$optForce" ] \
|
||||||
|
&& [ -d "$PKG_PREFIX" ] \
|
||||||
|
&& [ -r "$PKG_PREFIX"/bin/qmake ]
|
||||||
then
|
then
|
||||||
echo "Already built: Qt-$qtVERSION"
|
echo "Already built: $PACKAGE"
|
||||||
else
|
else
|
||||||
echo "Starting build: Qt-$qtVERSION"
|
echo "Starting build: $PACKAGE"
|
||||||
(
|
(
|
||||||
# Configuration options:
|
# Configuration options:
|
||||||
unset configOpt
|
unset configOpt
|
||||||
@ -140,38 +145,45 @@ else
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# end of configuration options
|
# Additional configure options
|
||||||
# ----------------------------
|
if [ "$1" = "--" ]
|
||||||
buildDIR=$buildBASE/$qtPACKAGE
|
then
|
||||||
|
shift
|
||||||
|
configOpt="$configOpt $@"
|
||||||
|
fi
|
||||||
|
|
||||||
cd $QT_SOURCE_DIR || exit 1
|
# End of configuration options
|
||||||
|
# ----------------------------
|
||||||
|
PKG_BUILD="$buildBASE/$PACKAGE"
|
||||||
|
|
||||||
|
cd "$PKG_SOURCE" || exit
|
||||||
[ -e Makefile ] && make distclean 2>/dev/null
|
[ -e Makefile ] && make distclean 2>/dev/null
|
||||||
|
|
||||||
# Remove any existing build folder and recreate
|
# Remove any existing build folder and recreate
|
||||||
rm -rf $QT_ARCH_DIR
|
rm -rf "$PKG_PREFIX"
|
||||||
rm -rf $buildDIR 2>/dev/null
|
rm -rf "$PKG_BUILD"
|
||||||
mkdir -p $buildDIR
|
mkdir -p "$PKG_BUILD"
|
||||||
|
|
||||||
# Remove any remnants from a previous shadow build
|
# Remove any remnants from a previous shadow build
|
||||||
rm -f "$QT_SOURCE_DIR/.qmake.cache" 2>/dev/null
|
rm -f "$PKG_SOURCE"/.qmake.cache
|
||||||
rm -f "$QT_SOURCE_DIR/src/corelib/global/qconfig.h" 2>/dev/null
|
rm -f "$PKG_SOURCE"/src/corelib/global/qconfig.h
|
||||||
rm -f "$QT_SOURCE_DIR/src/corelib/global/qconfig.cpp" 2>/dev/null
|
rm -f "$PKG_SOURCE"/src/corelib/global/qconfig.cpp
|
||||||
|
|
||||||
cd $buildDIR || exit 1
|
cd "$PKG_BUILD" || exit
|
||||||
|
|
||||||
# Compile as opensource, accepting LGPL conditions (yes)
|
# Compile as opensource, accepting LGPL conditions (yes)
|
||||||
echo yes | $QT_SOURCE_DIR/configure \
|
echo yes | "$PKG_SOURCE"/configure \
|
||||||
-prefix $QT_ARCH_PATH \
|
-prefix "$PKG_PREFIX" \
|
||||||
-opensource \
|
-opensource \
|
||||||
$configOpt \
|
$configOpt \
|
||||||
&& time make -j $WM_NCOMPPROCS \
|
&& time make -j $WM_NCOMPPROCS \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& echo "Built: Qt-$qtVERSION" \
|
&& echo "Built: $PACKAGE" \
|
||||||
&& finalizeQt
|
&& finalizeQt "$PKG_PREFIX"
|
||||||
) || {
|
) || {
|
||||||
echo "Error building: Qt-$qtVERSION"
|
echo "Error building: $PACKAGE"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# -----------------------------------------------------------------------------
|
||||||
|
|||||||
578
makeSCOTCH
Executable file
578
makeSCOTCH
Executable file
@ -0,0 +1,578 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | www.openfoam.com
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# makeSCOTCH
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Build the SCOTCH and PTSCOTCH libraries, optionally build binaries
|
||||||
|
#
|
||||||
|
# ----------------------------------------------
|
||||||
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
if : # Run from third-party directory
|
||||||
|
then
|
||||||
|
cd "${0%/*}" || exit
|
||||||
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
|
echo " Check your OpenFOAM environment and installation"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
_foamConfig scotch # Get SCOTCH_ARCH_PATH, SCOTCH_VERSION
|
||||||
|
|
||||||
|
PACKAGE="${SCOTCH_VERSION:-system}"
|
||||||
|
|
||||||
|
unset withMPI
|
||||||
|
case "$WM_MPLIB" in (*MPI*) [ "$FOAM_MPI" = dummy ] || withMPI=true ;; esac
|
||||||
|
|
||||||
|
if nonStandardPlatforms # Possibly unreliable inherited values
|
||||||
|
then
|
||||||
|
unset SCOTCH_ARCH_PATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
printVersions() { listPackageVersions scotch; exit 0; }
|
||||||
|
printHelp() {
|
||||||
|
/bin/cat<<USAGE
|
||||||
|
|
||||||
|
Usage: ${0##*/} [OPTION] [libso] [scotch-VERSION]
|
||||||
|
options:
|
||||||
|
-force Force compilation, even if include/library already exists
|
||||||
|
Also force build attempt of pt-scotch (mingw)
|
||||||
|
-gcc Force use of gcc/g++
|
||||||
|
-int32 Use SCOTCH_Num 32
|
||||||
|
-int64 Use SCOTCH_Num 64
|
||||||
|
-bin Create scotch binaries as well
|
||||||
|
-no-bin Suppress creation of scotch binaries (default)
|
||||||
|
-no-mpi Suppress build of pt-scotch
|
||||||
|
-list List available unpacked source versions
|
||||||
|
-help Display usage help
|
||||||
|
|
||||||
|
* Build SCOTCH (default: -int${WM_LABEL_SIZE:-32}) with
|
||||||
|
${PACKAGE:-[unspecified]}
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
showDownloadHint scotch
|
||||||
|
exit 0 # Clean exit
|
||||||
|
}
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
unset optForce optNoExtlib
|
||||||
|
optBinaries=false
|
||||||
|
optLabelSize="${WM_LABEL_SIZE:-32}"
|
||||||
|
|
||||||
|
# Parse options
|
||||||
|
while [ "$#" -gt 0 ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
'') ;; # Ignore empty
|
||||||
|
-h | -help*) printHelp;;
|
||||||
|
-list) printVersions;;
|
||||||
|
-gcc) useGcc ;;
|
||||||
|
-force) optForce=true ;;
|
||||||
|
-int32 | -int64) optLabelSize="${1#-int}" ;;
|
||||||
|
-bin) optBinaries=true ;;
|
||||||
|
-no-bin) optBinaries=false ;;
|
||||||
|
-no-mpi) unset withMPI ;;
|
||||||
|
-no-extlib) optNoExtlib=true ;; # Hidden option
|
||||||
|
|
||||||
|
scotch/ | sources/scotch* |\
|
||||||
|
scotch-[0-9]* | scotch-v[0-9]* | scotch-git | scotch_* )
|
||||||
|
PACKAGE="${1%%/}"
|
||||||
|
unset SCOTCH_ARCH_PATH # Avoid inconsistency
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
die "unknown option/argument: '$1'"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z "$PACKAGE" ]
|
||||||
|
then
|
||||||
|
die "The SCOTCH package/version not specified"
|
||||||
|
elif _foamIsNone "$PACKAGE" || _foamIsSystem "$PACKAGE"
|
||||||
|
then
|
||||||
|
echo "Using none/system (skip ThirdParty build of SCOTCH)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$optNoExtlib" = true ]
|
||||||
|
then
|
||||||
|
unset FOAM_EXT_LIBBIN
|
||||||
|
else
|
||||||
|
requireExtLibBin
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Build SCOTCH
|
||||||
|
# SCOTCH_ARCH_PATH : installation directory (as per config file)
|
||||||
|
#
|
||||||
|
# *PACKAGE : name-version of the package
|
||||||
|
# *SOURCE : location of original sources
|
||||||
|
# *PREFIX : installation directory
|
||||||
|
|
||||||
|
PKG_SOURCE="$(findSourceDir "$PACKAGE")"
|
||||||
|
PACKAGE="$(basename "$PACKAGE")"
|
||||||
|
PKG_PREFIX="$installBASE$WM_SIZE_OPTIONS/$PACKAGE"
|
||||||
|
export GIT_DIR="$PKG_SOURCE/.git"
|
||||||
|
|
||||||
|
# Override as per config file (if any)
|
||||||
|
[ -n "$SCOTCH_ARCH_PATH" ] && PKG_PREFIX="$SCOTCH_ARCH_PATH"
|
||||||
|
|
||||||
|
[ -d "$PKG_SOURCE/src" ] || {
|
||||||
|
echo "Missing sources: '$PACKAGE'"
|
||||||
|
showDownloadHint scotch
|
||||||
|
exit 2
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Select a Makefile.inc for the scotch build
|
||||||
|
# - could use more generalizing, but works fairly well
|
||||||
|
|
||||||
|
unset MakefileInc
|
||||||
|
for ending in \
|
||||||
|
"$(uname -s)-${WM_COMPILER}".shlib \
|
||||||
|
"$(uname -s)".shlib \
|
||||||
|
Linux.shlib \
|
||||||
|
;
|
||||||
|
do
|
||||||
|
# Fully resolve path
|
||||||
|
file="$WM_THIRD_PARTY_DIR/etc/makeFiles/scotch/Makefile.inc.$ending"
|
||||||
|
if [ -f "$file" ]
|
||||||
|
then
|
||||||
|
MakefileInc="$file"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
# - copy OpenFOAM-specific Makefile include files into the scotch dir.
|
||||||
|
# - place a full copy into an 'openfoam/' directory (for documentation)
|
||||||
|
# - make symlink from the openfoam/Makefile.inc.XXX -> src/Makefile.inc
|
||||||
|
|
||||||
|
createMakefileLinks()
|
||||||
|
{
|
||||||
|
# Sanity checks
|
||||||
|
if [ -z "$MakefileInc" ]
|
||||||
|
then
|
||||||
|
echo "Did not define a Makefile.inc for"
|
||||||
|
echo " $PACKAGE/src"
|
||||||
|
return 1
|
||||||
|
elif [ ! -f "$MakefileInc" ]
|
||||||
|
then
|
||||||
|
echo "No such file to include:"
|
||||||
|
echo " $MakefileInc"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "$PKG_SOURCE"/src ] || [ ! -w "$PKG_SOURCE"/src ]
|
||||||
|
then
|
||||||
|
echo "Directory missing or not writable:"
|
||||||
|
echo " $PKG_SOURCE/src"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Copy files and make links
|
||||||
|
mkdir -p "$PKG_SOURCE"/openfoam
|
||||||
|
cp -p "$(dirname "$MakefileInc")"/* "$PKG_SOURCE"/openfoam
|
||||||
|
rm -f "$PKG_SOURCE"/src/Makefile.inc
|
||||||
|
(
|
||||||
|
cd "$PKG_SOURCE/src" && \
|
||||||
|
ln -sf ../openfoam/"$(basename "$MakefileInc")" Makefile.inc
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#
|
||||||
|
# Manual installation of serial libraries
|
||||||
|
# from libdir to -> $FOAM_EXT_LIBBIN
|
||||||
|
#
|
||||||
|
install_serial()
|
||||||
|
{
|
||||||
|
local libdir_source="$1"
|
||||||
|
local libdir_target="$FOAM_EXT_LIBBIN"
|
||||||
|
local libname_suffix="-int$WM_LABEL_SIZE"
|
||||||
|
|
||||||
|
[ -n "$FOAM_EXT_LIBBIN" ] || unset libdir_target
|
||||||
|
[ -n "$WM_LABEL_SIZE" ] || unset libname_suffix
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Adjusting installation"
|
||||||
|
|
||||||
|
# Rename lib as xxx-intNN qualified library names (non-windows)
|
||||||
|
if [ -n "$libname_suffix" ] && [ "${EXT_SO:-.dll}" != ".dll" ]
|
||||||
|
then
|
||||||
|
(
|
||||||
|
cd "$libdir_source" || exit
|
||||||
|
echo "Tagging libraries with $libname_suffix"
|
||||||
|
for name in libscotch
|
||||||
|
do
|
||||||
|
if [ -f "$name$EXT_SO" ]
|
||||||
|
then
|
||||||
|
mv "$name$EXT_SO" "$name$libname_suffix$EXT_SO"
|
||||||
|
ln -sf "$name$libname_suffix$EXT_SO" "$name$EXT_SO"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$libdir_target" ]
|
||||||
|
then
|
||||||
|
# Remove old libraries and links
|
||||||
|
for name in libscotch
|
||||||
|
do
|
||||||
|
rm -f "$libdir_target/$name$EXT_SO"
|
||||||
|
rm -f "$libdir_target/$name$libname_suffix$EXT_SO"
|
||||||
|
done
|
||||||
|
mkdir -p "$libdir_target"
|
||||||
|
echo "Relocating serial libraries"
|
||||||
|
|
||||||
|
# echo "Installing: $libdir_target/libscotch$libname_suffix"
|
||||||
|
mv -f "$libdir_source"/lib* "$libdir_target"
|
||||||
|
fi
|
||||||
|
|
||||||
|
rmdir "$libdir_source" 2>/dev/null # Failed rmdir is uncritical
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Manual installation of parallel libraries
|
||||||
|
# from libdir to -> $FOAM_EXT_LIBBIN/$FOAM_MPI
|
||||||
|
#
|
||||||
|
install_parallel()
|
||||||
|
{
|
||||||
|
local libdir_source="$1"
|
||||||
|
local libdir_target="$FOAM_EXT_LIBBIN/$FOAM_MPI"
|
||||||
|
local libname_suffix="-int$WM_LABEL_SIZE"
|
||||||
|
local link_serial=false
|
||||||
|
|
||||||
|
[ -n "$FOAM_EXT_LIBBIN" ] || unset libdir_target
|
||||||
|
[ -n "$WM_LABEL_SIZE" ] || unset libname_suffix
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Adjusting installation"
|
||||||
|
|
||||||
|
# Rename lib as xxx-intNN qualified library names (non-windows)
|
||||||
|
if [ -n "$libname_suffix" ] && [ "${EXT_SO:-.dll}" != ".dll" ]
|
||||||
|
then
|
||||||
|
(
|
||||||
|
cd "$libdir_source" || exit
|
||||||
|
echo "Tagging libraries with $libname_suffix"
|
||||||
|
|
||||||
|
# When linked, remove generated serial libraries
|
||||||
|
if [ "$link_serial" = true ]
|
||||||
|
then
|
||||||
|
rm -f libscotch*
|
||||||
|
fi
|
||||||
|
|
||||||
|
for name in libscotch libptscotch
|
||||||
|
do
|
||||||
|
if [ -f "$name$EXT_SO" ]
|
||||||
|
then
|
||||||
|
mv "$name$EXT_SO" "$name$libname_suffix$EXT_SO"
|
||||||
|
ln -sf "$name$libname_suffix$EXT_SO" "$name$EXT_SO"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$libdir_target" ]
|
||||||
|
then
|
||||||
|
# Remove old libraries and links
|
||||||
|
for name in libscotch libptscotch
|
||||||
|
do
|
||||||
|
rm -f "$libdir_target/$name$EXT_SO"
|
||||||
|
rm -f "$libdir_target/$name$libname_suffix$EXT_SO"
|
||||||
|
done
|
||||||
|
mkdir -p "$libdir_target"
|
||||||
|
echo "Relocating parallel libraries"
|
||||||
|
|
||||||
|
# echo "Installing: $libdir_target/libptscotch$libname_suffix"
|
||||||
|
mv -f "$libdir_source"/lib* "$libdir_target"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create symlinks to serial versions?
|
||||||
|
if [ -n "$link_serial" ] && [ "${EXT_SO:-.dll}" != ".dll" ]
|
||||||
|
then
|
||||||
|
(
|
||||||
|
if [ -n "$libdir_target" ]
|
||||||
|
then
|
||||||
|
cd "$libdir_target" || exit
|
||||||
|
else
|
||||||
|
cd "$libdir_source" || exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
for name in libscotch"$libname_suffix" libscotcherr*
|
||||||
|
do
|
||||||
|
if [ -f ../"$name$EXT_SO" ]
|
||||||
|
then
|
||||||
|
ln -sf ../"$name$EXT_SO" "$name$EXT_SO"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
for name in libscotch
|
||||||
|
do
|
||||||
|
if [ -f "$name$libname_suffix$EXT_SO" ]
|
||||||
|
then
|
||||||
|
ln -sf "$name$libname_suffix$EXT_SO" "$name$EXT_SO"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
|
rmdir "$libdir_source" 2>/dev/null # Failed rmdir is uncritical
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo ========================================
|
||||||
|
echo "scotch decomposition ($PACKAGE)"
|
||||||
|
echo " Makefile.inc : ${customMakefileInc##*/}"
|
||||||
|
|
||||||
|
# (serial) scotch
|
||||||
|
bindir="$PKG_PREFIX"/bin
|
||||||
|
includedir="$PKG_PREFIX"/include
|
||||||
|
libdir="$FOAM_EXT_LIBBIN"
|
||||||
|
if [ -z "$FOAM_EXT_LIBBIN" ]
|
||||||
|
then
|
||||||
|
libdir="$PKG_PREFIX"/lib
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$optLabelSize" != "$WM_LABEL_SIZE" ]
|
||||||
|
then
|
||||||
|
echo "Using int-$optLabelSize instead of int-$WM_LABEL_SIZE"
|
||||||
|
fi
|
||||||
|
export WM_LABEL_SIZE="$optLabelSize"
|
||||||
|
|
||||||
|
# Test installation. May or may not have libscotcherrexit.so
|
||||||
|
if [ -z "$optForce" ] \
|
||||||
|
&& [ -f "$includedir"/scotch.h ] \
|
||||||
|
&& haveLibso "$libdir"/libscotch
|
||||||
|
then
|
||||||
|
echo " scotch include: $includedir"
|
||||||
|
echo " scotch library: $libdir"
|
||||||
|
elif [ -d "$PKG_SOURCE" ]
|
||||||
|
then
|
||||||
|
(
|
||||||
|
# Older versions ok, but scotch-6.0.5a cannot build in parallel.
|
||||||
|
# Force serial build
|
||||||
|
export WM_NCOMPPROCS=1
|
||||||
|
echo "*** building scotch in serial ***"
|
||||||
|
echo
|
||||||
|
|
||||||
|
cd "$PKG_SOURCE/src" || exit
|
||||||
|
|
||||||
|
applyPatch "$PACKAGE" .. # patch at parent-level
|
||||||
|
createMakefileLinks || exit
|
||||||
|
|
||||||
|
# Verify
|
||||||
|
[ -f Makefile.inc ] || {
|
||||||
|
echo " Error: scotch needs an appropriate Makefile.inc"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Fresh install
|
||||||
|
rm -rf "$PKG_PREFIX"
|
||||||
|
mkdir -p "$bindir" "$includedir" "$libdir"
|
||||||
|
|
||||||
|
# Temporary location for library install
|
||||||
|
libdir_tmp="$libdir"
|
||||||
|
if [ -n "$FOAM_EXT_LIBBIN" ]
|
||||||
|
then
|
||||||
|
libdir_tmp="$PKG_PREFIX"/lib-tmp
|
||||||
|
fi
|
||||||
|
|
||||||
|
export CCS="$(whichCC)" # CCS (serial compiler)
|
||||||
|
export CCP="$(whichMpicc)" # CCP (parallel compiler) default=mpicc
|
||||||
|
|
||||||
|
# Consistency for Intel-MPI and non-icc compilers
|
||||||
|
[ -n "$I_MPI_CC" ] || export I_MPI_CC="$(whichCC)"
|
||||||
|
|
||||||
|
# The make targets.
|
||||||
|
# - according to docs, cannot make binaries with suffix renaming
|
||||||
|
make_targets="libscotch"
|
||||||
|
if [ "$optBinaries" = true ]
|
||||||
|
then
|
||||||
|
make_targets="$make_targets scotch"
|
||||||
|
fi
|
||||||
|
|
||||||
|
make realclean 2>/dev/null # Extra safety
|
||||||
|
make -j $WM_NCOMPPROCS $make_targets \
|
||||||
|
&& make \
|
||||||
|
prefix="$PKG_PREFIX" \
|
||||||
|
bindir="$bindir" \
|
||||||
|
includedir="$includedir" \
|
||||||
|
libdir="$libdir_tmp" \
|
||||||
|
install
|
||||||
|
|
||||||
|
install_serial "$libdir_tmp"
|
||||||
|
|
||||||
|
sharedir="$PKG_PREFIX/share"
|
||||||
|
if [ "$optBinaries" = false ]
|
||||||
|
then
|
||||||
|
rm -rf "$sharedir/man" # No bins -> no manpages
|
||||||
|
fi
|
||||||
|
|
||||||
|
rmdir "$bindir" 2>/dev/null || true # Remove empty bin/
|
||||||
|
rmdir "${bindir%/*}" 2>/dev/null || true # ... and empty parent
|
||||||
|
rmdir "$sharedir" 2>/dev/null || true # Remove empty share/
|
||||||
|
make realclean 2>/dev/null || true # Failed cleanup is uncritical
|
||||||
|
) || warnBuildIssues SCOTCH
|
||||||
|
else
|
||||||
|
warnNotFound SCOTCH
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Build ptscotch when MPI (ThirdParty or system) is available
|
||||||
|
|
||||||
|
if [ "${withMPI}" != true ]
|
||||||
|
then
|
||||||
|
# Report that the above tests failed and pass-through the failure
|
||||||
|
echo "Skipping pt-scotch (no mpi)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Known build issues for mingw (MS-MPI source code annotations)
|
||||||
|
case "$WM_COMPILER" in
|
||||||
|
(Mingw*)
|
||||||
|
if [ -z "$optForce" ]
|
||||||
|
then
|
||||||
|
echo "Skipping pt-scotch - known compilation issues with $WM_COMPILER"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "Warning: pt-scotch - known compilation issues with $WM_COMPILER"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
# Build ptscotch if normal scotch was built (has include and library)
|
||||||
|
# (reuse prefix/include/lib dirs set above)
|
||||||
|
if [ -f "$includedir"/scotch.h ] \
|
||||||
|
&& haveLibso "$libdir"/libscotch
|
||||||
|
then
|
||||||
|
echo
|
||||||
|
echo ========================================
|
||||||
|
echo "pt-scotch decomposition ($PACKAGE with $FOAM_MPI)"
|
||||||
|
else
|
||||||
|
# Report that the above tests failed and pass-through the failure
|
||||||
|
echo "Skipping pt-scotch - no <scotch.h> found"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
# (parallel) pt-scotch
|
||||||
|
bindir="$PKG_PREFIX/bin/$FOAM_MPI"
|
||||||
|
includedir="$PKG_PREFIX/include/$FOAM_MPI"
|
||||||
|
libdir="$FOAM_EXT_LIBBIN/$FOAM_MPI"
|
||||||
|
if [ -z "$FOAM_EXT_LIBBIN" ]
|
||||||
|
then
|
||||||
|
libdir="$PKG_PREFIX/lib/$FOAM_MPI"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$optForce" ] \
|
||||||
|
&& [ -f "$includedir"/ptscotch.h ] \
|
||||||
|
&& haveLibso "$libdir"/libptscotch
|
||||||
|
then
|
||||||
|
echo " ptscotch include: $includedir"
|
||||||
|
echo " ptscotch library: $libdir"
|
||||||
|
else
|
||||||
|
(
|
||||||
|
# Older versions ok, but scotch-6.0.5a cannot build in parallel.
|
||||||
|
# Force serial build
|
||||||
|
export WM_NCOMPPROCS=1
|
||||||
|
echo "*** building pt-scotch in serial ***"
|
||||||
|
echo
|
||||||
|
|
||||||
|
cd "$PKG_SOURCE/src" || exit
|
||||||
|
createMakefileLinks || exit
|
||||||
|
|
||||||
|
# Verify
|
||||||
|
[ -f Makefile.inc ] || {
|
||||||
|
echo " Error: ptscotch needs an appropriate Makefile.inc"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Install into existing prefix
|
||||||
|
mkdir -p "$bindir" "$includedir" "$libdir"
|
||||||
|
|
||||||
|
# Temporary location for library install
|
||||||
|
libdir_tmp="$libdir"
|
||||||
|
if [ -n "$FOAM_EXT_LIBBIN" ]
|
||||||
|
then
|
||||||
|
libdir_tmp="$PKG_PREFIX"/lib-tmp
|
||||||
|
fi
|
||||||
|
|
||||||
|
export CCS="$(whichCC)" # CCS (serial compiler)
|
||||||
|
export CCP="$(whichMpicc)" # CCP (parallel compiler) default=mpicc
|
||||||
|
|
||||||
|
# Consistency for Intel-MPI and non-icc compilers
|
||||||
|
[ -n "$I_MPI_CC" ] || export I_MPI_CC="$(whichCC)"
|
||||||
|
|
||||||
|
# The make targets.
|
||||||
|
# - no simple means of handling mpi-specific binaries
|
||||||
|
# - according to docs, cannot make binaries with suffix renaming
|
||||||
|
make_targets="libptscotch"
|
||||||
|
if [ "$optBinaries" = true ]
|
||||||
|
then
|
||||||
|
make_targets="$make_targets ptscotch"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove any old symlinks etc
|
||||||
|
rm -rf "$includedir"/scotch*.h 2>/dev/null
|
||||||
|
rm -rf "$libdir"/libscotch*.so 2>/dev/null
|
||||||
|
|
||||||
|
make realclean 2>/dev/null # Extra safety
|
||||||
|
make -j $WM_NCOMPPROCS $make_targets \
|
||||||
|
&& make \
|
||||||
|
prefix="$PKG_PREFIX" \
|
||||||
|
bindir="$bindir" \
|
||||||
|
includedir="$includedir" \
|
||||||
|
libdir="$libdir_tmp" \
|
||||||
|
install
|
||||||
|
|
||||||
|
install_parallel "$libdir_tmp"
|
||||||
|
|
||||||
|
sharedir="$PKG_PREFIX/share"
|
||||||
|
if [ "$optBinaries" = false ]
|
||||||
|
then
|
||||||
|
rm -rf "$sharedir/man" # No bins -> no manpages
|
||||||
|
fi
|
||||||
|
|
||||||
|
rmdir "$bindir" 2>/dev/null || true # Remove empty bin/
|
||||||
|
rmdir "${bindir%/*}" 2>/dev/null || true # ... and empty parent
|
||||||
|
rmdir "$sharedir" 2>/dev/null || true # Remove empty share/
|
||||||
|
make realclean 2>/dev/null || true # Failed cleanup is uncritical
|
||||||
|
) || warnBuildIssues PTSCOTCH
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Verify existence of ptscotch include
|
||||||
|
[ -f "$PKG_PREFIX/include/$FOAM_MPI/ptscotch.h" ] || {
|
||||||
|
echo
|
||||||
|
echo " WARNING: required include file 'ptscotch.h' not found!"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Could remove $PKG_SOURCE/src/Makefile.inc, but leave for documentation
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
206
makeTecio
206
makeTecio
@ -1,206 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
# ========= |
|
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
# \\ / O peration |
|
|
||||||
# \\ / A nd | Copyright (C) 2016 OpenCFD Ltd.
|
|
||||||
# \\/ 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
|
|
||||||
# makeTecio
|
|
||||||
#
|
|
||||||
# Description
|
|
||||||
# Build Tecplot library
|
|
||||||
#
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
# Get boost version (headers only)
|
|
||||||
. $WM_PROJECT_DIR/etc/config.sh/functions
|
|
||||||
unset -f _foamAddPath _foamAddLib _foamAddMan # get settings only
|
|
||||||
|
|
||||||
_foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/CGAL)
|
|
||||||
|
|
||||||
boostPACKAGE=${boost_version:-boost-system}
|
|
||||||
tecioPACKAGE=tecio
|
|
||||||
targetType=lib
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
# 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
|
|
||||||
}
|
|
||||||
[ -n "$FOAM_EXT_LIBBIN" ] || {
|
|
||||||
echo "Error: FOAM_EXT_LIBBIN not set"
|
|
||||||
echo " Check the OpenFOAM entries in your dot-files and source them."
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
. etc/tools/ThirdPartyFunctions
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
usage()
|
|
||||||
{
|
|
||||||
exec 1>&2
|
|
||||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
|
||||||
/bin/cat<<USAGE
|
|
||||||
|
|
||||||
Usage: ${0##*/} [OPTION] [boost-VERSION] [tecio-VERSION]
|
|
||||||
options:
|
|
||||||
-cmake PATH With cmake from the path given
|
|
||||||
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
|
||||||
-help
|
|
||||||
|
|
||||||
|
|
||||||
* Compile the proprietary libtecio library
|
|
||||||
$tecioPACKAGE
|
|
||||||
with $boostPACKAGE
|
|
||||||
|
|
||||||
USAGE
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
# Ensure CMake gets the correct C/C++ compiler
|
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
|
||||||
|
|
||||||
# Parse options
|
|
||||||
while [ "$#" -gt 0 ]
|
|
||||||
do
|
|
||||||
case "$1" in
|
|
||||||
-h | -help)
|
|
||||||
usage
|
|
||||||
;;
|
|
||||||
-gcc)
|
|
||||||
export CC=gcc # use gcc/g++
|
|
||||||
export CXX=g++
|
|
||||||
;;
|
|
||||||
-cmake)
|
|
||||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
|
||||||
CMAKE_PATH="${2%%/}"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
boost-[0-9]* | boost_[0-9]* | boost-system )
|
|
||||||
boostPACKAGE="${1%%/}"
|
|
||||||
;;
|
|
||||||
tecio*)
|
|
||||||
tecioPACKAGE="${1%%/}"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
die "unknown option/argument: '$1'"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
# assert: directory must be available
|
|
||||||
[ -d "$tecioPACKAGE" ] || die "missing source directory '$tecioPACKAGE'"
|
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# Get Boost information
|
|
||||||
# - only headers are required
|
|
||||||
|
|
||||||
: ${BOOST_ARCH_PATH:=$installBASE/$boostPACKAGE} # Fallback
|
|
||||||
|
|
||||||
boostInc="$BOOST_ARCH_PATH/include"
|
|
||||||
|
|
||||||
if _foamIsSystem $boostPACKAGE
|
|
||||||
then
|
|
||||||
echo "Using boost-system"
|
|
||||||
|
|
||||||
# Tagged as 'system' but could actually point to a central location
|
|
||||||
[ -d "$BOOST_ARCH_PATH/include" ] || {
|
|
||||||
boostInc="/usr/include"
|
|
||||||
}
|
|
||||||
elif [ -f "$boostInc/boost/version.hpp" ]
|
|
||||||
then
|
|
||||||
echo "Using $boostPACKAGE"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Build TECIO library
|
|
||||||
#
|
|
||||||
# TECIO_SOURCE_DIR : location of the original sources
|
|
||||||
# TECIO_BINARY_DIR : location of the build
|
|
||||||
# TECIO_ARCH_PATH : location of the installed program
|
|
||||||
|
|
||||||
TECIO_SOURCE_DIR=$sourceBASE/$tecioPACKAGE/teciosrc
|
|
||||||
TECIO_BINARY_DIR=$buildBASE/$tecioPACKAGE
|
|
||||||
TECIO_ARCH_PATH=$installBASE/$tecioPACKAGE
|
|
||||||
|
|
||||||
if [ -d "$TECIO_SOURCE_DIR" ]
|
|
||||||
then
|
|
||||||
(
|
|
||||||
# Remove any existing build folder and recreate
|
|
||||||
if [ -d $TECIO_BINARY_DIR ]
|
|
||||||
then
|
|
||||||
echo "removing old build directory"
|
|
||||||
echo " $TECIO_BINARY_DIR"
|
|
||||||
rm -rf $TECIO_BINARY_DIR
|
|
||||||
fi
|
|
||||||
mkdir -p $TECIO_BINARY_DIR
|
|
||||||
|
|
||||||
rm -rf $TECIO_ARCH_PATH
|
|
||||||
|
|
||||||
unset configBoost
|
|
||||||
echo "----"
|
|
||||||
echo "Configuring $tecioPACKAGE with boost $BOOST_VERSION"
|
|
||||||
echo " Source : $TECIO_SOURCE_DIR"
|
|
||||||
echo " Build : $TECIO_BINARY_DIR"
|
|
||||||
echo " Target : $TECIO_ARCH_PATH"
|
|
||||||
|
|
||||||
if [ -d "$BOOST_ARCH_PATH" ]
|
|
||||||
then
|
|
||||||
echo " Boost : ThirdParty (${BOOST_ARCH_PATH##*/})"
|
|
||||||
else
|
|
||||||
echo " Boost : system"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cmake=$(findCMake)
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
set -x
|
|
||||||
cd $TECIO_BINARY_DIR && $cmake \
|
|
||||||
-DCMAKE_INSTALL_PREFIX=$TECIO_ARCH_PATH \
|
|
||||||
-DCMAKE_BINARY_TYPE=Release \
|
|
||||||
-DBoost_INCLUDE_DIR=$boostInc \
|
|
||||||
$TECIO_SOURCE_DIR \
|
|
||||||
&& make -j $WM_NCOMPPROCS \
|
|
||||||
&& { \
|
|
||||||
# Tecio doesn't offer to install, but fortunately only a few files,
|
|
||||||
# so just install in a single directory
|
|
||||||
mkdir -p $TECIO_ARCH_PATH 2>/dev/null
|
|
||||||
|
|
||||||
/bin/cp -pv \
|
|
||||||
$TECIO_BINARY_DIR/libtecio.a \
|
|
||||||
$TECIO_SOURCE_DIR/TECIO.h \
|
|
||||||
$TECIO_SOURCE_DIR/tecio_Exports.h \
|
|
||||||
$TECIO_ARCH_PATH
|
|
||||||
|
|
||||||
chmod 0644 $TECIO_ARCH_PATH/*
|
|
||||||
} \
|
|
||||||
&& echo "Built: $tecioPACKAGE"
|
|
||||||
) || {
|
|
||||||
echo "Error building: $tecioPACKAGE"
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
233
makeUMPIRE
Executable file
233
makeUMPIRE
Executable file
@ -0,0 +1,233 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | www.openfoam.com
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2025 OpenCFD Ltd.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# makeUMPIRE
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Build script for UMPIRE
|
||||||
|
#
|
||||||
|
# ----------------------------------------------
|
||||||
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Dynamic library ending (default is .so)
|
||||||
|
[ "$(uname -s)" = Darwin ] && EXT_SO=.dylib || EXT_SO=.so
|
||||||
|
|
||||||
|
# Short-circuit test for an installation
|
||||||
|
if [ "$1" = "-test" ]
|
||||||
|
then
|
||||||
|
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
|
||||||
|
dir="${2%/}" # <- *_ARCH_PATH
|
||||||
|
[ -d "$dir/include/umpire" ] || exit 2
|
||||||
|
|
||||||
|
package="umpire"
|
||||||
|
libStatic="libumpire.a"
|
||||||
|
for lib in \
|
||||||
|
"$dir/lib/$libStatic" \
|
||||||
|
"$dir/lib$WM_COMPILER_LIB_ARCH/$libStatic" \
|
||||||
|
;
|
||||||
|
do
|
||||||
|
if [ -r "$lib" ]
|
||||||
|
then
|
||||||
|
echo " $package include: $dir/include"
|
||||||
|
echo " $package library: ${lib%/*}"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
if : # Run from third-party directory
|
||||||
|
then
|
||||||
|
cd "${0%/*}" || exit
|
||||||
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
|
echo " Check your OpenFOAM environment and installation"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/CMakeFunctions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Obtain version from OpenFOAM etc/config.sh file:
|
||||||
|
_foamConfig umpire
|
||||||
|
|
||||||
|
PACKAGE="${umpire_version:-none}"
|
||||||
|
|
||||||
|
# Hint for cmake findMPI
|
||||||
|
if [ -d "$MPI_ARCH_PATH" ]
|
||||||
|
then
|
||||||
|
export MPI_HOME="$MPI_ARCH_PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
printVersions() { listPackageVersions umpire; exit 0; }
|
||||||
|
printHelp() {
|
||||||
|
cat<<USAGE
|
||||||
|
|
||||||
|
Usage: ${0##*/} [OPTION] [umpire-VERSION]
|
||||||
|
options:
|
||||||
|
-force Force compilation, even if include/library already exists
|
||||||
|
-gcc Force use of gcc/g++
|
||||||
|
-cmake PATH With cmake from the given path
|
||||||
|
-mpi-home PATH With hint for MPI_HOME
|
||||||
|
-DNAME=VALUE add cmake variable
|
||||||
|
-list List available unpacked source versions
|
||||||
|
-help Display usage help
|
||||||
|
|
||||||
|
* Build UMPIRE
|
||||||
|
${PACKAGE:-[unspecified]}
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
showDownloadHint umpire
|
||||||
|
exit 0 # Clean exit
|
||||||
|
}
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
exportCompiler minimal # Minimal compiler info for CMake/configure
|
||||||
|
|
||||||
|
unset optForce
|
||||||
|
|
||||||
|
# Parse options
|
||||||
|
while [ "$#" -gt 0 ]
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
'') ;; # Ignore empty
|
||||||
|
-h | -help*) printHelp;;
|
||||||
|
-list) printVersions;;
|
||||||
|
-gcc) useGcc ;;
|
||||||
|
-force) optForce=true ;;
|
||||||
|
|
||||||
|
-cmake)
|
||||||
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
CMAKE_PATH="${2%%/}"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-mpi-home) # mpi with hint
|
||||||
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
export MPI_HOME="${2%%/}"
|
||||||
|
case "${MPI_HOME:-none}" in (false|none) unset MPI_HOME;; esac
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
|
||||||
|
umpire/* | sources/umpire* | umpire-[0-9]* | umpire-git*)
|
||||||
|
PACKAGE="${1%%/}"
|
||||||
|
;;
|
||||||
|
-D[A-Z]*=* | [A-Z]*=*) # cmake variables
|
||||||
|
addCMakeVariable "$1"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
die "unknown option/argument: '$1'"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z "$PACKAGE" ]
|
||||||
|
then
|
||||||
|
die "The UMPIRE package/version not specified"
|
||||||
|
elif _foamIsNone "$PACKAGE" || _foamIsSystem "$PACKAGE"
|
||||||
|
then
|
||||||
|
echo "Using none/system (skip ThirdParty build of UMPIRE)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Known build issues for mingw (various things)
|
||||||
|
case "$WM_COMPILER" in
|
||||||
|
(Mingw*)
|
||||||
|
if [ "$optForce" = true ]
|
||||||
|
then
|
||||||
|
echo "Warning: umpire - not tested with $WM_COMPILER"
|
||||||
|
else
|
||||||
|
echo "Skipping umpire - not tested with $WM_COMPILER"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Build UMPIRE
|
||||||
|
# *PACKAGE : name-version of the package
|
||||||
|
# *SOURCE : location of original sources
|
||||||
|
# *PREFIX : installation directory
|
||||||
|
|
||||||
|
PKG_SOURCE="$(findSourceDir "$PACKAGE")"
|
||||||
|
PACKAGE="$(basename "$PACKAGE")"
|
||||||
|
PKG_PREFIX="$installBASE/$PACKAGE"
|
||||||
|
export GIT_DIR="$PKG_SOURCE/.git"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo ========================================
|
||||||
|
echo "Build umpire library $PACKAGE"
|
||||||
|
echo
|
||||||
|
|
||||||
|
if [ -z "$optForce" ] \
|
||||||
|
&& [ -f "$PKG_PREFIX/include/umpire/Umpire.hpp" ] \
|
||||||
|
&& {
|
||||||
|
[ -r "$PKG_PREFIX/lib/libumpire.a" ] \
|
||||||
|
|| [ -r "$PKG_PREFIX/lib$WM_COMPILER_LIB_ARCH/libumpire.a" ]
|
||||||
|
}
|
||||||
|
then
|
||||||
|
echo " UMPIRE already built : $PKG_PREFIX"
|
||||||
|
else
|
||||||
|
# CMake options often lag the configure ones
|
||||||
|
echo "Starting build: $PACKAGE (using cmake)"
|
||||||
|
echo
|
||||||
|
(
|
||||||
|
PKG_BUILD="$buildBASE/$PACKAGE"
|
||||||
|
cd "$PKG_SOURCE" || exit
|
||||||
|
|
||||||
|
applyPatch "$PACKAGE" "$PKG_SOURCE"
|
||||||
|
|
||||||
|
# Remove any existing build folder and recreate
|
||||||
|
rm -rf "$PKG_PREFIX"
|
||||||
|
rm -rf "$PKG_BUILD"
|
||||||
|
mkdir -p "$PKG_BUILD"
|
||||||
|
|
||||||
|
# With MPI?
|
||||||
|
# -DENABLE_FIND_MPI=ON
|
||||||
|
|
||||||
|
cmake=$(findCMake)
|
||||||
|
|
||||||
|
# By default installs into lib64/,
|
||||||
|
# but libcamp installs into lib/ so use that here as well !
|
||||||
|
#
|
||||||
|
# Also note that the umpire currently (2025-04-03) doesn't properly
|
||||||
|
# handle a relative directory for CMAKE_INSTALL_LIBDIR
|
||||||
|
# (https://github.com/LLNL/Umpire/issues/952)
|
||||||
|
|
||||||
|
libdir="$PKG_PREFIX/lib"
|
||||||
|
|
||||||
|
cd "$PKG_BUILD" && set -x && \
|
||||||
|
${cmake:?} \
|
||||||
|
-DCMAKE_INSTALL_PREFIX="$PKG_PREFIX" \
|
||||||
|
-DCMAKE_INSTALL_LIBDIR="$libdir" \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DCAMP_ENABLE_TESTS=OFF \
|
||||||
|
-DENABLE_ASTYLE=OFF \
|
||||||
|
-DENABLE_DOCS=OFF \
|
||||||
|
-DENABLE_DOXYGEN=OFF \
|
||||||
|
-DENABLE_EXAMPLES=OFF \
|
||||||
|
-DENABLE_FORTRAN=OFF \
|
||||||
|
-DENABLE_TESTS=OFF \
|
||||||
|
${WM_QUIET:+-DCMAKE_RULE_MESSAGES=OFF} \
|
||||||
|
"$PKG_SOURCE" \
|
||||||
|
&& make -j $WM_NCOMPPROCS all \
|
||||||
|
&& make install \
|
||||||
|
&& echo "Built: $PACKAGE"
|
||||||
|
) || {
|
||||||
|
echo "Error building: $PACKAGE"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
202
makeVTK
202
makeVTK
@ -3,24 +3,13 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / 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 OpenCFD Ltd.
|
# \\ / A nd | www.openfoam.com
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2016-2023 OpenCFD Ltd.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
#
|
|
||||||
# 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
|
# Script
|
||||||
# makeVTK
|
# makeVTK
|
||||||
@ -28,86 +17,89 @@
|
|||||||
# Description
|
# Description
|
||||||
# Make and install VTK.
|
# Make and install VTK.
|
||||||
# The VTK sources should be located under one of these locations:
|
# The VTK sources should be located under one of these locations:
|
||||||
# - $WM_THIRD_PARTY_DIR/ParaView-VERSION
|
# - $WM_THIRD_PARTY_DIR/VTK-VERSION
|
||||||
# - $WM_THIRD_PARTY_DIR/ParaView-vVERSION
|
|
||||||
#
|
#
|
||||||
# To use the VTK source from the ParaView source tree, simply make an
|
# To use the VTK source from the ParaView source tree, simply make an
|
||||||
# appropriate link first. For example,
|
# appropriate link first. For example,
|
||||||
#
|
#
|
||||||
# (cd $WM_THIRD_PARTY_DIR && ln -s ParaView-v5.2.0/VTK VTK-7.1.0)
|
# ln -s ParaView-v5.3.0/VTK VTK-7.1.0
|
||||||
#
|
#
|
||||||
|
# ----------------------------------------------
|
||||||
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
if : # Run from third-party directory
|
||||||
cd ${0%/*} || exit 1
|
then
|
||||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
cd "${0%/*}" || exit
|
||||||
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
echo " The environment variables are inconsistent with the installation."
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
echo " Check the OpenFOAM entries in your dot-files and source them."
|
echo " Check your OpenFOAM environment and installation"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
. etc/tools/ThirdPartyFunctions
|
fi
|
||||||
. etc/tools/ParaViewFunctions
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ThirdPartyFunctions
|
||||||
. etc/tools/vtkFunctions
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/CMakeFunctions
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/ParaViewFunctions
|
||||||
|
. "${WM_THIRD_PARTY_DIR:?}"/etc/tools/vtkFunctions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
#
|
# Obtain version from OpenFOAM etc/config.sh file:
|
||||||
# USER OPTIONS:
|
unset vtk_version mesa_version # Purge current values
|
||||||
# ~~~~~~~~~~~~~
|
_foamConfig vtk
|
||||||
|
|
||||||
# MPI support:
|
VTK_VERSION="$vtk_version"
|
||||||
# use 0 or unset MPI_MAX_PROCS for no upper-limit
|
|
||||||
withMPI=false
|
|
||||||
unset MPI_MAX_PROCS
|
|
||||||
|
|
||||||
# MESA graphics support:
|
case "$VTK_VERSION" in
|
||||||
withMESA=false
|
[Vv]*)
|
||||||
MESA_INCLUDE="/usr/include/GL"
|
VTK_VERSION="${VTK_VERSION##*-}" # Without "VTK-" prefix
|
||||||
MESA_LIBRARY="/usr/lib$WM_COMPILER_LIB_ARCH/libOSMesa.so"
|
;;
|
||||||
|
esac
|
||||||
# Set the path to cmake
|
VTK_VERSION="${VTK_VERSION%%-*}" # Without suffix (eg, -mesa)
|
||||||
CMAKE_PATH=""
|
|
||||||
|
|
||||||
# New rendering backend (starting with vtk 7?).
|
# New rendering backend (starting with vtk 7?).
|
||||||
# Default to auto-config based on VTK version
|
withGL2=auto # auto-config based on version
|
||||||
withGL2=auto
|
|
||||||
|
|
||||||
#
|
# Hint for cmake findMPI
|
||||||
# NO FURTHER EDITING BELOW THIS LINE
|
if [ -d "$MPI_ARCH_PATH" ]
|
||||||
#
|
then
|
||||||
#-----------------------------------------------------------------------------
|
export MPI_HOME="$MPI_ARCH_PATH"
|
||||||
Script=${0##*/}
|
fi
|
||||||
usage() {
|
|
||||||
exec 1>&2
|
#------------------------------------------------------------------------------
|
||||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
printVersions() { listPackageVersions vtk; exit 0; }
|
||||||
|
printHelp() {
|
||||||
cat<<USAGE
|
cat<<USAGE
|
||||||
|
|
||||||
usage: $Script [OPTION] [vtk-VERSION] [CMAKE-OPTION]
|
Usage: ${0##*/} [OPTION] [vtk-VERSION] [CMAKE-OPTION]
|
||||||
options:
|
options:
|
||||||
|
-gcc Force use of gcc/g++
|
||||||
|
-cmake PATH with cmake from the given path
|
||||||
-rebuild for repeated builds (-make -install) *use with caution*
|
-rebuild for repeated builds (-make -install) *use with caution*
|
||||||
-gl2 with new rendering backend (if not already enabled)
|
-gl2 with new rendering backend (default: auto)
|
||||||
-mesa with mesa (if not already enabled)
|
-mesa with mesa (if not already enabled)
|
||||||
-mpi with mpi (if not already enabled)
|
|
||||||
-mpi=NPROCS with mpi and max 'NPROCS' processes. NPROCS=0 for no
|
|
||||||
upper-limit on processes.
|
|
||||||
-osmesa with off-screen mesa only
|
|
||||||
-cmake PATH with cmake from the path given
|
|
||||||
-gcc force g++ instead of the value from \$WM_CXX
|
|
||||||
-verbose verbose output in Makefiles
|
|
||||||
-version VER specify an alternative version (current value: $VTK_VERSION)
|
|
||||||
-buildType NAME specify the build type (default: Release)
|
|
||||||
-mesa-prefix DIR location of mesa installation
|
-mesa-prefix DIR location of mesa installation
|
||||||
-mesa-include DIR location of mesa headers (current value: ${MESA_INCLUDE:-none})
|
-mesa-include DIR location of mesa headers (current: ${MESA_INCLUDE:-none})
|
||||||
-mesa-lib PATH path to mesa library (current value: ${MESA_LIBRARY:-none})
|
-mesa-lib PATH path to mesa library (current: ${MESA_LIBRARY:-none})
|
||||||
-help
|
-osmesa with off-screen mesa only
|
||||||
|
-mpi with mpi (VTK_Group_MPI=ON)
|
||||||
|
-mpi=N with max 'N' mpi processes. N=0 for no upper-limit.
|
||||||
|
-mpi-home PATH with mpi and hint for MPI_HOME
|
||||||
|
-verbose verbose output in Makefiles
|
||||||
|
-version VER specify an alternative version (current: $VTK_VERSION)
|
||||||
|
-buildType NAME specify the build type (default: Release)
|
||||||
|
-suffix NAME specify a suffix to distinguish the build
|
||||||
|
-DNAME=VALUE add cmake variable
|
||||||
|
-list List available unpacked source versions
|
||||||
|
-help Display usage help
|
||||||
|
|
||||||
The -no-FEATURE option can be disable these features (if not already disabled):
|
The -no-FEATURE option can be used to forcibly disable these features:
|
||||||
mesa mpi
|
-no-gl2 | -no-mesa | -no-mpi
|
||||||
|
|
||||||
CMake options start with a capital letter and contain an '='.
|
CMake options start with a capital letter and contain an '='.
|
||||||
For example,
|
For example,
|
||||||
$Script BUILD_TESTING=ON
|
${0##*/} BUILD_TESTING=ON
|
||||||
to add tests and avoid building documentation
|
to add tests and avoid building documentation
|
||||||
|
|
||||||
For finer control, the build stages can be selected or deselected individually:
|
For finer control, the build stages can be selected or deselected individually:
|
||||||
|
-patch -no-patch
|
||||||
-config -no-config
|
-config -no-config
|
||||||
-make -no-make
|
-make -no-make
|
||||||
-install -no-install
|
-install -no-install
|
||||||
@ -115,40 +107,42 @@ For finer control, the build stages can be selected or deselected individually:
|
|||||||
|
|
||||||
* Make and install VTK-$VTK_VERSION located under
|
* Make and install VTK-$VTK_VERSION located under
|
||||||
\$WM_THIRD_PARTY_DIR/VTK-$VTK_VERSION
|
\$WM_THIRD_PARTY_DIR/VTK-$VTK_VERSION
|
||||||
-> \$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/VTK-$VTK_VERSION
|
-> \$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/VTK-$VTK_VERSION$BUILD_SUFFIX
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
exit 1
|
# showDownloadHint vtk
|
||||||
|
exit 0 # Clean exit
|
||||||
}
|
}
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Ensure CMake gets the correct C/C++ compiler
|
exportCompiler minimal # Minimal compiler info for CMake/configure
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Various building stages
|
# Various building stages
|
||||||
#
|
|
||||||
unset runPATCH runCONFIG runMAKE runINSTALL
|
unset runPATCH runCONFIG runMAKE runINSTALL
|
||||||
runDEFAULT=true
|
runDEFAULT=true
|
||||||
buildType=Release
|
|
||||||
withOSMESA=false
|
|
||||||
|
|
||||||
# Parse options
|
# Parse options
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
'') ;; # Ignore empty
|
||||||
usage
|
-h | -help*) printHelp;;
|
||||||
|
-list) printVersions;;
|
||||||
|
-gcc) useGcc ;;
|
||||||
|
|
||||||
|
# VTK version
|
||||||
|
paraview/* | vtk/* | sources/paraview* | sources/vtk* |\
|
||||||
|
[0-9]* | vtk-[0-9]* | VTK-[0-9]*)
|
||||||
|
setVtkVersion "$(basename "$1")"
|
||||||
;;
|
;;
|
||||||
[0-9]* | vtk-[0-9]* | VTK-[0-9]*) # VTK version
|
-D[A-Z]*=* | [A-Z]*=*) # cmake variables
|
||||||
setVtkVersion "${1%%/}"
|
|
||||||
;;
|
|
||||||
[A-Z]*=*) # cmake variables
|
|
||||||
addCMakeVariable "$1"
|
addCMakeVariable "$1"
|
||||||
;;
|
;;
|
||||||
-gcc)
|
-patch) # stage 0: patch sources
|
||||||
export CC=gcc # use gcc/g++
|
runPATCH=true
|
||||||
export CXX=g++
|
unset runDEFAULT
|
||||||
|
;;
|
||||||
|
-no-patch)
|
||||||
|
runPATCH=false
|
||||||
;;
|
;;
|
||||||
-config) # stage 1: config only
|
-config) # stage 1: config only
|
||||||
runCONFIG=true
|
runCONFIG=true
|
||||||
@ -197,16 +191,20 @@ do
|
|||||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
withMESA=true
|
withMESA=true
|
||||||
MESA_INCLUDE="${2%%/}/include"
|
MESA_INCLUDE="${2%%/}/include"
|
||||||
|
# Could be under (lib64 | lib)
|
||||||
MESA_LIBRARY="${2%%/}/lib$WM_COMPILER_LIB_ARCH/libOSMesa.so"
|
MESA_LIBRARY="${2%%/}/lib$WM_COMPILER_LIB_ARCH/libOSMesa.so"
|
||||||
|
[ -f "$MESA_LIBRARY" ] || MESA_LIBRARY="${2%%/}/lib/libOSMesa.so"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-mesa-include)
|
-mesa-include)
|
||||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
withMESA=true
|
||||||
MESA_INCLUDE="${2%%/}"
|
MESA_INCLUDE="${2%%/}"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-mesa-lib)
|
-mesa-lib)
|
||||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
withMESA=true
|
||||||
MESA_LIBRARY="${2%%/}"
|
MESA_LIBRARY="${2%%/}"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
@ -217,6 +215,13 @@ do
|
|||||||
withMPI=true
|
withMPI=true
|
||||||
MPI_MAX_PROCS="${1##*=}"
|
MPI_MAX_PROCS="${1##*=}"
|
||||||
;;
|
;;
|
||||||
|
-mpi-home) # mpi with hint
|
||||||
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
withMPI=true
|
||||||
|
export MPI_HOME="${2%%/}"
|
||||||
|
case "${MPI_HOME:-none}" in (false|none) unset MPI_HOME;; esac
|
||||||
|
shift
|
||||||
|
;;
|
||||||
-no-mpi)
|
-no-mpi)
|
||||||
withMPI=false
|
withMPI=false
|
||||||
;;
|
;;
|
||||||
@ -236,7 +241,12 @@ do
|
|||||||
;;
|
;;
|
||||||
-buildType)
|
-buildType)
|
||||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
buildType="$2"
|
BUILD_TYPE="$2"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-suffix)
|
||||||
|
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||||
|
setBuildSuffix "$2"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@ -276,14 +286,14 @@ addMpiSupport # set MPI-specific options
|
|||||||
addMesaSupport # set MESA-specific options
|
addMesaSupport # set MESA-specific options
|
||||||
addGL2Support # new rendering backend
|
addGL2Support # new rendering backend
|
||||||
|
|
||||||
# set off-screen only options
|
# Set off-screen options
|
||||||
if [ "$withOSMESA" = true ]
|
if [ "$withOSMESA" = true ]
|
||||||
then
|
then
|
||||||
addCMakeVariable "VTK_USE_X:BOOL=OFF"
|
addCMakeVariable "VTK_USE_X=OFF"
|
||||||
addCMakeVariable "OPENGL_INCLUDE_DIR=$MESA_INCLUDE"
|
addCMakeVariable "OPENGL_INCLUDE_DIR=$MESA_INCLUDE"
|
||||||
addCMakeVariable "OPENGL_xmesa_INCLUDE_DIR=$MESA_INCLUDE"
|
|
||||||
addCMakeVariable "OPENGL_gl_LIBRARY=$MESA_LIBRARY"
|
addCMakeVariable "OPENGL_gl_LIBRARY=$MESA_LIBRARY"
|
||||||
addCMakeVariable "OPENGL_glu_LIBRARY=$MESA_LIBRARY"
|
addCMakeVariable "OPENGL_glu_LIBRARY=$MESA_LIBRARY"
|
||||||
|
addCMakeVariable "OPENGL_xmesa_INCLUDE_DIR=$MESA_INCLUDE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
setVtkDirs # where things are or should be put
|
setVtkDirs # where things are or should be put
|
||||||
@ -304,9 +314,13 @@ Features selected
|
|||||||
mesa ${withMESA:-false}
|
mesa ${withMESA:-false}
|
||||||
mpi ${withMPI:-false}
|
mpi ${withMPI:-false}
|
||||||
---------------------
|
---------------------
|
||||||
|
Compiler
|
||||||
|
cxx ${CXX:-unknown}
|
||||||
|
cxxflags ${CXXFLAGS:-none}
|
||||||
|
---------------------
|
||||||
Version information
|
Version information
|
||||||
version ${VTK_VERSION:-unknown}
|
vtk ${VTK_VERSION:-unknown}
|
||||||
build ${buildType:-Release}
|
build ${BUILD_TYPE:-unknown}
|
||||||
---------------------
|
---------------------
|
||||||
SUMMARY
|
SUMMARY
|
||||||
|
|
||||||
|
|||||||
@ -1,15 +1,23 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# An example for building particular combinations of VTK with
|
# An example for building particular combinations of VTK with
|
||||||
# - off-screen mesa
|
# - mesa (off-screen only)
|
||||||
|
|
||||||
vtk=VTK-7.1.0
|
vtk=VTK-8.2.0
|
||||||
# mesa=mesa-11.2.2
|
# mesa=mesa-11.2.2
|
||||||
mesa=mesa-13.0.1
|
# mesa=mesa-13.0.3
|
||||||
|
# mesa=mesa-17.1.1
|
||||||
|
mesa=mesa-18.3.4
|
||||||
|
|
||||||
|
# Module_vtkAcceleratorsVTKm : Request building vtkAcceleratorsVTKm
|
||||||
|
#
|
||||||
|
# -mpi implies VTK_Group_MPI : Request building MPI modules
|
||||||
|
|
||||||
|
set -x
|
||||||
./makeVTK \
|
./makeVTK \
|
||||||
$vtk \
|
-mpi \
|
||||||
-osmesa \
|
-osmesa \
|
||||||
-mesa-prefix $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$mesa \
|
-mesa-prefix $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$mesa \
|
||||||
"$@"
|
$vtk "$@" \
|
||||||
|
Module_vtkAcceleratorsVTKm=ON
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
82
minCmake
82
minCmake
@ -3,24 +3,13 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / 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 OpenCFD Ltd.
|
# \\ / A nd | www.openfoam.com
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
# Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM.
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
#
|
|
||||||
# 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
|
# Script
|
||||||
# minCmake
|
# minCmake
|
||||||
@ -28,21 +17,21 @@
|
|||||||
# Description
|
# Description
|
||||||
# Scour CMakeLists.txt files to report the cmake_minimum required.
|
# Scour CMakeLists.txt files to report the cmake_minimum required.
|
||||||
#
|
#
|
||||||
|
# ----------------------------------------------
|
||||||
|
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Run from third-party directory only
|
# Run from third-party directory only
|
||||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
cd "${0%/*}" || exit
|
||||||
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
|
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||||
echo " The environment variables are inconsistent with the installation."
|
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||||
echo " Check the OpenFOAM entries in your dot-files and source them."
|
echo " Check your OpenFOAM environment and installation"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
usage() {
|
printHelp() {
|
||||||
exec 1>&2
|
|
||||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
|
||||||
cat<<USAGE
|
cat<<USAGE
|
||||||
|
|
||||||
usage: ${0##*/} [OPTION] [dir1 ... dirN]
|
Usage: ${0##*/} [OPTION] [dir1 ... dirN]
|
||||||
options:
|
options:
|
||||||
-help
|
-help
|
||||||
|
|
||||||
@ -50,18 +39,17 @@ options:
|
|||||||
* Without any arguments, select all first level directories.
|
* Without any arguments, select all first level directories.
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
exit 1
|
exit 0 # Clean exit
|
||||||
}
|
}
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Parse options
|
# Parse options
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
-h | -help*) printHelp;;
|
||||||
usage
|
|
||||||
;;
|
|
||||||
-*)
|
-*)
|
||||||
usage "unknown option: '$1'"
|
echo "$0: Error unknown option: '$1'" 1>&2
|
||||||
|
exit 1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
break
|
break
|
||||||
@ -71,27 +59,55 @@ do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Nothing specified - use first level of unpacked directories
|
# Nothing specified - use first level of unpacked directories
|
||||||
[ "$#" -gt 0 ] || set -- $(find -mindepth 1 -maxdepth 1 -type d)
|
if [ "$#" -eq 0 ]
|
||||||
|
then
|
||||||
|
set -- \
|
||||||
|
$(
|
||||||
|
echo "searching..." 1>&2
|
||||||
|
find . -mindepth 2 -maxdepth 2 -name CMakeLists.txt
|
||||||
|
for dir in sources/*
|
||||||
|
do
|
||||||
|
[ -d "$dir" ] || continue
|
||||||
|
echo "search <$dir>" 1>&2
|
||||||
|
depth=1
|
||||||
|
# Is sources/pkg/pkg-version ?
|
||||||
|
if [ "$(echo "$dir" | sed -e 's#.*/[a-z][a-z]*##' | wc -w)" = 0 ]
|
||||||
|
then
|
||||||
|
depth=2
|
||||||
|
fi
|
||||||
|
find "$dir" -maxdepth "$depth" -name CMakeLists.txt
|
||||||
|
done
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
echo "processing..." 1>&2
|
||||||
for dir
|
for dir
|
||||||
do
|
do
|
||||||
dir="${dir#./}" # Remove leading "./"
|
dir="${dir#./}" # Remove leading "./"
|
||||||
dir="${dir%/}" # Remove trailing "/"
|
dir="${dir%/}" # Remove trailing "/"
|
||||||
|
|
||||||
|
case "$dir" in
|
||||||
|
(*/CMakeLists.txt) file="$dir" ;;
|
||||||
|
(*) file="$dir/CMakeLists.txt" ;;
|
||||||
|
esac
|
||||||
|
dir="$(dirname "$file")"
|
||||||
|
dir="$(basename "$dir")"
|
||||||
|
|
||||||
min=$(sed -n \
|
min=$(sed -n \
|
||||||
-e 's/^.*cmake_minimum.*VERSION *\([0-9.][0-9.]*\).*/\1/p' \
|
-e 's/^.*cmake_minimum.*VERSION *\([0-9.][0-9.]*\).*/\1/p' \
|
||||||
"$dir/CMakeLists.txt" \
|
"$file" \
|
||||||
2>/dev/null)
|
2>/dev/null | head -1)
|
||||||
|
|
||||||
if [ -n "$min" ]
|
if [ -n "$min" ]
|
||||||
then
|
then
|
||||||
# Remove trailing ".0" from version
|
# Remove trailing ".0" from version
|
||||||
echo "${min%.0}" "${dir#sources/}"
|
echo "${min%.0}" "$dir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done \
|
done \
|
||||||
| sort -n -k 1 \
|
| sort -n -k 1 \
|
||||||
| xargs printf " %-10s %s\n"
|
| xargs printf " %-10s %s\n"
|
||||||
# Use 4 leading spaces for easier pasting as Markdown
|
# 4 leading spaces for easy pasting as Markdown
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
38
sources.txt
38
sources.txt
@ -1,38 +0,0 @@
|
|||||||
Third-Party Sources
|
|
||||||
===================
|
|
||||||
|
|
||||||
OpenFOAM+ v1612
|
|
||||||
---------------
|
|
||||||
CGAL-4.9
|
|
||||||
ParaView-5.0.1
|
|
||||||
boost_1_62_0
|
|
||||||
fftw-3.3.5
|
|
||||||
openmpi-1.10.4
|
|
||||||
scotch_6.0.3
|
|
||||||
|
|
||||||
|
|
||||||
OpenFOAM+ v1606
|
|
||||||
---------------
|
|
||||||
CGAL-4.8
|
|
||||||
ParaView-5.0.1
|
|
||||||
boost_1_61_0
|
|
||||||
fftw-3.3.4
|
|
||||||
openmpi-1.10.2
|
|
||||||
scotch_6.0.3
|
|
||||||
|
|
||||||
|
|
||||||
OpenFOAM+ v3.0
|
|
||||||
---------------
|
|
||||||
CGAL-4.7
|
|
||||||
ParaView-4.4.0
|
|
||||||
openmpi-1.10.0
|
|
||||||
scotch_6.0.3
|
|
||||||
|
|
||||||
|
|
||||||
OpenFOAM+ 2.4
|
|
||||||
---------------
|
|
||||||
CGAL-4.6
|
|
||||||
ParaView-4.1.0
|
|
||||||
cmake-2.8.12.1
|
|
||||||
openmpi-1.8.5
|
|
||||||
scotch_6.0.3
|
|
||||||
Reference in New Issue
Block a user