26 Commits
v1912 ... v2012

Author SHA1 Message Date
ddfdec4cd9 CONFIG: update adios and petsc version information 2020-12-14 15:19:35 +01:00
834efe6dda COMP: handle forced use of gcc/g++ for wmake components
- does not change WM_OPTIONS or output directories, so that the target
  directories are correct.
2020-11-16 08:29:39 +01:00
69cff3b3d3 CONFIG: add detection of newer libadios2 libs
- prevent unneeded recompilation

DOC: add link for new scotch package
2020-11-04 20:45:06 +01:00
c3aa2a4bfe CONFIG: remove redundant petsc configure options, add '-debug' option 2020-09-11 13:35:27 +02:00
9a3938551a ENH: build petsc with debugging off (fixes #58)
- also permit petsc to determine its own hypre version (#58)
2020-09-07 15:56:42 +02:00
28f482b836 CONFIG: skip compilation of ADIOS2, METIS with mingw (#57)
- adios is out of scope for cross-compilation

- metis does not seem to support cross-compilation.
  Use scotch instead.
2020-08-12 16:45:17 +02:00
53a1736aad BUG: boost user-config.jam written into incorrect directory
- mistake introduced by 11e3723f10
2020-08-12 16:41:54 +02:00
f197c721c8 ENH: mingw cross-compile for FFTW (issue #57) 2020-08-11 16:21:26 +02:00
11e3723f10 ENH: improve test for existing libraries (fixes #56)
- check lib as well as lib64

- support -force option in a few more places
2020-08-10 15:10:31 +02:00
9a8a4852bc CONFIG: remove libz dependency for scotch (issue #55)
- reduces ThirdParty inter-dependency.
  Only useful for reading in graph files, which are not used
  internally by OpenFOAM.

- Was already removed for Mingw compilation.
2020-08-07 13:49:58 +02:00
507c01e485 CONFIG: add mpicc/mpicxx handling for Fujitsu MPI (issue #54)
- uses mpifcc/mpiFCC for mpicc/mpicxx, respectively
2020-08-07 13:49:45 +02:00
bdd4266e2f ENH: delay testing of FOAM_EXT_LIBBIN
- only test in the packages that actually require it.
  State as a requirement.

ENH: skip build of packages with known mingw issues

- primarily kahip and pt-scotch.
  Others may also have issues, but for these we tend to use system
  packages anyhow.

ENH: add '-force' option to various scripts

- overrides some _lazy_ build logic
2020-06-24 14:32:26 +02:00
36f89097d8 STYLE: fix typo in PETSc help, add download info for HYPRE 2020-06-22 12:25:09 +02:00
78819144d3 DOC: add hint about scotch gitlab repo and paraview requirements (#52)
- add download hints for -help of various make scripts
2020-06-19 00:38:03 +02:00
348b8cd4f4 CONFIG: support inplace petsc installations 2020-06-19 00:38:03 +02:00
b9ace75da8 DOC: update download links 2020-06-15 21:18:59 +02:00
aa2523ee63 DOC: update BUILD and SOURCES information 2020-06-15 20:41:05 +02:00
6e03e1ecb4 CONFIG: simplify version range
- accept [0-9]* instead of attempting more restrictive specifications

CONFIG: makePETSC without fortran
2020-06-15 20:30:22 +02:00
7958c7e4c1 BUG: shell syntax error in makePETSC 2020-06-05 15:02:17 +02:00
67093bfb2f CONFIG: add -with-lib options for makeCGAL
- if not otherwise specified:
  - OpenFOAM-v1912 and older are implicitly `-with-lib`
  - new versions are implicitly `-no-lib`
2020-06-05 14:06:39 +02:00
9de516d315 CONFIG: incremental improvement for scotch + mingw
- linkage errors for ptscotch not yet solved

CONFIG: add -I. for ThirdParty wmake Make/options

- some <headers> might otherwise be missed with the change to
  '-iquote' for general wmake rules
2020-05-14 16:16:40 +02:00
69de80cd08 ENH: use OpenFOAM etc/config.sh/cmake (if it exists) for finding cmake 2020-05-02 21:09:21 +02:00
60d3922681 ENH: support build of scotch executables
- improve library checks to avoid unnecessary rebuild when
  cross-compiling
2020-04-15 20:33:22 +02:00
a4ba6b72f5 CONFIG: support updated location of wmkdepend binaries
- initialise some commonly used variables

- add library function for checking library existence that also
  accounts for windows cross-compilation targets
2020-04-15 20:32:39 +02:00
0c7c86faa6 COMP: skip build of ADIOS2 examples
- may fail to find mpi.h with ThirdParty openmpi

- remove makeAdios1 (ADIOS1 considered defunct for our purposes)
2020-01-20 14:50:49 +01:00
cd811d9b28 BUG: shell quoting needed for dash (fixes #48)
- arguments passed to stripCompilerFlags caused the misbehaviour
2020-01-20 14:50:29 +01:00
41 changed files with 1076 additions and 978 deletions

View File

@ -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'"

View File

@ -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

View File

@ -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,19 @@ 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
[link adios]: https://github.com/ornladios/ADIOS2/archive/v2.6.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 scotch61]: https://gforge.inria.fr/frs/download.php/file/38352/scotch_6.1.0.tar.gz
[link scotch60_10]: https://gforge.inria.fr/frs/download.php/file/38350/scotch_6.0.10.tar.gz
[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 +544,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]: https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.14.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 +605,4 @@ easier to use `grep` and find the relevant pages and links.
---
Copyright 2016-2019 OpenCFD Ltd
Copyright 2016-2020 OpenCFD Ltd

View File

@ -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

View File

@ -1,4 +1,30 @@
Short summary of third-party software versions for recent OpenFOAM versions.
Third-party software versions for recent OpenFOAM versions
OpenFOAM-2012
---------------
ADIOS-2.6.0 *update*
CGAL-4.12.2
ParaView-5.6.3
boost_1_66_0
fftw-3.3.7
openmpi-4.0.3
scotch_6.0.9
kahip-2.12
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
---------------

View File

@ -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

View File

@ -1,7 +1,5 @@
/* NOTE: make any changes to this file in etc/makeFiles/ */
EXE_INC =
EXE_INC = -I.
LIB_LIBS =
PROJECT_LIBS =

View File

@ -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:
@ -29,7 +29,7 @@ CCS ?= $(CC)
CCP ?= mpicc
CCD = $(CCP)
CFLAGS = $(WM_CFLAGS) -fPIC -O3 \
-DCOMMON_FILE_COMPRESS_GZ \
-UCOMMON_FILE_COMPRESS \
-DCOMMON_RANDOM_FIXED_SEED \
-DSCOTCH_DETERMINISTIC \
-DSCOTCH_RENAME \
@ -41,7 +41,7 @@ CFLAGS += -DINTSIZE64
endif
CLIBFLAGS =
LDFLAGS = $(WM_LDFLAGS) -lz -lm
LDFLAGS = $(WM_LDFLAGS) -lm
MAKE = make
CP = cp

View File

@ -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 =

View File

@ -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:
@ -29,7 +29,7 @@ CCS ?= $(CC)
CCP ?= mpicc
CCD = $(CCP)
CFLAGS = $(WM_CFLAGS) -fPIC -O3 \
-DCOMMON_FILE_COMPRESS_GZ \
-UCOMMON_FILE_COMPRESS \
-DCOMMON_RANDOM_FIXED_SEED \
-DSCOTCH_DETERMINISTIC \
-DSCOTCH_RENAME \
@ -41,7 +41,7 @@ CFLAGS += -DINTSIZE64
endif
CLIBFLAGS = -shared
LDFLAGS = -Xlinker --no-as-needed $(WM_LDFLAGS) -lz -lm -lrt
LDFLAGS = -Xlinker --no-as-needed $(WM_LDFLAGS) -lm -lrt
MAKE = make
CP = cp

View File

@ -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"

View File

@ -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"

View File

@ -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"
# -----------------------------------------------------------------------------

View File

@ -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

View File

@ -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

View File

@ -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]

View File

@ -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"
@ -169,6 +211,16 @@ useGcc()
export CXX=g++
}
# Force use of system gcc/g++ (wmake compilation) without changing the
# WM_OPTIONS or output directories
useGccWmake()
{
export WM_COMPILER=Gcc
export WM_COMPILER_TYPE=system
}
# Scan arguments for a '-gcc' option, forcing gcc/g++ when found
useGccFlag()
{
@ -216,13 +268,20 @@ whichCXX()
}
# Return <mpicc> by default or <mpiicc> if possible for INTELMPI.
# Return
# <mpicc> by default
# <mpifcc> for FJMPI (if possible)
# <mpiicc> for INTELMPI (if possible)
#
# Cray doesn't have <mpicc>, but its <cc> manages mpi paths directly.
# NOTE: could further refine based on "wmake -show-c", but not yet needed
whichMpicc()
{
local comp="$(command -v mpicc)"
case "$WM_MPLIB" in
(FJMPI)
comp="$(command -v mpifcc)" # Fujitsu <mpifcc> available?
;;
(INTELMPI)
comp="$(command -v mpiicc)" # Intel <mpiicc> available?
;;
@ -234,13 +293,20 @@ whichMpicc()
}
# Return <mpicxx> by default or <mpiicpc> if possible for INTELMPI.
# Return
# <mpicxx> by default
# <mpiFCC> for FJMPI (if possible)
# <mpiicpc> for INTELMPI (if possible)
#
# Cray doesn't have <mpicxx>, but its <CC> manages mpi paths directly.
# NOTE: could further refine based on "wmake -show-cxx", but not yet needed
whichMpicxx()
{
local comp="$(command -v mpicxx)"
case "$WM_MPLIB" in
(FJMPI)
comp="$(command -v mpiFCC)" # Fujitsu <mpiFCC> available?
;;
(INTELMPI)
comp="$(command -v mpiicpc)" # Intel <mpiicpc> available?
;;
@ -252,24 +318,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 +350,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 +377,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 +499,7 @@ _foamIsSystem()
unset CMAKE_PATH # clear when first loaded
findCMake()
{
local config="config.sh/cmake"
local candidate foundExe
if [ -n "$CMAKE_PATH" ]
@ -419,13 +508,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 +524,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 +545,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 +604,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 +620,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 +641,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 +656,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 +672,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 +698,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 +720,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 +746,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~ \

View File

@ -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

View File

@ -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
# -----------------------------------------------------------------------------

View File

@ -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,15 +26,27 @@
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" ]
then
echo " adios2 include: $dir/include"
echo " adios2 library: $dir/lib$WM_COMPILER_LIB_ARCH"
exit 0
else
exit 2
fi
dir="${2%/}" # <- *_ARCH_PATH
[ -d "$dir/include" ] || exit 2
package="adios2"
libName="libadios2"
libName2="libadios2_cxx11_mpi"
for lib in \
"$dir/lib/$libName$EXT_SO" \
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName$EXT_SO" \
"$dir/lib/$libName2$EXT_SO" \
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName2$EXT_SO" \
;
do
if [ -r "$lib" ]
then
echo " $package include: $dir/include"
echo " $package library: ${lib%/*}"
exit 0
fi
done
exit 2
fi
#------------------------------------------------------------------------------
# Run from third-party directory only
@ -60,6 +71,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 +80,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 +95,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%%/}"
;;
*)
@ -112,6 +126,19 @@ then
exit 0
fi
# Known build issues for mingw (various things)
case "$WM_COMPILER" in
(Mingw*)
if [ "$optForce" = true ]
then
echo "Warning: adios2 - known compilation issues with $WM_COMPILER"
else
echo "Skipping adios2 - known compilation issues with $WM_COMPILER"
exit 0
fi
;;
esac
#------------------------------------------------------------------------------
#
# Build ADIOS
@ -130,11 +157,14 @@ 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/libadios2$EXT_SO" ] \
|| [ -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"
echo " ADIOS2 already built : $ADIOS2_ARCH_PATH"
else
# CMake options often lag the configure ones
echo "Starting build: $adiosPACKAGE (using cmake)"
@ -165,6 +195,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 \

View File

@ -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
}
#------------------------------------------------------------------------------
@ -81,12 +73,12 @@ do
case "$1" in
'') ;; # Ignore empty
-h | -help) usage ;;
-gcc) useGcc ;;
-gcc) useGccWmake ;;
lib|libso)
targetType="$1"
;;
libccmio-[1-9]*)
libccmio-[0-9]*)
ccmioPACKAGE="${1%%/}"
;;
*)
@ -97,6 +89,7 @@ do
done
requireWMakeToolchain
requireExtLibBin
#------------------------------------------------------------------------------
#

