Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bdd4266e2f | |||
| 36f89097d8 | |||
| 78819144d3 | |||
| 348b8cd4f4 | |||
| b9ace75da8 | |||
| aa2523ee63 | |||
| 6e03e1ecb4 | |||
| 7958c7e4c1 | |||
| 67093bfb2f | |||
| 9de516d315 | |||
| 69de80cd08 | |||
| 60d3922681 | |||
| a4ba6b72f5 | |||
| 0c7c86faa6 | |||
| cd811d9b28 |
20
Allclean
20
Allclean
@ -7,11 +7,10 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2011 OpenFOAM Foundation
|
||||
# Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# Allclean
|
||||
@ -35,10 +34,10 @@ usage() {
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
Usage: ${0##*/} [OPTION] [<platform> [ ... <platformN> ]]
|
||||
Usage: ${0##*/} [OPTION] [platform [ ... platformN]]
|
||||
options:
|
||||
-all remove all platforms directories.
|
||||
-current clean the current platform ($WM_OPTIONS).
|
||||
-all remove all platforms directories
|
||||
-current clean the current platform ($WM_OPTIONS)
|
||||
-help print the usage
|
||||
|
||||
Cleanup intermediate build directories.
|
||||
@ -50,10 +49,11 @@ USAGE
|
||||
}
|
||||
|
||||
# Print help message
|
||||
if [ "$1" = "-h" -o "$1" = "-help" ]
|
||||
then
|
||||
case "$1" in
|
||||
(-h | -help*)
|
||||
usage
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -124,7 +124,7 @@ fi
|
||||
removePlatform()
|
||||
{
|
||||
local platform="$1"
|
||||
if [ -n "$platform" -a -d "platforms/$platform" ]
|
||||
if [ -n "$platform" ] && [ -d "platforms/$platform" ]
|
||||
then
|
||||
echo
|
||||
echo "Cleaning platform '$platform'"
|
||||
|
||||
16
Allwmake
16
Allwmake
@ -7,14 +7,13 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# Allwmake
|
||||
# ThirdParty Allwmake
|
||||
#
|
||||
# Description
|
||||
# Build script for ThirdParty applications/libraries
|
||||
@ -29,11 +28,6 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
echo " Check your OpenFOAM environment and installation"
|
||||
exit 1
|
||||
}
|
||||
[ -n "$FOAM_EXT_LIBBIN" ] || {
|
||||
echo "Error (${0##*/}) : \$FOAM_EXT_LIBBIN not set for ThirdParty"
|
||||
echo " Check your OpenFOAM environment and installation"
|
||||
exit 1
|
||||
}
|
||||
. etc/tools/ThirdPartyFunctions
|
||||
#------------------------------------------------------------------------------
|
||||
exportCompiler true # Compiler info + flags for CMake/configure
|
||||
@ -54,7 +48,7 @@ echo Build MPI libraries if required
|
||||
echo " $MPI_ARCH_PATH"
|
||||
case "$WM_MPLIB" in
|
||||
(OPENMPI | MPICH)
|
||||
./make$WM_MPLIB -test "$MPI_ARCH_PATH" || ./make$WM_MPLIB
|
||||
./make"$WM_MPLIB" -test "$MPI_ARCH_PATH" || ./make"$WM_MPLIB"
|
||||
;;
|
||||
esac
|
||||
|
||||
@ -103,7 +97,7 @@ echo
|
||||
echo ========================================
|
||||
if [ -n "$CGAL_ARCH_PATH" ]
|
||||
then
|
||||
echo "CGAL/boost"
|
||||
echo "cgal/boost"
|
||||
./makeCGAL -test "$CGAL_ARCH_PATH" "$BOOST_ARCH_PATH" || \
|
||||
./makeCGAL || warnBuildIssues CGAL
|
||||
else
|
||||
|
||||
57
BUILD.md
57
BUILD.md
@ -148,11 +148,8 @@ export GMP_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mp
|
||||
- Builds an mpi library (openmpi or mpich), scotch decomposition, boost, CGAL, FFTW.
|
||||
- If the optional kahip or metis directories are found, they will also be compiled.
|
||||
2. `makeParaView` *(optional)*
|
||||
- This is optional, but extremely useful for visualization and for
|
||||
run-time post-processing function objects.
|
||||
You can build this at a later point in time, but then you should
|
||||
remember to rebuild the post-processing function objects and the
|
||||
reader module as well.
|
||||
- Can be useful for visualization and for run-time post-processing function objects.
|
||||
You can build this at a later point in time, and rebuild the visualization modules.
|
||||
3. Make any additional optional components
|
||||
|
||||
|
||||
@ -176,6 +173,12 @@ export GMP_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mp
|
||||
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`,
|
||||
@ -416,6 +419,8 @@ you may have additional hurdles to using the newest versions of clang.
|
||||
| [boost][page boost] | [download][link boost]
|
||||
| [CGAL][page CGAL] | [download][link CGAL]
|
||||
| [FFTW][page FFTW] | [download][link FFTW]
|
||||
| [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]
|
||||
| gperftools | [repo][repo gperftools] or [download][link gperftools]
|
||||
|
||||
@ -424,9 +429,9 @@ you may have additional hurdles to using the newest versions of clang.
|
||||
|
||||
| Name | Location
|
||||
|-----------------------|------------------------
|
||||
| [openmpi][page openmpi] | [download][link openmpi]. The newer [openmpi][newer openmpi] make exhibit stability issues.
|
||||
| [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] | [download][link scotch] or [older][older scotch] or [even older][oldest scotch]
|
||||
| [scotch, ptscotch][page scotch] | [repo][repo scotch] or [download][link scotch] or [older][older scotch] or [even older][oldest scotch]
|
||||
| [kahip][page kahip] | [download][link kahip] or [older][older kahip]
|
||||
| [metis][page metis] | [download][link metis]
|
||||
|
||||
@ -450,7 +455,8 @@ The minimum CMake requirements for building various components.
|
||||
2.8.12.2 llvm-3.7.0
|
||||
2.8.12.2 llvm-3.8.0
|
||||
2.8.4 cmake-3.6.0
|
||||
3.3 ParaView-5.6.0
|
||||
3.3 ParaView-5.6.3
|
||||
3.10 ParaView-5.7.0 - ParaView-5.8.0
|
||||
3.4.3 llvm-3.9.1
|
||||
3.4.3 llvm-4.0.0 - llvm-6.0.0
|
||||
3.6 ADIOS2
|
||||
@ -496,8 +502,8 @@ easier to use `grep` and find the relevant pages and links.
|
||||
[page mpc]: http://www.multiprecision.org/
|
||||
|
||||
[link gcc]: http://gcc.gnu.org/releases.html
|
||||
[link gmp]: ftp://ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.xz
|
||||
[link mpfr]: ftp://ftp.gnu.org/gnu/mpfr/mpfr-4.0.1.tar.xz
|
||||
[link gmp]: ftp://ftp.gnu.org/gnu/gmp/gmp-6.2.0.tar.xz
|
||||
[link mpfr]: ftp://ftp.gnu.org/gnu/mpfr/mpfr-4.0.2.tar.xz
|
||||
[link mpc]: ftp://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz
|
||||
|
||||
|
||||
@ -516,16 +522,17 @@ easier to use `grep` and find the relevant pages and links.
|
||||
|
||||
|
||||
<!-- parallel -->
|
||||
[page adios]: https://csmd.ornl.gov/adios2
|
||||
[page adios]: https://csmd.ornl.gov/software/adios2
|
||||
[repo adios]: https://github.com/ornladios/ADIOS2
|
||||
[link adios]: https://github.com/ornladios/ADIOS2/archive/v2.4.0.tar.gz
|
||||
|
||||
[page zfp]: http://computation.llnl.gov/projects/floating-point-compression/zfp-versions
|
||||
|
||||
[page scotch]: https://www.labri.fr/perso/pelegrin/scotch/
|
||||
[oldest scotch]: https://gforge.inria.fr/frs/download.php/file/37622/scotch_6.0.6.tar.gz
|
||||
[older scotch]: https://gforge.inria.fr/frs/download.php/file/38114/scotch_6.0.8.tar.gz
|
||||
[repo scotch]: https://gitlab.inria.fr/scotch/scotch
|
||||
[link scotch]: https://gforge.inria.fr/frs/download.php/file/38187/scotch_6.0.9.tar.gz
|
||||
[older scotch]: https://gforge.inria.fr/frs/download.php/file/38114/scotch_6.0.8.tar.gz
|
||||
[oldest scotch]: https://gforge.inria.fr/frs/download.php/file/37622/scotch_6.0.6.tar.gz
|
||||
|
||||
[page kahip]: http://algo2.iti.kit.edu/documents/kahip/
|
||||
[older kahip]: http://algo2.iti.kit.edu/schulz/software_releases/KaHIP_2.00.tar.gz
|
||||
@ -535,29 +542,35 @@ easier to use `grep` and find the relevant pages and links.
|
||||
[link metis]: http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz
|
||||
|
||||
[page openmpi]: http://www.open-mpi.org/
|
||||
[link openmpi]: https://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.7.tar.bz2
|
||||
[newer openmpi]: https://www.open-mpi.org/software/ompi/v2.1/downloads/openmpi-2.1.1.tar.bz2
|
||||
[older openmpi]: https://download.open-mpi.org/release/open-mpi/v1.10/openmpi-1.10.7.tar.bz2
|
||||
[link openmpi]: https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-4.0.3.tar.bz2
|
||||
|
||||
[page mpich]: http://www.mpich.org/
|
||||
[link mpich]: http://www.mpich.org/static/downloads/3.3/mpich-3.3.tar.gz
|
||||
|
||||
[page mvpapich]: http://mvapich.cse.ohio-state.edu/
|
||||
[link mvpapich]: http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.3.tar.gz
|
||||
|
||||
[page mvpapich]: http://mvapich.cse.ohio-state.edu/
|
||||
[link mvpapich]: http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.3.tar.gz
|
||||
|
||||
<!-- general -->
|
||||
[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
|
||||
[link boost]: https://sourceforge.net/projects/boost/files/boost/1.64.0/boost_1_64_0.tar.bz2
|
||||
[link boost]: https://sourceforge.net/projects/boost/files/boost/1.66.0/boost_1_66_0.tar.bz2
|
||||
|
||||
[page CGAL]: http://cgal.org
|
||||
[link CGAL]: https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.9.1/CGAL-4.9.1.tar.xz
|
||||
[link CGAL]: https://github.com/CGAL/cgal/releases/download/releases/CGAL-4.12.2/CGAL-4.12.2.tar.xz
|
||||
|
||||
[page FFTW]: http://www.fftw.org/
|
||||
[link FFTW]: http://www.fftw.org/fftw-3.3.7.tar.gz
|
||||
|
||||
[page petsc]: https://www.mcs.anl.gov/petsc/
|
||||
[link petsc]: http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.13.2.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.19.0.tar.gz
|
||||
|
||||
[page cgns]: http://cgns.github.io/
|
||||
[link ccmio]: http://portal.nersc.gov/project/visit/third_party/libccmio-2.6.1.tar.gz (check usage conditions)
|
||||
[altlink ccmio]: http://portal.nersc.gov/svn/visit/trunk/third_party/libccmio-2.6.1.tar.gz (check usage conditions)
|
||||
@ -590,4 +603,4 @@ easier to use `grep` and find the relevant pages and links.
|
||||
|
||||
---
|
||||
|
||||
Copyright 2016-2019 OpenCFD Ltd
|
||||
Copyright 2016-2020 OpenCFD Ltd
|
||||
|
||||
@ -2,39 +2,60 @@
|
||||
|
||||
For building some particular third-party libraries from source,
|
||||
the normal [OpenFOAM System Requirements][link openfoam-require]
|
||||
will be insufficient.
|
||||
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] and information,
|
||||
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]
|
||||
may be sufficient for your needs.
|
||||
is likely adequate for your needs.
|
||||
|
||||
|
||||
**Please help us with keeping the information here up-to-date and accurate.**
|
||||
***Please help us with keeping the information here up-to-date and accurate.***
|
||||
|
||||
### Ubuntu
|
||||
|
||||
Dependencies:
|
||||
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-get install qt4-dev-tools libqt4-dev libqt4-opengl-dev freeglut3-dev libqtwebkit-dev libxt-dev
|
||||
sudo apt install paraview-dev
|
||||
```
|
||||
Depending on your setup, the following subset may also be enough:
|
||||
```
|
||||
sudo apt install cmake qt5base-dev qttools5-dev qttools5-dev-tools libqt5opengl5-dev libqt5x11extras5-dev libxt-dev
|
||||
```
|
||||
|
||||
|
||||
### openSUSE
|
||||
|
||||
Dependencies:
|
||||
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 glu-devel
|
||||
sudo zypper install libQtWebKit-devel libqt4-devel qt4-assistant-adp-devel qt4-x11-tools
|
||||
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
|
||||
sudo zypper install libXt-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
|
||||
|
||||
|
||||
<!-- OpenFOAM -->
|
||||
@ -48,4 +69,4 @@ sudo zypper install libQtWebKit-devel libqt4-devel qt4-assistant-adp-devel qt4-x
|
||||
[link third-require]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/Requirements.md
|
||||
|
||||
---
|
||||
Copyright 2019 OpenCFD Ltd
|
||||
Copyright 2019-2020 OpenCFD Ltd
|
||||
|
||||
15
SOURCES.txt
15
SOURCES.txt
@ -1,4 +1,17 @@
|
||||
Short summary of third-party software versions for recent OpenFOAM versions.
|
||||
Third-party software versions for recent OpenFOAM versions
|
||||
|
||||
OpenFOAM-2006
|
||||
---------------
|
||||
|
||||
ADIOS-2.4.0
|
||||
CGAL-4.12.2 *update*
|
||||
ParaView-5.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
|
||||
---------------
|
||||
|
||||
@ -8,6 +8,7 @@ EXE_INC = \
|
||||
${c++LESSWARN} \
|
||||
${COMP_OPENMP} \
|
||||
-DNDEBUG -DMODE_NODESEP \
|
||||
-I. \
|
||||
-I$(KAHIP_LIB_SRC) \
|
||||
-I$(KAHIP_LIB_SRC)/partition \
|
||||
-I$(KAHIP_LIB_SRC)/partition/uncoarsening/refinement/quotient_graph_refinement/flow_refinement
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
/* NOTE: make any changes to this file in etc/makeFiles/ */
|
||||
|
||||
EXE_INC =
|
||||
|
||||
EXE_INC = -I.
|
||||
LIB_LIBS =
|
||||
|
||||
PROJECT_LIBS =
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
# - wmake -show-cflags : with -m32 / -m64
|
||||
# - wmake -show-cflags-arch : with -m32 / -m64
|
||||
#
|
||||
# Pass these in via the enviroment since using '$(shell ...)' here does not
|
||||
# Pass these in via the environment since using '$(shell ...)' here does not
|
||||
# always work well.
|
||||
#
|
||||
# Notes:
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
# - wmake -show-cflags : with -m32 / -m64
|
||||
# - wmake -show-cflags-arch : with -m32 / -m64
|
||||
#
|
||||
# Pass these in via the enviroment since using '$(shell ...)' here does not
|
||||
# Pass these in via the environment since using '$(shell ...)' here does not
|
||||
# always work well.
|
||||
#
|
||||
# Notes:
|
||||
@ -28,12 +28,17 @@ OBJ = .o
|
||||
|
||||
CFLAGS_CROSS = -DCOMMON_WINDOWS -DCOMMON_STUB_FORK
|
||||
|
||||
# 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
|
||||
CCP = x86_64-w64-mingw32-gcc
|
||||
CCD = gcc
|
||||
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 \
|
||||
-UCOMMON_FILE_COMPRESS \
|
||||
@ -48,6 +53,10 @@ ifeq ($(WM_LABEL_SIZE),64)
|
||||
CFLAGS += -DINTSIZE64
|
||||
endif
|
||||
|
||||
# Non-standard "__stdcall" in MSMPI <mpi.h>
|
||||
CCDFLAGS = $(CFLAGS) -D__stdcall=''
|
||||
|
||||
|
||||
CLIBFLAGS = -shared
|
||||
LDFLAGS =
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
# - wmake -show-cflags : with -m32 / -m64
|
||||
# - wmake -show-cflags-arch : with -m32 / -m64
|
||||
#
|
||||
# Pass these in via the enviroment since using '$(shell ...)' here does not
|
||||
# Pass these in via the environment since using '$(shell ...)' here does not
|
||||
# always work well.
|
||||
#
|
||||
# Notes:
|
||||
|
||||
@ -6,11 +6,10 @@
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# etc/pkgconfigAdjust
|
||||
@ -36,7 +35,6 @@
|
||||
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||
#------------------------------------------------------------------------------
|
||||
# Run from third-party directory only
|
||||
cd "${0%/*}" || exit
|
||||
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"
|
||||
@ -67,7 +65,7 @@ while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
'') ;; # Ignore empty
|
||||
-h | -help) usage ;;
|
||||
-h | -help*) usage ;;
|
||||
|
||||
*)
|
||||
pkgconfigAdjust "$1"
|
||||
|
||||
@ -6,11 +6,10 @@
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# etc/pkgconfigPrefix
|
||||
@ -28,13 +27,12 @@
|
||||
#
|
||||
# This allows this type of shell command
|
||||
#
|
||||
# etc/pkgconfigPrefix $(find platforms -type d -name pkgconfig)
|
||||
# etc/pkgconfigPrefix $(find platforms -name pkgconfig -type d)
|
||||
#
|
||||
# ----------------------------------------------
|
||||
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||
#------------------------------------------------------------------------------
|
||||
# Run from third-party directory only
|
||||
cd "${0%/*}" || exit
|
||||
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"
|
||||
@ -64,7 +62,7 @@ while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
'') ;; # Ignore empty
|
||||
-h | -help) usage ;;
|
||||
-h | -help*) usage ;;
|
||||
|
||||
*)
|
||||
pkgconfigNewPrefix "$1"
|
||||
|
||||
@ -7,11 +7,10 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2011 OpenFOAM Foundation
|
||||
# Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# etc/relocateQt
|
||||
@ -23,7 +22,6 @@
|
||||
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||
#------------------------------------------------------------------------------
|
||||
# Run from third-party directory only
|
||||
cd "${0%/*}" || exit
|
||||
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"
|
||||
@ -58,12 +56,12 @@ while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
'') ;; # Ignore empty
|
||||
-h | -help) usage ;;
|
||||
-h | -help*) usage ;;
|
||||
|
||||
-f | -force)
|
||||
optForce=true
|
||||
;;
|
||||
-qt-[1-9]* | [1-9]* | qt-*)
|
||||
-qt-[0-9]* | [0-9]* | qt-*)
|
||||
# -qt-VERSION, VERSION, qt-VERSION, qt-everywhere-opensource-src-VERSION
|
||||
qtVERSION="${1%%/}";
|
||||
qtVERSION="${qtVERSION##*-}"
|
||||
@ -86,6 +84,6 @@ then
|
||||
# Create qt.conf and adjust locations to use '${prefix}' internally
|
||||
finalizeQt
|
||||
fi
|
||||
pkgconfigNewPrefix $QT_ARCH_PATH
|
||||
pkgconfigNewPrefix "$QT_ARCH_PATH"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
@ -3,12 +3,13 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2019 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# testThirdPartyFunctions
|
||||
|
||||
@ -6,11 +6,10 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# File
|
||||
# etc/tools/ParaViewFunctions
|
||||
@ -268,7 +267,7 @@ addMesaSupport()
|
||||
return
|
||||
fi
|
||||
|
||||
if [ -d "$MESA_INCLUDE" -a -f "$MESA_LIBRARY" ]
|
||||
if [ -d "$MESA_INCLUDE" ] && [ -f "$MESA_LIBRARY" ]
|
||||
then
|
||||
addCMakeVariable "VTK_OPENGL_HAS_OSMESA=ON"
|
||||
addCMakeVariable "OSMESA_INCLUDE_DIR=$MESA_INCLUDE"
|
||||
@ -480,7 +479,7 @@ INFO
|
||||
# Non-system installation of QT?
|
||||
case "$qtLib" in (/usr/lib | /usr/lib64) unset qtLib ;; esac
|
||||
|
||||
if [ "${qmake%/*}" != /usr/bin -a -d "$qtLib" ]
|
||||
if [ "${qmake%/*}" != /usr/bin ] && [ -d "$qtLib" ]
|
||||
then
|
||||
/bin/cat<<INFO
|
||||
|
||||
|
||||
@ -2,14 +2,14 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# | Copyright (C) 2011 OpenFOAM Foundation
|
||||
# Copyright (C) 2011 OpenFOAM Foundation
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# File
|
||||
# etc/tools/QtFunction
|
||||
@ -35,7 +35,7 @@ createQtConf()
|
||||
{
|
||||
local confFile="$QT_ARCH_PATH/bin/qt.conf"
|
||||
|
||||
if [ -n "$QT_ARCH_PATH" -a -d "$QT_ARCH_PATH/bin" ]
|
||||
if [ -n "$QT_ARCH_PATH" ] && [ -d "$QT_ARCH_PATH/bin" ]
|
||||
then
|
||||
/bin/cat << QT_CONF > $confFile
|
||||
[Paths]
|
||||
|
||||
@ -6,11 +6,10 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# File
|
||||
# etc/tools/ThirdPartyFunctions
|
||||
@ -24,6 +23,10 @@
|
||||
# Compiler and flags are managed via the 'wmake -show-c, -show-cflags, ..'
|
||||
# but also with WM_CC, WM_CFLAGS,... env variables
|
||||
#
|
||||
# Files
|
||||
# Uses OpenFOAM/etc/config.sh/cmake (if it exists) for the
|
||||
# CMAKE_ARCH_PATH that may specify a possible cmake/bin directory.
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# The normal locations for source, build and installation (prefix-dir)
|
||||
@ -31,6 +34,9 @@ sourceBASE="$WM_THIRD_PARTY_DIR"
|
||||
buildBASE="$WM_THIRD_PARTY_DIR/build/$WM_ARCH$WM_COMPILER"
|
||||
installBASE="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER"
|
||||
|
||||
# Commonly used names
|
||||
unset sourceDIR buildDIR prefixDIR binDIR incDIR libDIR
|
||||
|
||||
# Synthetic value combining precision and label size (Eg, DPInt32)
|
||||
WM_SIZE_OPTIONS="${WM_PRECISION_OPTION}Int${WM_LABEL_SIZE}"
|
||||
|
||||
@ -38,7 +44,15 @@ WM_SIZE_OPTIONS="${WM_PRECISION_OPTION}Int${WM_LABEL_SIZE}"
|
||||
EXT_SO="$(wmake -show-ext-so 2>/dev/null)"
|
||||
if [ -z "$EXT_SO" ]
|
||||
then
|
||||
[ "$(uname -s)" = Darwin ] && EXT_SO=.dylib || EXT_SO=.so
|
||||
EXT_SO=.so
|
||||
case "$WM_OSTYPE" in
|
||||
*windows)
|
||||
EXT_SO=.dll
|
||||
;;
|
||||
*)
|
||||
[ Darwin = "$(uname -s 2>/dev/null)" ] && EXT_SO=.dylib
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
||||
@ -55,14 +69,40 @@ then
|
||||
fi
|
||||
|
||||
unset BUILD_SUFFIX
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Check for existence of shared library (without .so extension)
|
||||
#
|
||||
# $1 = The path and library stem
|
||||
#
|
||||
haveLibso()
|
||||
{
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
return 1
|
||||
elif [ -r "$1$EXT_SO" ]
|
||||
then
|
||||
return 0
|
||||
elif [ "$EXT_SO" = .dll ] && [ -r "$1.dll.a" ]
|
||||
then
|
||||
# Including cross-compiling
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 2
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Service routine to strip out OpenFOAM-specific portions from the compiler
|
||||
# flags (ie, everything after "-DOPENFOAM=...") while retaining '-fPIC'
|
||||
# flags (ie, everything after and including "-DOPENFOAM=...")
|
||||
# while retaining '-fPIC'
|
||||
#
|
||||
# $1 = all flags concatenated as a single string
|
||||
#
|
||||
stripCompilerFlags()
|
||||
{
|
||||
local input="$@"
|
||||
local flags="${input%-DOPENFOAM=*}" # Strip out OpenFOAM-specific
|
||||
local flags="${1%-DOPENFOAM=*}" # Strip out OpenFOAM-specific
|
||||
flags="${flags## }" # Trim leading space
|
||||
flags="${flags%% }" # Trim trailing space
|
||||
|
||||
@ -73,9 +113,9 @@ stripCompilerFlags()
|
||||
;;
|
||||
|
||||
(*)
|
||||
case "$input" in
|
||||
case "$1" in
|
||||
(*-fPIC*)
|
||||
# Add -fPIC back in (was after the -DOPENFOAM=... content)
|
||||
# Add -fPIC back in (was after -DOPENFOAM=... content)
|
||||
flags="$flags${flags+ }-fPIC"
|
||||
;;
|
||||
esac
|
||||
@ -104,11 +144,12 @@ exportCompiler()
|
||||
local comp flag
|
||||
|
||||
# C compiler and flags
|
||||
comp="$(wmake -show-c 2>/dev/null)" && \
|
||||
flag="$(wmake -show-cflags 2>/dev/null)" || {
|
||||
if ! comp="$(wmake -show-c 2>/dev/null)" \
|
||||
|| ! flag="$(wmake -show-cflags 2>/dev/null)"
|
||||
then
|
||||
comp="$WM_CC"
|
||||
flag="$WM_CFLAGS"
|
||||
}
|
||||
fi
|
||||
|
||||
if test -n "$comp" && command -v "$comp" >/dev/null
|
||||
then
|
||||
@ -117,7 +158,7 @@ exportCompiler()
|
||||
then
|
||||
case "$option" in
|
||||
(basic | minimal | strip)
|
||||
flag="$(stripCompilerFlags $flag)"
|
||||
flag="$(stripCompilerFlags "$flag")"
|
||||
;;
|
||||
esac
|
||||
export CFLAGS="$flag"
|
||||
@ -125,11 +166,12 @@ exportCompiler()
|
||||
fi
|
||||
|
||||
# C++ compiler and flags
|
||||
comp="$(wmake -show-cxx 2>/dev/null)" && \
|
||||
flag="$(wmake -show-cxxflags 2>/dev/null)" || {
|
||||
if ! comp="$(wmake -show-cxx 2>/dev/null)" \
|
||||
|| ! flag="$(wmake -show-cxxflags 2>/dev/null)"
|
||||
then
|
||||
comp="$WM_CXX"
|
||||
flag="$WM_CXXFLAGS"
|
||||
}
|
||||
fi
|
||||
|
||||
if test -n "$comp" && command -v "$comp" >/dev/null
|
||||
then
|
||||
@ -138,7 +180,7 @@ exportCompiler()
|
||||
then
|
||||
case "$option" in
|
||||
(basic | minimal | strip)
|
||||
flag="$(stripCompilerFlags $flag)"
|
||||
flag="$(stripCompilerFlags "$flag")"
|
||||
;;
|
||||
esac
|
||||
export CXXFLAGS="$flag"
|
||||
@ -252,24 +294,31 @@ whichMpicxx()
|
||||
}
|
||||
|
||||
# Require wmkdepend etc when building with wmake
|
||||
# before 2020-04-03: wmake/platforms/linux64Gcc
|
||||
# after 2020-04-03: platforms/tools/linux64Gcc
|
||||
requireWMakeToolchain()
|
||||
{
|
||||
local archName="$WM_ARCH$WM_COMPILER"
|
||||
local wmDir="${WM_DIR:-$WM_PROJECT_DIR/wmake}"
|
||||
local archDir="$wmDir/platforms/$WM_ARCH$WM_COMPILER"
|
||||
local archDir1="$wmDir/platforms/$archName"
|
||||
local archDir2="$WM_PROJECT_DIR/platforms/tools/$archName"
|
||||
|
||||
if [ -x "$archDir/wmkdepend" ] || [ -x "$archDir/wmkdep" ]
|
||||
if [ -x "$archDir1/wmkdepend" ] || [ -x "$archDir1/wmkdep" ] || \
|
||||
[ -x "$archDir2/wmkdepend" ] || [ -x "$archDir2/wmkdep" ]
|
||||
then
|
||||
echo "Appear to have {wmkdepend,wmkdep} binary" 1>&2
|
||||
else
|
||||
echo "Warning: appear to be missing {wmkdepend,wmkdep} binary ... building" 1>&2
|
||||
( cd "$wmDir/src" && make -s )
|
||||
|
||||
[ -x "$archDir/wmkdepend" ] || [ -x "$archDir/wmkdep" ] || {
|
||||
[ -x "$archDir1/wmkdepend" ] || [ -x "$archDir1/wmkdep" ] || \
|
||||
[ -x "$archDir2/wmkdepend" ] || [ -x "$archDir2/wmkdep" ] || {
|
||||
exec 1>&2
|
||||
echo
|
||||
echo "Error: cannot use wmake build for '${0##*/}"
|
||||
echo " Missing {wmkdepend,wmkdep} binary"
|
||||
echo " Please try run the top-level OpenFOAM Allwmake first"
|
||||
echo " Please run the top-level OpenFOAM Allwmake first"
|
||||
echo " or top-level wmake/src/Allmake"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
@ -277,6 +326,20 @@ requireWMakeToolchain()
|
||||
}
|
||||
|
||||
|
||||
# Require FOAM_EXT_LIBBIN for some compilations
|
||||
requireExtLibBin()
|
||||
{
|
||||
[ -n "$FOAM_EXT_LIBBIN" ] || {
|
||||
exec 1>&2
|
||||
echo
|
||||
echo "Error: \$FOAM_EXT_LIBBIN not set for '${0##*/}"
|
||||
echo " Check your OpenFOAM environment and installation"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# grep for package http or ftp entries in BUILD.md
|
||||
# Should be of the form "[link xx]: http://..."
|
||||
showDownloadHint()
|
||||
@ -290,7 +353,8 @@ showDownloadHint()
|
||||
if [ -f "$WM_THIRD_PARTY_DIR/BUILD.md" ]
|
||||
then
|
||||
grep -i "$package" "$WM_THIRD_PARTY_DIR/BUILD.md" | \
|
||||
grep -E '(http|ftp)' | sed -ne 's/^ *\[.*\]: */ /p'
|
||||
grep -E '(http|ftp)' | sed -ne 's/^ *\[.*\]: */ /p' | \
|
||||
uniq
|
||||
fi
|
||||
fi
|
||||
}
|
||||
@ -411,6 +475,7 @@ _foamIsSystem()
|
||||
unset CMAKE_PATH # clear when first loaded
|
||||
findCMake()
|
||||
{
|
||||
local config="config.sh/cmake"
|
||||
local candidate foundExe
|
||||
|
||||
if [ -n "$CMAKE_PATH" ]
|
||||
@ -419,13 +484,13 @@ findCMake()
|
||||
if [ -d "$CMAKE_PATH" ]
|
||||
then
|
||||
for candidate in \
|
||||
$CMAKE_PATH/cmake \
|
||||
$CMAKE_PATH/bin/cmake \
|
||||
"$CMAKE_PATH"/cmake \
|
||||
"$CMAKE_PATH"/bin/cmake \
|
||||
;
|
||||
do
|
||||
if [ -f "$candidate" -a -x "$candidate" ]
|
||||
if [ -f "$candidate" ] && [ -x "$candidate" ]
|
||||
then
|
||||
foundExe=$candidate
|
||||
foundExe="$candidate"
|
||||
break
|
||||
fi
|
||||
done
|
||||
@ -435,14 +500,14 @@ findCMake()
|
||||
if [ -z "$foundExe" ]
|
||||
then
|
||||
for candidate in \
|
||||
$CMAKE_PATH \
|
||||
$installBASE/$CMAKE_PATH/bin/cmake \
|
||||
$installBASE/cmake-$CMAKE_PATH/bin/cmake \
|
||||
"$CMAKE_PATH" \
|
||||
"$installBASE/$CMAKE_PATH"/bin/cmake \
|
||||
"$installBASE/cmake-$CMAKE_PATH"/bin/cmake \
|
||||
;
|
||||
do
|
||||
if [ -f "$candidate" -a -x "$candidate" ]
|
||||
if [ -f "$candidate" ] && [ -x "$candidate" ]
|
||||
then
|
||||
foundExe=$candidate
|
||||
foundExe="$candidate"
|
||||
break
|
||||
fi
|
||||
done
|
||||
@ -456,26 +521,45 @@ findCMake()
|
||||
foundExe="$(cd ${foundExe%/cmake} 2>/dev/null && pwd)/cmake"
|
||||
fi
|
||||
echo "Using cmake=$foundExe" 1>&2
|
||||
echo $foundExe
|
||||
echo "$foundExe"
|
||||
return 0
|
||||
else
|
||||
cat << NOT_FOUND 1>&2
|
||||
'cmake' not found under specified CMAKE_PATH
|
||||
CMAKE_PATH=$CMAKE_PATH
|
||||
reverting to using command from path
|
||||
reverting to using command from $config or from PATH
|
||||
NOT_FOUND
|
||||
fi
|
||||
fi
|
||||
|
||||
unset cmake_version CMAKE_ARCH_PATH
|
||||
if candidate="$("$WM_PROJECT_DIR"/bin/foamEtcFile "$config" 2>/dev/null)"
|
||||
then
|
||||
. "$candidate"
|
||||
|
||||
for candidate in \
|
||||
"$CMAKE_ARCH_PATH"/bin/cmake \
|
||||
"$installBASE/$cmake_version"/bin/cmake \
|
||||
;
|
||||
do
|
||||
if [ -f "$candidate" ] && [ -x "$candidate" ]
|
||||
then
|
||||
echo "Using cmake=$candidate" 1>&2
|
||||
echo "$candidate"
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Default to use the path, try resolving (so we know what we are using).
|
||||
for candidate in cmake
|
||||
do
|
||||
foundExe=$(command -v $candidate 2>/dev/null) && break
|
||||
foundExe="$(command -v "$candidate" 2>/dev/null)" && break
|
||||
done
|
||||
: ${foundExe:=false}
|
||||
: "${foundExe:=false}"
|
||||
|
||||
echo "Using cmake=$foundExe" 1>&2
|
||||
echo $foundExe
|
||||
echo "$foundExe"
|
||||
}
|
||||
|
||||
|
||||
@ -496,13 +580,13 @@ findQMake()
|
||||
if [ -d "$QMAKE_PATH" ]
|
||||
then
|
||||
for candidate in \
|
||||
$QMAKE_PATH/qmake \
|
||||
$QMAKE_PATH/bin/qmake \
|
||||
"$QMAKE_PATH"/qmake \
|
||||
"$QMAKE_PATH"/bin/qmake \
|
||||
;
|
||||
do
|
||||
if [ -f "$candidate" -a -x "$candidate" ]
|
||||
if [ -f "$candidate" ] && [ -x "$candidate" ]
|
||||
then
|
||||
foundExe=$candidate
|
||||
foundExe="$candidate"
|
||||
break
|
||||
fi
|
||||
done
|
||||
@ -512,14 +596,14 @@ findQMake()
|
||||
if [ -z "$foundExe" ]
|
||||
then
|
||||
for candidate in \
|
||||
$QMAKE_PATH \
|
||||
$installBASE/$QMAKE_PATH/bin/qmake \
|
||||
$installBASE/qt-$QMAKE_PATH/bin/qmake \
|
||||
"$QMAKE_PATH" \
|
||||
"$installBASE/$QMAKE_PATH"/bin/qmake \
|
||||
"$installBASE/qt-$QMAKE_PATH"/bin/qmake \
|
||||
;
|
||||
do
|
||||
if [ -f "$candidate" -a -x "$candidate" ]
|
||||
if [ -f "$candidate" ] && [ -x "$candidate" ]
|
||||
then
|
||||
foundExe=$candidate
|
||||
foundExe="$candidate"
|
||||
break
|
||||
fi
|
||||
done
|
||||
@ -533,13 +617,13 @@ findQMake()
|
||||
foundExe="$(cd ${foundExe%/qmake} 2>/dev/null && pwd)/qmake"
|
||||
fi
|
||||
echo "Using qmake=$foundExe" 1>&2
|
||||
echo $foundExe
|
||||
echo "$foundExe"
|
||||
return 0
|
||||
else
|
||||
cat << NOT_FOUND 1>&2
|
||||
'qmake' not found under specified QMAKE_PATH
|
||||
QMAKE_PATH=$QMAKE_PATH
|
||||
reverting to using command from path
|
||||
reverting to using command from PATH
|
||||
NOT_FOUND
|
||||
fi
|
||||
fi
|
||||
@ -548,9 +632,9 @@ NOT_FOUND
|
||||
# Some systems have qmake-qt5 as well as qmake
|
||||
for candidate in qmake-qt5 qmake
|
||||
do
|
||||
foundExe=$(command -v $candidate 2>/dev/null) && break
|
||||
foundExe="$(command -v "$candidate" 2>/dev/null)" && break
|
||||
done
|
||||
: ${foundExe:=false}
|
||||
: "${foundExe:=false}"
|
||||
|
||||
echo "Using qmake=$foundExe" 1>&2
|
||||
echo $foundExe
|
||||
@ -564,7 +648,7 @@ pkgconfigNewPrefix()
|
||||
{
|
||||
local dir="${1%%/}"
|
||||
|
||||
if [ -n "$dir" -a -d "$dir" ]
|
||||
if [ -n "$dir" ] && [ -d "$dir" ]
|
||||
then
|
||||
# Require absolute path, but use logical (not physical) location
|
||||
[ "${dir}" != "${dir#/}" ] || dir=$(cd $dir 2>/dev/null && /bin/pwd -L)
|
||||
@ -590,7 +674,7 @@ pkgconfigNewPrefix()
|
||||
[ -d "$dir/$libdir" ] || continue
|
||||
for i in $dir/$libdir/*.pc
|
||||
do
|
||||
if [ -f "$i" -a ! -L "$i" ]
|
||||
if [ -f "$i" ] && [ ! -L "$i" ]
|
||||
then
|
||||
nfiles="x$nfiles"
|
||||
sed -i~ -e 's@^\(prefix=\).*$@\1'"$dir@" $i
|
||||
@ -612,7 +696,7 @@ pkgconfigAdjust()
|
||||
{
|
||||
local dir="${1%%/}"
|
||||
|
||||
if [ -n "$dir" -a -d "$dir" ]
|
||||
if [ -n "$dir" ] && [ -d "$dir" ]
|
||||
then
|
||||
# Require absolute path, but use logical (not physical) location
|
||||
[ "${dir}" != "${dir#/}" ] || dir=$(cd $dir 2>/dev/null && /bin/pwd -L)
|
||||
@ -638,7 +722,7 @@ pkgconfigAdjust()
|
||||
[ -d "$dir/$libdir" ] || continue
|
||||
for i in $dir/$libdir/*.pc
|
||||
do
|
||||
if [ -f "$i" -a ! -L "$i" ]
|
||||
if [ -f "$i" ] && [ ! -L "$i" ]
|
||||
then
|
||||
nfiles="x$nfiles"
|
||||
sed -i~ \
|
||||
|
||||
@ -5,11 +5,10 @@
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2016-2018 OpenCFD Ltd.
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# File
|
||||
# etc/tools/vtkFunctions
|
||||
|
||||
365
makeAdios1
365
makeAdios1
@ -1,365 +0,0 @@
|
||||
#!/bin/sh
|
||||
#------------------------------------------------------------------------------
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Script
|
||||
# makeAdios1
|
||||
#
|
||||
# Description
|
||||
# Build script for ADIOS1
|
||||
#
|
||||
# ----------------------------------------------
|
||||
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||
#------------------------------------------------------------------------------
|
||||
# Run from third-party directory 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
|
||||
}
|
||||
. etc/tools/ThirdPartyFunctions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# ADIOS version from OpenFOAM etc/config.sh file:
|
||||
_foamConfig adios1
|
||||
|
||||
adiosPACKAGE=${adios1_version:-adios-none}
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
usage() {
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
|
||||
usage: ${0##*/} [OPTION] [adios-VERSION] [-- configure-options]
|
||||
options:
|
||||
-gcc Force use of gcc/g++
|
||||
-cmake PATH With cmake from the given path
|
||||
-help
|
||||
|
||||
* Build ADIOS
|
||||
$adiosPACKAGE
|
||||
|
||||
USAGE
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
exportCompiler minimal # Minimal compiler info for CMake/configure
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
'') ;; # Ignore empty
|
||||
--) break;; # Extra configure options (leave on $@ for later detection)
|
||||
-h | -help) usage ;;
|
||||
-gcc) useGcc ;;
|
||||
|
||||
-cmake)
|
||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||
CMAKE_PATH="${2%%/}"
|
||||
shift
|
||||
;;
|
||||
ADIOS1-[1-9]* | ADIOS1-git* | ADIOS-[1-9]* | ADIOS-git*)
|
||||
adiosPACKAGE="${1%%/}"
|
||||
;;
|
||||
adios1-[1-9]* | adios1-git* | adios-[1-9]* | 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
|
||||
# ADIOS1_SOURCE_DIR : location of the original sources
|
||||
# ADIOS1_ARCH_PATH : installation directory
|
||||
|
||||
ADIOS1_SOURCE_DIR=$sourceBASE/$adiosPACKAGE
|
||||
ADIOS1_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 "$ADIOS1_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" || exit
|
||||
|
||||
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 $ADIOS1_ARCH_PATH/bin/adios_lint
|
||||
|
||||
# Replace resolved paths with variables
|
||||
echo "Adjust prefix for ADIOS"
|
||||
for i in \
|
||||
$ADIOS1_ARCH_PATH/bin/adios_config \
|
||||
$ADIOS1_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 \
|
||||
$ADIOS1_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 $ADIOS1_ARCH_PATH/bin/adios_config ] || {
|
||||
echo "Warning: no adios_config"
|
||||
return 1
|
||||
}
|
||||
|
||||
echo "==============="
|
||||
|
||||
# May have problems listing parallel methods (eg, transport key missing)
|
||||
if $ADIOS1_ARCH_PATH/bin/adios_config -m >/dev/null 2>&1
|
||||
then
|
||||
$ADIOS1_ARCH_PATH/bin/adios_config -m 2>/dev/null
|
||||
else
|
||||
echo "Warning: could not list parallel methods"
|
||||
# Fallback to serial methods
|
||||
$ADIOS1_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 $ADIOS1_ARCH_PATH/include/adios.h \
|
||||
-a -r $ADIOS1_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libadios_${FOAM_MPI}.a ]
|
||||
then
|
||||
echo " ADIOS header in $ADIOS1_ARCH_PATH/include"
|
||||
### echo " ADIOS libs in $FOAM_EXT_LIBBIN" # dynamic
|
||||
echo " ADIOS libs in $ADIOS1_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"
|
||||
|
||||
# Additional configure options
|
||||
if [ "$1" = "--" ]
|
||||
then
|
||||
shift
|
||||
configOpt="$configOpt $@"
|
||||
fi
|
||||
|
||||
# End of configuration options
|
||||
# ----------------------------
|
||||
buildDIR=$buildBASE/$adiosPACKAGE
|
||||
|
||||
cd "$ADIOS1_SOURCE_DIR" || exit
|
||||
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
|
||||
|
||||
[ -e Makefile ] && make distclean 2>/dev/null
|
||||
|
||||
applyPatch $adiosPACKAGE $ADIOS1_SOURCE_DIR
|
||||
|
||||
# Remove any existing build folder and recreate
|
||||
rm -rf $ADIOS1_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 && $ADIOS1_SOURCE_DIR/configure \
|
||||
--prefix=$ADIOS1_ARCH_PATH \
|
||||
--libdir=$ADIOS1_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 "$ADIOS1_SOURCE_DIR" || exit
|
||||
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
|
||||
|
||||
applyPatch $adiosPACKAGE $ADIOS1_SOURCE_DIR
|
||||
|
||||
# Remove any existing build folder and recreate
|
||||
rm -rf $ADIOS1_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=$ADIOS1_ARCH_PATH \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_FORTRAN=FALSE \
|
||||
${WM_QUIET:+-DCMAKE_RULE_MESSAGES=OFF} \
|
||||
$ADIOS1_SOURCE_DIR \
|
||||
&& make -j $WM_NCOMPPROCS all \
|
||||
&& make install \
|
||||
&& echo "Built: $adiosPACKAGE" \
|
||||
&& adjustADIOS \
|
||||
&& listMethods
|
||||
) || {
|
||||
echo "Error building: $adiosPACKAGE"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
27
makeAdios2
27
makeAdios2
@ -5,11 +5,10 @@
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2018-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# makeAdios2
|
||||
@ -27,8 +26,9 @@
|
||||
if [ "$1" = "-test" ]
|
||||
then
|
||||
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
|
||||
dir="${2%/}" # <- FFTW_ARCH_PATH
|
||||
if [ -d "$dir/include" -a -r "$dir/lib$WM_COMPILER_LIB_ARCH/libadios2$EXT_SO" ]
|
||||
dir="${2%/}" # <- *_ARCH_PATH
|
||||
if [ -d "$dir/include" ] \
|
||||
&& [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libadios2$EXT_SO" ]
|
||||
then
|
||||
echo " adios2 include: $dir/include"
|
||||
echo " adios2 library: $dir/lib$WM_COMPILER_LIB_ARCH"
|
||||
@ -60,6 +60,7 @@ 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
|
||||
-help
|
||||
@ -68,11 +69,14 @@ options:
|
||||
$adiosPACKAGE
|
||||
|
||||
USAGE
|
||||
showDownloadHint ADIOS2
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
exportCompiler minimal # Minimal compiler info for CMake/configure
|
||||
|
||||
unset optForce
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
@ -80,16 +84,15 @@ do
|
||||
'') ;; # Ignore empty
|
||||
-h | -help) usage ;;
|
||||
-gcc) useGcc ;;
|
||||
-force) optForce=true ;;
|
||||
|
||||
-cmake)
|
||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||
CMAKE_PATH="${2%%/}"
|
||||
shift
|
||||
;;
|
||||
ADIOS2-[1-9]* | ADIOS2-git* | adios-[1-9]* | ADIOS-git*)
|
||||
adiosPACKAGE="${1%%/}"
|
||||
;;
|
||||
adios2-[1-9]* | adios2-git* | adios-[1-9]* | adios-git*)
|
||||
ADIOS2-[0-9]* | ADIOS2-git* | ADIOS-[0-9]* | ADIOS-git* | \
|
||||
adios2-[0-9]* | adios2-git* | adios-[0-9]* | adios-git*)
|
||||
adiosPACKAGE="${1%%/}"
|
||||
;;
|
||||
*)
|
||||
@ -130,8 +133,9 @@ echo
|
||||
|
||||
# Needs future adjustment
|
||||
# - for mpi-specific library locations
|
||||
if [ -f $ADIOS2_ARCH_PATH/include/adios2.h \
|
||||
-a -r $ADIOS2_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libadios2$EXT_SO ]
|
||||
if [ -z "$optForce" ] \
|
||||
&& [ -f "$ADIOS2_ARCH_PATH/include/adios2.h" ] \
|
||||
&& [ -r "$ADIOS2_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libadios2$EXT_SO" ]
|
||||
then
|
||||
echo " ADIOS2 header in $ADIOS2_ARCH_PATH/include"
|
||||
echo " ADIOS2 libs in $ADIOS2_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH"
|
||||
@ -165,6 +169,7 @@ else
|
||||
-DCMAKE_INSTALL_PREFIX=$ADIOS2_ARCH_PATH \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DADIOS2_USE_Fortran=FALSE \
|
||||
-DADIOS2_BUILD_EXAMPLES=FALSE \
|
||||
${WM_QUIET:+-DCMAKE_RULE_MESSAGES=OFF} \
|
||||
$ADIOS2_SOURCE_DIR \
|
||||
&& make -j $WM_NCOMPPROCS all \
|
||||
|
||||
17
makeCCMIO
17
makeCCMIO
@ -7,11 +7,10 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# makeCCMIO
|
||||
@ -22,9 +21,6 @@
|
||||
# ----------------------------------------------
|
||||
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||
#------------------------------------------------------------------------------
|
||||
# Dynamic library ending (default is .so)
|
||||
[ "$(uname -s)" = Darwin ] && EXT_SO=.dylib || EXT_SO=.so
|
||||
|
||||
# Run from third-party directory only
|
||||
cd "${0%/*}" || exit
|
||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
@ -32,11 +28,6 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
echo " Check your OpenFOAM environment and installation"
|
||||
exit 1
|
||||
}
|
||||
[ -n "$FOAM_EXT_LIBBIN" ] || {
|
||||
echo "Error (${0##*/}) : \$FOAM_EXT_LIBBIN not set"
|
||||
echo " Check your OpenFOAM environment and installation"
|
||||
exit 1
|
||||
}
|
||||
. etc/tools/ThirdPartyFunctions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -71,6 +62,7 @@ options:
|
||||
prior to running this script.
|
||||
|
||||
USAGE
|
||||
showDownloadHint CCMIO
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
@ -86,7 +78,7 @@ do
|
||||
lib|libso)
|
||||
targetType="$1"
|
||||
;;
|
||||
libccmio-[1-9]*)
|
||||
libccmio-[0-9]*)
|
||||
ccmioPACKAGE="${1%%/}"
|
||||
;;
|
||||
*)
|
||||
@ -97,6 +89,7 @@ do
|
||||
done
|
||||
|
||||
requireWMakeToolchain
|
||||
requireExtLibBin
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
116
makeCGAL
116
makeCGAL
@ -7,11 +7,10 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
# Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# makeCGAL
|
||||
@ -35,8 +34,8 @@
|
||||
if [ "$1" = "-test" ]
|
||||
then
|
||||
[ "$#" -eq 3 ] || { echo "${0##*/} -test : needs 2 argument"; exit 1; }
|
||||
dir="${2%/}" # <- CGAL_ARCH_PATH
|
||||
if [ -d "$dir/include" -a -r "$dir/lib$WM_COMPILER_LIB_ARCH/libCGAL$EXT_SO" ]
|
||||
dir="${2%/}" # <- *_ARCH_PATH
|
||||
if [ -d "$dir/include" ] && [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libCGAL$EXT_SO" ]
|
||||
then
|
||||
echo " CGAL include: $dir/include"
|
||||
echo " CGAL library: $dir/lib$WM_COMPILER_LIB_ARCH"
|
||||
@ -44,8 +43,8 @@ then
|
||||
dir="${3%/}" # <- BOOST_ARCH_PATH
|
||||
for root in "$dir" /usr
|
||||
do
|
||||
if [ -d "$root/include/boost" \
|
||||
-a -r "$root/lib$WM_COMPILER_LIB_ARCH/libboost_system$EXT_SO" ]
|
||||
if [ -d "$root/include/boost" ] \
|
||||
&& [ -r "$root/lib$WM_COMPILER_LIB_ARCH/libboost_system$EXT_SO" ]
|
||||
then
|
||||
echo " boost include: $root/include"
|
||||
echo " boost library: $root/lib$WM_COMPILER_LIB_ARCH"
|
||||
@ -89,7 +88,8 @@ usage: ${0##*/} [OPTION] [CGAL-VERSION] [boost-VERSION] [gmp-VERSION] [mpfr-VERS
|
||||
options:
|
||||
-gcc Force use of gcc/g++
|
||||
-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)
|
||||
-with-lib Configure CGAL with library
|
||||
-toolset=NAME Use named toolset in bootstrap
|
||||
-system Use system versions for boost/gmp/mpfr
|
||||
-help
|
||||
@ -108,12 +108,15 @@ simply specify a 'system' version. For example,
|
||||
Use gmp-none to disable use of gmp/mpfr (eg, not available)
|
||||
|
||||
USAGE
|
||||
showDownloadHint BOOST
|
||||
showDownloadHint CGAL
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
exportCompiler # Compiler info for CMake/configure
|
||||
|
||||
unset optHeadersOnly optToolset
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
@ -139,11 +142,14 @@ do
|
||||
-no-lib)
|
||||
optHeadersOnly=true
|
||||
;;
|
||||
gmp-[4-9]* | gmp-system | gmp-none)
|
||||
-with-lib)
|
||||
optHeadersOnly=false
|
||||
;;
|
||||
gmp-[0-9]* | gmp-system | gmp-none)
|
||||
gmpPACKAGE="${1%%/}"
|
||||
unset GMP_ARCH_PATH
|
||||
;;
|
||||
mpfr-[2-9]* | mpfr-system | mpfr-none)
|
||||
mpfr-[0-9]* | mpfr-system | mpfr-none)
|
||||
mpfrPACKAGE="${1%%/}"
|
||||
unset MPFR_ARCH_PATH
|
||||
;;
|
||||
@ -165,17 +171,36 @@ done
|
||||
[ -n "$cgalPACKAGE" ] || die "The cgal-VERSION was not specified"
|
||||
|
||||
# Nothing to build
|
||||
if _foamIsNone $boostPACKAGE
|
||||
if _foamIsNone "$boostPACKAGE"
|
||||
then
|
||||
echo "Using boost-none (skip ThirdParty build of BOOST/CGAL)"
|
||||
exit 0
|
||||
fi
|
||||
if _foamIsNone $cgalPACKAGE
|
||||
if _foamIsNone "$cgalPACKAGE"
|
||||
then
|
||||
echo "Using cgal-none (skip ThirdParty build of CGAL)"
|
||||
exit 0
|
||||
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
|
||||
## gmpPACKAGE=none
|
||||
## mpfrPACKAGE=none
|
||||
## unset GMP_ARCH_PATH MPFR_ARCH_PATH
|
||||
## fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Build Boost
|
||||
@ -187,13 +212,13 @@ fi
|
||||
# BOOST_ARCH_PATH : installation directory
|
||||
# BOOST_SOURCE_DIR : location of the original sources
|
||||
|
||||
BOOST_SOURCE_DIR=$sourceBASE/$boostPACKAGE
|
||||
: ${BOOST_ARCH_PATH:=$installBASE/$boostPACKAGE} # Fallback
|
||||
BOOST_SOURCE_DIR="$sourceBASE/$boostPACKAGE"
|
||||
: "${BOOST_ARCH_PATH:=$installBASE/$boostPACKAGE}"
|
||||
|
||||
boostInc="$BOOST_ARCH_PATH/include"
|
||||
boostLib="$BOOST_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH"
|
||||
|
||||
if _foamIsSystem $boostPACKAGE
|
||||
if _foamIsSystem "$boostPACKAGE"
|
||||
then
|
||||
echo "Using boost-system (skip ThirdParty build of BOOST)"
|
||||
|
||||
@ -201,9 +226,9 @@ then
|
||||
|
||||
if [ -d "$boostInc" ]
|
||||
then
|
||||
if BOOST_ARCH_PATH=$(cd $BOOST_ARCH_PATH 2>/dev/null && pwd -P)
|
||||
if BOOST_ARCH_PATH=$(cd "$BOOST_ARCH_PATH" 2>/dev/null && pwd -P)
|
||||
then
|
||||
boostPACKAGE=${BOOST_ARCH_PATH##*/}
|
||||
boostPACKAGE="${BOOST_ARCH_PATH##*/}"
|
||||
else
|
||||
echo "ERROR: bad path for BOOST_ARCH_PATH"
|
||||
echo "stopping build"
|
||||
@ -282,8 +307,8 @@ else
|
||||
esac
|
||||
|
||||
./bootstrap.sh \
|
||||
--prefix=$BOOST_ARCH_PATH \
|
||||
--libdir=$boostLib \
|
||||
--prefix="$BOOST_ARCH_PATH" \
|
||||
--libdir="$boostLib" \
|
||||
--with-libraries=thread \
|
||||
--with-libraries=system \
|
||||
--with-toolset="$optToolset" \
|
||||
@ -295,8 +320,9 @@ else
|
||||
}
|
||||
fi
|
||||
|
||||
|
||||
# Nothing left to build
|
||||
if _foamIsSystem $cgalPACKAGE
|
||||
if _foamIsSystem "$cgalPACKAGE"
|
||||
then
|
||||
echo "Using cgal-system (skip ThirdParty build of CGAL)"
|
||||
exit 0
|
||||
@ -328,28 +354,28 @@ fi
|
||||
# CGAL_BUILD_DIR : location of the build
|
||||
# CGAL_ARCH_PATH : installation directory
|
||||
|
||||
CGAL_SOURCE_DIR=$sourceBASE/$cgalPACKAGE
|
||||
CGAL_BUILD_DIR=$buildBASE/$cgalPACKAGE
|
||||
: ${CGAL_ARCH_PATH:=$installBASE/$cgalPACKAGE} # Fallback
|
||||
CGAL_SOURCE_DIR="$sourceBASE/$cgalPACKAGE"
|
||||
CGAL_BUILD_DIR="$buildBASE/$cgalPACKAGE"
|
||||
: "${CGAL_ARCH_PATH:=$installBASE/$cgalPACKAGE}"
|
||||
|
||||
# gmp/mpfr are installed without compiler name
|
||||
mpfrBASE=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
||||
mpfrBASE="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH"
|
||||
|
||||
# Enable/disable gmp/mpfr together
|
||||
if _foamIsNone $gmpPACKAGE || _foamIsNone $mpfrPACKAGE
|
||||
if _foamIsNone "$gmpPACKAGE" || _foamIsNone "$mpfrPACKAGE"
|
||||
then
|
||||
GMP_ARCH_PATH=none
|
||||
MPFR_ARCH_PATH=none
|
||||
elif _foamIsSystem $gmpPACKAGE || _foamIsSystem $mpfrPACKAGE
|
||||
elif _foamIsSystem "$gmpPACKAGE" || _foamIsSystem "$mpfrPACKAGE"
|
||||
then
|
||||
# May really be system, but could also by a central installation
|
||||
# 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)
|
||||
if GMP_ARCH_PATH=$(cd "$GMP_ARCH_PATH" 2>/dev/null && pwd -P)
|
||||
then
|
||||
gmpPACKAGE=${GMP_ARCH_PATH##*/}
|
||||
gmpPACKAGE="${GMP_ARCH_PATH##*/}"
|
||||
else
|
||||
echo "ERROR: bad path for GMP_ARCH_PATH"
|
||||
echo "stopping build"
|
||||
@ -361,9 +387,9 @@ then
|
||||
|
||||
if [ -d "$MPFR_ARCH_PATH" ]
|
||||
then
|
||||
if MPFR_ARCH_PATH=$(cd $MPFR_ARCH_PATH 2>/dev/null && pwd -P)
|
||||
if MPFR_ARCH_PATH=$(cd "$MPFR_ARCH_PATH" 2>/dev/null && pwd -P)
|
||||
then
|
||||
mpfrPACKAGE=${MPFR_ARCH_PATH##*/}
|
||||
mpfrPACKAGE="${MPFR_ARCH_PATH##*/}"
|
||||
else
|
||||
echo "ERROR: bad path for MPFR_ARCH_PATH"
|
||||
echo "stopping build"
|
||||
@ -373,8 +399,8 @@ then
|
||||
MPFR_ARCH_PATH=system
|
||||
fi
|
||||
else
|
||||
GMP_ARCH_PATH=$mpfrBASE/$gmpPACKAGE
|
||||
MPFR_ARCH_PATH=$mpfrBASE/$mpfrPACKAGE
|
||||
GMP_ARCH_PATH="$mpfrBASE/$gmpPACKAGE"
|
||||
MPFR_ARCH_PATH="$mpfrBASE/$mpfrPACKAGE"
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -410,7 +436,7 @@ BOOST_VERSION=$BOOST_VERSION
|
||||
|
||||
CGAL_lib=lib$WM_COMPILER_LIB_ARCH
|
||||
BOOST_lib=lib$WM_COMPILER_LIB_ARCH
|
||||
CGAL_HEADER_ONLY=${optHeadersOnly:-false}
|
||||
CGAL_HEADER_ONLY=${optHeadersOnly:-default}
|
||||
BUILD_INFO
|
||||
}
|
||||
|
||||
@ -464,13 +490,13 @@ fi
|
||||
|
||||
(
|
||||
# Remove any existing build folder and recreate
|
||||
if [ -d $CGAL_BUILD_DIR ]
|
||||
if [ -d "$CGAL_BUILD_DIR" ]
|
||||
then
|
||||
echo "removing old build directory"
|
||||
echo " $CGAL_BUILD_DIR"
|
||||
rm -rf $CGAL_BUILD_DIR
|
||||
rm -rf "$CGAL_BUILD_DIR"
|
||||
fi
|
||||
mkdir -p $CGAL_BUILD_DIR
|
||||
mkdir -p "$CGAL_BUILD_DIR"
|
||||
|
||||
cd "$CGAL_BUILD_DIR" || exit
|
||||
export GIT_DIR="$CGAL_SOURCE_DIR/.git" # Mask seeing our own git-repo
|
||||
@ -484,7 +510,7 @@ fi
|
||||
|
||||
|
||||
# See http://doc.cgal.org/latest/Manual/installation.html
|
||||
if _foamIsSystem $boostPACKAGE
|
||||
if _foamIsSystem "$boostPACKAGE"
|
||||
then
|
||||
# Tagged as 'system' but could actually point to a central location
|
||||
if [ -d "$BOOST_ARCH_PATH/include" ]
|
||||
@ -512,10 +538,10 @@ CMAKE_OPTIONS
|
||||
)
|
||||
fi
|
||||
|
||||
if _foamIsSystem $GMP_ARCH_PATH
|
||||
if _foamIsSystem "$GMP_ARCH_PATH"
|
||||
then
|
||||
echo " gmp : system"
|
||||
elif _foamIsNone $GMP_ARCH_PATH
|
||||
elif _foamIsNone "$GMP_ARCH_PATH"
|
||||
then
|
||||
echo " gmp : disabled"
|
||||
configGmp="-DCGAL_DISABLE_GMP=TRUE" # Also used for mpfr
|
||||
@ -543,10 +569,10 @@ CMAKE_OPTIONS
|
||||
echo " system : gmp (did not find $GMP_ARCH_PATH)"
|
||||
fi
|
||||
|
||||
if _foamIsSystem $MPFR_ARCH_PATH
|
||||
if _foamIsSystem "$MPFR_ARCH_PATH"
|
||||
then
|
||||
echo " mpfr : system"
|
||||
elif _foamIsNone $MPFR_ARCH_PATH
|
||||
elif _foamIsNone "$MPFR_ARCH_PATH"
|
||||
then
|
||||
echo " mpfr : disabled"
|
||||
configGmp="-DCGAL_DISABLE_GMP=TRUE" # Also used for mpfr
|
||||
@ -586,6 +612,13 @@ CMAKE_OPTIONS
|
||||
;;
|
||||
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/
|
||||
# Name only (not path) for CGAL_INSTALL_LIB_DIR
|
||||
echo "----"
|
||||
@ -598,7 +631,6 @@ CMAKE_OPTIONS
|
||||
-DWITH_CGAL_ImageIO=OFF \
|
||||
-DWITH_CGAL_Qt5=OFF \
|
||||
$cmakeDefs \
|
||||
${optHeadersOnly:+-DCGAL_HEADER_ONLY=TRUE} \
|
||||
$configBoost $configGmp $configMpfr \
|
||||
${WM_QUIET:+-DCMAKE_RULE_MESSAGES=OFF} \
|
||||
$CGAL_SOURCE_DIR \
|
||||
|
||||
25
makeCmake
25
makeCmake
@ -7,11 +7,10 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2011 OpenFOAM Foundation
|
||||
# Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# makeCmake
|
||||
@ -46,6 +45,7 @@ usage() {
|
||||
|
||||
usage: ${0##*/} [OPTION] cmake-VERSION
|
||||
options:
|
||||
-force Force compilation, even if binary already exists
|
||||
-gcc Force use of gcc/g++
|
||||
-link Create additional symlink as 'cmake-system'
|
||||
-help
|
||||
@ -54,12 +54,14 @@ options:
|
||||
${cmakePACKAGE:-'unspecified'}
|
||||
|
||||
USAGE
|
||||
showDownloadHint CMAKE
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
exportCompiler # Compiler info for CMake/configure
|
||||
|
||||
unset optLink
|
||||
unset optForce optLink
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
@ -67,11 +69,10 @@ do
|
||||
'') ;; # Ignore empty
|
||||
-h | -help) usage ;;
|
||||
-gcc) useGcc ;;
|
||||
-force) optForce=true ;;
|
||||
-link) optLink=true ;;
|
||||
|
||||
-link)
|
||||
optLink=true
|
||||
;;
|
||||
cmake-[1-9]*)
|
||||
cmake-[0-9]*)
|
||||
cmakePACKAGE="${1%%/}"
|
||||
;;
|
||||
*)
|
||||
@ -97,7 +98,9 @@ fi
|
||||
CMAKE_SOURCE_DIR=$sourceBASE/$cmakePACKAGE
|
||||
CMAKE_ARCH_PATH=$installBASE/$cmakePACKAGE
|
||||
|
||||
if [ -d "$CMAKE_ARCH_PATH" -a -r "$CMAKE_ARCH_PATH/bin/cmake" ]
|
||||
if [ -z "$optForce" ] \
|
||||
&& [ -d "$CMAKE_ARCH_PATH" ] \
|
||||
&& [ -r "$CMAKE_ARCH_PATH/bin/cmake" ]
|
||||
then
|
||||
echo "Already built: $cmakePACKAGE"
|
||||
else
|
||||
@ -124,7 +127,7 @@ else
|
||||
}
|
||||
fi
|
||||
|
||||
if [ "$optLink" = true -a -x "$CMAKE_ARCH_PATH/bin/cmake" ]
|
||||
if [ "$optLink" = true ] && [ -x "$CMAKE_ARCH_PATH/bin/cmake" ]
|
||||
then
|
||||
(
|
||||
cd "${CMAKE_ARCH_PATH%/*}" || exit
|
||||
@ -135,7 +138,7 @@ then
|
||||
then
|
||||
exit 2
|
||||
fi
|
||||
ln -svf $cmakePACKAGE cmake-system
|
||||
ln -svf "$cmakePACKAGE" cmake-system
|
||||
)
|
||||
fi
|
||||
|
||||
|
||||
18
makeFFTW
18
makeFFTW
@ -6,11 +6,10 @@
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# makeFFTW
|
||||
@ -28,8 +27,9 @@
|
||||
if [ "$1" = "-test" ]
|
||||
then
|
||||
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
|
||||
dir="${2%/}" # <- FFTW_ARCH_PATH
|
||||
if [ -d "$dir/include" -a -r "$dir/lib$WM_COMPILER_LIB_ARCH/libfftw3$EXT_SO" ]
|
||||
dir="${2%/}" # <- *_ARCH_PATH
|
||||
if [ -d "$dir/include" ] \
|
||||
&& [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libfftw3$EXT_SO" ]
|
||||
then
|
||||
echo " fftw include: $dir/include"
|
||||
echo " fftw library: $dir/lib$WM_COMPILER_LIB_ARCH"
|
||||
@ -62,6 +62,7 @@ usage() {
|
||||
|
||||
usage: ${0##*/} [OPTION] [fftw-VERSION] [-- configure-options]
|
||||
options:
|
||||
-force Force compilation, even if include/library already exists
|
||||
-gcc Force use of gcc/g++
|
||||
-help
|
||||
|
||||
@ -69,11 +70,14 @@ options:
|
||||
${fftwPACKAGE:-'unspecified FFTW version'}
|
||||
|
||||
USAGE
|
||||
showDownloadHint FFTW
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
exportCompiler # Compiler info for CMake/configure
|
||||
|
||||
unset optForce
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
@ -82,6 +86,7 @@ do
|
||||
--) break;; # Extra configure options (leave on $@ for later detection)
|
||||
-h | -help) usage ;;
|
||||
-gcc) useGcc ;;
|
||||
-force) optForce=true ;;
|
||||
|
||||
fftw-[0-9]* | fftw_[0-9]* | fftw-system )
|
||||
fftwPACKAGE="${1%%/}"
|
||||
@ -121,7 +126,8 @@ fi
|
||||
FFTW_SOURCE_DIR=$sourceBASE/$fftwPACKAGE
|
||||
FFTW_ARCH_PATH=$installBASE/$fftwPACKAGE
|
||||
|
||||
if [ -r "$FFTW_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libfftw3$EXT_SO" ]
|
||||
if [ -z "$optForce" ] \
|
||||
&& [ -r "$FFTW_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libfftw3$EXT_SO" ]
|
||||
then
|
||||
echo "Already has FFTW shared library"
|
||||
else
|
||||
|
||||
18
makeGcc
18
makeGcc
@ -7,11 +7,10 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# makeGcc
|
||||
@ -79,6 +78,10 @@ options:
|
||||
${gccPACKAGE:-'unspecified GCC version'}
|
||||
|
||||
USAGE
|
||||
showDownloadHint GCC
|
||||
showDownloadHint GMP
|
||||
showDownloadHint MPFR
|
||||
showDownloadHint MPC
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
@ -117,20 +120,23 @@ do
|
||||
mpcPACKAGE="mpc-system"
|
||||
unset GMP_ARCH_PATH MPFR_ARCH_PATH
|
||||
;;
|
||||
gmp-[4-9]* | gmp-system)
|
||||
gmp-[0-9]* | gmp-system)
|
||||
gmpPACKAGE="${1%%/}"
|
||||
unset GMP_ARCH_PATH
|
||||
;;
|
||||
mpfr-[2-9]* | mpfr-system)
|
||||
mpfr-[0-9]* | mpfr-system)
|
||||
mpfrPACKAGE="${1%%/}"
|
||||
unset MPFR_ARCH_PATH
|
||||
;;
|
||||
mpc-[0-9]* | mpc-system)
|
||||
mpcPACKAGE="${1%%/}"
|
||||
;;
|
||||
gcc-[4-9]* | gcc-system)
|
||||
gcc-[0-9]* | gcc-system)
|
||||
gccPACKAGE="${1%%/}"
|
||||
;;
|
||||
[0-9]*)
|
||||
gccPACKAGE="gcc-${1%%/}"
|
||||
;;
|
||||
*)
|
||||
die "unknown option/argument: '$1'"
|
||||
;;
|
||||
|
||||
@ -7,11 +7,10 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2012 OpenFOAM Foundation
|
||||
# Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# makeGperftools
|
||||
@ -52,6 +51,7 @@ options:
|
||||
$gperftoolsPACKAGE
|
||||
|
||||
USAGE
|
||||
showDownloadHint GPERFTOOLS
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
70
makeHYPRE
70
makeHYPRE
@ -6,11 +6,10 @@
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2018-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# makeHYPRE
|
||||
@ -21,35 +20,7 @@
|
||||
# ----------------------------------------------
|
||||
# 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%/}" # <- HYPRE_ARCH_PATH
|
||||
if [ -d "$dir/include" ]
|
||||
then
|
||||
for lib in \
|
||||
$FOAM_EXT_LIBBIN/libhypre$EXT_SO \
|
||||
$dir/lib/libhypre.a \
|
||||
$dir/lib/libhypre$EXT_SO \
|
||||
$dir/lib$WM_COMPILER_LIB_ARCH/libhypre.a \
|
||||
$dir/lib$WM_COMPILER_LIB_ARCH/libhypre$EXT_SO \
|
||||
;
|
||||
do
|
||||
if [ -r "$lib" ]
|
||||
then
|
||||
echo " hypre include: $dir/include"
|
||||
echo " hypre library: ${lib%/*}"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
fi
|
||||
exit 2
|
||||
fi
|
||||
#------------------------------------------------------------------------------
|
||||
# Run from third-party directory only
|
||||
cd "${0%/*}" || exit
|
||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
@ -57,16 +28,11 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
echo " Check your OpenFOAM environment and installation"
|
||||
exit 1
|
||||
}
|
||||
[ -n "$FOAM_EXT_LIBBIN" ] || {
|
||||
echo "Error (${0##*/}) : \$FOAM_EXT_LIBBIN not set"
|
||||
echo " Check your OpenFOAM environment and installation"
|
||||
exit 1
|
||||
}
|
||||
. etc/tools/ThirdPartyFunctions
|
||||
#------------------------------------------------------------------------------
|
||||
_foamConfig hypre
|
||||
|
||||
hyprePACKAGE=${hypre_version:-hypre-system}
|
||||
hyprePACKAGE="${hypre_version:-hypre-system}"
|
||||
targetType=libso
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -75,8 +41,9 @@ usage() {
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
|
||||
usage: ${0##*/} [OPTION] [lib|libso] [HYPRE-VERSION]
|
||||
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++
|
||||
-help
|
||||
|
||||
@ -84,11 +51,14 @@ options:
|
||||
${hyprePACKAGE:-'unspecified hypre version'}
|
||||
|
||||
USAGE
|
||||
showDownloadHint HYPRE
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
exportCompiler # Compiler info for CMake/configure
|
||||
|
||||
unset optForce
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
@ -96,12 +66,13 @@ do
|
||||
'') ;; # Ignore empty
|
||||
-h | -help) usage ;;
|
||||
-gcc) useGcc ;;
|
||||
-force) optForce=true ;;
|
||||
|
||||
lib|libso)
|
||||
targetType="$1"
|
||||
;;
|
||||
|
||||
hypre-[0-9]*)
|
||||
hypre-[0-9]* | hypre-git)
|
||||
hyprePACKAGE="${1%%/}"
|
||||
unset HYPRE_ARCH_PATH # Avoid inconsistency
|
||||
;;
|
||||
@ -115,11 +86,11 @@ done
|
||||
[ -n "$hyprePACKAGE" ] || die "The hypre-VERSION was not specified"
|
||||
|
||||
# Nothing to build
|
||||
if _foamIsNone $hyprePACKAGE
|
||||
if _foamIsNone "$hyprePACKAGE"
|
||||
then
|
||||
echo "Using hypre-none (skip ThirdParty build of HYPRE)"
|
||||
exit 0
|
||||
elif _foamIsSystem $hyprePACKAGE
|
||||
elif _foamIsSystem "$hyprePACKAGE"
|
||||
then
|
||||
echo "Using hypre-system"
|
||||
exit 0
|
||||
@ -132,12 +103,12 @@ fi
|
||||
# HYPRE_ARCH_PATH : installation directory
|
||||
# HYPRE_SOURCE_DIR : location of the original sources
|
||||
|
||||
HYPRE_SOURCE_DIR=$sourceBASE/$hyprePACKAGE
|
||||
HYPRE_SOURCE_DIR="$sourceBASE/$hyprePACKAGE"
|
||||
: "${HYPRE_ARCH_PATH:=$installBASE$WM_SIZE_OPTIONS/$hyprePACKAGE}"
|
||||
|
||||
[ -d "$HYPRE_SOURCE_DIR" ] || {
|
||||
echo "Missing sources: '$hyprePACKAGE'"
|
||||
showDownloadHint HYPER
|
||||
showDownloadHint HYPRE
|
||||
exit 1
|
||||
}
|
||||
|
||||
@ -149,17 +120,24 @@ CXX="$(whichMpicxx)"
|
||||
echo "Starting build: $hyprePACKAGE ($targetType)"
|
||||
echo
|
||||
(
|
||||
# Configuration options:
|
||||
# Configuration options
|
||||
unset configOpt
|
||||
|
||||
# Additional configure options
|
||||
if [ "$1" = "--" ]
|
||||
then
|
||||
shift
|
||||
configOpt="$configOpt $@"
|
||||
fi
|
||||
|
||||
cd "$HYPRE_SOURCE_DIR/src" || exit
|
||||
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
|
||||
|
||||
rm -rf $HYPRE_ARCH_PATH
|
||||
rm -rf "$HYPRE_ARCH_PATH"
|
||||
[ -e Makefile ] && make distclean 2>/dev/null
|
||||
|
||||
./configure \
|
||||
--prefix=$HYPRE_ARCH_PATH \
|
||||
--prefix="$HYPRE_ARCH_PATH" \
|
||||
--disable-fortran \
|
||||
--enable-shared \
|
||||
$configOpt \
|
||||
|
||||
33
makeKAHIP
33
makeKAHIP
@ -6,11 +6,10 @@
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# makeKAHIP
|
||||
@ -28,7 +27,7 @@
|
||||
if [ "$1" = "-test" ]
|
||||
then
|
||||
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
|
||||
dir="${2%/}" # <- KAHIP_ARCH_PATH
|
||||
dir="${2%/}" # <- *_ARCH_PATH
|
||||
if [ -d "$dir/include" ]
|
||||
then
|
||||
for lib in \
|
||||
@ -57,11 +56,6 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
echo " Check your OpenFOAM environment and installation"
|
||||
exit 1
|
||||
}
|
||||
[ -n "$FOAM_EXT_LIBBIN" ] || {
|
||||
echo "Error (${0##*/}) : \$FOAM_EXT_LIBBIN not set"
|
||||
echo " Check your OpenFOAM environment and installation"
|
||||
exit 1
|
||||
}
|
||||
. etc/tools/ThirdPartyFunctions
|
||||
#------------------------------------------------------------------------------
|
||||
_foamConfig kahip
|
||||
@ -79,6 +73,7 @@ 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
|
||||
-help
|
||||
|
||||
@ -86,11 +81,14 @@ options:
|
||||
$kahipPACKAGE
|
||||
|
||||
USAGE
|
||||
showDownloadHint KAHIP
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
exportCompiler minimal # Minimal compiler info for CMake/configure
|
||||
|
||||
unset optForce
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
@ -98,6 +96,7 @@ do
|
||||
'') ;; # Ignore empty
|
||||
-h | -help) usage ;;
|
||||
-gcc) useGcc ;;
|
||||
-force) optForce=true ;;
|
||||
|
||||
-cmake)
|
||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||
@ -109,7 +108,7 @@ do
|
||||
targetType="$1"
|
||||
;;
|
||||
|
||||
kahip-[1-9]* | kahip-git | KaHIP_* | KaHIP-[1-9]*)
|
||||
kahip-[0-9]* | kahip-git | KaHIP_* | KaHIP-[0-9]*)
|
||||
kahipPACKAGE="${1%%/}"
|
||||
unset KAHIP_ARCH_PATH # Avoid inconsistency
|
||||
;;
|
||||
@ -133,7 +132,21 @@ then
|
||||
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
|
||||
|
||||
requireWMakeToolchain
|
||||
requireExtLibBin
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
10
makeLLVM
10
makeLLVM
@ -7,11 +7,10 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# makeLLVM
|
||||
@ -74,6 +73,7 @@ options:
|
||||
${llvmPACKAGE:-'unspecified LLVM version'}
|
||||
|
||||
USAGE
|
||||
showDownloadHint LLVM
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
@ -95,7 +95,7 @@ do
|
||||
llvm-[0-9]* | llvm-svn*)
|
||||
llvmPACKAGE="${1%%/}"
|
||||
;;
|
||||
[1-9]*)
|
||||
[0-9]*)
|
||||
llvmPACKAGE="llvm-${1%%/}"
|
||||
;;
|
||||
*)
|
||||
@ -148,7 +148,7 @@ then
|
||||
set -x
|
||||
$LLVM_SOURCE_DIR/configure \
|
||||
--prefix=$LLVM_ARCH_PATH \
|
||||
--with-gcc-toolchain=$(which gcc | sed s%/bin/gcc%%) \
|
||||
--with-gcc-toolchain="$(command -v gcc | sed 's%/bin/gcc%%')" \
|
||||
--enable-optimized \
|
||||
--enable-shared \
|
||||
&& set +x \
|
||||
|
||||
15
makeMETIS
15
makeMETIS
@ -6,11 +6,10 @@
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2017-2018 OpenCFD Ltd.
|
||||
# Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# makeMETIS
|
||||
@ -28,7 +27,7 @@
|
||||
if [ "$1" = "-test" ]
|
||||
then
|
||||
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
|
||||
dir="${2%/}" # <- METIS_ARCH_PATH
|
||||
dir="${2%/}" # <- *_ARCH_PATH
|
||||
if [ -d "$dir/include" ]
|
||||
then
|
||||
for lib in \
|
||||
@ -57,11 +56,6 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
echo " Check your OpenFOAM environment and installation"
|
||||
exit 1
|
||||
}
|
||||
[ -n "$FOAM_EXT_LIBBIN" ] || {
|
||||
echo "Error (${0##*/}) : \$FOAM_EXT_LIBBIN not set"
|
||||
echo " Check your OpenFOAM environment and installation"
|
||||
exit 1
|
||||
}
|
||||
. etc/tools/ThirdPartyFunctions
|
||||
#------------------------------------------------------------------------------
|
||||
_foamConfig metis
|
||||
@ -84,6 +78,7 @@ options:
|
||||
${metisPACKAGE:-'unspecified metis version'}
|
||||
|
||||
USAGE
|
||||
showDownloadHint METIS
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
@ -125,6 +120,8 @@ then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
requireExtLibBin
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Build METIS
|
||||
|
||||
18
makeMGridGen
18
makeMGridGen
@ -6,11 +6,10 @@
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# makeMGridGen
|
||||
@ -45,6 +44,7 @@ usage() {
|
||||
|
||||
usage: ${0##*/} [OPTION] [mgridgen-VERSION]
|
||||
options:
|
||||
-force Force compilation, even if include/library already exists
|
||||
-gcc Force use of gcc/g++
|
||||
-help
|
||||
|
||||
@ -52,12 +52,14 @@ options:
|
||||
$mgridgenPACKAGE
|
||||
|
||||
USAGE
|
||||
# showDownloadHint GRIDGEN
|
||||
exit 1
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
exportCompiler # Compiler info for CMake/configure
|
||||
|
||||
unset optForce
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
@ -65,8 +67,9 @@ do
|
||||
'') ;; # Ignore empty
|
||||
-h | -help) usage ;;
|
||||
-gcc) useGcc ;;
|
||||
-force) optForce=true ;;
|
||||
|
||||
mgridgen-[1-9]* | MGridGen-[1-9]* | parmgridgen-[1-9]* | ParMGridGen-[1-9]*)
|
||||
mgridgen-[0-9]* | MGridGen-[0-9]* | parmgridgen-[0-9]* | ParMGridGen-[0-9]*)
|
||||
mgridgenPACKAGE="${1%%/}"
|
||||
;;
|
||||
*)
|
||||
@ -134,8 +137,9 @@ install()
|
||||
# Needs future adjustment
|
||||
# - for shared library
|
||||
# - for mpi-specific library locations
|
||||
if [ -f $MGRIDGEN_ARCH_PATH/include/mgridgen.h \
|
||||
-a -r $MGRIDGEN_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmgrid.a ]
|
||||
if [ -z "$optForce" ] \
|
||||
&& [ -f "$MGRIDGEN_ARCH_PATH/include/mgridgen.h" \
|
||||
&& [ -r "$MGRIDGEN_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmgrid.a" ]
|
||||
then
|
||||
echo " MGridGen header in $MGRIDGEN_ARCH_PATH/include"
|
||||
echo " MGridGen libs in $MGRIDGEN_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" # static
|
||||
|
||||
18
makeMPICH
18
makeMPICH
@ -6,11 +6,10 @@
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# makeMPICH
|
||||
@ -28,7 +27,7 @@
|
||||
if [ "$1" = "-test" ]
|
||||
then
|
||||
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
|
||||
dir="${2%/}" # <- MPI_ARCH_PATH
|
||||
dir="${2%/}" # <- *_ARCH_PATH
|
||||
if [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
|
||||
then
|
||||
echo "Have mpich shared library (${dir##*/})"
|
||||
@ -73,6 +72,7 @@ usage() {
|
||||
|
||||
usage: ${0##*/} [OPTION] [mpich-VERSION] [-- configure-options]
|
||||
options:
|
||||
-force Force compilation, even if include/library already exists
|
||||
-gcc Force use of gcc/g++
|
||||
-help
|
||||
|
||||
@ -80,11 +80,14 @@ options:
|
||||
${mpiPACKAGE:-'unspecified mpich version'}
|
||||
|
||||
USAGE
|
||||
showDownloadHint MPICH
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
exportCompiler # Compiler info for CMake/configure
|
||||
|
||||
unset optForce
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
@ -93,6 +96,7 @@ do
|
||||
--) break;; # Extra configure options (leave on $@ for later detection)
|
||||
-h | -help) usage ;;
|
||||
-gcc) useGcc ;;
|
||||
-force) optForce=true ;;
|
||||
|
||||
mpich*)
|
||||
mpiPACKAGE="${1%%/}"
|
||||
@ -128,10 +132,12 @@ fi
|
||||
MPI_SOURCE_DIR=$sourceBASE/$mpiPACKAGE
|
||||
MPI_ARCH_PATH=$installBASE/$mpiPACKAGE
|
||||
|
||||
if [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
|
||||
if [ -z "$optForce" ] \
|
||||
&& [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
|
||||
then
|
||||
echo "Already has shared library"
|
||||
elif [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
|
||||
elif [ -z "$optForce" ] \
|
||||
&& [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
|
||||
then
|
||||
echo "Already has static library"
|
||||
else
|
||||
|
||||
18
makeMVAPICH
18
makeMVAPICH
@ -6,11 +6,10 @@
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# makeMVAPICH2
|
||||
@ -28,7 +27,7 @@
|
||||
if [ "$1" = "-test" ]
|
||||
then
|
||||
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
|
||||
dir="${2%/}" # <- MPI_ARCH_PATH
|
||||
dir="${2%/}" # <- *_ARCH_PATH
|
||||
if [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
|
||||
then
|
||||
echo "Have mpich shared library (${dir##*/})"
|
||||
@ -73,6 +72,7 @@ usage() {
|
||||
|
||||
usage: ${0##*/} [OPTION] [mvapich2-VERSION] [-- configure-options]
|
||||
options:
|
||||
-force Force compilation, even if include/library already exists
|
||||
-gcc Force use of gcc/g++
|
||||
-help
|
||||
|
||||
@ -84,11 +84,14 @@ The additional configure-options could include, for example,
|
||||
${0##*/} -- --disable-mcast
|
||||
|
||||
USAGE
|
||||
showDownloadHint MVAPICH
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
exportCompiler # Compiler info for CMake/configure
|
||||
|
||||
unset optForce
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
@ -97,6 +100,7 @@ do
|
||||
--) break;; # Extra configure options (leave on $@ for later detection)
|
||||
-h | -help) usage ;;
|
||||
-gcc) useGcc ;;
|
||||
-force) optForce=true ;;
|
||||
|
||||
mvapich*)
|
||||
mpiPACKAGE="${1%%/}"
|
||||
@ -132,10 +136,12 @@ fi
|
||||
MPI_SOURCE_DIR=$sourceBASE/$mpiPACKAGE
|
||||
MPI_ARCH_PATH=$installBASE/$mpiPACKAGE
|
||||
|
||||
if [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
|
||||
if [ -z "$optForce" ] \
|
||||
&& [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
|
||||
then
|
||||
echo "Already has shared library"
|
||||
elif [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
|
||||
elif [ -z "$optForce" ] \
|
||||
&& [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
|
||||
then
|
||||
echo "Already has static library"
|
||||
else
|
||||
|
||||
4
makeMesa
4
makeMesa
@ -9,8 +9,7 @@
|
||||
# Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# makeMesa
|
||||
@ -60,6 +59,7 @@ options:
|
||||
${mesaPACKAGE:-'unspecified MESA version'}
|
||||
|
||||
USAGE
|
||||
showDownloadHint MESA
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
18
makeOPENMPI
18
makeOPENMPI
@ -6,11 +6,10 @@
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# makeOPENMPI
|
||||
@ -28,7 +27,7 @@
|
||||
if [ "$1" = "-test" ]
|
||||
then
|
||||
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
|
||||
dir="${2%/}" # <- MPI_ARCH_PATH
|
||||
dir="${2%/}" # <- *_ARCH_PATH
|
||||
if [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
|
||||
then
|
||||
echo " Have openmpi shared library (${dir##*/})"
|
||||
@ -73,6 +72,7 @@ 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
|
||||
@ -83,12 +83,13 @@ options:
|
||||
${mpiPACKAGE:-'unspecified openmpi version'}
|
||||
|
||||
USAGE
|
||||
showDownloadHint OPENMPI
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
exportCompiler # Compiler info for CMake/configure
|
||||
|
||||
unset optMemchecker optThreaded
|
||||
unset optForce optMemchecker optThreaded
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
@ -98,6 +99,7 @@ do
|
||||
--) break;; # Extra configure options (leave on $@ for later detection)
|
||||
-h | -help) usage ;;
|
||||
-gcc) useGcc ;;
|
||||
-force) optForce=true ;;
|
||||
-memcheck*) optMemchecker=true ;;
|
||||
-thread*) optThreaded=enable ;;
|
||||
-no-thread*) optThreaded=disable ;;
|
||||
@ -136,10 +138,12 @@ fi
|
||||
MPI_SOURCE_DIR=$sourceBASE/$mpiPACKAGE
|
||||
MPI_ARCH_PATH=$installBASE/$mpiPACKAGE
|
||||
|
||||
if [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
|
||||
if [ -z "$optForce" ] \
|
||||
&& [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
|
||||
then
|
||||
echo "Already has shared library: $MPI_ARCH_PATH"
|
||||
elif [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
|
||||
elif [ -z "$optForce" ] \
|
||||
&& [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
|
||||
then
|
||||
echo "Already has static library: $MPI_ARCH_PATH"
|
||||
else
|
||||
|
||||
164
makePETSC
164
makePETSC
@ -6,11 +6,10 @@
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2018-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# makePETSC
|
||||
@ -21,35 +20,7 @@
|
||||
# ----------------------------------------------
|
||||
# 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%/}" # <- PETSC_ARCH_PATH
|
||||
if [ -d "$dir/include" ]
|
||||
then
|
||||
for lib in \
|
||||
$FOAM_EXT_LIBBIN/libpetsc$EXT_SO \
|
||||
$dir/lib/libpetsc.a \
|
||||
$dir/lib/libpetsc$EXT_SO \
|
||||
$dir/lib$WM_COMPILER_LIB_ARCH/libpetsc.a \
|
||||
$dir/lib$WM_COMPILER_LIB_ARCH/libpetsc$EXT_SO \
|
||||
;
|
||||
do
|
||||
if [ -r "$lib" ]
|
||||
then
|
||||
echo " petsc include: $dir/include"
|
||||
echo " petsc library: ${lib%/*}"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
fi
|
||||
exit 2
|
||||
fi
|
||||
#------------------------------------------------------------------------------
|
||||
# Run from third-party directory only
|
||||
cd "${0%/*}" || exit
|
||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
@ -57,38 +28,50 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
echo " Check your OpenFOAM environment and installation"
|
||||
exit 1
|
||||
}
|
||||
[ -n "$FOAM_EXT_LIBBIN" ] || {
|
||||
echo "Error (${0##*/}) : \$FOAM_EXT_LIBBIN not set"
|
||||
echo " Check your OpenFOAM environment and installation"
|
||||
exit 1
|
||||
}
|
||||
. etc/tools/ThirdPartyFunctions
|
||||
#------------------------------------------------------------------------------
|
||||
_foamConfig hypre
|
||||
_foamConfig petsc
|
||||
|
||||
petscPACKAGE=${petsc_version:-petsc-system}
|
||||
hyprePACKAGE="${hypre_version:-hypre-none}"
|
||||
petscPACKAGE="${petsc_version:-petsc-system}"
|
||||
targetType=libso
|
||||
|
||||
# Should be possible to build with download, but seems to fail
|
||||
# hypreURL="https://github.com/hypre-space/hypre/archive/v2.14.0.tar.gz"
|
||||
unset hypreURL
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
usage() {
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
|
||||
usage: ${0##*/} [OPTION] [lib|libso] [PETSC-VERSION]
|
||||
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)
|
||||
-no-hypre Disable automatic hypre detection
|
||||
-help
|
||||
|
||||
* build PETSC with
|
||||
${petscPACKAGE:-'unspecified petsc version'}
|
||||
|
||||
USAGE
|
||||
showDownloadHint PETSC
|
||||
|
||||
echo
|
||||
echo "Many people who have downloaded PETSC have also downloaded HYPRE :"
|
||||
showDownloadHint HYPRE
|
||||
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
exportCompiler # Compiler info for CMake/configure
|
||||
|
||||
unset optForce optInplace
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
@ -96,12 +79,24 @@ do
|
||||
'') ;; # Ignore empty
|
||||
-h | -help) usage ;;
|
||||
-gcc) useGcc ;;
|
||||
-force) optForce=true ;;
|
||||
-inplace) optInplace=true ;;
|
||||
|
||||
lib|libso)
|
||||
targetType="$1"
|
||||
;;
|
||||
|
||||
petsc-[0-9]*)
|
||||
-no-hypre)
|
||||
unset hyprePACKAGE hypreURL
|
||||
unset HYPRE_ARCH_PATH
|
||||
;;
|
||||
|
||||
hypre-[0-9]* | hypre-git)
|
||||
hyprePACKAGE="${1%%/}"
|
||||
unset hypreURL
|
||||
unset HYPRE_ARCH_PATH # Avoid inconsistency
|
||||
;;
|
||||
petsc-[0-9]* | petsc-git)
|
||||
petscPACKAGE="${1%%/}"
|
||||
unset PETSC_ARCH_PATH # Avoid inconsistency
|
||||
;;
|
||||
@ -115,16 +110,30 @@ done
|
||||
[ -n "$petscPACKAGE" ] || die "The petsc-VERSION was not specified"
|
||||
|
||||
# Nothing to build
|
||||
if _foamIsNone $petscPACKAGE
|
||||
if _foamIsNone "$petscPACKAGE"
|
||||
then
|
||||
echo "Using petsc-none (skip ThirdParty build of PETSC)"
|
||||
exit 0
|
||||
elif _foamIsSystem $petscPACKAGE
|
||||
elif _foamIsSystem "$petscPACKAGE"
|
||||
then
|
||||
echo "Using petsc-system"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Integrations
|
||||
|
||||
# No hypre
|
||||
if _foamIsNone "$hyprePACKAGE"
|
||||
then
|
||||
:
|
||||
elif [ -n "$hyprePACKAGE" ]
|
||||
then
|
||||
# Clunky
|
||||
: "${HYPRE_ARCH_PATH:=$installBASE$WM_SIZE_OPTIONS/$hyprePACKAGE}"
|
||||
fi
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Build PETSC
|
||||
@ -132,7 +141,7 @@ fi
|
||||
# PETSC_ARCH_PATH : installation directory
|
||||
# PETSC_SOURCE_DIR : location of the original sources
|
||||
|
||||
PETSC_SOURCE_DIR=$sourceBASE/$petscPACKAGE
|
||||
PETSC_SOURCE_DIR="$sourceBASE/$petscPACKAGE"
|
||||
: "${PETSC_ARCH_PATH:=$installBASE$WM_SIZE_OPTIONS/$petscPACKAGE}"
|
||||
|
||||
[ -d "$PETSC_SOURCE_DIR" ] || {
|
||||
@ -142,18 +151,50 @@ PETSC_SOURCE_DIR=$sourceBASE/$petscPACKAGE
|
||||
}
|
||||
|
||||
|
||||
# PETSC arch - same root as WM_OPTIONS (eg, DPInt32)
|
||||
archOpt="$WM_SIZE_OPTIONS"
|
||||
|
||||
if [ -n "$optInplace" ]
|
||||
then
|
||||
unset installPrefix
|
||||
# No install stage requires
|
||||
makeInstall() { true; }
|
||||
else
|
||||
|
||||
# Regular installation location
|
||||
installPrefix="$PETSC_ARCH_PATH"
|
||||
|
||||
makeInstall() {
|
||||
make PETSC_DIR="$PETSC_SOURCE_DIR" PETSC_ARCH="$archOpt" install
|
||||
}
|
||||
fi
|
||||
|
||||
echo "Starting build: $petscPACKAGE ($targetType)"
|
||||
echo
|
||||
(
|
||||
# PETSC arch - same root as WM_OPTIONS (eg, DPInt32)
|
||||
archOpt="$WM_SIZE_OPTIONS"
|
||||
|
||||
# Configuration options:
|
||||
# Configuration options
|
||||
configOpt="--with-cc=$(whichMpicc) --with-cxx=$(whichMpicxx)"
|
||||
|
||||
# Normally want hypre but this is really clunky
|
||||
if [ -f "$HYPRE_ARCH_PATH/include/HYPRE.h" ]
|
||||
then
|
||||
echo "Has installed hypre: $hyprePACKAGE"
|
||||
configOpt="$configOpt --with-hypre-dir=$HYPRE_ARCH_PATH"
|
||||
elif [ -n "$urlHypre" ]
|
||||
then
|
||||
configOpt="$configOpt --download-hypre=$urlHypre"
|
||||
fi
|
||||
|
||||
# Additional configure options
|
||||
if [ "$1" = "--" ]
|
||||
then
|
||||
shift
|
||||
configOpt="$configOpt $@"
|
||||
fi
|
||||
|
||||
if [ "$targetType" = libso ]
|
||||
then
|
||||
configOpt="--with-shared-libraries"
|
||||
configOpt="$configOpt --with-shared-libraries"
|
||||
fi
|
||||
|
||||
if [ "$WM_LABEL_SIZE" = 64 ]
|
||||
@ -170,25 +211,40 @@ echo
|
||||
configOpt="$configOpt --with-precision=double"
|
||||
fi
|
||||
|
||||
# We export compiler settings (above) but actually use the
|
||||
# --with-cc and --with-cxx. So ignore them and flags
|
||||
|
||||
unset CC CXX
|
||||
unset CFLAGS CXXFLAGS
|
||||
|
||||
cd "$PETSC_SOURCE_DIR" || exit
|
||||
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
|
||||
|
||||
rm -rf $PETSC_ARCH_PATH
|
||||
rm -rf "$PETSC_ARCH_PATH"
|
||||
# No clean here, if we have multiple arch in the same directory
|
||||
|
||||
## without tests? --testdir=..
|
||||
## configOpt="$configOpt --download-f2cblaslapack=1"
|
||||
|
||||
set -x
|
||||
./configure \
|
||||
--prefix=$PETSC_ARCH_PATH \
|
||||
--with-petsc-arch=$archOpt \
|
||||
${installPrefix:+--prefix="$installPrefix"} \
|
||||
--PETSC_DIR="$PETSC_SOURCE_DIR" \
|
||||
--with-petsc-arch="$archOpt" \
|
||||
--with-clanguage=C \
|
||||
--with-fc=0 \
|
||||
--with-scalapack=0 \
|
||||
--with-superlu_dist=0 \
|
||||
--with-suitesparse=0 \
|
||||
--download-f2cblaslapack=1 \
|
||||
--with-x=0 \
|
||||
$configOpt \
|
||||
&& set +x \
|
||||
&& echo "Configured: petsc" \
|
||||
&& make PETSC_DIR=$PETSC_SOURCE_DIR PETSC_ARCH="$archOpt" all \
|
||||
&& make ${WM_NCOMPPROCS:+-j $WM_NCOMPPROCS} \
|
||||
PETSC_DIR="$PETSC_SOURCE_DIR" PETSC_ARCH="$archOpt" all \
|
||||
&& echo "Built: petsc" \
|
||||
&& make PETSC_DIR=$PETSC_SOURCE_DIR PETSC_ARCH="$archOpt" install
|
||||
&& echo "Installed: petsc"
|
||||
&& makeInstall \
|
||||
&& echo "Installed: petsc - may require etc/pkgconfigPrefix to relocate"
|
||||
) || {
|
||||
echo "Error building: petsc"
|
||||
exit 1
|
||||
|
||||
@ -7,11 +7,10 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# makeParaView
|
||||
@ -127,6 +126,7 @@ For example,
|
||||
Or change the \$WM_PROJECT_DIR/etc/config.sh/paraview settings.
|
||||
|
||||
USAGE
|
||||
showDownloadHint PARAVIEW
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
@ -274,7 +274,7 @@ do
|
||||
-no-qt)
|
||||
withQT=false
|
||||
;;
|
||||
-qt-[1-9]*)
|
||||
-qt-[0-9]*)
|
||||
withQT=true
|
||||
QMAKE_PATH="$installBASE/${1##-}"
|
||||
;;
|
||||
|
||||
17
makeQt
17
makeQt
@ -7,11 +7,10 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2011 OpenFOAM Foundation
|
||||
# Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# makeQt
|
||||
@ -39,17 +38,21 @@ usage() {
|
||||
|
||||
usage: ${0##*/} [OPTION] [qt-VERSION] [-- configure-options]
|
||||
options:
|
||||
-force Force compilation, even if it already exists
|
||||
-gcc Force use of gcc/g++
|
||||
-help
|
||||
|
||||
* build $qtTYPE, version ${qtVERSION:-undefined}
|
||||
|
||||
USAGE
|
||||
showDownloadHint QT
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
exportCompiler true # Compiler info + flags for CMake/configure
|
||||
|
||||
unset optForce
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
@ -58,8 +61,9 @@ do
|
||||
--) break;; # Extra configure options (leave on $@ for later detection)
|
||||
-h | -help) usage ;;
|
||||
-gcc) useGcc ;;
|
||||
-force) optForce=true ;;
|
||||
|
||||
-qt-[1-9]* | [1-9]* | qt-*)
|
||||
-qt-[0-9]* | [0-9]* | qt-*)
|
||||
# -qt-VERSION, VERSION, qt-VERSION, qt-everywhere-opensource-src-VERSION
|
||||
qtVERSION="${1%%/}";
|
||||
qtVERSION="${qtVERSION##*-}"
|
||||
@ -95,7 +99,10 @@ echo
|
||||
echo ========================================
|
||||
echo "Build Qt $qtPACKAGE"
|
||||
echo
|
||||
if [ -d "$QT_ARCH_PATH" -a -r "$QT_ARCH_PATH/bin/qmake" ]
|
||||
|
||||
if [ -z "$optForce" ] \
|
||||
&& [ -d "$QT_ARCH_PATH" ] \
|
||||
&& [ -r "$QT_ARCH_PATH/bin/qmake" ]
|
||||
then
|
||||
echo "Already built: Qt-$qtVERSION"
|
||||
else
|
||||
|
||||
180
makeSCOTCH
180
makeSCOTCH
@ -6,22 +6,19 @@
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# makeSCOTCH
|
||||
#
|
||||
# Description
|
||||
# Build the SCOTCH and PTSCOTCH libraries
|
||||
# Build the SCOTCH and PTSCOTCH libraries, optionally build binaries
|
||||
#
|
||||
# ----------------------------------------------
|
||||
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Run from third-party directory only
|
||||
cd "${0%/*}" || exit
|
||||
@ -30,11 +27,6 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
echo " Check your OpenFOAM environment and installation"
|
||||
exit 1
|
||||
}
|
||||
[ -n "$FOAM_EXT_LIBBIN" ] || {
|
||||
echo "Error (${0##*/}) : \$FOAM_EXT_LIBBIN not set"
|
||||
echo " Check your OpenFOAM environment and installation"
|
||||
exit 1
|
||||
}
|
||||
. etc/tools/ThirdPartyFunctions
|
||||
#------------------------------------------------------------------------------
|
||||
_foamConfig scotch # Get SCOTCH_ARCH_PATH, SCOTCH_VERSION
|
||||
@ -53,18 +45,25 @@ 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++
|
||||
-bin Create scotch binaries as well (experimental)
|
||||
-no-bin Suppress creation of scotch binaries (default)
|
||||
-no-mpi Suppress build of pt-scotch
|
||||
-help
|
||||
|
||||
* Compile SCOTCH
|
||||
$kahipPACKAGE
|
||||
$scotchPACKAGE
|
||||
|
||||
USAGE
|
||||
showDownloadHint SCOTCH
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
unset optBinaries optForce
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
@ -72,11 +71,13 @@ do
|
||||
'') ;; # Ignore empty
|
||||
-h | -help) usage ;;
|
||||
-gcc) useGcc ;;
|
||||
-force) optForce=true ;;
|
||||
|
||||
-no-mpi)
|
||||
unset withMPI
|
||||
;;
|
||||
scotch-[1-9]* | scotch-git | scotch_* | scotch-[1-9]*)
|
||||
-bin) optBinaries=true ;;
|
||||
-no-bin) unset optBinaries ;;
|
||||
-no-mpi) unset withMPI ;;
|
||||
|
||||
scotch-[0-9]* | scotch-git | scotch_* )
|
||||
scotchPACKAGE="${1%%/}"
|
||||
unset SCOTCH_ARCH_PATH # Avoid inconsistency
|
||||
;;
|
||||
@ -90,16 +91,18 @@ done
|
||||
[ -n "$scotchPACKAGE" ] || die "The scotch-VERSION was not specified"
|
||||
|
||||
# Nothing to build
|
||||
if _foamIsNone $scotchPACKAGE
|
||||
if _foamIsNone "$scotchPACKAGE"
|
||||
then
|
||||
echo "Using scotch-none (skip ThirdParty build of SCOTCH)"
|
||||
exit 0
|
||||
elif _foamIsSystem $scotchPACKAGE
|
||||
elif _foamIsSystem "$scotchPACKAGE"
|
||||
then
|
||||
echo "Using scotch-system"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
requireExtLibBin
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Needs generalizing, but works fairly well
|
||||
@ -123,7 +126,7 @@ makefileInc="../../$scotchMakefile"
|
||||
# SCOTCH_ARCH_PATH : installation directory
|
||||
# SCOTCH_SOURCE_DIR : location of the original sources
|
||||
|
||||
SCOTCH_SOURCE_DIR=$sourceBASE/$scotchPACKAGE
|
||||
SCOTCH_SOURCE_DIR="$sourceBASE/$scotchPACKAGE"
|
||||
: "${SCOTCH_ARCH_PATH:=$installBASE$WM_SIZE_OPTIONS/$scotchPACKAGE}"
|
||||
|
||||
[ -d "$SCOTCH_SOURCE_DIR/src" ] || {
|
||||
@ -137,12 +140,19 @@ echo ========================================
|
||||
echo "scotch decomposition ($scotchPACKAGE)"
|
||||
echo " Makefile.inc : ${makefileInc##*/}"
|
||||
|
||||
# (serial) scotch
|
||||
prefixDIR="$SCOTCH_ARCH_PATH"
|
||||
binDIR="$prefixDIR"/bin
|
||||
incDIR="$prefixDIR"/include
|
||||
libDIR="$FOAM_EXT_LIBBIN"
|
||||
|
||||
# Test installation. May or may not have libscotcherrexit.so
|
||||
if [ -f "$SCOTCH_ARCH_PATH/include/scotch.h" ] \
|
||||
&& [ -r "$FOAM_EXT_LIBBIN/libscotch$EXT_SO" ]
|
||||
if [ -z "$optForce" ] \
|
||||
&& [ -f "$incDIR"/scotch.h ] \
|
||||
&& haveLibso "$libDIR"/libscotch
|
||||
then
|
||||
echo " scotch include: $SCOTCH_ARCH_PATH/include"
|
||||
echo " scotch library: $FOAM_EXT_LIBBIN"
|
||||
echo " scotch include: $incDIR"
|
||||
echo " scotch library: $libDIR"
|
||||
elif [ -d "$SCOTCH_SOURCE_DIR" ]
|
||||
then
|
||||
(
|
||||
@ -163,18 +173,14 @@ then
|
||||
|
||||
applyPatch "$scotchPACKAGE" .. # patch at parent-level
|
||||
|
||||
prefixDIR=$SCOTCH_ARCH_PATH
|
||||
incDIR=$SCOTCH_ARCH_PATH/include
|
||||
libDIR=$FOAM_EXT_LIBBIN
|
||||
|
||||
mkdir -p $prefixDIR 2>/dev/null
|
||||
mkdir -p $incDIR 2>/dev/null
|
||||
mkdir -p $libDIR 2>/dev/null
|
||||
mkdir -p "$binDIR" 2>/dev/null
|
||||
mkdir -p "$incDIR" 2>/dev/null
|
||||
mkdir -p "$libDIR" 2>/dev/null
|
||||
|
||||
if [ -f "$makefileInc" ]
|
||||
then
|
||||
rm -f Makefile.inc
|
||||
ln -s $makefileInc Makefile.inc
|
||||
ln -s "$makefileInc" Makefile.inc
|
||||
fi
|
||||
[ -f Makefile.inc ] || {
|
||||
echo " Error: scotch needs an appropriate Makefile.inc"
|
||||
@ -187,16 +193,25 @@ then
|
||||
# Consistency for Intel-MPI and non-icc compilers
|
||||
[ -n "$I_MPI_CC" ] || export I_MPI_CC="$(whichCC)"
|
||||
|
||||
# The make targets
|
||||
make_targets="libscotch"
|
||||
if [ "$optBinaries" = true ]
|
||||
then
|
||||
make_targets="$make_targets scotch"
|
||||
fi
|
||||
|
||||
make realclean 2>/dev/null # Extra safety
|
||||
make -j $WM_NCOMPPROCS libscotch \
|
||||
make -j $WM_NCOMPPROCS $make_targets \
|
||||
&& make \
|
||||
prefix=$prefixDIR \
|
||||
includedir=$incDIR \
|
||||
libdir=$libDIR \
|
||||
prefix="$prefixDIR" \
|
||||
bindir="$binDIR" \
|
||||
libdir="$libDIR" \
|
||||
includedir="$incDIR" \
|
||||
install
|
||||
|
||||
rmdir "$SCOTCH_ARCH_PATH/bin" 2> /dev/null || true # Superfluous bin?
|
||||
make realclean 2>/dev/null || true # Failed cleanup is uncritical
|
||||
rmdir "$binDIR" 2>/dev/null || true # Remove empty bin/
|
||||
rmdir "${binDIR%/*}" 2>/dev/null || true # ... and empty parent
|
||||
make realclean 2>/dev/null || true # Failed cleanup is uncritical
|
||||
) || warnBuildIssues SCOTCH
|
||||
else
|
||||
warnNotFound SCOTCH
|
||||
@ -205,31 +220,53 @@ fi
|
||||
|
||||
# Build ptscotch when MPI (ThirdParty or system) is available
|
||||
|
||||
[ "${withMPI}" = true ] || {
|
||||
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
|
||||
|
||||
echo
|
||||
echo ========================================
|
||||
echo "pt-scotch decomposition ($scotchPACKAGE with $FOAM_MPI)"
|
||||
|
||||
# Build ptscotch if normal scotch was built (has include and library)
|
||||
[ -f "$SCOTCH_ARCH_PATH/include/scotch.h" ] && \
|
||||
[ -r "$FOAM_EXT_LIBBIN/libscotch$EXT_SO" ] || \
|
||||
{
|
||||
# Report that the above tests failed and pass-through the failure
|
||||
echo
|
||||
echo " skipping - no <scotch.h> found"
|
||||
exit 2
|
||||
}
|
||||
|
||||
if [ -f "$SCOTCH_ARCH_PATH/include/$FOAM_MPI/ptscotch.h" ] && \
|
||||
[ -r "$FOAM_EXT_LIBBIN/$FOAM_MPI/libptscotch$EXT_SO" ]
|
||||
# (reuse prefix/include/lib dirs set above)
|
||||
if [ -f "$incDIR"/scotch.h ] \
|
||||
&& haveLibso "$libDIR"/libscotch
|
||||
then
|
||||
echo " ptscotch include: $SCOTCH_ARCH_PATH/include/$FOAM_MPI"
|
||||
echo " ptscotch library: $FOAM_EXT_LIBBIN/$FOAM_MPI"
|
||||
echo
|
||||
echo ========================================
|
||||
echo "pt-scotch decomposition ($scotchPACKAGE 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
|
||||
prefixDIR="$SCOTCH_ARCH_PATH"
|
||||
binDIR="$prefixDIR/bin/$FOAM_MPI"
|
||||
incDIR="$prefixDIR/include/$FOAM_MPI"
|
||||
libDIR="$FOAM_EXT_LIBBIN/$FOAM_MPI"
|
||||
|
||||
if [ -z "$optForce" ] \
|
||||
&& [ -f "$incDIR"/ptscotch.h ] \
|
||||
&& haveLibso "$libDIR"/libptscotch
|
||||
then
|
||||
echo " ptscotch include: $incDIR"
|
||||
echo " ptscotch library: $libDIR"
|
||||
else
|
||||
(
|
||||
# Older versions ok, but scotch-6.0.5a cannot build in parallel.
|
||||
@ -246,18 +283,14 @@ else
|
||||
export GIT_DIR="$SCOTCH_SOURCE_DIR/.git" # Mask seeing our own git-repo
|
||||
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 $incDIR 2>/dev/null
|
||||
mkdir -p $libDIR 2>/dev/null
|
||||
mkdir -p "$binDIR" 2>/dev/null
|
||||
mkdir -p "$incDIR" 2>/dev/null
|
||||
mkdir -p "$libDIR" 2>/dev/null
|
||||
|
||||
if [ -f "$makefileInc" ]
|
||||
then
|
||||
rm -f Makefile.inc
|
||||
ln -s $makefileInc Makefile.inc
|
||||
ln -s "$makefileInc" Makefile.inc
|
||||
fi
|
||||
[ -f Makefile.inc ] || {
|
||||
echo " Error: ptscotch needs an appropriate Makefile.inc"
|
||||
@ -270,16 +303,25 @@ else
|
||||
# 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
|
||||
make_targets="libptscotch"
|
||||
if [ "$optBinaries" = true ]
|
||||
then
|
||||
make_targets="$make_targets ptscotch"
|
||||
fi
|
||||
|
||||
make realclean 2>/dev/null # Extra safety
|
||||
make -j $WM_NCOMPPROCS libptscotch \
|
||||
make -j $WM_NCOMPPROCS $make_targets \
|
||||
&& make \
|
||||
prefix=$prefixDIR \
|
||||
includedir=$incDIR \
|
||||
libdir=$libDIR \
|
||||
prefix="$prefixDIR" \
|
||||
bindir="$binDIR" \
|
||||
libdir="$libDIR" \
|
||||
includedir="$incDIR" \
|
||||
install
|
||||
|
||||
rmdir "$SCOTCH_ARCH_PATH/bin" 2> /dev/null || true # Superfluous bin?
|
||||
make realclean 2>/dev/null || true # Failed cleanup is uncritical
|
||||
rmdir "$binDIR" 2>/dev/null || true # Remove empty bin/
|
||||
rmdir "${binDIR%/*}" 2>/dev/null || true # ... and empty parent
|
||||
make realclean 2>/dev/null || true # Failed cleanup is uncritical
|
||||
) || warnBuildIssues PTSCOTCH
|
||||
fi
|
||||
|
||||
|
||||
6
makeVTK
6
makeVTK
@ -6,11 +6,10 @@
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# makeVTK
|
||||
@ -103,6 +102,7 @@ For finer control, the build stages can be selected or deselected individually:
|
||||
-> \$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/VTK-$VTK_VERSION$BUILD_SUFFIX
|
||||
|
||||
USAGE
|
||||
# showDownloadHint VTK
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
7
minCmake
7
minCmake
@ -6,11 +6,10 @@
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
#
|
||||
# Script
|
||||
# minCmake
|
||||
@ -84,6 +83,6 @@ do
|
||||
done \
|
||||
| sort -n -k 1 \
|
||||
| xargs printf " %-10s %s\n"
|
||||
# Use 4 leading spaces for easier pasting as Markdown
|
||||
# 4 leading spaces for easy pasting as Markdown
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user