150
makeCGAL
View File

@ -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,11 @@
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
[ -d "$dir/include" ] || exit 2
# 2020-08-10: Needs reworking for header-only installations!
if [ -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 +46,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 +91,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 +111,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
unset optForce optHeadersOnly optToolset
# Parse options
while [ "$#" -gt 0 ]
do
@ -121,6 +127,7 @@ do
'') ;; # Ignore empty
-h | -help) usage ;;
-gcc) useGcc ;;
-force) optForce=true ;;
-cmake)
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
@ -139,11 +146,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 +175,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 +216,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 +230,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"
@ -218,16 +247,17 @@ then
fi
# Use lib/ when lib64/ does not exist
[ ! -d "$boostLib" -a -d "$libdir" ] && boostLib="$libdir"
[ -d "$libdir" -a ! -d "$boostLib" ] && boostLib="$libdir"
elif [ -f "$boostInc/boost/version.hpp" ]
elif [ -z "$optForce" ] \
&& [ -f "$boostInc/boost/version.hpp" ]
then
echo "Using $boostPACKAGE"
libdir="$BOOST_ARCH_PATH/lib"
# Use lib when lib64 does not exist
[ ! -d "$boostLib" -a -d "$libdir" ] && boostLib="$libdir"
[ -d "$libdir" -a ! -d "$boostLib" ] && boostLib="$libdir"
else
echo "Starting build: $boostPACKAGE"
@ -235,14 +265,14 @@ else
# Absolute path for --libdir
(
# Configuration options:
unset buildOpt
# Write user-config.jam into source directory
cd "$BOOST_SOURCE_DIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
rm -rf $BOOST_ARCH_PATH
# Configuration options:
unset buildOpt
# Compiler-specific adjustments
case "$WM_COMPILER" in
(Arm*)
# Toolset for bootstrap
@ -281,9 +311,14 @@ else
;;
esac
# End of configuration options
# ----------------------------
rm -rf "$BOOST_ARCH_PATH"
./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 +330,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 +364,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 +397,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 +409,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 +446,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
}
@ -455,22 +491,22 @@ cgalIsCurrent()
}
if cgalIsCurrent
if [ -z "$optForce" ] \
&& cgalIsCurrent
then
echo " ${CGAL_ARCH_PATH##*/} build appears to be up-to-date - skipping"
echo
exit 0
fi
else
(
# 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 +520,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 +548,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 +579,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
@ -578,6 +614,7 @@ CMAKE_OPTIONS
unset cmakeDefs
# Compiler-specific adjustments
case "$WM_COMPILER" in
(Mingw*)
cmakeDefs="$cmakeDefs -DCMAKE_SYSTEM_NAME=Windows"
@ -586,6 +623,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 +642,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 \
@ -626,5 +669,6 @@ CMAKE_OPTIONS
echo "Done CGAL"
)
fi
#------------------------------------------------------------------------------

View File

@ -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

View File

@ -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,15 +27,24 @@
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" ]
then
echo " fftw include: $dir/include"
echo " fftw library: $dir/lib$WM_COMPILER_LIB_ARCH"
exit 0
else
exit 2
fi
dir="${2%/}" # <- *_ARCH_PATH
[ -d "$dir/include" ] || exit 2
package="fftw"
libName="libfftw3"
for lib in \
"$dir/lib/$libName$EXT_SO" \
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName$EXT_SO" \
;
do
if [ -r "$lib" ]
then
echo " $package include: $dir/include"
echo " $package library: ${lib%/*}"
exit 0
fi
done
exit 2
fi
#------------------------------------------------------------------------------
# Run from third-party directory only
@ -52,7 +60,7 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
# FFTW version from OpenFOAM etc/config.sh file:
_foamConfig FFTW
fftwPACKAGE=${fftw_version:-fftw-system}
fftwPACKAGE="${fftw_version:-fftw-system}"
#------------------------------------------------------------------------------
usage() {
@ -62,6 +70,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 +78,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 +94,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%%/}"
@ -118,12 +131,17 @@ fi
# FFTW_SOURCE_DIR : location of the original sources
# FFTW_ARCH_PATH : installation directory
FFTW_SOURCE_DIR=$sourceBASE/$fftwPACKAGE
FFTW_ARCH_PATH=$installBASE/$fftwPACKAGE
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/libfftw3$EXT_SO" ] \
|| [ -r "$FFTW_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libfftw3$EXT_SO" ] \
|| [ -r "$FFTW_ARCH_PATH/bin/libfftw3-3$EXT_SO" ] # Windows
}
then
echo "Already has FFTW shared library"
echo "FFTW already built : $FFTW_ARCH_PATH"
else
echo "Starting build: FFTW ($fftwPACKAGE)"
echo
@ -132,6 +150,21 @@ else
# Configuration options:
unset configOpt
# Compiler-specific adjustments
case "$WM_COMPILER" in
(Mingw*)
# Cross-compiling
# See http://www.fftw.org/install/windows.html
configOpt="
--host=x86_64-w64-mingw32
--with-our-malloc
--enable-threads --with-combined-threads
--enable-sse2
--with-incoming-stack-boundary=2
"
;;
esac
# Additional configure options
if [ "$1" = "--" ]
then
@ -141,20 +174,20 @@ else
# End of configuration options
# ----------------------------
buildDIR=$buildBASE/$fftwPACKAGE
buildDIR="$buildBASE/$fftwPACKAGE"
cd "$FFTW_SOURCE_DIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
rm -rf $FFTW_ARCH_PATH
rm -rf $buildDIR
mkdir -p $buildDIR
cd $buildDIR
rm -rf "$FFTW_ARCH_PATH"
rm -rf "$buildDIR"
mkdir -p "$buildDIR"
cd "$buildDIR"
set -x
$FFTW_SOURCE_DIR/configure \
--prefix=$FFTW_ARCH_PATH \
--libdir=$FFTW_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH \
"$FFTW_SOURCE_DIR"/configure \
--prefix="$FFTW_ARCH_PATH" \
--libdir="$FFTW_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" \
--enable-shared --disable-static \
--disable-fortran \
$configOpt \
@ -162,7 +195,7 @@ else
&& make -j $WM_NCOMPPROCS \
&& make install \
&& echo "Built $fftwPACKAGE" \
&& pkgconfigAdjust $FFTW_ARCH_PATH
&& pkgconfigAdjust "$FFTW_ARCH_PATH"
) || {
echo "Error building: FFTW"
exit 1

18
makeGcc
View File

@ -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'"
;;

View File

@ -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
}
#------------------------------------------------------------------------------

View File

@ -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,24 +51,29 @@ options:
${hyprePACKAGE:-'unspecified hypre version'}
USAGE
showDownloadHint HYPRE
exit 1
}
#------------------------------------------------------------------------------
exportCompiler # Compiler info for CMake/configure
unset optForce
# Parse options
while [ "$#" -gt 0 ]
do
case "$1" in
'') ;; # Ignore empty
--) break;; # Extra configure options (leave on $@ for later detection)
-h | -help) 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 +87,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 +104,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 +121,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 \

View File

@ -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,25 +27,26 @@
if [ "$1" = "-test" ]
then
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
dir="${2%/}" # <- KAHIP_ARCH_PATH
if [ -d "$dir/include" ]
then
for lib in \
$FOAM_EXT_LIBBIN/libkahip$EXT_SO \
$dir/lib/libkahip.a \
$dir/lib/libkahip$EXT_SO \
$dir/lib$WM_COMPILER_LIB_ARCH/libkahip.a \
$dir/lib$WM_COMPILER_LIB_ARCH/libkahip$EXT_SO \
;
do
if [ -r "$lib" ]
then
echo " kahip include: $dir/include"
echo " kahip library: ${lib%/*}"
exit 0
fi
done
fi
dir="${2%/}" # <- *_ARCH_PATH
[ -d "$dir/include" ] || exit 2
package="kahip"
libName="libkahip"
for lib in \
"$FOAM_EXT_LIBBIN/$libName$EXT_SO" \
"$dir/lib/$libName.a" \
"$dir/lib/$libName$EXT_SO" \
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName.a" \
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName$EXT_SO" \
;
do
if [ -r "$lib" ]
then
echo " $package include: $dir/include"
echo " $package library: ${lib%/*}"
exit 0
fi
done
exit 2
fi
#------------------------------------------------------------------------------
@ -57,11 +57,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 +74,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,18 +82,22 @@ options:
$kahipPACKAGE
USAGE
showDownloadHint KAHIP
exit 1
}
#------------------------------------------------------------------------------
exportCompiler minimal # Minimal compiler info for CMake/configure
unset optForce
# Parse options
while [ "$#" -gt 0 ]
do
case "$1" in
'') ;; # Ignore empty
-h | -help) usage ;;
-gcc) useGcc ;;
-gcc) useGccWmake ;;
-force) optForce=true ;;
-cmake)
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
@ -109,7 +109,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 +133,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
#------------------------------------------------------------------------------
#

View File

@ -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 \

View File

@ -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,25 +27,26 @@
if [ "$1" = "-test" ]
then
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
dir="${2%/}" # <- METIS_ARCH_PATH
if [ -d "$dir/include" ]
then
for lib in \
$FOAM_EXT_LIBBIN/libmetis$EXT_SO \
$dir/lib/libmetis.a \
$dir/lib/libmetis$EXT_SO \
$dir/lib$WM_COMPILER_LIB_ARCH/libmetis.a \
$dir/lib$WM_COMPILER_LIB_ARCH/libmetis$EXT_SO \
;
do
if [ -r "$lib" ]
then
echo " metis include: $dir/include"
echo " metis library: ${lib%/*}"
exit 0
fi
done
fi
dir="${2%/}" # <- *_ARCH_PATH
[ -d "$dir/include" ] || exit 2
package="metis"
libName="libmetis"
for lib in \
"$FOAM_EXT_LIBBIN/$libName$EXT_SO" \
"$dir/lib/$libName.a" \
"$dir/lib/$libName$EXT_SO" \
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName.a" \
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName$EXT_SO" \
;
do
if [ -r "$lib" ]
then
echo " $package include: $dir/include"
echo " $package library: ${lib%/*}"
exit 0
fi
done
exit 2
fi
#------------------------------------------------------------------------------
@ -57,11 +57,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 +79,7 @@ options:
${metisPACKAGE:-'unspecified metis version'}
USAGE
showDownloadHint METIS
exit 1
}
#------------------------------------------------------------------------------
@ -125,6 +121,19 @@ then
exit 0
fi
# Known build issues for mingw (various things)
case "$WM_COMPILER" in
(Mingw*)
if :
then
echo "Skipping metis - known compilation issues with $WM_COMPILER"
exit 0
fi
;;
esac
requireExtLibBin
#------------------------------------------------------------------------------
#
# Build METIS

View File

@ -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,12 +137,14 @@ 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/libmgrid.a" ] \
|| [ -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
echo
echo " MGridGen already built : $MGRIDGEN_ARCH_PATH"
else
(
cd "$MGRIDGEN_SOURCE_DIR" || exit

View File

@ -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,19 +27,25 @@
if [ "$1" = "-test" ]
then
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
dir="${2%/}" # <- MPI_ARCH_PATH
if [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
then
echo "Have mpich shared library (${dir##*/})"
exit 0
elif [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
then
echo "Have mpich static library (${dir##*/})"
exit 0
else
echo "No mpich libraries found: ${dir:-not-specified}"
exit 2
fi
dir="${2%/}" # <- *_ARCH_PATH
package="mpich"
libName="libmpi"
for lib in \
"$dir/lib/$libName.a" \
"$dir/lib/$libName$EXT_SO" \
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName.a" \
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName$EXT_SO" \
;
do
if [ -r "$lib" ]
then
echo "Have $package shared library (${dir##*/})"
exit 0
fi
done
echo "No $package libraries found: ${dir:-not-specified}"
exit 2
fi
#------------------------------------------------------------------------------
# Run from third-party directory only
@ -73,6 +78,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 +86,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 +102,7 @@ do
--) break;; # Extra configure options (leave on $@ for later detection)
-h | -help) usage ;;
-gcc) useGcc ;;
-force) optForce=true ;;
mpich*)
mpiPACKAGE="${1%%/}"
@ -128,12 +138,20 @@ 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/libmpi$EXT_SO" ] \
|| [ -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" ]
echo "Already has shared library: $MPI_ARCH_PATH"
elif [ -z "$optForce" ] \
&& {
[ -r "$MPI_ARCH_PATH/lib/libmpi.a" ] \
|| [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
}
then
echo "Already has static library"
echo "Already has static library: $MPI_ARCH_PATH"
else
echo "Starting build: $WM_MPLIB ($mpiPACKAGE)"
echo

View File

@ -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,19 +27,25 @@
if [ "$1" = "-test" ]
then
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
dir="${2%/}" # <- MPI_ARCH_PATH
if [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
then
echo "Have mpich shared library (${dir##*/})"
exit 0
elif [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
then
echo "Have mpich static library (${dir##*/})"
exit 0
else
echo "No mpich libraries found: ${dir:-not-specified}"
exit 2
fi
dir="${2%/}" # <- *_ARCH_PATH
package="mvapich"
libName="libmpi"
for lib in \
"$dir/lib/$libName.a" \
"$dir/lib/$libName$EXT_SO" \
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName.a" \
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName$EXT_SO" \
;
do
if [ -r "$lib" ]
then
echo "Have $package library (${dir##*/})"
exit 0
fi
done
echo "No $package libraries found: ${dir:-not-specified}"
exit 2
fi
#------------------------------------------------------------------------------
# Run from third-party directory only
@ -73,6 +78,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 +90,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 +106,7 @@ do
--) break;; # Extra configure options (leave on $@ for later detection)
-h | -help) usage ;;
-gcc) useGcc ;;
-force) optForce=true ;;
mvapich*)
mpiPACKAGE="${1%%/}"
@ -132,12 +142,20 @@ 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/libmpi$EXT_SO" ] \
|| [ -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" ]
echo "Already has shared library: $MPI_ARCH_PATH"
elif [ -z "$optForce" ] \
&& {
[ -r "$MPI_ARCH_PATH/lib/libmpi.a" ] \
|| [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
}
then
echo "Already has static library"
echo "Already has static library: $MPI_ARCH_PATH"
else
echo "Starting build: $WM_MPLIB ($mpiPACKAGE)"
echo

View File

@ -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
}
#------------------------------------------------------------------------------

View File

@ -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,19 +27,25 @@
if [ "$1" = "-test" ]
then
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
dir="${2%/}" # <- MPI_ARCH_PATH
if [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
then
echo " Have openmpi shared library (${dir##*/})"
exit 0
elif [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
then
echo " Have openmpi static library (${dir##*/})"
exit 0
else
echo "No openmpi libraries found: ${dir:-not-specified}"
exit 2
fi
dir="${2%/}" # <- *_ARCH_PATH
package="openmpi"
libName="libmpi"
for lib in \
"$dir/lib/$libName.a" \
"$dir/lib/$libName$EXT_SO" \
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName.a" \
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName$EXT_SO" \
;
do
if [ -r "$lib" ]
then
echo "Have $package library (${dir##*/})"
exit 0
fi
done
echo "No $package libraries found: ${dir:-not-specified}"
exit 2
fi
#------------------------------------------------------------------------------
# Run from third-party directory only
@ -73,6 +78,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 +89,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 +105,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 +144,18 @@ 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/libmpi$EXT_SO" ] \
|| [ -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/libmpi.a" ] \
|| [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
}
then
echo "Already has static library: $MPI_ARCH_PATH"
else

203
makePETSC
View File

@ -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,53 +28,81 @@ 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 petsc
petscPACKAGE=${petsc_version:-petsc-system}
petscPACKAGE="${petsc_version:-petsc-system}"
targetType=libso
unset hyprePACKAGE
unset HYPRE_ARCH_PATH # Avoid inconsistency
#------------------------------------------------------------------------------
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)
-debug Build with debugging enabled
-hypre=URL Specify hypre download location
-no-hypre Disable automatic hypre download/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 optDebug optForce optInplace optHypre
# Parse options
while [ "$#" -gt 0 ]
do
case "$1" in
'') ;; # Ignore empty
--) break;; # Extra configure options (leave on $@ for later detection)
-h | -help) usage ;;
-gcc) useGcc ;;
-force) optForce=true ;;
-inplace) optInplace=true ;;
-debug) optDebug=true ;;
lib|libso)
targetType="$1"
lib|libso) targetType="$1" ;;
-hypre=*)
optHypre="${1#*=}" # URL for download
unset hyprePACKAGE HYPRE_ARCH_PATH
;;
petsc-[0-9]*)
-no-hypre)
optHypre=false
unset hyprePACKAGE HYPRE_ARCH_PATH
;;
hypre-[0-9]* | hypre-git)
hyprePACKAGE="${1%%/}"
unset optHypre
unset HYPRE_ARCH_PATH # Avoid inconsistency
;;
petsc-[0-9]* | petsc-git)
petscPACKAGE="${1%%/}"
unset PETSC_ARCH_PATH # Avoid inconsistency
unset PETSC_ARCH_PATH # Avoid inconsistency
;;
*)
die "unknown option/argument: '$1'"
@ -115,16 +114,28 @@ 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
# Clunky
if [ -z "$optHypre" ] && [ -n "$hyprePACKAGE" ] \
&& ! _foamIsNone "$hyprePACKAGE"
then
echo "Using $hyprePACKAGE"
: "${HYPRE_ARCH_PATH:=$installBASE$WM_SIZE_OPTIONS/$hyprePACKAGE}"
fi
#------------------------------------------------------------------------------
#
# Build PETSC
@ -132,7 +143,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 +153,52 @@ 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)"
if [ "$WM_PRECISION_OPTION" = SP ]
then
optHypre=false # No single-precision hypre
echo "No single-precision hypre"
fi
if [ -d "$PETSC_SOURCE_DIR/$archOpt/externalpackages" ]
then
echo "Removing old $archOpt/externalpackages"
rm -rf "$PETSC_SOURCE_DIR/$archOpt/externalpackages"
fi
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)"
if [ "$optDebug" = true ]
then
configOpt="$configOpt --with-debugging=1"
else
# A reasonable assumption for optimization
configOpt="$configOpt --with-debugging=0"
configOpt="$configOpt --COPTFLAGS=-O3 --CXXOPTFLAGS=-O3"
fi
if [ "$targetType" = libso ]
then
configOpt="--with-shared-libraries"
configOpt="$configOpt --with-shared-libraries"
fi
if [ "$WM_LABEL_SIZE" = 64 ]
@ -170,25 +215,61 @@ echo
configOpt="$configOpt --with-precision=double"
fi
case "$optHypre" in
false)
configOpt="$configOpt --with-hypre=0"
;;
ftp:* | git:* | http:* | https:*)
configOpt="$configOpt --download-hypre=$optHypre"
;;
*)
# This is a really clunky way to use ThirdParty hypre
if [ -f "$HYPRE_ARCH_PATH/include/HYPRE.h" ]
then
echo "Has installed hypre: $hyprePACKAGE"
configOpt="$configOpt --with-hypre-dir=$HYPRE_ARCH_PATH"
else
configOpt="$configOpt --download-hypre"
fi
;;
esac
# Additional configure options
if [ "$1" = "--" ]
then
shift
configOpt="$configOpt $@"
fi
# We export compiler settings (above) but actually use the
# --with-cc and --with-cxx. So ignore these environment variables.
unset CC CXX
unset CFLAGS CXXFLAGS
cd "$PETSC_SOURCE_DIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
unset GIT_DIR # No special git-repo handling
rm -rf $PETSC_ARCH_PATH
rm -rf "$PETSC_ARCH_PATH"
# No clean here, if we have multiple arch in the same directory
echo
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-scalapack=0 \
--with-superlu_dist=0 \
--with-suitesparse=0 \
--download-f2cblaslapack=1 \
--with-fc=0 \
--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

View File

@ -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
View File

@ -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

View File

@ -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

View File

@ -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
}
#------------------------------------------------------------------------------

View File

@ -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
#------------------------------------------------------------------------------