48 Commits
v1812 ... v2006

Author SHA1 Message Date
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
03f529f3bd DOC: update list of software versions 2019-12-17 07:53:39 +01:00
cb75d01584 ENH: improve toolset naming
- if passed things like "clang-9", strip down to the base name "clang"
2019-12-15 13:54:12 +01:00
baae61e0ec DOC: update internal repo links 2019-12-09 13:15:26 +01:00
714cddd6ca DOC: update links and replicate patches for scotch 2019-11-20 12:32:05 +01:00
c8a7f46db2 STYLE: regularize quoting and exit on failed 'cd' 2019-11-19 16:17:01 +01:00
e51f92f2f1 COMP: add error code to makeAdios2 to cascade error information to caller 2019-11-12 16:51:02 +01:00
a0d0ee36af DOC: add note about LIBGL_DEBUG env variable 2019-11-11 11:53:51 +01:00
074481b2f0 CONFIG: updates for kahip and scotch 2019-10-28 12:56:09 +01:00
a856a5fcad STYLE: remove unused branch in makeAdios2 2019-10-28 11:51:29 +01:00
c41b591b30 COMP: adjust makeParaView for paraview-5.7.0 (uses python3) 2019-10-02 17:16:20 +02:00
a9f5058557 ENH: more forgiving if scotch is missing, provide download hints (#45)
- include makeAdios2 into the Allwmake list (as optional component)
2019-08-16 15:50:08 +02:00
54d6b7994d CONFIG: harmonize makeAdios1, makeAdios2 files
- remove old dependency of adios2 on the adios1 library
2019-07-31 16:16:10 +02:00
17a443a557 BUG: export minimal compiler flags for VTK, ParaView (fixes #44)
- in 1906, we changed the handling of compiler flags to include the
  exact values as used by OpenFOAM.

  While this is needed for compiling some external programs -- see
  https://develop.openfoam.com/Development/OpenFOAM-plus/issues/1256
  for the discussion -- it appears to bring in flags that upset
  some of the ParaView (and possibly VTK) compilation.

  The culprits are likely to be found in the various '-W' switches,
  but for now we simply extract a mininal set of compiler flags
  that include -std=c++11 -m64 -fPIC, but no optimization flags,
  additional warnings flags or OpenFOAM-specific defines.
2019-07-29 13:55:04 +02:00
b987703b3c STYLE: minor update for README, BUILD information 2019-06-28 09:31:25 +02:00
325f848dc1 CONFIG: makeGcc with -m32/-m64 option instead of old WM_ARCH_OPTION 2019-06-27 18:43:10 +02:00
4c4a11755a DOC: relocated OpenFOAM etc/README.md to doc/Config.md 2019-06-13 18:42:18 +02:00
3c852a8929 DOC: fix links 2019-06-09 19:09:46 +02:00
867d96ec54 DOC: update docs, add initial Requirements information 2019-06-07 13:31:19 +02:00
16b59832cc CONFIG: add comment for compile flags in makeMesa
- add links for newest khaip, scotch (untested)
2019-06-06 23:27:08 +02:00
ddd4176269 ENH: additional tweaks for building boost. Eg armclang 2019-04-29 21:26:31 +02:00
ae5b2326c0 ENH: provide separate makeSCOTCH script for independent use
- improve handling of scotch build toolchain

- relax the test for existence of libscotcherrexit, which can also be
  incorporated into libscotch itself
2019-04-29 18:51:05 +02:00
bbbc7b2953 COMP: force PROJECT_LIBS to be empty
- additional safety when using wmake to generate .so or exe files.
  These third-party libraries must not themselves have a link
  dependency on OpenFOAM.
2019-04-27 17:48:22 +02:00
5ac0e3624f STYLE: trim trailing slash from tested directories 2019-04-25 11:44:53 +02:00
a7c2a4bfb9 STYLE: use EXT_SO instead of SO for consistency with wmake internal naming 2019-04-25 10:46:45 +02:00
c6e6c0abbf COMP: add Makefile patches for scotch_6.0.6
- bypasses generation of executables
2019-04-25 10:46:45 +02:00
fbbb275862 COMP: make libscotch/libptscotch targets instead of scotch/ptscotch
- we do not generally need any of executables, just the libraries.
  This also avoids generating a libscotchmetis too.
2019-04-25 10:46:45 +02:00
770e22bf51 ENH: update handling of compiler and flags
- support use of wmake -show-xyz, as well as older WM_CC, WM_CFLAGS etc.

- add support for Makefile.inc for scotch

- add -toolset= option for making boost and use b2 instead of legacy
  bjam for configuration
2019-04-25 10:46:44 +02:00
830e92194a BOT: reformat headers 2019-04-12 08:54:50 +02:00
8df5d377e7 STYLE: update some examples for mesa-18.3.4
- still needs more testing to determine the best combination of versions
2019-03-11 11:54:02 +01:00
aa9fc0efd2 CONFIG: update makeMPICH and makeMVAPICH
- note: mpich now builds libmpi.so instead of libmpich.so
2019-02-14 18:11:33 +01:00
f968a67362 CONFIG: update link for openmpi 2019-01-21 14:18:15 +01:00
c8135cc48e CONFIG: update download links for adios + kahip 2019-01-21 10:24:41 +01:00
adfe28332e CONFIG: additional llvm configuration for mesa build (#41) 2019-01-21 10:24:15 +01:00
49 changed files with 2536 additions and 1375 deletions

View File

@ -3,12 +3,14 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# 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.
#
# Script
# Allclean
@ -20,7 +22,8 @@
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Run from third-party directory only
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
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
@ -31,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.
@ -46,10 +49,11 @@ USAGE
}
# Print help message
if [ "$1" = "-h" -o "$1" = "-help" ]
then
case "$1" in
(-h | -help*)
usage
fi
;;
esac
#------------------------------------------------------------------------------
@ -59,39 +63,48 @@ for i in \
gmp-* mpfr-* mpc-* gcc-* llvm-* \
;
do
[ -d "$i" ] && (
if [ -d "$i" ]
then
(
echo
echo "${i%/*}"
echo " make distclean"
echo
cd $i && make distclean
)
fi
done
# Clean various packages via 'realclean'
for i in scotch*/src
do
[ -d "$i" ] && (
if [ -d "$i" ]
then
(
echo
echo "${i%/*}"
echo " make realclean"
echo
cd $i && make realclean
)
fi
done
# Clean various packages via 'wclean'
for i in libccmio*/Make kahip*/lib/Make
do
[ -d "$i" ] && (
if [ -d "$i" ]
then
(
echo
echo "${i%/Make}"
echo " wclean"
echo
cd ${i%/Make} && wclean
)
fi
done
@ -111,11 +124,11 @@ fi
removePlatform()
{
local platform="$1"
if [ -n "$platform" -a -d "platforms/$platform" ]
if [ -n "$platform" ] && [ -d "platforms/$platform" ]
then
echo
echo "Cleaning platform '$platform'"
\rm -rf "platforms/$platform"
rm -rf "platforms/$platform"
else
echo
echo "Platform '$platform' not built"
@ -136,7 +149,7 @@ do
echo
echo "Removing all platforms/sub-directories"
echo
\rm -rf platforms/*
rm -rf platforms/*
break
;;

246
Allwmake
View File

@ -3,15 +3,17 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2011-2016 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.
#
# Script
# Allwmake
# ThirdParty Allwmake
#
# Description
# Build script for ThirdParty applications/libraries
@ -19,228 +21,44 @@
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Dynamic library endings (default is .so)
[ "$(uname -s)" = Darwin ] && SO=dylib || SO=so
# Run from third-party directory only
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
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
}
[ -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
exportLinker # Linker flags for CMake/configure
useGccFlag $@ # Scan arguments for a '-gcc' option
warnBuildIssues()
{
echo
echo " ---------------------------------------------------"
echo " Optional component ($1) had build issues"
echo " OpenFOAM will nonetheless remain largely functional"
echo " ---------------------------------------------------"
echo
}
warnNotFound()
{
echo "Optional component ($1) was not found"
}
#------------------------------------------------------------------------------
echo
echo ========================================
echo Start ThirdParty Allwmake
echo ========================================
echo "using: $CC $CFLAGS"
echo "using: $CXX $CXXFLAGS"
echo
echo ========================================
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
#------------------------------------------------------------------------------
# Building scotch on different platforms is still a bit of a pain
# Get SCOTCH_VERSION, SCOTCH_ARCH_PATH
if settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/scotch)
then
. $settings
else
echo
echo "Error: no config.sh/scotch settings"
echo
fi
echo
echo ========================================
echo "Scotch decomposition ($SCOTCH_VERSION)"
echo " $SCOTCH_ARCH_PATH"
SCOTCH_SOURCE_DIR=$sourceBASE/$SCOTCH_VERSION
# Needs generalizing, but works fairly well
scotchMakefile=etc/makeFiles/scotch/Makefile.inc.OpenFOAM-"$(uname -s)".shlib
[ -f $scotchMakefile ] || \
scotchMakefile=${scotchMakefile%/*}/Makefile.inc.OpenFOAM-Linux.shlib
if [ -f $SCOTCH_ARCH_PATH/include/scotch.h \
-a -r $FOAM_EXT_LIBBIN/libscotch.$SO \
-a -r $FOAM_EXT_LIBBIN/libscotcherrexit.$SO ]
then
echo " scotch include: $SCOTCH_ARCH_PATH/include"
echo " scotch library: $FOAM_EXT_LIBBIN"
elif [ -d "$SCOTCH_SOURCE_DIR" ]
then
(
# Older versions ok, but scotch-6.0.5a cannot build in parallel.
# Force serial build
export WM_NCOMPPROCS=1
echo "*** building scotch in serial ***"
echo
cd $SCOTCH_SOURCE_DIR/src || exit 1
export GIT_DIR=$SCOTCH_SOURCE_DIR/.git # Mask seeing our own git-repo
rm -rf $SCOTCH_ARCH_PATH
applyPatch $SCOTCH_VERSION .. # 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
# Makefile relative to this directory
scotchMakefile=../../$scotchMakefile
if [ -f $scotchMakefile ]
then
rm -f Makefile.inc
ln -s $scotchMakefile Makefile.inc
fi
[ -f Makefile.inc ] || {
echo " Error: scotch needs an appropriate Makefile.inc"
exit 1
}
export CCS="${CC:-$WM_CC}" # CCS (serial compiler) default=$(CC)
export CCP=$(whichMpicc) # CCP (parallel compiler) default=mpicc
# Consistency for Intel-MPI and non-icc compilers
[ -n "$I_MPI_CC" ] || export I_MPI_CC="${CC:-$WM_CC}"
make realclean 2>/dev/null # Extra safety
make -j $WM_NCOMPPROCS scotch \
&& make \
prefix=$prefixDIR \
includedir=$incDIR \
libdir=$libDIR \
install
make realclean 2>/dev/null || true # Failed cleanup is uncritical
) || warnBuildIssues SCOTCH
else
warnNotFound SCOTCH
fi
# Build ptscotch if MPI (ThirdParty or system) is available
# and normal scotch was built (has include and library)
if [ "${FOAM_MPI:-dummy}" != dummy ] && \
[ -f $SCOTCH_ARCH_PATH/include/scotch.h \
-a -r $FOAM_EXT_LIBBIN/libscotch.$SO ] || \
{
# Report that the above tests failed and pass-through the failure
echo
echo " WARNING: skipping pt-scotch - no mpi or <scotch.h> not found"
false
}
then
echo
echo ========================================
echo "pt-scotch decomposition ($SCOTCH_VERSION with $FOAM_MPI)"
echo " $SCOTCH_ARCH_PATH"
if [ -f $SCOTCH_ARCH_PATH/include/$FOAM_MPI/ptscotch.h \
-a -r $FOAM_EXT_LIBBIN/$FOAM_MPI/libptscotch.$SO \
-a -r $FOAM_EXT_LIBBIN/$FOAM_MPI/libptscotcherrexit.$SO ]
then
echo " ptscotch include: $SCOTCH_ARCH_PATH/include/$FOAM_MPI"
echo " ptscotch library: $FOAM_EXT_LIBBIN/$FOAM_MPI"
else
(
# Older versions ok, but scotch-6.0.5a cannot build in parallel.
# Force serial build
export WM_NCOMPPROCS=1
echo "*** building pt-scotch in serial ***"
cd $SCOTCH_SOURCE_DIR/src || exit 1
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
if [ -f $scotchMakefile ]
then
rm -f Makefile.inc
ln -s $scotchMakefile Makefile.inc
fi
[ -f Makefile.inc ] || {
echo " Error: ptscotch needs an appropriate Makefile.inc"
exit 1
}
export CCS="${CC:-$WM_CC}" # CCS (serial compiler) default=$(CC)
export CCP=$(whichMpicc) # CCP (parallel compiler) default=mpicc
# Consistency for Intel-MPI and non-icc compilers
[ -n "$I_MPI_CC" ] || export I_MPI_CC="${CC:-$WM_CC}"
make realclean 2>/dev/null # Extra safety
make -j $WM_NCOMPPROCS ptscotch \
&& make \
prefix=$prefixDIR \
includedir=$incDIR \
libdir=$libDIR \
install
make realclean 2>/dev/null || true # Failed cleanup is uncritical
) || warnBuildIssues PTSCOTCH
fi
# Verify existence of ptscotch include
[ -f $SCOTCH_ARCH_PATH/include/$FOAM_MPI/ptscotch.h ] || {
echo
echo " WARNING: required include file 'ptscotch.h' not found!"
}
fi
# Could now remove $SCOTCH_SOURCE_DIR/src/Makefile.inc
# Treat as optional, but really isn't if anyone wants parallel calculations
./makeSCOTCH || warnBuildIssues SCOTCH
#------------------------------------------------------------------------------
echo
echo ========================================
# Get KAHIP_ARCH_PATH
@ -250,17 +68,16 @@ then
fi
if [ -n "$KAHIP_ARCH_PATH" ]
then
echo KaHIP decomposition
echo KAHIP decomposition
./makeKAHIP -test "$KAHIP_ARCH_PATH" || \
./makeKAHIP || warnBuildIssues KAHIP
else
warnNotFound KAHIP # METIS is optional
warnNotFound KAHIP # is optional
fi
#------------------------------------------------------------------------------
echo
echo ========================================
# Get METIS_ARCH_PATH
if settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/metis)
then
@ -268,11 +85,11 @@ then
fi
if [ -n "$METIS_ARCH_PATH" ]
then
echo Metis decomposition
echo METIS decomposition
./makeMETIS -test "$METIS_ARCH_PATH" || \
./makeMETIS || warnBuildIssues METIS
else
warnNotFound METIS # METIS is optional
warnNotFound METIS # is optional
fi
#------------------------------------------------------------------------------
@ -280,13 +97,14 @@ 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
warnNotFound CGAL # CGAL is optional
warnNotFound CGAL # is optional
fi
#------------------------------------------------------------------------------
echo
echo ========================================
if [ -n "$FFTW_ARCH_PATH" ]
@ -295,9 +113,29 @@ then
./makeFFTW -test "$FFTW_ARCH_PATH" || \
./makeFFTW || warnBuildIssues FFTW
else
warnNotFound FFTW # FFTW is optional
warnNotFound FFTW # is optional
fi
#------------------------------------------------------------------------------
echo
echo ========================================
# Get ADIOS2_ARCH_PATH
if settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/adios2)
then
. $settings
fi
if [ -n "$ADIOS2_ARCH_PATH" ]
then
echo ADIOS2
./makeAdios2 -test "$ADIOS2_ARCH_PATH" || \
./makeAdios2 || warnBuildIssues ADIOS2
else
warnNotFound ADIOS2 # is optional
fi
#------------------------------------------------------------------------------
echo
echo ========================================
echo Done ThirdParty Allwmake

311
BUILD.md
View File

@ -1,24 +1,12 @@
<!--
|--------------------------------------------------------------------------|
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | |
| \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd. |
| \\/ M anipulation | |
|--------------------------------------------------------------------------|
-->
---
# OpenFOAM&reg; ThirdParty Build
OpenFOAM depends to a certain extent on third-party libraries
(*opensource only*). It also provides some interfaces to *opensource* or
*proprietary* libraries. This third-party package contains configurations and
scripts for building third-party packages. It should normally only be used in
*proprietary* libraries. This third-party collection contains configurations and
scripts for building third-party packages. It will normally only be used in
conjunction with the corresponding OpenFOAM version.
## Organization
## Directory Organization
The ThirdParty directory contains a number of build scripts as well as
some directories:
@ -38,18 +26,19 @@ This approach avoids duplicate entries for the default versions and
ensures the best overall consistency between the OpenFOAM installation
and its corresponding third-party installation.
Nonethess, the distributed make scripts can generally be used for a
Nonetheless, the distributed make scripts can generally be used for a
variety of versions of the third-party libraries, with the software
version specified on the command-line. For example,
$ ./makeFFTW -help
usage: makeFFTW [OPTION] [fftw-VERSION]
```
$ ./makeFFTW -help
usage: makeFFTW [OPTION] [fftw-VERSION]
```
---
## Before Starting
0. Review the [system requirements](http://www.openfoam.com/documentation/system-requirements.php)
0. Review the [system requirements][link openfoam-require]
and decide on the following:
* compiler type/version - if the system compiler is not relatively recent,
you will need a [third-party compiler](#makeGcc) installation.
@ -61,17 +50,21 @@ version specified on the command-line. For example,
Often (but not always) a `mpi-selector` command is available for this purpose.
You may need to open a new shell afterwards for the change to take effect.
Using the following command may help diagnosing things:
which mpicc
```
which mpicc
```
2. Adjust the OpenFOAM `etc/bashrc`, `etc/config.sh/...` or equivalent
`prefs.sh` files to reflect your preferred configuration.
the `etc/prefs.{csh,sh}` files to reflect your preferred configuration.
For many config files, there are several configuration possibilities:
- Define a particular third-party version.
- Use a system installation.
- Disable use of an optional component.
- Define an alternative site-wide central location.
- After making the desired changes, use `wmRefresh` or equivalent to use the configurations.
See the [OpenFOAM configuration information][link openfoam-config]
for more details.
After making the desired changes, use the `wmRefresh` alias
or equivalent to enable the configuration.
---
@ -117,18 +110,18 @@ Additionally, if you are using clang but with ThirdParty locations for
gmp/mpfr you will need some extra work. Here is an example:
* Compile a new ThirdParty clang version:
./makeLLVM llvm-4.0.1
```
./makeLLVM llvm-4.0.1
```
* Now adjust the OpenFOAM `prefs.sh` to use the new compiler settings,
and update the OpenFOAM environment (eg, `wmRefresh`)
* Next use (abuse) the `makeGcc` script to compile gmp/mpfr libraries.
It is best to pass the desired versions explicitly, and necessary
to set the CC/CXX variables so that the correct compiler is used:
CC=clang CXX=clang++ ./makeGcc gmp-6.1.2 mpfr-4.0.0 gcc-system
```
CC=clang CXX=clang++ ./makeGcc gmp-6.1.2 mpfr-4.0.0 gcc-system
```
specifying `gcc-system` effectively disables building of gcc,
but will build the gmp/mpfr components.
@ -138,13 +131,12 @@ gmp/mpfr you will need some extra work. Here is an example:
The location to make these changes is in the `etc/config.sh/CGAL`,
since this is the component that uses the mpfr library.
For example,
gmp_version=gmp-6.1.2
mpfr_version=mpfr-4.0.0
export GMP_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gmp_version
export GMP_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpfr_version
```
gmp_version=gmp-6.1.2
mpfr_version=mpfr-4.0.0
export GMP_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gmp_version
export GMP_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpfr_version
```
* Update update the OpenFOAM environment (eg, `wmRefresh`) again.
@ -155,20 +147,16 @@ gmp/mpfr you will need some extra work. Here is an example:
can also be invoked directly to find possible build errors.
- 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 but highly recommended)*
- 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.
2. `makeParaView` *(optional)*
- 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
#### Optional Components
`makeADIOS`
- Only required for [ADIOS](#parallel) support,
which is currently staged in the [add-ons repository][link AddOns].
`makeAdios2`
- Only required for [ADIOS](#parallel) support.
`makeCGAL`
- Builds [boost](#general-packages) and [CGAL](#general-packages).
@ -185,11 +173,23 @@ gmp/mpfr you will need some extra work. Here is an example:
Automatically invoked from the ThirdParty `Allwmake`,
but can be invoked directly to resolve possible build errors.
`makeOPENMPI`
- Builds [OPENMPI](#parallel) library.
`makePETSC`
- Only required for [PETSC](#general-packages) support.
`makeMETIS`
- Builds [METIS](#parallel) decomposition library.
Automatically invoked from the ThirdParty `Allwmake`,
but can be invoked directly to resolve possible build errors.
`makeSCOTCH`
- Builds [scotch, ptscotch](#parallel) decomposition libraries.
Automatically invoked from the ThirdParty `Allwmake`,
but can be invoked directly for special configurations
or to resolve possible build errors.
`makeMGridGen`
- Optional agglomeration routines.
@ -216,17 +216,17 @@ gmp/mpfr you will need some extra work. Here is an example:
Report in sorted order.
`Allclean`
- After building, this script may be used to remove intermediate build information
and save some disk space.
- After building, this script may be used to remove intermediate build
information and save some disk space.
## Build Notes
### CGAL
- The zlib library and zlib development headers are required.
- The [zlib][page zlib] library and development headers are required.
### Scotch
- The zlib library and zlib development headers are required.
- The [zlib][page zlib] library and development headers are required.
### Mesa
@ -242,19 +242,22 @@ and save some disk space.
- Rather than downloading VTK separately, it is easy to reuse the VTK
sources that are bundled with ParaView.
For example, by using a symbolic link:
ln -s ParaView-v5.6.0/VTK VTK-8.2.0
```
ln -s ParaView-v5.6.0/VTK VTK-8.2.0
```
The appropriate VTK version number can be found from the contents of
the `vtkVersion.cmake` file.
For example,
$ cat ParaView-v5.6.0/VTK/CMake/vtkVersion.cmake
# VTK version number components.
set(VTK_MAJOR_VERSION 8)
set(VTK_MINOR_VERSION 2)
set(VTK_BUILD_VERSION 0)
```
$ cat ParaView-v5.6.0/VTK/CMake/vtkVersion.cmake
```
contains this type of information
```
# VTK version number components.
set(VTK_MAJOR_VERSION 8)
set(VTK_MINOR_VERSION 2)
set(VTK_BUILD_VERSION 0)
```
### ParaView
- Building ParaView requires CMake, qmake and a `qt` development files.
@ -272,11 +275,34 @@ use the ParaView-5.4 sources that were included in the ThirdParty-v1712
source pack. This, however, has never been tested in combination with
the OpenFOAM Catalyst insitu visualization.
If you encounter problems starting paraview (eg, segmentation fault)
it could be related to the graphics libraries not being properly found.
The `LIBGL_DEBUG` environment variable can be used to obtain more
detailed information:
```
$ export LIBGL_DEBUG=verbose
```
The call to paraview now emits this information:
```
libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /usr/lib64/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/swrast_dri.so
...
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
```
Indicating that the drivers are probably not correctly installed.
The `/var/log/Xorg.0.log` file or the `dmesg` command may yield more
information to the cause.
In this particular case, the Nvidia drivers had a client/server
version mismatch.
#### 5.6.x, 5.5.x binary packages
For general functionality, the paraview version distributed with
the operating system or a [binary package][download ParaView]])
the operating system or a [binary package][download ParaView]
may be sufficient for your needs.
- No known issues with the native OpenFOAM reader.
@ -301,15 +327,6 @@ may not be important for you):
#### 5.3.0 and older are neither recommended nor supported
- Various compilation issues and known bugs.
### ADIOS
- The github release currently requires GNU autoconf tools (eg,
autoconf, autoheader, automake) for its configuration.
- Some inconsistency in directory names (ADIOS vs. adios) between releases.
- Optionally uses bzip2, zlib development headers (eg, libbz2-devel, zlib-devel)
for the corresponding compression tranforms.
- The [zfp floating point compression][page zfp] library is now included as
part of ADIOS.
### Making Qt <a name="makeQt"></a>
- Building a third-party Qt installation (prior to building ParaView) requires
some additional effort, but should nonetheless work smoothly.
@ -317,13 +334,13 @@ may not be important for you):
1. Download a [*qt-everywhere-opensource-src*][link Qt5] package and
unpack in the third-party directory.
2. Use the `makeQt` script with the QT version number. For example,
./makeQt 5.9.3
```
./makeQt 5.9.3
```
3. Build ParaView using this third-party QT. For example,
./makeParaView -qt-5.9.3 5.6.0
```
./makeParaView -qt-5.9.3 5.6.0
```
- ParaView versions prior to 5.3.0 do not properly support QT5.
- If you relocate the third-party directory to another location
@ -342,7 +359,7 @@ slightly older QT (eg, [qt-5.6.3][link Qt56]) instead.
### Gcc Compiler <a name="gcc-compiler"></a>
The minimum version of gcc required is 4.8.0.
The minimum version of gcc required is **4.8.5**
| Name | Location
|-------------------|--------------------------------------------
@ -376,7 +393,7 @@ install the 32-bit development libraries by default.
### Clang Compiler <a name="clang-compiler"></a>
The minimum version of clang required is 3.5.
The minimum version of clang required is **3.7**
*Attention*: If you are building a newer version of clang, you may need to
update your CMake beforehand since GNU *configure* can only be used prior
@ -402,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]
@ -410,10 +429,10 @@ 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.
| [adios][page adios] | [repo][repo adios] or [github download][link adios] or [alt download][altlink adios]
| [scotch, ptscotch][page scotch] | [download][link scotch] or older: [6.0.3][link scotch603]
| [kahip][page kahip] | [download][link kahip]
| [openmpi][page openmpi] | [download][link openmpi]. ***Some openmpi2/openmpi3 versions exhibit [stability issues](https://github.com/open-mpi/ompi/issues/5375)***
| [adios][page adios] | [repo][repo adios] or [github download][link adios]
| [scotch, ptscotch][page scotch] | [repo][repo scotch] or [download][link scotch] or [older][older scotch] or [even older][oldest scotch]
| [kahip][page kahip] | [download][link kahip] or [older][older kahip]
| [metis][page metis] | [download][link metis]
@ -422,39 +441,59 @@ you may have additional hurdles to using the newest versions of clang.
| Name | Location
|-----------------------|------------------------
| [MESA][page mesa] | [download][link mesa] or [older 13][link mesa13], [older 11][link mesa11]
| [ParaView][page ParaView] | [download][link ParaView] or [older paraview-55][link ParaView55], [older paraview-54][link ParaView54] or [binaries][download ParaView]
| [ParaView][page ParaView] | [download][link ParaView] or older [paraview-56][link ParaView56], [paraview-55][link ParaView55] or [binaries][download ParaView]
| [Qt][page Qt] | [QT5][link Qt5] for ParaView-5.3.0 and later, or the [older qt-56][link Qt56] for older systems.
### CMake Minimum Requirements <a name="min-cmake"></a>
The minimum CMake requirements for building various components.
2.8 llvm-3.4.2
2.8.11 CGAL-4.9
2.8.11 CGAL-4.11
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.4.3 llvm-3.9.1
3.4.3 llvm-4.0.0 - llvm-6.0.0
3.6 ADIOS2
```
2.8 llvm-3.4.2
2.8.11 CGAL-4.9
2.8.11 CGAL-4.11
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.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
```
### GCC Minimum Requirements <a name="min-gcc"></a>
The minimum gcc/g++ requirements for building various components.
4.7 llvm-3.7.0
4.7 llvm-3.6.2
4.7 llvm-3.5.2
4.4 llvm-3.4.2
```
4.7 llvm-3.7.0
4.7 llvm-3.6.2
4.7 llvm-3.5.2
4.4 llvm-3.4.2
```
If your system gcc/g++ is too old to build the desired llvm/clang
version, you may need to build a lower llvm/clang version and then use
that clang compiler for building the newer llvm/clang version.
<!-- OpenFOAM, Internal links -->
[link openfoam-readme]: https://develop.openfoam.com/Development/openfoam/blob/develop/README.md
[link openfoam-config]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Config.md
[link openfoam-build]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Build.md
[link openfoam-require]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Requirements.md
[link third-readme]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/README.md
[link third-build]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/BUILD.md
[link third-require]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/Requirements.md
## Software Links
If you have access to this information file in its raw form, you will
note that most of the software pages and download links are listed as
a collection at the end of the file. This is designed to make it
easier to use `grep` and find the relevant pages and links.
<!-- gcc-related -->
[page gcc]: http://gcc.gnu.org/releases.html
@ -463,8 +502,8 @@ that clang compiler for building the newer llvm/clang version.
[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
@ -483,41 +522,55 @@ that clang compiler for building the newer llvm/clang version.
<!-- parallel -->
[page adios]: https://www.olcf.ornl.gov/center-projects/adios/
[repo adios]: https://github.com/ornladios/ADIOS
[link adios]: https://github.com/ornladios/ADIOS/archive/v1.13.0.tar.gz
[altlink adios]: http://users.nccs.gov/%7Epnorbert/adios-1.13.0.tar.gz
[page adios]: https://csmd.ornl.gov/software/adios2
[repo adios]: https://github.com/ornladios/ADIOS2
[link adios]: https://github.com/ornladios/ADIOS2/archive/v2.4.0.tar.gz
[page zfp]: http://computation.llnl.gov/projects/floating-point-compression/zfp-versions
[page scotch]: https://www.labri.fr/perso/pelegrin/scotch/
[link scotch603]: https://gforge.inria.fr/frs/download.php/file/34099/scotch_6.0.3.tar.gz
[link scotch605]: https://gforge.inria.fr/frs/download.php/file/37398/scotch_6.0.5a.tar.gz
[link scotch]: https://gforge.inria.fr/frs/download.php/file/37622/scotch_6.0.6.tar.gz
[repo scotch]: https://gitlab.inria.fr/scotch/scotch
[link scotch]: https://gforge.inria.fr/frs/download.php/file/38187/scotch_6.0.9.tar.gz
[older scotch]: https://gforge.inria.fr/frs/download.php/file/38114/scotch_6.0.8.tar.gz
[oldest scotch]: https://gforge.inria.fr/frs/download.php/file/37622/scotch_6.0.6.tar.gz
[page kahip]: http://algo2.iti.kit.edu/documents/kahip/
[link kahip]: http://algo2.iti.kit.edu/schulz/software_releases/KaHIP_2.00.tar.gz
[older kahip]: http://algo2.iti.kit.edu/schulz/software_releases/KaHIP_2.00.tar.gz
[link kahip]: http://algo2.iti.kit.edu/schulz/software_releases/KaHIP_2.12.tar.gz
[page metis]: http://glaros.dtc.umn.edu/gkhome/metis/metis/overview
[link metis]: http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz
[page openmpi]: http://www.open-mpi.org/
[link openmpi]: https://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.4.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
<!-- general -->
[page cmake]: http://www.cmake.org/
[link cmake]: http://www.cmake.org/files/v3.5/cmake-3.5.2.tar.gz
[link cmake]: https://cmake.org/files/v3.8/cmake-3.8.2.tar.gz
[page boost]: http://boost.org
[link boost]: https://sourceforge.net/projects/boost/files/boost/1.64.0/boost_1_64_0.tar.bz2
[link boost]: https://sourceforge.net/projects/boost/files/boost/1.66.0/boost_1_66_0.tar.bz2
[page CGAL]: http://cgal.org
[link CGAL]: https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.9.1/CGAL-4.9.1.tar.xz
[link CGAL]: https://github.com/CGAL/cgal/releases/download/releases/CGAL-4.12.2/CGAL-4.12.2.tar.xz
[page FFTW]: http://www.fftw.org/
[link FFTW]: http://www.fftw.org/fftw-3.3.7.tar.gz
[page petsc]: https://www.mcs.anl.gov/petsc/
[link petsc]: http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.13.2.tar.gz
[page hypre]: https://computing.llnl.gov/projects/hypre-scalable-linear-solvers-multigrid-methods/
[repo hypre]: https://github.com/hypre-space/hypre/
[link hypre]: https://github.com/hypre-space/hypre/archive/v2.19.0.tar.gz
[page cgns]: http://cgns.github.io/
[link ccmio]: http://portal.nersc.gov/project/visit/third_party/libccmio-2.6.1.tar.gz (check usage conditions)
[altlink ccmio]: http://portal.nersc.gov/svn/visit/trunk/third_party/libccmio-2.6.1.tar.gz (check usage conditions)
@ -525,6 +578,9 @@ that clang compiler for building the newer llvm/clang version.
[repo gperftools]: https://github.com/gperftools/gperftools
[link gperftools]: https://github.com/gperftools/gperftools/releases/download/gperftools-2.5/gperftools-2.5.tar.gz
[page zlib]: https://www.zlib.net/
[link zlib]: https://sourceforge.net/projects/libpng/files/zlib/1.2.11/zlib-1.2.11.tar.xz
<!-- Visualization -->
@ -532,7 +588,8 @@ that clang compiler for building the newer llvm/clang version.
[download ParaView]: https://www.paraview.org/download/
[link ParaView54]: http://www.paraview.org/files/v5.4/ParaView-v5.4.1.tar.gz
[link ParaView55]: http://www.paraview.org/files/v5.5/ParaView-v5.5.2.tar.gz
[link ParaView]: http://www.paraview.org/files/v5.6/ParaView-v5.6.0.tar.gz
[link ParaView56]: http://www.paraview.org/files/v5.6/ParaView-v5.6.3.tar.gz
[link ParaView]: http://www.paraview.org/files/v5.7/ParaView-v5.7.0.tar.gz
[page mesa]: http://mesa3d.org/
[link mesa]: ftp://ftp.freedesktop.org/pub/mesa/mesa-17.1.1.tar.xz
@ -544,24 +601,6 @@ that clang compiler for building the newer llvm/clang version.
[link Qt56]: http://download.qt.io/official_releases/qt/5.6/5.6.3/single/qt-everywhere-opensource-src-5.6.3.tar.xz
[link Qt5]: http://download.qt.io/official_releases/qt/5.9/5.9.3/single/qt-everywhere-opensource-src-5.9.3.tar.xz
<!-- OpenFOAM -->
[link AddOns]: https://develop.openfoam.com/Community/OpenFOAM-addOns
[link community-projects]: http://www.openfoam.com/community/projects.php
---
<!-- Standard Footer -->
## Additional OpenFOAM Links
- [Community AddOns][link AddOns] repository
- [Collaborative and Community-based Developments][link community-projects]
- [Download](http://www.openfoam.com/download) and
[installation instructions](http://www.openfoam.com/code/build-guide.php)
- [Documentation](http://www.openfoam.com/documentation)
- [Reporting bugs/issues](http://www.openfoam.com/code/bug-reporting.php) (including bugs/suggestions/feature requests) in OpenFOAM
- [Contacting OpenCFD](http://www.openfoam.com/contact)
---
Copyright 2016-2018 OpenCFD Ltd
Copyright 2016-2020 OpenCFD Ltd

102
README.md
View File

@ -1,15 +1,3 @@
<!--
|--------------------------------------------------------------------------|
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | |
| \\ / A nd | Copyright (C) 2016-2017 OpenCFD Ltd. |
| \\/ M anipulation | |
|--------------------------------------------------------------------------|
-->
---
# OpenFOAM&reg; ThirdParty
OpenFOAM depends to a certain extent on third-party libraries
@ -34,14 +22,14 @@ version specified on the command-line.
## Before Starting
0. Review the [system requirements](http://www.openfoam.com/documentation/system-requirements.php)
0. Review the [system requirements][link openfoam-require]
and decide on the following:
* compiler type/version (you may need a third-party compiler installation).
* MPI type/version.
* ParaView type/version.
* CMake type/version, ...
1. Adjust the OpenFOAM `etc/bashrc`, `etc/config.sh/...` or equivalent
`prefs.sh` files to reflect your preferred configuration.
`prefs.sh` files to reflect your preferred [configuration][link openfoam-config].
2. Source the updated OpenFOAM environment
---
@ -53,38 +41,82 @@ automatically as part of the top-level OpenFOAM `Allwmake`.
Nonetheless it may be necessary or useful to build particular
ThirdParty components prior to building OpenFOAM itself.
### Build Sequence
### Sequence
1. `makeGcc` _or_ `makeLLVM` *(optional)*
2. `makeCmake` *(optional)*
3. `Allwmake`
- This will be automatically invoked by the top-level OpenFOAM `Allwmake`.
4. `makeParaView` *(optional but highly recommended)*
4. `makeParaView` *(optional)*
5. Any other additional optional components
If the `Allwmake` is being invoked directly (not from the OpenFOAM `Allwmake`),
it may be necessary to bootstrap the binary parts of the `wmake` toolchain
manually before proceeding. This is done with the following command:
```
$WM_PROJECT_DIR/wmake/src/Allmake
```
### Build Details
**It normally advisable to skip the ParaView compilation initially**.
More details can be found the ThirdParty BUILD.md information.
Building ParaView from source tends to be the most difficult part of
any third-party compilation.
For general functionality, the paraview version distributed with
the operating system or a [binary package][download ParaView]
may be sufficient for your needs.
### Details
- More details can be found the [ThirdParty BUILD.md][link third-build] information.
- Some configuration details can be found in the
[OpenFOAM doc/Config.md][link openfoam-config] information.
### Other
When building other libraries directly, with autoconfig or cmake, it
will be useful or necessary to use the same compiler and compiler
settings as are used by OpenFOAM itself. These are obtained from the
`wmake` show options and can be used to set corresponding environment
variables. For example,
```
CC="$(wmake -show-c)" CFLAGS="$(wmake -show-cflags)" ./configure
```
Here is the correspondence to commonly used environment variables
| Env variable | Obtaining from wmake | Meaning |
|-------------------|---------------------------|-----------------------|
| CC | `wmake -show-c` | C compiler |
| CFLAGS | `wmake -show-cflags` | C compiler flags |
| CXX | `wmake -show-cxx` | C++ compiler |
| CXXFLAGS | `wmake -show-cxxflags` | C++ compiler flags |
| | `wmake -show-cflags-arch` | Architecture information when linking |
| | `wmake -show-cxxflags-arch` | Architecture information when linking |
In some situations it can also be useful to have the compiler and flags
together (similar to `mpicc -show` and `mpicxx -show`):
```
wmake -show-compile-c
wmake -show-compile-cxx
```
<!-- Quick links -->
[download ParaView]: https://www.paraview.org/download/
<!-- OpenFOAM -->
[link AddOns]: https://develop.openfoam.com/Community/OpenFOAM-addOns
[link community-projects]: http://www.openfoam.com/community/projects.php
[link openfoam-readme]: https://develop.openfoam.com/Development/openfoam/blob/develop/README.md
[link openfoam-config]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Config.md
[link openfoam-build]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Build.md
[link openfoam-require]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Requirements.md
[link third-readme]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/README.md
[link third-build]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/BUILD.md
[link third-require]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/Requirements.md
---
<!-- Standard Footer -->
## Additional OpenFOAM Links
- [Community AddOns][link AddOns] repository
- [Collaborative and Community-based Developments][link community-projects]
- [Download](http://www.openfoam.com/download) and
[installation instructions](http://www.openfoam.com/code/build-guide.php)
- [Documentation](http://www.openfoam.com/documentation)
- [Reporting bugs/issues](http://www.openfoam.com/code/bug-reporting.php) (including bugs/suggestions/feature requests) in OpenFOAM
- [Contacting OpenCFD](http://www.openfoam.com/contact)
---
Copyright 2016-2017 OpenCFD Ltd
Copyright 2016-2019 OpenCFD Ltd

72
Requirements.md Normal file
View File

@ -0,0 +1,72 @@
## OpenFOAM&reg; ThirdParty System Requirements
For building some particular third-party libraries from source,
the normal [OpenFOAM System Requirements][link openfoam-require]
may not be sufficient.
This is most notably the case for ParaView and/or QT compilation.
As duly noted in [BUILD][link third-build] and [README][link third-readme] information,
building ParaView from source tends to be the most difficult part of
any third-party compilation.
For general functionality, the paraview version distributed with
the operating system or a [binary package][download ParaView]
is likely adequate for your needs.
***Please help us with keeping the information here up-to-date and accurate.***
### Ubuntu
The full dependency list for building ParaView can be found from the
corresponding [debian/control][debian control] file.
A ***quick*** way to get these dependencies on to your system is to
use the paraview development package:
```
sudo apt install paraview-dev
```
Depending on your setup, the following subset may also be enough:
```
sudo apt install cmake qt5base-dev qttools5-dev qttools5-dev-tools libqt5opengl5-dev libqt5x11extras5-dev libxt-dev
```
### openSUSE
The full dependency list for building ParaView can be found from the
corresponding [rpm spec][suse spec] file.
A ***quick*** way to get these dependencies on to your system is to
use the paraview development package:
```
sudo zypper install paraview-devel
```
Depending on your setup, the following subset may also be enough:
```
sudo zypper install Mesa-libEGL-devel
sudo zypper install libqt5-qtbase-devel libqt5-qtsvg-devel libqt5-qttools-devel libqt5-qtx11extras
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 -->
[link openfoam-readme]: https://develop.openfoam.com/Development/openfoam/blob/develop/README.md
[link openfoam-config]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Config.md
[link openfoam-build]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Build.md
[link openfoam-require]: https://develop.openfoam.com/Development/openfoam/blob/develop/doc/Requirements.md
[link third-readme]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/README.md
[link third-build]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/BUILD.md
[link third-require]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/Requirements.md
---
Copyright 2019-2020 OpenCFD Ltd

View File

@ -1,4 +1,42 @@
Short summary of third-party software versions for recent OpenFOAM versions.
Third-party software versions for recent OpenFOAM versions
OpenFOAM-2006
---------------
ADIOS-2.4.0
CGAL-4.12.2 *update*
ParaView-5.6.3
boost_1_66_0 *update*
fftw-3.3.7
openmpi-4.0.3 *update*
scotch_6.0.9
kahip-2.12
OpenFOAM-1912
---------------
ADIOS-2.4.0 *new*
CGAL-4.9.1
ParaView-5.6.3 *minor*
boost_1_64_0
fftw-3.3.7
openmpi-1.10.7 *minor*
scotch_6.0.9 *minor*
kahip-2.12 *update*
OpenFOAM-1906
---------------
CGAL-4.9.1
ParaView-5.6.0
boost_1_64_0
fftw-3.3.7
openmpi-1.10.7 *minor*
scotch_6.0.6
kahip-2.00d
OpenFOAM-1812
---------------
@ -64,7 +102,7 @@ openmpi-1.10.2 *minor*
scotch_6.0.3
OpenFOAM-3.0+
OpenFOAM-1601 (3.0+)
---------------
CGAL-4.7 *update*
ParaView-4.4.0 *update*

View File

@ -8,8 +8,11 @@ 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
LIB_LIBS =
PROJECT_LIBS =

View File

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

View File

@ -1,12 +1,23 @@
#-------------------------------*- makefile -*---------------------------------
# OpenFOAM notes:
#
# WM_CFLAGS, WM_LDFLAGS contain "-m32 -fPIC" etc
# WM_LABEL_SIZE == 64 for 'long' instead of 'int' for OpenFOAM labels
# Prior to OpenFOAM-v1906, these were always part of the environment
#
# - WM_CFLAGS : with -m32 / -m64 and -fPIC
# - WM_LDFLAGS : with -m32 / -m64
#
# With OpenFOAM-v1906 and later
#
# - wmake -show-cflags : with -m32 / -m64
# - wmake -show-cflags-arch : with -m32 / -m64
#
# Pass these in via the environment since using '$(shell ...)' here does not
# always work well.
#
# Notes:
# - compiled without pthread
#
# Normally set CCS, CCP by caller
#------------------------------------------------------------------------------
EXE =
LIB = .dylib
@ -17,7 +28,7 @@ ARFLAGS = $(WM_CFLAGS) -dynamiclib -undefined dynamic_lookup -o
CCS ?= $(CC)
CCP ?= mpicc
CCD = $(CCP)
CFLAGS = $(WM_CFLAGS) -O3 \
CFLAGS = $(WM_CFLAGS) -fPIC -O3 \
-DCOMMON_FILE_COMPRESS_GZ \
-DCOMMON_RANDOM_FIXED_SEED \
-DSCOTCH_DETERMINISTIC \

View File

@ -0,0 +1,73 @@
#-------------------------------*- makefile -*---------------------------------
#
# Prior to OpenFOAM-v1906, these were always part of the environment
#
# - WM_CFLAGS : with -m32 / -m64 and -fPIC
# - WM_LDFLAGS : with -m32 / -m64
#
# With OpenFOAM-v1906 and later
#
# - wmake -show-cflags : with -m32 / -m64
# - wmake -show-cflags-arch : with -m32 / -m64
#
# Pass these in via the environment since using '$(shell ...)' here does not
# always work well.
#
# Notes:
# - compiled without pthread
#
# Normally set CCS, CCP by caller
#------------------------------------------------------------------------------
EXE =
LIB = .dll
OBJ = .o
# Separate the cross-compilation flags from regular CFLAGS to ensure that
# system gcc does not use them for the scotch build toolchain
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 $(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 \
-DCOMMON_RANDOM_FIXED_SEED \
-DSCOTCH_DETERMINISTIC \
-DSCOTCH_RENAME \
-DSCOTCH_PTHREAD \
-Drestrict=__restrict
# 32-bit vs. 64-bit labels
ifeq ($(WM_LABEL_SIZE),64)
CFLAGS += -DINTSIZE64
endif
# Non-standard "__stdcall" in MSMPI <mpi.h>
CCDFLAGS = $(CFLAGS) -D__stdcall=''
CLIBFLAGS = -shared
LDFLAGS =
MAKE = make
CP = cp
CAT = cat
LN = ln
MKDIR = mkdir
MV = mv
RANLIB = echo
LEX = flex -Pscotchyy -olex.yy.c
YACC = bison -pscotchyy -y -b y
#------------------------------------------------------------------------------

View File

@ -1,12 +1,23 @@
#-------------------------------*- makefile -*---------------------------------
# OpenFOAM notes:
#
# WM_CFLAGS, WM_LDFLAGS contain "-m32 -fPIC" etc
# WM_LABEL_SIZE == 64 for 'long' instead of 'int' for OpenFOAM labels
# Prior to OpenFOAM-v1906, these were always part of the environment
#
# - WM_CFLAGS : with -m32 / -m64 and -fPIC
# - WM_LDFLAGS : with -m32 / -m64
#
# With OpenFOAM-v1906 and later
#
# - wmake -show-cflags : with -m32 / -m64
# - wmake -show-cflags-arch : with -m32 / -m64
#
# Pass these in via the environment since using '$(shell ...)' here does not
# always work well.
#
# Notes:
# - compiled without pthread
#
# Normally set CCS, CCP by caller
#------------------------------------------------------------------------------
EXE =
LIB = .so
@ -17,7 +28,7 @@ ARFLAGS = $(WM_CFLAGS) -shared -o
CCS ?= $(CC)
CCP ?= mpicc
CCD = $(CCP)
CFLAGS = $(WM_CFLAGS) -O3 \
CFLAGS = $(WM_CFLAGS) -fPIC -O3 \
-DCOMMON_FILE_COMPRESS_GZ \
-DCOMMON_RANDOM_FIXED_SEED \
-DSCOTCH_DETERMINISTIC \

48
etc/patches/scotch_6.0.6 Normal file
View File

@ -0,0 +1,48 @@
--- scotch_6.0.6/src/libscotch/Makefile.orig 2019-04-29 14:59:53.957103493 +0200
+++ scotch_6.0.6/src/libscotch/Makefile 2019-04-29 18:50:42.560080675 +0200
@@ -51,6 +51,12 @@
.PHONY : ptscotch scotch ptinstall install clean realclean
+ifeq ($(WM_OSTYPE),MSwindows)
+
+libscotch : libscotch$(LIB) scotch.h
+
+endif
+
scotch :
$(MAKE) CC="$(CCS)" CCD="$(CCS)" \
scotch.h \
@@ -438,6 +444,11 @@
wgraph_part_zr$(OBJ) \
wgraph_store$(OBJ)
+ifeq ($(WM_OSTYPE),MSwindows)
+## Add into libscotch instead of having a separate library
+LIBSCOTCHDEPS += library_error_exit$(OBJ)
+endif
+
##
## Todo list.
##
--- scotch_6.0.6/src/Makefile.orig 2018-07-14 17:24:49.000000000 +0200
+++ scotch_6.0.6/src/Makefile 2019-04-29 18:39:16.365132864 +0200
@@ -89,9 +89,18 @@
$(mandir)/man1 : $(mandir)
-$(MKDIR) $(mandir)/man1
+ifeq ($(WM_OSTYPE),MSwindows)
+
+libscotch : required
+ (cd libscotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) libscotch && $(MAKE) install)
+
+else
+
libscotch : required
(cd libscotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install)
+endif
+
scotch : libscotch
(cd scotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install)
(cd libscotchmetis ; $(MAKE) scotch && $(MAKE) install)

48
etc/patches/scotch_6.0.7 Normal file
View File

@ -0,0 +1,48 @@
--- scotch_6.0.6/src/libscotch/Makefile.orig 2019-04-29 14:59:53.957103493 +0200
+++ scotch_6.0.6/src/libscotch/Makefile 2019-04-29 18:50:42.560080675 +0200
@@ -51,6 +51,12 @@
.PHONY : ptscotch scotch ptinstall install clean realclean
+ifeq ($(WM_OSTYPE),MSwindows)
+
+libscotch : libscotch$(LIB) scotch.h
+
+endif
+
scotch :
$(MAKE) CC="$(CCS)" CCD="$(CCS)" \
scotch.h \
@@ -438,6 +444,11 @@
wgraph_part_zr$(OBJ) \
wgraph_store$(OBJ)
+ifeq ($(WM_OSTYPE),MSwindows)
+## Add into libscotch instead of having a separate library
+LIBSCOTCHDEPS += library_error_exit$(OBJ)
+endif
+
##
## Todo list.
##
--- scotch_6.0.6/src/Makefile.orig 2018-07-14 17:24:49.000000000 +0200
+++ scotch_6.0.6/src/Makefile 2019-04-29 18:39:16.365132864 +0200
@@ -89,9 +89,18 @@
$(mandir)/man1 : $(mandir)
-$(MKDIR) $(mandir)/man1
+ifeq ($(WM_OSTYPE),MSwindows)
+
+libscotch : required
+ (cd libscotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) libscotch && $(MAKE) install)
+
+else
+
libscotch : required
(cd libscotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install)
+endif
+
scotch : libscotch
(cd scotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install)
(cd libscotchmetis ; $(MAKE) scotch && $(MAKE) install)

48
etc/patches/scotch_6.0.8 Normal file
View File

@ -0,0 +1,48 @@
--- scotch_6.0.6/src/libscotch/Makefile.orig 2019-04-29 14:59:53.957103493 +0200
+++ scotch_6.0.6/src/libscotch/Makefile 2019-04-29 18:50:42.560080675 +0200
@@ -51,6 +51,12 @@
.PHONY : ptscotch scotch ptinstall install clean realclean
+ifeq ($(WM_OSTYPE),MSwindows)
+
+libscotch : libscotch$(LIB) scotch.h
+
+endif
+
scotch :
$(MAKE) CC="$(CCS)" CCD="$(CCS)" \
scotch.h \
@@ -438,6 +444,11 @@
wgraph_part_zr$(OBJ) \
wgraph_store$(OBJ)
+ifeq ($(WM_OSTYPE),MSwindows)
+## Add into libscotch instead of having a separate library
+LIBSCOTCHDEPS += library_error_exit$(OBJ)
+endif
+
##
## Todo list.
##
--- scotch_6.0.6/src/Makefile.orig 2018-07-14 17:24:49.000000000 +0200
+++ scotch_6.0.6/src/Makefile 2019-04-29 18:39:16.365132864 +0200
@@ -89,9 +89,18 @@
$(mandir)/man1 : $(mandir)
-$(MKDIR) $(mandir)/man1
+ifeq ($(WM_OSTYPE),MSwindows)
+
+libscotch : required
+ (cd libscotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) libscotch && $(MAKE) install)
+
+else
+
libscotch : required
(cd libscotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install)
+endif
+
scotch : libscotch
(cd scotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install)
(cd libscotchmetis ; $(MAKE) scotch && $(MAKE) install)

48
etc/patches/scotch_6.0.9 Normal file
View File

@ -0,0 +1,48 @@
--- scotch_6.0.6/src/libscotch/Makefile.orig 2019-04-29 14:59:53.957103493 +0200
+++ scotch_6.0.6/src/libscotch/Makefile 2019-04-29 18:50:42.560080675 +0200
@@ -51,6 +51,12 @@
.PHONY : ptscotch scotch ptinstall install clean realclean
+ifeq ($(WM_OSTYPE),MSwindows)
+
+libscotch : libscotch$(LIB) scotch.h
+
+endif
+
scotch :
$(MAKE) CC="$(CCS)" CCD="$(CCS)" \
scotch.h \
@@ -438,6 +444,11 @@
wgraph_part_zr$(OBJ) \
wgraph_store$(OBJ)
+ifeq ($(WM_OSTYPE),MSwindows)
+## Add into libscotch instead of having a separate library
+LIBSCOTCHDEPS += library_error_exit$(OBJ)
+endif
+
##
## Todo list.
##
--- scotch_6.0.6/src/Makefile.orig 2018-07-14 17:24:49.000000000 +0200
+++ scotch_6.0.6/src/Makefile 2019-04-29 18:39:16.365132864 +0200
@@ -89,9 +89,18 @@
$(mandir)/man1 : $(mandir)
-$(MKDIR) $(mandir)/man1
+ifeq ($(WM_OSTYPE),MSwindows)
+
+libscotch : required
+ (cd libscotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) libscotch && $(MAKE) install)
+
+else
+
libscotch : required
(cd libscotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install)
+endif
+
scotch : libscotch
(cd scotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install)
(cd libscotchmetis ; $(MAKE) scotch && $(MAKE) install)

View File

@ -3,12 +3,13 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# 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
@ -33,7 +34,7 @@
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Run from third-party (parent) directory only
# Run from third-party directory only
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
echo "Error (${0##*/}) : current directory is not \$WM_THIRD_PARTY_DIR"
echo " Check your OpenFOAM environment and installation"
@ -64,7 +65,7 @@ while [ "$#" -gt 0 ]
do
case "$1" in
'') ;; # Ignore empty
-h | -help) usage ;;
-h | -help*) usage ;;
*)
pkgconfigAdjust "$1"

View File

@ -3,12 +3,13 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# 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
@ -26,12 +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 (parent) directory only
# Run from third-party directory only
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
echo "Error (${0##*/}) : current directory is not \$WM_THIRD_PARTY_DIR"
echo " Check your OpenFOAM environment and installation"
@ -61,7 +62,7 @@ while [ "$#" -gt 0 ]
do
case "$1" in
'') ;; # Ignore empty
-h | -help) usage ;;
-h | -help*) usage ;;
*)
pkgconfigNewPrefix "$1"

View File

@ -3,12 +3,14 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# 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.
#
# Script
# etc/relocateQt
@ -19,7 +21,7 @@
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Run from third-party (parent) directory only
# Run from third-party directory only
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
echo "Error (${0##*/}) : current directory is not \$WM_THIRD_PARTY_DIR"
echo " Check your OpenFOAM environment and installation"
@ -54,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##*-}"
@ -82,6 +84,6 @@ then
# Create qt.conf and adjust locations to use '${prefix}' internally
finalizeQt
fi
pkgconfigNewPrefix $QT_ARCH_PATH
pkgconfigNewPrefix "$QT_ARCH_PATH"
# -----------------------------------------------------------------------------

46
etc/testThirdPartyFunctions Executable file
View File

@ -0,0 +1,46 @@
#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2019 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# testThirdPartyFunctions
#
# Description
# Simple ad hoc tests of etc/tools/ThirdPartyFunctions
#
#------------------------------------------------------------------------------
echo ========================================
echo "Calling environment"
echo "CC=$CC"
echo "CXX=$CXX"
echo
echo ========================================
. "$WM_THIRD_PARTY_DIR/etc/tools/ThirdPartyFunctions"
#------------------------------------------------------------------------------
echo "CC=$(whichCC)"
echo "CXX=$(whichCXX)"
echo "mpicc=$(whichMpicc)"
echo "mpicxx=$(whichMpicxx)"
exportCompiler
echo ========================================
echo "using: $CC $CFLAGS"
echo "using: $CXX $CXXFLAGS"
echo
echo ========================================
#------------------------------------------------------------------------------

View File

@ -2,12 +2,14 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2011-2016 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/ParaViewFunctions
@ -16,8 +18,7 @@
# ParaView make/install helper functions
#
# Note
# Obtaining paths via 'python-config' is possible, but may not always
# resolve properly:
# Obtaining paths via 'python-config' may not always resolve properly:
#
# python-config --includes
# >>
@ -36,6 +37,7 @@ unset withMPI MPI_MAX_PROCS
unset withQT QT_VERSION QMAKE_PATH
unset withMESA MESA_INCLUDE MESA_LIBRARY withOSMESA
unset withPYTHON PYTHON_INCLUDE PYTHON_LIBRARY
unset withPYTHON3
unset withGL2
BUILD_TYPE=Release # The cmake build type
@ -83,7 +85,7 @@ setParaViewDirs()
echo "ParaView_BUILD_DIR=$ParaView_BUILD_DIR"
echo "ParaView_DIR=$ParaView_DIR"
export GIT_DIR=$ParaView_SOURCE_DIR/.git # Mask seeing our own git-repo
export GIT_DIR="$ParaView_SOURCE_DIR/.git" # Mask seeing our own git-repo
}
@ -164,9 +166,17 @@ addPythonSupport()
return
fi
local pythonBin pythonConfig pythonMajor
local pythonBin="python"
local pythonConfig="python-config"
local pythonMajor
pythonBin=$(which python 2>/dev/null) || {
if [ "$withPYTHON3" = true ]
then
pythonBin="python3"
pythonConfig="python3-config"
fi
pythonBin=$(which "$pythonBin" 2>/dev/null) || {
echo "*** Error: python not found"
echo "*** Deactivate python support by not using the -python "
echo "*** option"
@ -185,7 +195,7 @@ addPythonSupport()
# Fallback: get PYTHON_LIBRARY from dynamically linked binary
PYTHON_LIBRARY=$(ldd $pythonBin | \
PYTHON_LIBRARY=$(ldd "$pythonBin" | \
sed -ne '/libpython/s/^.* => \(.*\) (.*/\1/p')
[ -e "$PYTHON_LIBRARY" ] || {
@ -203,7 +213,7 @@ addPythonSupport()
}
# Guess major from library
pythonMajor=$(echo $PYTHON_LIBRARY | sed 's/.*libpython\(.*\)\.so.*/\1/')
pythonMajor=$(echo "$PYTHON_LIBRARY" | sed 's/.*libpython\(.*\)\.so.*/\1/')
if [ -n "$PYTHON_INCLUDE" ]
then
@ -213,12 +223,12 @@ addPythonSupport()
echo "*** Error: Python.h not found at location specified " \
"by -python-include : PYTHON_INCLUDE=$PYTHON_INCLUDE"
elif pythonConfig=$(which python-config 2>/dev/null)
elif pythonConfig=$(which "$pythonConfig" 2>/dev/null)
then
# Guess from python-config
# parse '-I/usr/include/python2.7 -I/usr/include/python2.7'
# -> '/usr/include/python2.7'
PYTHON_INCLUDE=$(python-config --includes | sed -ne 's/^-I\([^ ][^ ]*\).*$/\1/p')
PYTHON_INCLUDE=$("$pythonConfig" --includes | sed -ne 's/^-I\([^ ][^ ]*\).*$/\1/p')
else
@ -257,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"
@ -386,7 +396,7 @@ configParaView()
addCMakeVariable "CMAKE_BUILD_TYPE=$BUILD_TYPE"
cd $ParaView_BUILD_DIR || exit 1 # Change to build folder
cd "$ParaView_BUILD_DIR" || exit # Change to build folder
echo "----"
echo "Configuring paraview-$ParaView_VERSION (major version: $ParaView_MAJOR)"
@ -424,7 +434,7 @@ configParaView()
#
makeParaView()
{
cd $ParaView_BUILD_DIR || exit 1 # Change to build folder
cd "$ParaView_BUILD_DIR" || exit # Change to build folder
echo " Starting make"
time make -j $WM_NCOMPPROCS
echo " Done make"
@ -443,7 +453,7 @@ makeParaView()
#
installParaView()
{
cd $ParaView_BUILD_DIR || exit 1 # Change to build folder
cd "$ParaView_BUILD_DIR" || exit # Change to build folder
echo " Installing ParaView to $ParaView_DIR"
make install
@ -469,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,12 +2,14 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# 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
@ -33,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

@ -2,12 +2,14 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2011-2016 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/ThirdPartyFunctions
@ -17,6 +19,14 @@
#
# Define the standard buildBASE and installBASE for the platform
# Define WM_NCOMPPROCS always.
#
# 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)
@ -24,47 +34,177 @@ 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}"
# Dynamic library endings (default is .so)
[ "$(uname -s)" = Darwin ] && SO=dylib || SO=so
# Dynamic library ending (default is .so)
EXT_SO="$(wmake -show-ext-so 2>/dev/null)"
if [ -z "$EXT_SO" ]
then
EXT_SO=.so
case "$WM_OSTYPE" in
*windows)
EXT_SO=.dll
;;
*)
[ Darwin = "$(uname -s 2>/dev/null)" ] && EXT_SO=.dylib
;;
esac
fi
# Fallback values, needed for our scotch Makefile which uses
# WM_CFLAGS and WM_LDFLAGS for arch information
if [ -z "$WM_CFLAGS" ]
then
export WM_CFLAGS="$(wmake -show-cflags 2>/dev/null)"
fi
if [ -z "$WM_LDFLAGS" ]
then
export WM_LDFLAGS="$(wmake -show-cflags-arch 2>/dev/null)"
fi
unset BUILD_SUFFIX
#------------------------------------------------------------------------------
# Export WM compiler settings (and flags) for CMake/configure
# $1 = true: export compiler flags too
# 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 and including "-DOPENFOAM=...")
# while retaining '-fPIC'
#
# $1 = all flags concatenated as a single string
#
stripCompilerFlags()
{
local flags="${1%-DOPENFOAM=*}" # Strip out OpenFOAM-specific
flags="${flags## }" # Trim leading space
flags="${flags%% }" # Trim trailing space
# Retain -fPIC though
case "$flags" in
(*-fPIC*)
# -fPIC already included
;;
(*)
case "$1" in
(*-fPIC*)
# Add -fPIC back in (was after -DOPENFOAM=... content)
flags="$flags${flags+ }-fPIC"
;;
esac
;;
esac
echo "$flags"
}
# Export compiler settings (and flags) for CMake/configure
# based on the values from wmake -show-compile-*
#
# Since "wmake -show-XX" is only available after 1904, continue to support
# the previous env variables method (WM_CC, WM_CFLAGS, WM_CXX, WM_CXXFLAGS)
#
# $1 = "basic|minimal|strip" (optional)
#
# If the option 'basic' is provided, the OpenFOAM-specific portions of
# the flags are stripped out. Ie, everything after "-DOPENFOAM=..."
# but retaining '-fPIC'
#
exportCompiler()
{
if test -n "$WM_CC" && command -v "$WM_CC" >/dev/null
local option="$1"
local comp flag
# C compiler and flags
if ! comp="$(wmake -show-c 2>/dev/null)" \
|| ! flag="$(wmake -show-cflags 2>/dev/null)"
then
export CC="$WM_CC"
if [ "$1" = true -a -n "$WM_CFLAGS" ]
comp="$WM_CC"
flag="$WM_CFLAGS"
fi
if test -n "$comp" && command -v "$comp" >/dev/null
then
export CC="$comp"
if [ -n "$flag" ]
then
export CFLAGS="$WM_CFLAGS"
case "$option" in
(basic | minimal | strip)
flag="$(stripCompilerFlags "$flag")"
;;
esac
export CFLAGS="$flag"
fi
fi
if test -n "$WM_CXX" && command -v "$WM_CXX" >/dev/null
# C++ compiler and flags
if ! comp="$(wmake -show-cxx 2>/dev/null)" \
|| ! flag="$(wmake -show-cxxflags 2>/dev/null)"
then
export CXX="$WM_CXX"
if [ "$1" = true -a -n "$WM_CXXFLAGS" ]
comp="$WM_CXX"
flag="$WM_CXXFLAGS"
fi
if test -n "$comp" && command -v "$comp" >/dev/null
then
export CXX="$comp"
if [ -n "$flag" ]
then
export CXXFLAGS="$WM_CXXFLAGS"
case "$option" in
(basic | minimal | strip)
flag="$(stripCompilerFlags "$flag")"
;;
esac
export CXXFLAGS="$flag"
fi
fi
}
# Export WM linker settings for CMake/configure
# Export linker settings for CMake/configure
exportLinker()
{
if [ -n "$WM_LDFLAGS" ]
local flag
# Linker flags, actually just the machine arch
flag="$(wmake -show-cflags-arch 2>/dev/null)" || flag="$WM_LDFLAGS"
if test -n "$flag"
then
export LDFLAGS="$WM_LDFLAGS"
export LDFLAGS="$flag"
fi
}
# Force use of gcc/g++
# Force use of gcc/g++, but the values of CFLAGS, CXXFLAGS may be incorrect
useGcc()
{
export CC=gcc
@ -84,60 +224,101 @@ useGccFlag()
done
}
# Return <mpicc> by default or <mpiicc> if possible for INTELMPI.
# Cray doesn't have <mpicc>, but its <cc> manages mpi paths directly.
# NOTE: could further refine based on $CC or $WM_CC, but not yet needed
whichMpicc()
# Return current value of $CC if set or obtain from 'wmake -show-c',
# using $WM_CC (older env variable) as the first level fallback.
# Final fallback is <gcc>
whichCC()
{
local mpicc=$(command -v mpicc)
case "$WM_MPLIB" in
(INTELMPI)
mpicc=$(command -v mpiicc) # Intel <mpiicc> available?
;;
(CRAY-MPI*)
: ${mpicc:=cc} # Cray <cc> if there is no <mpicc>
;;
esac
echo "${mpicc:-mpicc}"
local comp="$CC"
if [ -z "$comp" ]
then
comp="$(wmake -show-c 2>/dev/null)" || comp="$WM_CC"
test -n "$comp" && command -v "$comp" >/dev/null || unset comp
fi
echo "${comp:-gcc}"
}
# Return current value of $CXX if set or obtain from 'wmake -show-cxx',
# using $WM_CXX (older env variable) as the first level fallback.
# Final fallback is <g++>
whichCXX()
{
local comp="$CXX"
if [ -z "$comp" ]
then
comp="$(wmake -show-cxx 2>/dev/null)" || comp="$WM_CXX"
test -n "$comp" && command -v "$comp" >/dev/null || unset comp
fi
echo "${comp:-g++}"
}
# Return <mpicc> by default or <mpiicc> if possible for INTELMPI.
# Cray doesn't have <mpicc>, but its <cc> manages mpi paths directly.
# NOTE: could further refine based on $CC or $WM_CC, but not yet needed
whichMpicxx()
# NOTE: could further refine based on "wmake -show-c", but not yet needed
whichMpicc()
{
local mpicxx=$(command -v mpicxx)
local comp="$(command -v mpicc)"
case "$WM_MPLIB" in
(INTELMPI)
mpicxx=$(command -v mpiicpc) # Intel <mpiicpc> available?
comp="$(command -v mpiicc)" # Intel <mpiicc> available?
;;
(CRAY-MPI*)
: ${mpicxx:=CC} # Cray <CC> if there is no <mpicc>
: "${comp:=cc}" # Cray <cc> if there is no <mpicc>
;;
esac
echo "${mpicxx:-mpicxx}"
echo "${comp:-mpicc}"
}
# Return <mpicxx> by default or <mpiicpc> if possible for INTELMPI.
# 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
(INTELMPI)
comp="$(command -v mpiicpc)" # Intel <mpiicpc> available?
;;
(CRAY-MPI*)
: "${comp:=CC}" # Cray <CC> if there is no <mpicc>
;;
esac
echo "${comp:-mpicxx}"
}
# 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
}
@ -145,6 +326,40 @@ 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()
{
local package="$1"
if [ -n "$package" ]
then
echo "Possible download locations for $package :"
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' | \
uniq
fi
fi
}
#------------------------------------------------------------------------------
# Some functions as per OpenFOAM etc/config.sh/functions
@ -220,6 +435,24 @@ die()
exit 1
}
# Warn
warnBuildIssues()
{
echo
echo " ---------------------------------------------------"
echo " Optional component ($1) had build issues"
echo " OpenFOAM will nonetheless remain largely functional"
echo " ---------------------------------------------------"
echo
}
# Warn
warnNotFound()
{
echo "Optional component ($1) was not found"
}
# Test if it matches "*-none"
_foamIsNone()
{
@ -242,6 +475,7 @@ _foamIsSystem()
unset CMAKE_PATH # clear when first loaded
findCMake()
{
local config="config.sh/cmake"
local candidate foundExe
if [ -n "$CMAKE_PATH" ]
@ -250,13 +484,13 @@ findCMake()
if [ -d "$CMAKE_PATH" ]
then
for candidate in \
$CMAKE_PATH/cmake \
$CMAKE_PATH/bin/cmake \
"$CMAKE_PATH"/cmake \
"$CMAKE_PATH"/bin/cmake \
;
do
if [ -f "$candidate" -a -x "$candidate" ]
if [ -f "$candidate" ] && [ -x "$candidate" ]
then
foundExe=$candidate
foundExe="$candidate"
break
fi
done
@ -266,14 +500,14 @@ findCMake()
if [ -z "$foundExe" ]
then
for candidate in \
$CMAKE_PATH \
$installBASE/$CMAKE_PATH/bin/cmake \
$installBASE/cmake-$CMAKE_PATH/bin/cmake \
"$CMAKE_PATH" \
"$installBASE/$CMAKE_PATH"/bin/cmake \
"$installBASE/cmake-$CMAKE_PATH"/bin/cmake \
;
do
if [ -f "$candidate" -a -x "$candidate" ]
if [ -f "$candidate" ] && [ -x "$candidate" ]
then
foundExe=$candidate
foundExe="$candidate"
break
fi
done
@ -287,26 +521,45 @@ findCMake()
foundExe="$(cd ${foundExe%/cmake} 2>/dev/null && pwd)/cmake"
fi
echo "Using cmake=$foundExe" 1>&2
echo $foundExe
echo "$foundExe"
return 0
else
cat << NOT_FOUND 1>&2
'cmake' not found under specified CMAKE_PATH
CMAKE_PATH=$CMAKE_PATH
reverting to using command from path
reverting to using command from $config or from PATH
NOT_FOUND
fi
fi
unset cmake_version CMAKE_ARCH_PATH
if candidate="$("$WM_PROJECT_DIR"/bin/foamEtcFile "$config" 2>/dev/null)"
then
. "$candidate"
for candidate in \
"$CMAKE_ARCH_PATH"/bin/cmake \
"$installBASE/$cmake_version"/bin/cmake \
;
do
if [ -f "$candidate" ] && [ -x "$candidate" ]
then
echo "Using cmake=$candidate" 1>&2
echo "$candidate"
return 0
fi
done
fi
# Default to use the path, try resolving (so we know what we are using).
for candidate in cmake
do
foundExe=$(command -v $candidate 2>/dev/null) && break
foundExe="$(command -v "$candidate" 2>/dev/null)" && break
done
: ${foundExe:=false}
: "${foundExe:=false}"
echo "Using cmake=$foundExe" 1>&2
echo $foundExe
echo "$foundExe"
}
@ -327,13 +580,13 @@ findQMake()
if [ -d "$QMAKE_PATH" ]
then
for candidate in \
$QMAKE_PATH/qmake \
$QMAKE_PATH/bin/qmake \
"$QMAKE_PATH"/qmake \
"$QMAKE_PATH"/bin/qmake \
;
do
if [ -f "$candidate" -a -x "$candidate" ]
if [ -f "$candidate" ] && [ -x "$candidate" ]
then
foundExe=$candidate
foundExe="$candidate"
break
fi
done
@ -343,14 +596,14 @@ findQMake()
if [ -z "$foundExe" ]
then
for candidate in \
$QMAKE_PATH \
$installBASE/$QMAKE_PATH/bin/qmake \
$installBASE/qt-$QMAKE_PATH/bin/qmake \
"$QMAKE_PATH" \
"$installBASE/$QMAKE_PATH"/bin/qmake \
"$installBASE/qt-$QMAKE_PATH"/bin/qmake \
;
do
if [ -f "$candidate" -a -x "$candidate" ]
if [ -f "$candidate" ] && [ -x "$candidate" ]
then
foundExe=$candidate
foundExe="$candidate"
break
fi
done
@ -364,13 +617,13 @@ findQMake()
foundExe="$(cd ${foundExe%/qmake} 2>/dev/null && pwd)/qmake"
fi
echo "Using qmake=$foundExe" 1>&2
echo $foundExe
echo "$foundExe"
return 0
else
cat << NOT_FOUND 1>&2
'qmake' not found under specified QMAKE_PATH
QMAKE_PATH=$QMAKE_PATH
reverting to using command from path
reverting to using command from PATH
NOT_FOUND
fi
fi
@ -379,9 +632,9 @@ NOT_FOUND
# Some systems have qmake-qt5 as well as qmake
for candidate in qmake-qt5 qmake
do
foundExe=$(command -v $candidate 2>/dev/null) && break
foundExe="$(command -v "$candidate" 2>/dev/null)" && break
done
: ${foundExe:=false}
: "${foundExe:=false}"
echo "Using qmake=$foundExe" 1>&2
echo $foundExe
@ -395,7 +648,7 @@ pkgconfigNewPrefix()
{
local dir="${1%%/}"
if [ -n "$dir" -a -d "$dir" ]
if [ -n "$dir" ] && [ -d "$dir" ]
then
# Require absolute path, but use logical (not physical) location
[ "${dir}" != "${dir#/}" ] || dir=$(cd $dir 2>/dev/null && /bin/pwd -L)
@ -421,7 +674,7 @@ pkgconfigNewPrefix()
[ -d "$dir/$libdir" ] || continue
for i in $dir/$libdir/*.pc
do
if [ -f "$i" -a ! -L "$i" ]
if [ -f "$i" ] && [ ! -L "$i" ]
then
nfiles="x$nfiles"
sed -i~ -e 's@^\(prefix=\).*$@\1'"$dir@" $i
@ -443,7 +696,7 @@ pkgconfigAdjust()
{
local dir="${1%%/}"
if [ -n "$dir" -a -d "$dir" ]
if [ -n "$dir" ] && [ -d "$dir" ]
then
# Require absolute path, but use logical (not physical) location
[ "${dir}" != "${dir#/}" ] || dir=$(cd $dir 2>/dev/null && /bin/pwd -L)
@ -469,7 +722,7 @@ pkgconfigAdjust()
[ -d "$dir/$libdir" ] || continue
for i in $dir/$libdir/*.pc
do
if [ -f "$i" -a ! -L "$i" ]
if [ -f "$i" ] && [ ! -L "$i" ]
then
nfiles="x$nfiles"
sed -i~ \
@ -570,7 +823,7 @@ applyPatch()
if [ -r "$patch" ]
then
(
cd $dst || exit 1
cd "$dst" || exit
if [ -f "$sentinel" ]
then
echo "patch for $pkg was already applied"

View File

@ -2,12 +2,13 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# 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
@ -65,7 +66,7 @@ setVtkDirs()
echo "VTK_BUILD_DIR=$VTK_BUILD_DIR"
echo "VTK_DIR=$VTK_DIR"
export GIT_DIR=$VTK_SOURCE_DIR/.git # Mask seeing our own git-repo
export GIT_DIR="$VTK_SOURCE_DIR/.git" # Mask seeing our own git-repo
}
@ -120,7 +121,7 @@ configVTK()
addCMakeVariable "CMAKE_BUILD_TYPE=$BUILD_TYPE"
cd $VTK_BUILD_DIR || exit 1 # change to build folder
cd "$VTK_BUILD_DIR" || exit # change to build folder
echo "----"
echo "Configuring VTK-$VTK_VERSION"
@ -176,7 +177,7 @@ addMpiSupport()
#
makeVTK()
{
cd $VTK_BUILD_DIR || exit 1 # Change to build folder
cd "$VTK_BUILD_DIR" || exit # Change to build folder
echo " Starting make"
time make -j $WM_NCOMPPROCS
@ -193,7 +194,7 @@ makeVTK()
#
installVTK()
{
cd $VTK_BUILD_DIR || exit 1 # Change to build folder
cd "$VTK_BUILD_DIR" || exit # Change to build folder
echo " Installing VTK to $VTK_DIR"
make install

358
makeADIOS
View File

@ -1,358 +0,0 @@
#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd.
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
#
# Script
# makeADIOS
#
# Description
# Build script for ADIOS
#
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Run from third-party directory only
cd ${0%/*} && 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 ADIOS
adiosPACKAGE=${adios_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:
-cmake PATH With cmake from the path given
-gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX
-help
* Build ADIOS
$adiosPACKAGE
USAGE
exit 1
}
#------------------------------------------------------------------------------
exportCompiler true # Compiler info + flags 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
;;
ADIOS-[1-9]* | adios-[1-9]* | ADIOS-git* | adios-git*)
adiosPACKAGE="${1%%/}"
;;
*)
die "unknown option/argument: '$1'"
;;
esac
shift
done
[ -n "$adiosPACKAGE" ] || die "The adios-VERSION was not specified"
# Nothing to build
if _foamIsNone "$adiosPACKAGE"
then
echo "Using adios-none (skip ThirdParty build of ADIOS)"
exit 0
elif _foamIsSystem "$adiosPACKAGE"
then
echo "Using adios-system"
exit 0
fi
#------------------------------------------------------------------------------
#
# Build ADIOS
# ADIOS_SOURCE_DIR : location of the original sources
# ADIOS_ARCH_PATH : installation directory
ADIOS_SOURCE_DIR=$sourceBASE/$adiosPACKAGE
ADIOS_ARCH_PATH=$installBASE/$adiosPACKAGE
: ${FOAM_MPI:=dummy}
echo
echo ========================================
echo "Build adios library $adiosPACKAGE for $FOAM_MPI"
echo
#
# Manual adjustments to adios config
#
adjustADIOS()
{
# Rename libraries according to FOAM_MPI
(
cd $ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH || exit 1
if [ "$FOAM_MPI" != dummy ]
then
\mv -f libadios.a libadios_$FOAM_MPI.a
\mv -f libadiosread.a libadiosread_$FOAM_MPI.a
fi
\mv -f libadios_nompi.a libadios_dummy.a
\mv -f libadiosread_nompi.a libadiosread_dummy.a
echo
echo "ADIOS library renamed to libadios_$FOAM_MPI"
echo
)
# We don't need/use XML things
\rm -f $ADIOS_ARCH_PATH/bin/adios_lint
# Replace resolved paths with variables
echo "Adjust prefix for ADIOS"
for i in \
$ADIOS_ARCH_PATH/bin/adios_config \
$ADIOS_ARCH_PATH/etc/adios_config.flags \
;
do
[ -f "$i" ] || {
echo " no such file - '$i'"
continue
}
if sed -i -e 's|'"$WM_THIRD_PARTY_DIR"'|$WM_THIRD_PARTY_DIR|g' $i
then
echo " '$i'"
else
echo " problems with '$i'"
fi
done
# Adjust the config flags file:
# * Remove references to Fortran libraries (disabled in configure)
# * Remove references to deprecated version 1 API
# * Cleanup excessive whitespace
# * Handle renamed libraries:
# - libadios -> libadios_$FOAM_MPI
# - libadios_nompi -> libadios_dummy
#
echo "Adjust library names for ADIOS"
for i in \
$ADIOS_ARCH_PATH/etc/adios_config.flags \
;
do
[ -f "$i" ] || {
echo " no such file - '$i'"
continue
}
if sed -i \
-e '/_FLIB=/d' \
-e '/_V1_INC=/d' \
-e 's| *| |g' \
-e 's|\(-ladios[a-z]*_\)nompi |\1dummy |g' \
$i
then
echo " '$i'"
else
echo " problems with '$i'"
fi
if [ "$FOAM_MPI" != dummy ]
then
sed -i -e 's|\(-ladios[a-z]*\) |\1_'"$FOAM_MPI |g" $i || \
echo " problems with '$i'"
fi
done
}
#
# List ADIOS methods/configuration
#
listMethods()
{
[ -f $ADIOS_ARCH_PATH/bin/adios_config ] || {
echo "Warning: no adios_config"
return 1
}
echo "==============="
# May have problems listing parallel methods (eg, transport key missing)
if $ADIOS_ARCH_PATH/bin/adios_config -m >/dev/null 2>&1
then
$ADIOS_ARCH_PATH/bin/adios_config -m 2>/dev/null
else
echo "Warning: could not list parallel methods"
# Fallback to serial methods
$ADIOS_ARCH_PATH/bin/adios_config -s -m 2>/dev/null
fi || echo "Warning: could not list configured methods"
echo "==============="
}
# Needs future adjustment
# - for shared library
# - for mpi-specific library locations
if [ -f $ADIOS_ARCH_PATH/include/adios.h \
-a -r $ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libadios_${FOAM_MPI}.a ]
then
echo " ADIOS header in $ADIOS_ARCH_PATH/include"
### echo " ADIOS libs in $FOAM_EXT_LIBBIN" # dynamic
echo " ADIOS libs in $ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" # static
listMethods
elif [ -z "$CMAKE_PATH" ]
then
echo "Starting build: $adiosPACKAGE (using configure)"
echo
(
# Configuration options:
unset configOpt
# Add InfiniBand support
ibDir=/usr/local/ofed
if [ -d "$ibDir" -a "$FOAM_MPI" != dummy ]
then
configOpt="$configOpt --with-infiniband=$ibDir"
fi
# Transport layers
if [ -f /usr/include/bzlib.h ]
then
configOpt="$configOpt --with-bzip2"
fi
if [ -f /usr/include/zlib.h ]
then
configOpt="$configOpt --with-zlib"
fi
# Other types of support
## configOpt="$configOpt --with-hdf5=..."
## configOpt="$configOpt --with-lustre=..."
## configOpt="$configOpt --enable-research-transports"
# Additional configure options
if [ "$1" = "--" ]
then
shift
configOpt="$configOpt $@"
fi
# End of configuration options
# ----------------------------
buildDIR=$buildBASE/$adiosPACKAGE
cd $ADIOS_SOURCE_DIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
[ -e Makefile ] && make distclean 2>/dev/null
applyPatch $adiosPACKAGE $ADIOS_SOURCE_DIR
# Remove any existing build folder and recreate
rm -rf $ADIOS_ARCH_DIR
rm -rf $buildDIR 2>/dev/null
mkdir -p $buildDIR
[ -f configure ] || {
echo "no configure for $adiosPACKAGE ... trying autogen"
./autogen.sh
}
# May not work properly with FOAM_MPI = dummy
if [ "$FOAM_MPI" = dummy ]
then
configOpt="$configOpt --without-mpi"
else
CC=mpicc
CXX=mpicxx
fi
# Install into lib64/
cd $buildDIR && $ADIOS_SOURCE_DIR/configure \
--prefix=$ADIOS_ARCH_PATH \
--libdir=$ADIOS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH \
--disable-fortran \
--with-pic \
--without-fastbit \
$configOpt \
&& make -j $WM_NCOMPPROCS all \
&& make install \
&& echo "Built: $adiosPACKAGE" \
&& adjustADIOS \
&& listMethods
) || {
echo "Error building: $adiosPACKAGE"
}
else
# CMake options often lag the configure ones
echo "Starting build: $adiosPACKAGE (using cmake)"
echo
(
buildDIR=$buildBASE/$adiosPACKAGE
cd $ADIOS_SOURCE_DIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
applyPatch $adiosPACKAGE $ADIOS_SOURCE_DIR
# Remove any existing build folder and recreate
rm -rf $ADIOS_ARCH_DIR
rm -rf $buildDIR 2>/dev/null
mkdir -p $buildDIR
# May not work properly with FOAM_MPI = dummy
if [ "$FOAM_MPI" = dummy ]
then
configOpt="$configOpt --without-mpi"
else
CC=mpicc
CXX=mpicxx
fi
cmake=$(findCMake)
# Install into lib64/
cd $buildDIR && $cmake \
-DCMAKE_INSTALL_PREFIX=$ADIOS_ARCH_PATH \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_FORTRAN=FALSE \
${WM_QUIET:+-DCMAKE_RULE_MESSAGES=OFF} \
$ADIOS_SOURCE_DIR \
&& make -j $WM_NCOMPPROCS all \
&& make install \
&& echo "Built: $adiosPACKAGE" \
&& adjustADIOS \
&& listMethods
) || {
echo "Error building: $adiosPACKAGE"
}
fi
# -----------------------------------------------------------------------------

View File

@ -1,16 +1,17 @@
#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# This file is part of OpenFOAM, licensed under the GNU General Public License
# <http://www.gnu.org/licenses/>.
# Copyright (C) 2018-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# makeADIOS2
# makeAdios2
#
# Description
# Build script for ADIOS2
@ -18,8 +19,28 @@
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Dynamic library ending (default is .so)
[ "$(uname -s)" = Darwin ] && EXT_SO=.dylib || EXT_SO=.so
# Short-circuit test for an installation
if [ "$1" = "-test" ]
then
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
dir="${2%/}" # <- *_ARCH_PATH
if [ -d "$dir/include" ] \
&& [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libadios2$EXT_SO" ]
then
echo " adios2 include: $dir/include"
echo " adios2 library: $dir/lib$WM_COMPILER_LIB_ARCH"
exit 0
else
exit 2
fi
fi
#------------------------------------------------------------------------------
# Run from third-party directory only
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
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
@ -27,9 +48,9 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
. etc/tools/ThirdPartyFunctions
#------------------------------------------------------------------------------
# ADIOS2 version from OpenFOAM etc/config.sh file:
_foamConfig ADIOS2
_foamConfig adios2
adios2PACKAGE=${adios2_version:-adios-none}
adiosPACKAGE=${adios2_version:-adios-none}
#------------------------------------------------------------------------------
usage() {
@ -39,18 +60,22 @@ usage() {
usage: ${0##*/} [OPTION] [adios-VERSION]
options:
-cmake PATH With cmake from the path given
-gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX
-force Force compilation, even if include/library already exists
-gcc Force use of gcc/g++
-cmake PATH With cmake from the given path
-help
* Build ADIOS2
$adios2PACKAGE
$adiosPACKAGE
USAGE
showDownloadHint ADIOS2
exit 1
}
#------------------------------------------------------------------------------
exportCompiler true # Compiler info + flags for CMake/configure
exportCompiler minimal # Minimal compiler info for CMake/configure
unset optForce
# Parse options
while [ "$#" -gt 0 ]
@ -59,14 +84,16 @@ 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-[1-9]* | ADIOS2-git* | adios2-git*)
adios2PACKAGE="${1%%/}"
ADIOS2-[0-9]* | ADIOS2-git* | ADIOS-[0-9]* | ADIOS-git* | \
adios2-[0-9]* | adios2-git* | adios-[0-9]* | adios-git*)
adiosPACKAGE="${1%%/}"
;;
*)
die "unknown option/argument: '$1'"
@ -75,14 +102,14 @@ do
shift
done
[ -n "$adios2PACKAGE" ] || die "The adios2-VERSION was not specified"
[ -n "$adiosPACKAGE" ] || die "The adios2-VERSION was not specified"
# nothing to build
if _foamIsNone "$adios2PACKAGE"
if _foamIsNone "$adiosPACKAGE"
then
echo "Using adios-none (skip ThirdParty build of ADIOS)"
exit 0
elif _foamIsSystem "$adios2PACKAGE"
elif _foamIsSystem "$adiosPACKAGE"
then
echo "Using adios-system"
exit 0
@ -94,8 +121,8 @@ fi
# ADIOS2_SOURCE_DIR : location of the original sources
# ADIOS2_ARCH_PATH : installation directory
ADIOS2_SOURCE_DIR=$sourceBASE/$adios2PACKAGE
ADIOS2_ARCH_PATH=$installBASE/$adios2PACKAGE
ADIOS2_SOURCE_DIR=$sourceBASE/$adiosPACKAGE
ADIOS2_ARCH_PATH=$installBASE/$adiosPACKAGE
: ${FOAM_MPI:=dummy}
@ -104,26 +131,24 @@ echo ========================================
echo "Build adios library $adiosPACKAGE for $FOAM_MPI"
echo
# Needs future adjustment
# - for shared library
# - for mpi-specific library locations
if [ -f $ADIOS2_ARCH_PATH/include/adios.h \
-a -r $ADIOS2_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libadios_${FOAM_MPI}.a ]
if [ -z "$optForce" ] \
&& [ -f "$ADIOS2_ARCH_PATH/include/adios2.h" ] \
&& [ -r "$ADIOS2_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libadios2$EXT_SO" ]
then
echo " ADIOS2 header in $ADIOS2_ARCH_PATH/include"
### echo " ADIOS2 libs in $FOAM_EXT_LIBBIN" # dynamic
echo " ADIOS2 libs in $ADIOS2_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" # static
echo " ADIOS2 libs in $ADIOS2_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH"
else
# CMake options often lag the configure ones
echo "Starting build: $adios2PACKAGE (using cmake)"
echo "Starting build: $adiosPACKAGE (using cmake)"
echo
(
buildDIR=$buildBASE/$adios2PACKAGE
cd $ADIOS2_SOURCE_DIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
buildDIR=$buildBASE/$adiosPACKAGE
cd "$ADIOS2_SOURCE_DIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
applyPatch $adios2PACKAGE $ADIOS2_SOURCE_DIR
applyPatch $adiosPACKAGE $ADIOS2_SOURCE_DIR
# Remove any existing build folder and recreate
rm -rf $ADIOS2_ARCH_DIR
@ -131,32 +156,28 @@ else
mkdir -p $buildDIR
# May not work properly with FOAM_MPI = dummy
if [ "$FOAM_MPI" = dummy ]
if [ "$FOAM_MPI" != dummy ]
then
configOpt="$configOpt --without-mpi"
else
CC=mpicc
CXX=mpicxx
fi
# HACK
export ADIOS1_ROOT=/local/home/mark/openfoam/ThirdParty-plus/platforms/linux64Gcc/ADIOS-1.12.0
cmake=$(findCMake)
# Install into lib64/
cd $buildDIR && $cmake \
-DCMAKE_INSTALL_PREFIX=$ADIOS2_ARCH_PATH \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_FORTRAN=FALSE \
-DADIOS1_USE_STATIC_LIBS=TRUE \
-DADIOS2_USE_Fortran=FALSE \
-DADIOS2_BUILD_EXAMPLES=FALSE \
${WM_QUIET:+-DCMAKE_RULE_MESSAGES=OFF} \
$ADIOS2_SOURCE_DIR \
&& make -j $WM_NCOMPPROCS all \
&& make install \
&& echo "Built: $adios2PACKAGE"
&& echo "Built: $adiosPACKAGE"
) || {
echo "Error building: $adios2PACKAGE"
echo "Error building: $adiosPACKAGE"
exit 1
}
fi

View File

@ -3,12 +3,14 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2011-2016 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.
#
# Script
# makeCCMIO
@ -19,20 +21,13 @@
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Dynamic library endings (default is .so)
[ "$(uname -s)" = Darwin ] && SO=dylib || SO=so
# Run from third-party directory only
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
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
}
[ -n "$FOAM_EXT_LIBBIN" ] || {
echo "Error (${0##*/}) : \$FOAM_EXT_LIBBIN not set"
echo " Check your OpenFOAM environment and installation"
exit 1
}
. etc/tools/ThirdPartyFunctions
#------------------------------------------------------------------------------
@ -51,7 +46,7 @@ usage()
Usage: ${0##*/} [OPTION] [lib|libso] [libccmio-VERSION]
options:
-gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX
-gcc Force use of gcc/g++
-help
* Compile the proprietary libccmio library
@ -67,6 +62,7 @@ options:
prior to running this script.
USAGE
showDownloadHint CCMIO
exit 1
}
#------------------------------------------------------------------------------
@ -82,7 +78,7 @@ do
lib|libso)
targetType="$1"
;;
libccmio-[1-9]*)
libccmio-[0-9]*)
ccmioPACKAGE="${1%%/}"
;;
*)
@ -93,6 +89,7 @@ do
done
requireWMakeToolchain
requireExtLibBin
#------------------------------------------------------------------------------
#
@ -123,11 +120,11 @@ install()
echo "Starting build: $ccmioPACKAGE ($targetType)"
echo
(
cd $CCMIO_SOURCE_DIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
cd "$CCMIO_SOURCE_DIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
rm -rf $CCMIO_ARCH_PATH
rm -f $FOAM_EXT_LIBBIN/libccmio.$SO
rm -f $FOAM_EXT_LIBBIN/libccmio$EXT_SO
libdir=$CCMIO_ARCH_PATH/lib

221
makeCGAL
View File

@ -3,12 +3,14 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2012-2016 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.
#
# Script
# makeCGAL
@ -25,24 +27,24 @@
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Dynamic library endings (default is .so)
[ "$(uname -s)" = Darwin ] && SO=dylib || SO=so
# 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 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.$SO" ]
dir="${2%/}" # <- *_ARCH_PATH
if [ -d "$dir/include" ] && [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libCGAL$EXT_SO" ]
then
echo " CGAL include: $dir/include"
echo " CGAL library: $dir/lib$WM_COMPILER_LIB_ARCH"
# Additional information about boost
dir="$3" # <- BOOST_ARCH_PATH
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.$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"
@ -56,7 +58,8 @@ then
fi
#------------------------------------------------------------------------------
# Run from third-party directory only
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
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
@ -83,10 +86,12 @@ usage() {
usage: ${0##*/} [OPTION] [CGAL-VERSION] [boost-VERSION] [gmp-VERSION] [mpfr-VERSION]
options:
-cmake PATH with cmake from the path given
-gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
-no-lib compile CGAL for use in headers only mode (since CGAL 4.9)
-system use system versions for boost/gmp/mpfr
-gcc Force use of gcc/g++
-cmake PATH Use cmake from the given path
-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
* build CGAL with
@ -103,12 +108,15 @@ simply specify a 'system' version. For example,
Use gmp-none to disable use of gmp/mpfr (eg, not available)
USAGE
showDownloadHint BOOST
showDownloadHint CGAL
exit 1
}
#------------------------------------------------------------------------------
exportCompiler # Compiler info for CMake/configure
unset optHeadersOnly
unset optHeadersOnly optToolset
# Parse options
while [ "$#" -gt 0 ]
do
@ -122,6 +130,9 @@ do
CMAKE_PATH="${2%%/}"
shift
;;
-toolset=*)
optToolset="${1#*=}"
;;
-sys*)
gmpPACKAGE="gmp-system"
mpfrPACKAGE="mpfr-system"
@ -131,11 +142,14 @@ do
-no-lib)
optHeadersOnly=true
;;
gmp-[4-9]* | gmp-system | gmp-none)
-with-lib)
optHeadersOnly=false
;;
gmp-[0-9]* | gmp-system | gmp-none)
gmpPACKAGE="${1%%/}"
unset GMP_ARCH_PATH
;;
mpfr-[2-9]* | mpfr-system | mpfr-none)
mpfr-[0-9]* | mpfr-system | mpfr-none)
mpfrPACKAGE="${1%%/}"
unset MPFR_ARCH_PATH
;;
@ -157,17 +171,36 @@ done
[ -n "$cgalPACKAGE" ] || die "The cgal-VERSION was not specified"
# Nothing to build
if _foamIsNone $boostPACKAGE
if _foamIsNone "$boostPACKAGE"
then
echo "Using boost-none (skip ThirdParty build of BOOST/CGAL)"
exit 0
fi
if _foamIsNone $cgalPACKAGE
if _foamIsNone "$cgalPACKAGE"
then
echo "Using cgal-none (skip ThirdParty build of CGAL)"
exit 0
fi
# For OpenFOAM 1912 and earlier, no predefined default.
# Force headers-only *after* starting with OpenFOAM-v2006
if [ -z "$optHeadersOnly" ] && foamVersion=$(wmake -version 2>/dev/null)
then
if [ "${foamVersion:-0}" -gt 1912 ]
then
optHeadersOnly=true
fi
fi
# Headers-only - might be able to avoid gmp/mpfr?
## if [ "${optHeadersOnly:-false}" = true ]
## then
## gmpPACKAGE=none
## mpfrPACKAGE=none
## unset GMP_ARCH_PATH MPFR_ARCH_PATH
## fi
#------------------------------------------------------------------------------
#
# Build Boost
@ -179,13 +212,13 @@ fi
# BOOST_ARCH_PATH : installation directory
# BOOST_SOURCE_DIR : location of the original sources
BOOST_SOURCE_DIR=$sourceBASE/$boostPACKAGE
: ${BOOST_ARCH_PATH:=$installBASE/$boostPACKAGE} # Fallback
BOOST_SOURCE_DIR="$sourceBASE/$boostPACKAGE"
: "${BOOST_ARCH_PATH:=$installBASE/$boostPACKAGE}"
boostInc="$BOOST_ARCH_PATH/include"
boostLib="$BOOST_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH"
if _foamIsSystem $boostPACKAGE
if _foamIsSystem "$boostPACKAGE"
then
echo "Using boost-system (skip ThirdParty build of BOOST)"
@ -193,9 +226,9 @@ then
if [ -d "$boostInc" ]
then
if BOOST_ARCH_PATH=$(cd $BOOST_ARCH_PATH 2>/dev/null && pwd -P)
if BOOST_ARCH_PATH=$(cd "$BOOST_ARCH_PATH" 2>/dev/null && pwd -P)
then
boostPACKAGE=${BOOST_ARCH_PATH##*/}
boostPACKAGE="${BOOST_ARCH_PATH##*/}"
else
echo "ERROR: bad path for BOOST_ARCH_PATH"
echo "stopping build"
@ -227,17 +260,59 @@ else
# Absolute path for --libdir
(
cd $BOOST_SOURCE_DIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
# Configuration options:
unset buildOpt
cd "$BOOST_SOURCE_DIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
rm -rf $BOOST_ARCH_PATH
case "$WM_COMPILER" in
(Arm*)
# Toolset for bootstrap
optToolset="gcc"
echo "using clang : arm : $(whichCC) ;" > user-config.jam
echo "using mpi ;" >> user-config.jam
# Toolset for build
buildOpt="--user-config=user-config.jam toolset=clang"
;;
(Mingw*)
# Toolset for bootstrap
optToolset="gcc"
echo "using gcc : mingw : $(whichCC) ;" > user-config.jam
# Toolset for build
buildOpt="--user-config=user-config.jam toolset=gcc"
buildOpt="$buildOpt target-os=windows release"
;;
(*)
# Toolset for bootstrap and build
if [ -z "$optToolset" ]
then
optToolset="$(whichCC)"
# Base names for gcc-8, clang-9 etc.
case "$optToolset" in
(clang*) optToolset=clang;;
(gcc*) optToolset=gcc;;
esac
fi
buildOpt="toolset=$optToolset"
;;
esac
./bootstrap.sh \
--prefix=$BOOST_ARCH_PATH \
--libdir=$boostLib \
--prefix="$BOOST_ARCH_PATH" \
--libdir="$boostLib" \
--with-libraries=thread \
--with-libraries=system \
&& ./bjam toolset=$WM_CC -j $WM_NCOMPPROCS install \
--with-toolset="$optToolset" \
&& ./b2 $buildOpt -j $WM_NCOMPPROCS install \
&& echo "Built: boost"
) || {
echo "Error building: boost"
@ -245,8 +320,9 @@ else
}
fi
# Nothing left to build
if _foamIsSystem $cgalPACKAGE
if _foamIsSystem "$cgalPACKAGE"
then
echo "Using cgal-system (skip ThirdParty build of CGAL)"
exit 0
@ -278,28 +354,28 @@ fi
# CGAL_BUILD_DIR : location of the build
# CGAL_ARCH_PATH : installation directory
CGAL_SOURCE_DIR=$sourceBASE/$cgalPACKAGE
CGAL_BUILD_DIR=$buildBASE/$cgalPACKAGE
: ${CGAL_ARCH_PATH:=$installBASE/$cgalPACKAGE} # Fallback
CGAL_SOURCE_DIR="$sourceBASE/$cgalPACKAGE"
CGAL_BUILD_DIR="$buildBASE/$cgalPACKAGE"
: "${CGAL_ARCH_PATH:=$installBASE/$cgalPACKAGE}"
# gmp/mpfr are installed without compiler name
mpfrBASE=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH
mpfrBASE="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH"
# Enable/disable gmp/mpfr together
if _foamIsNone $gmpPACKAGE || _foamIsNone $mpfrPACKAGE
if _foamIsNone "$gmpPACKAGE" || _foamIsNone "$mpfrPACKAGE"
then
GMP_ARCH_PATH=none
MPFR_ARCH_PATH=none
elif _foamIsSystem $gmpPACKAGE || _foamIsSystem $mpfrPACKAGE
elif _foamIsSystem "$gmpPACKAGE" || _foamIsSystem "$mpfrPACKAGE"
then
# May really be system, but could also by a central installation
# Ensure everything is accurately recorded. Resolve paths etc.
if [ -d "$GMP_ARCH_PATH" ]
then
if GMP_ARCH_PATH=$(cd $GMP_ARCH_PATH 2>/dev/null && pwd -P)
if GMP_ARCH_PATH=$(cd "$GMP_ARCH_PATH" 2>/dev/null && pwd -P)
then
gmpPACKAGE=${GMP_ARCH_PATH##*/}
gmpPACKAGE="${GMP_ARCH_PATH##*/}"
else
echo "ERROR: bad path for GMP_ARCH_PATH"
echo "stopping build"
@ -311,9 +387,9 @@ then
if [ -d "$MPFR_ARCH_PATH" ]
then
if MPFR_ARCH_PATH=$(cd $MPFR_ARCH_PATH 2>/dev/null && pwd -P)
if MPFR_ARCH_PATH=$(cd "$MPFR_ARCH_PATH" 2>/dev/null && pwd -P)
then
mpfrPACKAGE=${MPFR_ARCH_PATH##*/}
mpfrPACKAGE="${MPFR_ARCH_PATH##*/}"
else
echo "ERROR: bad path for MPFR_ARCH_PATH"
echo "stopping build"
@ -323,8 +399,8 @@ then
MPFR_ARCH_PATH=system
fi
else
GMP_ARCH_PATH=$mpfrBASE/$gmpPACKAGE
MPFR_ARCH_PATH=$mpfrBASE/$mpfrPACKAGE
GMP_ARCH_PATH="$mpfrBASE/$gmpPACKAGE"
MPFR_ARCH_PATH="$mpfrBASE/$mpfrPACKAGE"
fi
#------------------------------------------------------------------------------
@ -360,7 +436,7 @@ BOOST_VERSION=$BOOST_VERSION
CGAL_lib=lib$WM_COMPILER_LIB_ARCH
BOOST_lib=lib$WM_COMPILER_LIB_ARCH
CGAL_HEADER_ONLY=${optHeadersOnly:-false}
CGAL_HEADER_ONLY=${optHeadersOnly:-default}
BUILD_INFO
}
@ -414,16 +490,16 @@ fi
(
# Remove any existing build folder and recreate
if [ -d $CGAL_BUILD_DIR ]
if [ -d "$CGAL_BUILD_DIR" ]
then
echo "removing old build directory"
echo " $CGAL_BUILD_DIR"
rm -rf $CGAL_BUILD_DIR
rm -rf "$CGAL_BUILD_DIR"
fi
mkdir -p $CGAL_BUILD_DIR
mkdir -p "$CGAL_BUILD_DIR"
cd $CGAL_BUILD_DIR || exit 1
export GIT_DIR=$CGAL_SOURCE_DIR/.git # Mask seeing our own git-repo
cd "$CGAL_BUILD_DIR" || exit
export GIT_DIR="$CGAL_SOURCE_DIR/.git" # Mask seeing our own git-repo
unset configBoost configGmp configMpfr
echo "----"
@ -434,7 +510,7 @@ fi
# See http://doc.cgal.org/latest/Manual/installation.html
if _foamIsSystem $boostPACKAGE
if _foamIsSystem "$boostPACKAGE"
then
# Tagged as 'system' but could actually point to a central location
if [ -d "$BOOST_ARCH_PATH/include" ]
@ -453,19 +529,19 @@ fi
configBoost=$(cat <<CMAKE_OPTIONS
-DBoost_INCLUDE_DIR=$boostInc
-DBoost_LIBRARY_DIRS=$boostLib
-DBoost_THREAD_LIBRARY=$boostLib/libboost_thread.$SO
-DBoost_THREAD_LIBRARY_RELEASE=$boostLib/libboost_thread.$SO
-DBoost_SYSTEM_LIBRARY=$boostLib/libboost_system.$SO
-DBoost_SYSTEM_LIBRARY_RELEASE=$boostLib/libboost_system.$SO
-DBoost_THREAD_LIBRARY=$boostLib/libboost_thread$EXT_SO
-DBoost_THREAD_LIBRARY_RELEASE=$boostLib/libboost_thread$EXT_SO
-DBoost_SYSTEM_LIBRARY=$boostLib/libboost_system$EXT_SO
-DBoost_SYSTEM_LIBRARY_RELEASE=$boostLib/libboost_system$EXT_SO
-DBoost_VERSION=$BOOST_VERSION
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
@ -478,12 +554,12 @@ CMAKE_OPTIONS
$GMP_ARCH_PATH/lib \
;
do
if [ -f "$libdir/libgmp.$SO" ]
if [ -f "$libdir/libgmp$EXT_SO" ]
then
configGmp=$(cat <<CMAKE_OPTIONS
-DGMP_INCLUDE_DIR=$GMP_ARCH_PATH/include
-DGMP_LIBRARIES_DIR=$libdir
-DGMP_LIBRARIES=$libdir/libgmp.$SO
-DGMP_LIBRARIES=$libdir/libgmp$EXT_SO
CMAKE_OPTIONS
)
break
@ -493,10 +569,10 @@ CMAKE_OPTIONS
echo " system : gmp (did not find $GMP_ARCH_PATH)"
fi
if _foamIsSystem $MPFR_ARCH_PATH
if _foamIsSystem "$MPFR_ARCH_PATH"
then
echo " mpfr : system"
elif _foamIsNone $MPFR_ARCH_PATH
elif _foamIsNone "$MPFR_ARCH_PATH"
then
echo " mpfr : disabled"
configGmp="-DCGAL_DISABLE_GMP=TRUE" # Also used for mpfr
@ -509,12 +585,12 @@ CMAKE_OPTIONS
$MPFR_ARCH_PATH/lib \
;
do
if [ -f "$libdir/libmpfr.$SO" ]
if [ -f "$libdir/libmpfr$EXT_SO" ]
then
configMpfr=$(cat <<CMAKE_OPTIONS
-DMPFR_INCLUDE_DIR=$MPFR_ARCH_PATH/include
-DMPFR_LIBRARIES_DIR=$libdir
-DMPFR_LIBRARIES=$libdir/libmpfr.$SO
-DMPFR_LIBRARIES=$libdir/libmpfr$EXT_SO
CMAKE_OPTIONS
)
break
@ -526,6 +602,23 @@ CMAKE_OPTIONS
cmake=$(findCMake)
unset cmakeDefs
case "$WM_COMPILER" in
(Mingw*)
cmakeDefs="$cmakeDefs -DCMAKE_SYSTEM_NAME=Windows"
cmakeDefs="$cmakeDefs -DCMAKE_C_COMPILER=$(wmake -show-c)"
cmakeDefs="$cmakeDefs -DCMAKE_CXX_COMPILER=$(wmake -show-cxx)"
;;
esac
# Headers/library decision
case "$optHeadersOnly" in
(true | false)
cmakeDefs="$cmakeDefs -DCGAL_HEADER_ONLY=${optHeadersOnly}"
;;
esac
# For CGAL < 4.9, for installation into lib64/, not lib/
# Name only (not path) for CGAL_INSTALL_LIB_DIR
echo "----"
@ -537,7 +630,7 @@ CMAKE_OPTIONS
-DWITH_CGAL_Core=OFF \
-DWITH_CGAL_ImageIO=OFF \
-DWITH_CGAL_Qt5=OFF \
${optHeadersOnly:+-DCGAL_HEADER_ONLY=TRUE} \
$cmakeDefs \
$configBoost $configGmp $configMpfr \
${WM_QUIET:+-DCMAKE_RULE_MESSAGES=OFF} \
$CGAL_SOURCE_DIR \

View File

@ -3,12 +3,14 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# 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.
#
# Script
# makeCmake
@ -23,7 +25,8 @@
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Run from third-party directory only
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
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
@ -42,7 +45,8 @@ usage() {
usage: ${0##*/} [OPTION] cmake-VERSION
options:
-gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX
-force Force compilation, even if binary already exists
-gcc Force use of gcc/g++
-link Create additional symlink as 'cmake-system'
-help
@ -50,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
@ -63,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%%/}"
;;
*)
@ -93,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
@ -101,8 +108,8 @@ else
(
buildDIR=$buildBASE/$cmakePACKAGE
cd $CMAKE_SOURCE_DIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
cd "$CMAKE_SOURCE_DIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
make distclean 2>/dev/null
rm -rf $buildDIR
@ -120,10 +127,10 @@ 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 1
cd "${CMAKE_ARCH_PATH%/*}" || exit
if [ -L cmake-system ]
then
rm cmake-system
@ -131,7 +138,7 @@ then
then
exit 2
fi
ln -svf $cmakePACKAGE cmake-system
ln -svf "$cmakePACKAGE" cmake-system
)
fi

View File

@ -3,12 +3,13 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# 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
@ -19,15 +20,16 @@
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Dynamic library endings (default is .so)
[ "$(uname -s)" = Darwin ] && SO=dylib || SO=so
# 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" # <- FFTW_ARCH_PATH
if [ -d "$dir/include" -a -r "$dir/lib$WM_COMPILER_LIB_ARCH/libfftw3.$SO" ]
dir="${2%/}" # <- *_ARCH_PATH
if [ -d "$dir/include" ] \
&& [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libfftw3$EXT_SO" ]
then
echo " fftw include: $dir/include"
echo " fftw library: $dir/lib$WM_COMPILER_LIB_ARCH"
@ -38,7 +40,8 @@ then
fi
#------------------------------------------------------------------------------
# Run from third-party directory only
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
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
@ -59,18 +62,22 @@ usage() {
usage: ${0##*/} [OPTION] [fftw-VERSION] [-- configure-options]
options:
-gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX
-force Force compilation, even if include/library already exists
-gcc Force use of gcc/g++
-help
* build FFTW with
${fftwPACKAGE:-'unspecified FFTW version'}
USAGE
showDownloadHint FFTW
exit 1
}
#------------------------------------------------------------------------------
exportCompiler # Compiler info for CMake/configure
unset optForce
# Parse options
while [ "$#" -gt 0 ]
do
@ -79,6 +86,7 @@ do
--) break;; # Extra configure options (leave on $@ for later detection)
-h | -help) usage ;;
-gcc) useGcc ;;
-force) optForce=true ;;
fftw-[0-9]* | fftw_[0-9]* | fftw-system )
fftwPACKAGE="${1%%/}"
@ -118,7 +126,8 @@ fi
FFTW_SOURCE_DIR=$sourceBASE/$fftwPACKAGE
FFTW_ARCH_PATH=$installBASE/$fftwPACKAGE
if [ -r "$FFTW_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libfftw3.$SO" ]
if [ -z "$optForce" ] \
&& [ -r "$FFTW_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libfftw3$EXT_SO" ]
then
echo "Already has FFTW shared library"
else
@ -140,8 +149,8 @@ else
# ----------------------------
buildDIR=$buildBASE/$fftwPACKAGE
cd $FFTW_SOURCE_DIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
cd "$FFTW_SOURCE_DIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
rm -rf $FFTW_ARCH_PATH
rm -rf $buildDIR

72
makeGcc
View File

@ -3,12 +3,14 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2011-2016 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.
#
# Script
# makeGcc
@ -32,7 +34,8 @@
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Run from third-party directory only
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
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
@ -61,6 +64,7 @@ usage() {
usage: ${0##*/} [OPTION] [gcc-VERSION] [gmp-VERSION] [mpfr-VERSION] [mpc-VERSION]
options:
-clang Force clang/clang++ for building
-m32 | -m64 32-bit or 64-bit (default) ABI
-multilib for 64-bit systems with 32-bit support required
-no-multilib for 64-bit systems without 32-bit support (DEFAULT)
-no-threadsafe disable mpfr thread-safe (default is auto-detect)
@ -74,9 +78,15 @@ options:
${gccPACKAGE:-'unspecified GCC version'}
USAGE
showDownloadHint GCC
showDownloadHint GMP
showDownloadHint MPFR
showDownloadHint MPC
exit 1
}
#------------------------------------------------------------------------------
optArch=64 # Use 64-bit ABI
# Build 32-bit libraries on 64-bit systems (normally not needed)
optMultilib=disable
unset optThreadSafe # unset=auto
@ -92,6 +102,9 @@ do
export CXX=clang++
;;
-m32 | -m64)
optArch="${1#*m}"
;;
-multi*)
optMultilib=enable
;;
@ -107,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'"
;;
@ -134,6 +150,7 @@ cat<<SUMMARY
GCC configuration
------------------
GCC = $gccPACKAGE
ABI = $optArch
GMP = $gmpPACKAGE
MPFR = $mpfrPACKAGE
MPC = $mpcPACKAGE
@ -142,17 +159,6 @@ Using CC = $CC $CFLAGS
Using CXX = $CXX $CXXFLAGS
SUMMARY
# Set 32 or 64 bit ABI
case "$WM_ARCH_OPTION" in
32 | 64)
ABI=$WM_ARCH_OPTION
;;
*)
die "The WM_ARCH_OPTION ($WM_ARCH_OPTION) must be 32 or 64"
;;
esac
#------------------------------------------------------------------------------
# Build/install without compiler name
buildBASE=$WM_THIRD_PARTY_DIR/build/$WM_ARCH$WM_COMPILER_ARCH
@ -193,8 +199,8 @@ else
sourceDIR=$sourceBASE/$gmpPACKAGE
buildDIR=$buildBASE/$gmpPACKAGE
cd $sourceDIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
cd "$sourceDIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
make distclean 2>/dev/null
rm -rf $buildDIR
@ -202,7 +208,7 @@ else
cd $buildDIR
set -x
$sourceDIR/configure ABI=$ABI \
$sourceDIR/configure ABI=$optArch \
--prefix=$GMP_ARCH_PATH \
--libdir=$GMP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH \
--enable-cxx \
@ -232,7 +238,7 @@ fi
# Build MPFR
# ================
echo "---------------"
if [ -d $MPFR_ARCH_PATH ]
if [ -d "$MPFR_ARCH_PATH" ]
then
echo "Already built: $mpfrPACKAGE"
elif _foamIsSystem $MPFR_ARCH_PATH
@ -245,8 +251,8 @@ else
sourceDIR=$sourceBASE/$mpfrPACKAGE
buildDIR=$buildBASE/$mpfrPACKAGE
cd $sourceDIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
cd "$sourceDIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
make distclean 2>/dev/null
rm -rf $buildDIR
@ -258,7 +264,7 @@ else
[ -n "$optThreadSafe" ] && configOpt="--${optThreadSafe}-thread-safe"
set -x
$sourceDIR/configure ABI=$ABI \
$sourceDIR/configure ABI=$optArch \
--prefix=$MPFR_ARCH_PATH \
--libdir=$MPFR_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH \
$configGMP $configOpt \
@ -288,7 +294,7 @@ fi
# Build MPC
# ================
echo "---------------"
if [ -d $MPC_ARCH_PATH ]
if [ -d "$MPC_ARCH_PATH" ]
then
echo "Already built: $mpcPACKAGE"
elif _foamIsSystem $MPC_ARCH_PATH
@ -301,8 +307,8 @@ else
sourceDIR=$sourceBASE/$mpcPACKAGE
buildDIR=$buildBASE/$mpcPACKAGE
cd $sourceDIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
cd "$sourceDIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
make distclean 2>/dev/null
rm -rf $buildDIR
@ -310,7 +316,7 @@ else
cd $buildDIR
set -x
$sourceDIR/configure ABI=$ABI \
$sourceDIR/configure ABI=$optArch \
--prefix=$MPC_ARCH_PATH \
--libdir=$MPC_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH \
$configGMP $configMPFR \
@ -344,7 +350,7 @@ fi
# or specify -no-multilib on the command-line
#
echo "---------------"
if [ -d $GCC_ARCH_PATH ]
if [ -d "$GCC_ARCH_PATH" ]
then
echo "Already built: $gccPACKAGE"
elif _foamIsSystem $GCC_ARCH_PATH
@ -357,8 +363,8 @@ else
sourceDIR=$sourceBASE/$gccPACKAGE
buildDIR=$buildBASE/$gccPACKAGE
cd $sourceDIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
cd "$sourceDIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
make distclean 2>/dev/null
rm -rf $buildDIR

View File

@ -3,12 +3,14 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2012 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.
#
# Script
# makeGperftools
@ -20,7 +22,8 @@
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Run from third-party directory only
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
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
@ -41,13 +44,14 @@ usage() {
usage: ${0##*/} [gperftools-VERSION]
options:
-gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX
-gcc Force use of gcc/g++
-help
* build gperftools
$gperftoolsPACKAGE
USAGE
showDownloadHint GPERFTOOLS
exit 1
}
#------------------------------------------------------------------------------
@ -100,8 +104,8 @@ else
(
buildDIR=$buildBASE/$gperftoolsPACKAGE
cd $GPERFTOOLS_SOURCE_DIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
cd "$GPERFTOOLS_SOURCE_DIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
[ -e Makefile ] && make distclean 2>/dev/null
rm -rf $GPERFTOOLS_ARCH_PATH

View File

@ -3,12 +3,13 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# 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
@ -19,51 +20,19 @@
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Dynamic library endings (default is .so)
[ "$(uname -s)" = Darwin ] && SO=dylib || 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.$SO \
$dir/lib/libhypre.a \
$dir/lib/libhypre.$SO \
$dir/lib$WM_COMPILER_LIB_ARCH/libhypre.a \
$dir/lib$WM_COMPILER_LIB_ARCH/libhypre.$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%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
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
}
[ -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
#------------------------------------------------------------------------------
@ -72,20 +41,24 @@ 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:
-gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX
-force Force compilation, even if include/library already exists
-gcc Force use of gcc/g++
-help
* build HYPRE with
${hyprePACKAGE:-'unspecified hypre version'}
USAGE
showDownloadHint HYPRE
exit 1
}
#------------------------------------------------------------------------------
exportCompiler # Compiler info for CMake/configure
unset optForce
# Parse options
while [ "$#" -gt 0 ]
do
@ -93,12 +66,13 @@ do
'') ;; # Ignore empty
-h | -help) usage ;;
-gcc) useGcc ;;
-force) optForce=true ;;
lib|libso)
targetType="$1"
;;
hypre-[0-9]*)
hypre-[0-9]* | hypre-git)
hyprePACKAGE="${1%%/}"
unset HYPRE_ARCH_PATH # Avoid inconsistency
;;
@ -112,11 +86,11 @@ done
[ -n "$hyprePACKAGE" ] || die "The hypre-VERSION was not specified"
# Nothing to build
if _foamIsNone $hyprePACKAGE
if _foamIsNone "$hyprePACKAGE"
then
echo "Using hypre-none (skip ThirdParty build of HYPRE)"
exit 0
elif _foamIsSystem $hyprePACKAGE
elif _foamIsSystem "$hyprePACKAGE"
then
echo "Using hypre-system"
exit 0
@ -129,11 +103,12 @@ fi
# HYPRE_ARCH_PATH : installation directory
# HYPRE_SOURCE_DIR : location of the original sources
HYPRE_SOURCE_DIR=$sourceBASE/$hyprePACKAGE
: ${HYPRE_ARCH_PATH:=$installBASE$WM_SIZE_OPTIONS/$hyprePACKAGE}
HYPRE_SOURCE_DIR="$sourceBASE/$hyprePACKAGE"
: "${HYPRE_ARCH_PATH:=$installBASE$WM_SIZE_OPTIONS/$hyprePACKAGE}"
[ -d "$HYPRE_SOURCE_DIR" ] || {
echo "Missing sources: '$hyprePACKAGE'"
showDownloadHint HYPRE
exit 1
}
@ -145,17 +120,24 @@ CXX="$(whichMpicxx)"
echo "Starting build: $hyprePACKAGE ($targetType)"
echo
(
# Configuration options:
# Configuration options
unset configOpt
cd $HYPRE_SOURCE_DIR/src || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
# Additional configure options
if [ "$1" = "--" ]
then
shift
configOpt="$configOpt $@"
fi
rm -rf $HYPRE_ARCH_PATH
cd "$HYPRE_SOURCE_DIR/src" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
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

@ -3,12 +3,13 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# 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
@ -19,22 +20,22 @@
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Dynamic library endings (default is .so)
[ "$(uname -s)" = Darwin ] && SO=dylib || SO=so
# 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" # <- KAHIP_ARCH_PATH
dir="${2%/}" # <- *_ARCH_PATH
if [ -d "$dir/include" ]
then
for lib in \
$FOAM_EXT_LIBBIN/libkahip.$SO \
$FOAM_EXT_LIBBIN/libkahip$EXT_SO \
$dir/lib/libkahip.a \
$dir/lib/libkahip.$SO \
$dir/lib/libkahip$EXT_SO \
$dir/lib$WM_COMPILER_LIB_ARCH/libkahip.a \
$dir/lib$WM_COMPILER_LIB_ARCH/libkahip.$SO \
$dir/lib$WM_COMPILER_LIB_ARCH/libkahip$EXT_SO \
;
do
if [ -r "$lib" ]
@ -49,16 +50,12 @@ then
fi
#------------------------------------------------------------------------------
# Run from third-party directory only
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
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
}
[ -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
@ -75,16 +72,22 @@ usage()
Usage: ${0##*/} [OPTION] [lib|libso] [kahip-VERSION]
options:
-gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX
-gcc Force use of gcc/g++
-force Force build attempt (mingw)
-cmake PATH With cmake from the given path
-help
* Compile KaHIP
$kahipPACKAGE
USAGE
showDownloadHint KAHIP
exit 1
}
#------------------------------------------------------------------------------
exportCompiler minimal # Minimal compiler info for CMake/configure
unset optForce
# Parse options
while [ "$#" -gt 0 ]
@ -93,12 +96,19 @@ do
'') ;; # Ignore empty
-h | -help) usage ;;
-gcc) useGcc ;;
-force) optForce=true ;;
-cmake)
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
CMAKE_PATH="${2%%/}"
shift
;;
lib|libso)
targetType="$1"
;;
kahip-[1-9]* | kahip-git)
kahip-[0-9]* | kahip-git | KaHIP_* | KaHIP-[0-9]*)
kahipPACKAGE="${1%%/}"
unset KAHIP_ARCH_PATH # Avoid inconsistency
;;
@ -122,7 +132,21 @@ then
exit 0
fi
# Known build issues for mingw (uses some non-portable headers)
case "$WM_COMPILER" in
(Mingw*)
if [ "$optForce" = true ]
then
echo "Warning: kahip - known compilation issues with $WM_COMPILER"
else
echo "Skipping kahip - known compilation issues with $WM_COMPILER"
exit 0
fi
;;
esac
requireWMakeToolchain
requireExtLibBin
#------------------------------------------------------------------------------
#
@ -136,7 +160,8 @@ KAHIP_ARCH_PATH=$installBASE/$kahipPACKAGE
[ -d "$KAHIP_SOURCE_DIR" ] || {
echo "Missing sources: '$kahipPACKAGE'"
exit 1
showDownloadHint KAHIP
exit 2
}
#
@ -158,20 +183,31 @@ install()
$incdir
}
echo "Starting build: $kahipPACKAGE ($targetType)"
echo
(
cd $KAHIP_SOURCE_DIR/lib || exit 1
export GIT_DIR=$KAHIP_SOURCE_DIR/.git # Mask seeing our own git-repo
rm -rf $KAHIP_ARCH_PATH
rm -f $FOAM_EXT_LIBBIN/libkahip.$SO
# Newer KAHIP (>= 2.11) uses CMake,
# but unfortunately does not install include/
# nor pass through flags for 64bit indices in the header.
withCmake=true
version=$(echo "$kahipPACKAGE" | sed -e 's/^kahip[-_]*//i')
case "$version" in 2.0*) unset withCmake;; esac
if true
then
(
echo "Starting build: $kahipPACKAGE ($targetType) using wmake"
echo
cd "$KAHIP_SOURCE_DIR/lib" || exit
export GIT_DIR="$KAHIP_SOURCE_DIR/.git" # Mask seeing our own git-repo
rm -rf "$KAHIP_ARCH_PATH"
rm -f "$FOAM_EXT_LIBBIN/libkahip$EXT_SO"
libdir=$KAHIP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
cpMakeFiles kahip 2>/dev/null
if [ -e ../interface -a ! -e interface ]
if [ -e ../interface ] && [ ! -e interface ]
then
ln -s ../interface interface
fi
@ -193,6 +229,6 @@ echo
echo "Error building: kahip"
exit 1
}
fi
#------------------------------------------------------------------------------

View File

@ -3,12 +3,14 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2011-2016 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.
#
# Script
# makeLLVM
@ -38,7 +40,8 @@
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Run from third-party directory only
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
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
@ -62,14 +65,15 @@ usage() {
usage: ${0##*/} [OPTION] [llvm-VERSION]
options:
-cmake PATH with cmake from the path given
-gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
-gcc Force use of gcc/g++
-cmake PATH with cmake from the given path
-help
* build llvm/clang
${llvmPACKAGE:-'unspecified LLVM version'}
USAGE
showDownloadHint LLVM
exit 1
}
#------------------------------------------------------------------------------
@ -91,7 +95,7 @@ do
llvm-[0-9]* | llvm-svn*)
llvmPACKAGE="${1%%/}"
;;
[1-9]*)
[0-9]*)
llvmPACKAGE="llvm-${1%%/}"
;;
*)
@ -133,8 +137,8 @@ then
echo "Starting build: $llvmPACKAGE (using configure)"
echo
(
cd $LLVM_SOURCE_DIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
cd "$LLVM_SOURCE_DIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
make distclean 2>/dev/null
rm -rf $LLVM_BUILD_DIR
@ -144,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 \
@ -165,8 +169,8 @@ else
# Configuration options:
unset configOpt
cd $LLVM_SOURCE_DIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
cd "$LLVM_SOURCE_DIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
if [ -f tools/openmp/CMakeLists.txt ]
then

View File

@ -3,12 +3,13 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# 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
@ -19,22 +20,22 @@
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Dynamic library endings (default is .so)
[ "$(uname -s)" = Darwin ] && SO=dylib || SO=so
# 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" # <- METIS_ARCH_PATH
dir="${2%/}" # <- *_ARCH_PATH
if [ -d "$dir/include" ]
then
for lib in \
$FOAM_EXT_LIBBIN/libmetis.$SO \
$FOAM_EXT_LIBBIN/libmetis$EXT_SO \
$dir/lib/libmetis.a \
$dir/lib/libmetis.$SO \
$dir/lib/libmetis$EXT_SO \
$dir/lib$WM_COMPILER_LIB_ARCH/libmetis.a \
$dir/lib$WM_COMPILER_LIB_ARCH/libmetis.$SO \
$dir/lib$WM_COMPILER_LIB_ARCH/libmetis$EXT_SO \
;
do
if [ -r "$lib" ]
@ -49,16 +50,12 @@ then
fi
#------------------------------------------------------------------------------
# Run from third-party directory only
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
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
}
[ -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
@ -74,13 +71,14 @@ usage() {
usage: ${0##*/} [OPTION] [lib|libso] [METIS-VERSION]
options:
-gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX
-gcc Force use of gcc/g++
-help
* build METIS with
${metisPACKAGE:-'unspecified metis version'}
USAGE
showDownloadHint METIS
exit 1
}
#------------------------------------------------------------------------------
@ -122,6 +120,8 @@ then
exit 0
fi
requireExtLibBin
#------------------------------------------------------------------------------
#
# Build METIS
@ -130,11 +130,12 @@ fi
# METIS_SOURCE_DIR : location of the original sources
METIS_SOURCE_DIR=$sourceBASE/$metisPACKAGE
: ${METIS_ARCH_PATH:=$installBASE$WM_SIZE_OPTIONS/$metisPACKAGE}
: "${METIS_ARCH_PATH:=$installBASE$WM_SIZE_OPTIONS/$metisPACKAGE}"
[ -d "$METIS_SOURCE_DIR" ] || {
echo "Missing sources: '$metisPACKAGE'"
exit 1
showDownloadHint METIS
exit 2
}
#
@ -146,10 +147,10 @@ install()
if [ "$targetType" = libso ]
then
\mv $libdir/libmetis.$SO $FOAM_EXT_LIBBIN
\mv $libdir/libmetis$EXT_SO $FOAM_EXT_LIBBIN
rmdir $libdir 2>/dev/null # Failed rmdir is uncritical
echo "Installing: $FOAM_EXT_LIBBIN/libmetis.$SO"
echo "Installing: $FOAM_EXT_LIBBIN/libmetis$EXT_SO"
fi
return 0
}
@ -164,11 +165,11 @@ echo
configOpt="shared=1"
fi
cd $METIS_SOURCE_DIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
cd "$METIS_SOURCE_DIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
rm -rf $METIS_ARCH_PATH
rm -f $FOAM_EXT_LIBBIN/libmetis.$SO
rm -f $FOAM_EXT_LIBBIN/libmetis$EXT_SO
# Adjust metis integer size to match OpenFOAM label-size
sed -i -e 's=\(#define IDXTYPEWIDTH\).*=\1 '$WM_LABEL_SIZE'=' \

View File

@ -3,12 +3,13 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# 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
@ -20,6 +21,7 @@
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Run from ThirdParty directory only
cd "${0%/*}" || exit
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
echo " The environment variables are inconsistent with the installation."
@ -42,30 +44,32 @@ usage() {
usage: ${0##*/} [OPTION] [mgridgen-VERSION]
options:
-gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX
-force Force compilation, even if include/library already exists
-gcc Force use of gcc/g++
-help
* Build MGridGen
$mgridgenPACKAGE
USAGE
# showDownloadHint GRIDGEN
exit 1
}
#------------------------------------------------------------------------------
exportCompiler # Compiler info for CMake/configure
unset optForce
# Parse options
while [ "$#" -gt 0 ]
do
case "$1" in
-h | -help)
usage
;;
-gcc)
useGcc # Use gcc/g++
;;
mgridgen-[1-9]* | MGridGen-[1-9]* | parmgridgen-[1-9]* | ParMGridGen-[1-9]*)
'') ;; # Ignore empty
-h | -help) usage ;;
-gcc) useGcc ;;
-force) optForce=true ;;
mgridgen-[0-9]* | MGridGen-[0-9]* | parmgridgen-[0-9]* | ParMGridGen-[0-9]*)
mgridgenPACKAGE="${1%%/}"
;;
*)
@ -96,7 +100,7 @@ fi
# MGRIDGEN_ARCH_PATH : installation directory
MGRIDGEN_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$mgridgenPACKAGE
MGRIDGEN_ARCH_PATH=$installBASE$WM_SIZE_OPTIONS/$mgridgenPACKAGE
MGRIDGEN_ARCH_PATH="$installBASE$WM_SIZE_OPTIONS/$mgridgenPACKAGE"
: ${FOAM_MPI:=dummy}
@ -133,22 +137,23 @@ install()
# Needs future adjustment
# - for shared library
# - for mpi-specific library locations
if [ -f $MGRIDGEN_ARCH_PATH/include/mgridgen.h \
-a -r $MGRIDGEN_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmgrid.a ]
if [ -z "$optForce" ] \
&& [ -f "$MGRIDGEN_ARCH_PATH/include/mgridgen.h" \
&& [ -r "$MGRIDGEN_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmgrid.a" ]
then
echo " MGridGen header in $MGRIDGEN_ARCH_PATH/include"
echo " MGridGen libs in $MGRIDGEN_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" # static
echo
else
(
cd $MGRIDGEN_SOURCE_DIR || exit 1
cd "$MGRIDGEN_SOURCE_DIR" || exit
[ -e Makefile ] && make realclean 2>/dev/null
# Remove any existing build folder and recreate
rm -rf $MGRIDGEN_ARCH_PATH
serial="${CC:-$WM_CC}" # CC (serial compiler) default=cc
# parallel=$(whichMpicc) # PARCC (parallel compiler) default=mpicc
serial="$(whichCC)" # CC (serial compiler) default=gcc
# parallel=$(whichMpicc) # PARCC (parallel compiler) default=mpicc
# PARCC=$parallel
# PARLD=$parallel
# PARLIBS="-L../.. -lparmgrid -lmgrid -lm"
@ -156,8 +161,8 @@ else
make \
COPTIONS="-fPIC" \
LDOPTIONS="-fPIC" \
CC=$serial \
LD=$serial \
CC="$serial" \
LD="$serial" \
LIBDIR="-L../.." \
LIBS="-L../.. -lmgrid -lm" \
make=make \
@ -166,6 +171,7 @@ else
&& echo "Built: $mgridgenPACKAGE"
) || {
echo "Error building: $mgridgenPACKAGE"
exit 1
}
fi

View File

@ -3,35 +3,36 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# 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
#
# Description
# Build script for mpich - legacy (unmaintained) build code!
# Build script for mpich [unmaintained]
#
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Dynamic library endings (default is .so)
[ "$(uname -s)" = Darwin ] && SO=dylib || SO=so
# 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" # <- MPI_ARCH_PATH
if [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpich.$SO" ]
dir="${2%/}" # <- *_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/libmpich.a" ]
elif [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
then
echo "Have mpich static library (${dir##*/})"
exit 0
@ -42,7 +43,8 @@ then
fi
#------------------------------------------------------------------------------
# Run from third-party directory only
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
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
@ -70,18 +72,22 @@ usage() {
usage: ${0##*/} [OPTION] [mpich-VERSION] [-- configure-options]
options:
-gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
-force Force compilation, even if include/library already exists
-gcc Force use of gcc/g++
-help
* build mpich with
${mpiPACKAGE:-'unspecified mpich version'}
USAGE
showDownloadHint MPICH
exit 1
}
#------------------------------------------------------------------------------
exportCompiler # Compiler info for CMake/configure
unset optForce
# Parse options
while [ "$#" -gt 0 ]
do
@ -90,6 +96,7 @@ do
--) break;; # Extra configure options (leave on $@ for later detection)
-h | -help) usage ;;
-gcc) useGcc ;;
-force) optForce=true ;;
mpich*)
mpiPACKAGE="${1%%/}"
@ -125,10 +132,12 @@ fi
MPI_SOURCE_DIR=$sourceBASE/$mpiPACKAGE
MPI_ARCH_PATH=$installBASE/$mpiPACKAGE
if [ -r "$MPI_ARCH_PATH/lib_ARCH/libmpi.$SO" ]
if [ -z "$optForce" ] \
&& [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
then
echo "Already has shared library"
elif [ -r "$MPI_ARCH_PATH/lib/libmpi.a" ]
elif [ -z "$optForce" ] \
&& [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
then
echo "Already has static library"
else
@ -149,8 +158,10 @@ else
# End of configuration options
# ----------------------------
cd $MPI_SOURCE_DIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
buildDIR=$buildBASE/$mpiPACKAGE
cd "$MPI_SOURCE_DIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
[ -e Makefile ] && make distclean 2>/dev/null
rm -rf $MPI_ARCH_PATH

194
makeMVAPICH Executable file
View File

@ -0,0 +1,194 @@
#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2019-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# makeMVAPICH2
#
# Description
# Build script for mvapich2 [unmaintained]
#
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Dynamic library ending (default is .so)
[ "$(uname -s)" = Darwin ] && EXT_SO=.dylib || EXT_SO=.so
# Short-circuit test for an installation
if [ "$1" = "-test" ]
then
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
dir="${2%/}" # <- *_ARCH_PATH
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
fi
#------------------------------------------------------------------------------
# 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
# Transition
# ~~~~~~~~~~
_foamAddLib() { true; }
_foamAddMan() { true; }
_foamAddPath() { true; }
#------------------------------------------------------------------------------
WM_MPLIB=MV2MPI # Ensure we get the correct MPI
# mvapich2 version from OpenFOAM etc/config.sh file:
_foamConfig mpi
mpiPACKAGE=${FOAM_MPI:-mvapich2-system}
#------------------------------------------------------------------------------
usage() {
exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
cat<<USAGE
usage: ${0##*/} [OPTION] [mvapich2-VERSION] [-- configure-options]
options:
-force Force compilation, even if include/library already exists
-gcc Force use of gcc/g++
-help
* build mvapich2 with
${mpiPACKAGE:-'unspecified mpich version'}
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
case "$1" in
'') ;; # Ignore empty
--) break;; # Extra configure options (leave on $@ for later detection)
-h | -help) usage ;;
-gcc) useGcc ;;
-force) optForce=true ;;
mvapich*)
mpiPACKAGE="${1%%/}"
;;
*)
die "unknown option/argument: '$1'"
;;
esac
shift
done
[ -n "$mpiPACKAGE" ] || die "The mvapich-VERSION was not specified"
# Nothing to build
if _foamIsNone "$mpiPACKAGE"
then
echo "Using mvapich-none (skip ThirdParty build of mvapich)"
exit 0
elif _foamIsSystem "$mpiPACKAGE"
then
echo "Using mvapich-system (skip ThirdParty build of mvapich)"
exit 0
fi
#------------------------------------------------------------------------------
#
# Build mvapich
#
# MPI_SOURCE_DIR : location of the original sources
# MPI_ARCH_PATH : installation directory
MPI_SOURCE_DIR=$sourceBASE/$mpiPACKAGE
MPI_ARCH_PATH=$installBASE/$mpiPACKAGE
if [ -z "$optForce" ] \
&& [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
then
echo "Already has shared library"
elif [ -z "$optForce" ] \
&& [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
then
echo "Already has static library"
else
echo "Starting build: $WM_MPLIB ($mpiPACKAGE)"
echo
(
# Configuration options:
unset configOpt
# Additional configure options
if [ "$1" = "--" ]
then
shift
configOpt="$configOpt $@"
fi
# End of configuration options
# ----------------------------
buildDIR=$buildBASE/$mpiPACKAGE
cd "$MPI_SOURCE_DIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
[ -e Makefile ] && make distclean 2>/dev/null
rm -rf $MPI_ARCH_PATH
rm -rf $buildDIR
mkdir -p $buildDIR
cd $buildDIR
set -x
$MPI_SOURCE_DIR/configure \
--prefix=$MPI_ARCH_PATH \
--disable-fortran --disable-g \
--libdir=$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH \
--enable-shared --disable-static \
$configOpt \
&& set +x \
&& make -j $WM_NCOMPPROCS \
&& make install \
&& echo "Built: $mpiPACKAGE" \
&& pkgconfigAdjust $MPI_ARCH_PATH
) || {
echo "Error building: $mpiPACKAGE"
exit 1
}
fi
#------------------------------------------------------------------------------

113
makeMesa
View File

@ -3,12 +3,13 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd.
# \\ / 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/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# makeMesa
@ -26,7 +27,8 @@
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Run from third-party directory only
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
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
@ -34,7 +36,7 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
. etc/tools/ThirdPartyFunctions
#------------------------------------------------------------------------------
unset vtk_version mesa_version # Purge current values
unset vtk_version mesa_version mesa_llvm # Purge current values
# mesa version from OpenFOAM etc/config.sh file:
_foamConfig vtk
@ -49,25 +51,39 @@ usage() {
usage: ${0##*/} [OPTION] mesa-VERSION [-- configure-options]
options:
-gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX
-gcc Force use of gcc/g++
-llvm VER llvm version (in ThirdParty) or 'system' to use system
-help
* build Mesa with
${mesaPACKAGE:-'unspecified MESA version'}
USAGE
showDownloadHint MESA
exit 1
}
#------------------------------------------------------------------------------
exportCompiler # Compiler info for CMake/configure
unset withLLVM
# Non-standard location for clang?
case "$WM_COMPILER_TYPE-$WM_COMPILER" in
ThirdParty-Clang*)
thirdPartyClang=true
(ThirdParty-Clang*)
withLLVM=true # 'true' means find on path
;;
*)
unset thirdPartyClang
(system-Clang*)
withLLVM=system # 'system' means find on path
;;
(*)
if _foamIsNone "$mesa_llvm"
then
withLLVM=false
elif _foamIsSystem "$mesa_llvm"
then
withLLVM=system # 'system' means find on path
else
withLLVM="$mesa_llvm" # Take value from mesa config
fi
;;
esac
@ -80,12 +96,19 @@ do
-h | -help) usage ;;
-gcc)
useGcc
unset thirdPartyClang
unset withLLVM
;;
-llvm)
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
withLLVM="$2"
shift
;;
llvm-*)
withLLVM="$1"
;;
mesa-*)
mesaPACKAGE="${1%%/}"
;;
*)
die "unknown option/argument: '$1'"
;;
@ -108,27 +131,43 @@ fi
#------------------------------------------------------------------------------
# Locate third-party clang as required
if [ "$thirdPartyClang" = true ]
then
thirdPartyClang=$(command -v clang) || {
echo "Error: could not properly locate clang"
case "$withLLVM" in
(true | system)
LLVM_ARCH_PATH="$(command -v clang)" || {
echo "Error: could not properly locate llvm/clang"
exit 2
}
# Root installation directory
thirdPartyClang=${thirdPartyClang%/bin/clang}
LLVM_ARCH_PATH="${LLVM_ARCH_PATH%/bin/clang}"
[ -d "$thirdPartyClang" ] || {
echo "Error: could not properly locate clang"
[ -d "$LLVM_ARCH_PATH" ] || {
echo "Error: could not properly locate llvm/clang"
exit 2
}
fi
;;
('' | none | false)
withLLVM=none
echo "No llvm"
;;
(llvm-*)
echo "check llvm = $withLLVM"
LLVM_ARCH_PATH="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH/$withLLVM"
[ -d "$LLVM_ARCH_PATH" ] || {
echo "Error: could not properly locate llvm/clang"
exit 2
}
;;
esac
#------------------------------------------------------------------------------
#
# Build MESA
# For 64-bit
# - MESA itself will normally build into 'lib64'.
# - MESA itself will normally build into 'lib64' (depends on autoconfig).
#
# MESA_SOURCE_DIR : location of the original sources
# MESA_ARCH_DIR : installation directory
@ -149,11 +188,17 @@ adjustMESA()
(
# Configuration options:
unset configOpt
unset configOpt compFlags
if [ -d "$thirdPartyClang" ]
# Sometimes for LLVM issues
# compFlags="-D_GLIBCXX_USE_CXX11_ABI=0"
# Possibly for older mesa versions (see paraview wiki)
# compFlags="-O2 -DDEFAULT_SOFTWARE_DEPTH_BITS=31"
if [ -d "$LLVM_ARCH_PATH" ]
then
configOpt="$configOpt --with-llvm-prefix=$thirdPartyClang"
configOpt="$configOpt --with-llvm-prefix=$LLVM_ARCH_PATH"
fi
# Additional configure options
@ -167,8 +212,8 @@ adjustMESA()
# ----------------------------
buildDIR=$buildBASE/$mesaPACKAGE
cd $MESA_SOURCE_DIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
cd "$MESA_SOURCE_DIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
# Remove any existing build
rm -rf $MESA_ARCH_PATH
@ -178,17 +223,19 @@ adjustMESA()
echo "----"
echo "Building $mesaPACKAGE"
echo " Source : $MESA_SOURCE_DIR"
echo " Target : $MESA_ARCH_PATH"
if [ -d "$thirdPartyClang" ]
echo " Source : $MESA_SOURCE_DIR"
echo " Target : $MESA_ARCH_PATH"
if [ -d "$LLVM_ARCH_PATH" ]
then
echo " Clang : $thirdPartyClang"
echo " llvm : $LLVM_ARCH_PATH"
fi
echo "----"
# Possibly for older mesa versions (see paraview wiki)
# CXXFLAGS="-O2 -DDEFAULT_SOFTWARE_DEPTH_BITS=31" \
# CFLAGS="-O2 -DDEFAULT_SOFTWARE_DEPTH_BITS=31" \
if [ -n "$compFlags" ]
then
CFLAGS="$CFLAGS $compFlags"
CXXFLAGS="$CXXFLAGS $compFlags"
fi
## autoreconf -fi
set -x

12
makeMesa.example Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
# An example for building mesa with llvm
mesa=mesa-18.3.4
llvm=llvm-4.0.1
set -x
./makeMesa \
$mesa $llvm
"$@"
#------------------------------------------------------------------------------

View File

@ -3,12 +3,13 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# 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
@ -19,15 +20,15 @@
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Dynamic library endings (default is .so)
[ "$(uname -s)" = Darwin ] && SO=dylib || SO=so
# 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" # <- MPI_ARCH_PATH
if [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpi.$SO" ]
dir="${2%/}" # <- *_ARCH_PATH
if [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
then
echo " Have openmpi shared library (${dir##*/})"
exit 0
@ -42,7 +43,8 @@ then
fi
#------------------------------------------------------------------------------
# Run from third-party directory only
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
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
@ -70,7 +72,8 @@ usage() {
usage: ${0##*/} [OPTION] [openmpi-VERSION] [-- configure-options]
options:
-gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX
-force Force compilation, even if include/library already exists
-gcc Force use of gcc/g++
-memcheck Configure with --enable-memcheck (requires valgrind.h)
-threaded Configure with --enable-mpi-thread-multiple
-no-threaded Configure with --disable-mpi-thread-multiple
@ -80,12 +83,13 @@ options:
${mpiPACKAGE:-'unspecified openmpi version'}
USAGE
showDownloadHint OPENMPI
exit 1
}
#------------------------------------------------------------------------------
exportCompiler # Compiler info for CMake/configure
unset optMemchecker optThreaded
unset optForce optMemchecker optThreaded
# Parse options
while [ "$#" -gt 0 ]
@ -95,6 +99,7 @@ do
--) break;; # Extra configure options (leave on $@ for later detection)
-h | -help) usage ;;
-gcc) useGcc ;;
-force) optForce=true ;;
-memcheck*) optMemchecker=true ;;
-thread*) optThreaded=enable ;;
-no-thread*) optThreaded=disable ;;
@ -133,10 +138,12 @@ fi
MPI_SOURCE_DIR=$sourceBASE/$mpiPACKAGE
MPI_ARCH_PATH=$installBASE/$mpiPACKAGE
if [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.$SO" ]
if [ -z "$optForce" ] \
&& [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
then
echo "Already has shared library: $MPI_ARCH_PATH"
elif [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
elif [ -z "$optForce" ] \
&& [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
then
echo "Already has static library: $MPI_ARCH_PATH"
else
@ -171,8 +178,8 @@ else
buildDIR=$buildBASE/$mpiPACKAGE
cd $MPI_SOURCE_DIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
cd "$MPI_SOURCE_DIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
[ -e Makefile ] && make distclean 2>/dev/null
rm -rf $MPI_ARCH_PATH

180
makePETSC
View File

@ -3,12 +3,13 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# 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
@ -19,73 +20,58 @@
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Dynamic library endings (default is .so)
[ "$(uname -s)" = Darwin ] && SO=dylib || 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.$SO \
$dir/lib/libpetsc.a \
$dir/lib/libpetsc.$SO \
$dir/lib$WM_COMPILER_LIB_ARCH/libpetsc.a \
$dir/lib$WM_COMPILER_LIB_ARCH/libpetsc.$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%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
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
}
[ -n "$FOAM_EXT_LIBBIN" ] || {
echo "Error (${0##*/}) : \$FOAM_EXT_LIBBIN not set"
echo " Check your OpenFOAM environment and installation"
exit 1
}
. etc/tools/ThirdPartyFunctions
#------------------------------------------------------------------------------
_foamConfig hypre
_foamConfig petsc
petscPACKAGE=${petsc_version:-petsc-system}
hyprePACKAGE="${hypre_version:-hypre-none}"
petscPACKAGE="${petsc_version:-petsc-system}"
targetType=libso
# Should be possible to build with download, but seems to fail
# hypreURL="https://github.com/hypre-space/hypre/archive/v2.14.0.tar.gz"
unset hypreURL
#------------------------------------------------------------------------------
usage() {
exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
cat<<USAGE
usage: ${0##*/} [OPTION] [lib|libso] [PETSC-VERSION]
usage: ${0##*/} [OPTION] [lib|libso] [HYPRE-VERSION] [PETSC-VERSION] [-- configure-options]
options:
-gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX
-force Force compilation, even if include/library already exists
-gcc Force use of gcc/g++
-inplace Build/install inplace (expert option)
-no-hypre Disable automatic hypre detection
-help
* build PETSC with
${petscPACKAGE:-'unspecified petsc version'}
USAGE
showDownloadHint PETSC
echo
echo "Many people who have downloaded PETSC have also downloaded HYPRE :"
showDownloadHint HYPRE
exit 1
}
#------------------------------------------------------------------------------
exportCompiler # Compiler info for CMake/configure
unset optForce optInplace
# Parse options
while [ "$#" -gt 0 ]
do
@ -93,12 +79,24 @@ do
'') ;; # Ignore empty
-h | -help) usage ;;
-gcc) useGcc ;;
-force) optForce=true ;;
-inplace) optInplace=true ;;
lib|libso)
targetType="$1"
;;
petsc-[0-9]*)
-no-hypre)
unset hyprePACKAGE hypreURL
unset HYPRE_ARCH_PATH
;;
hypre-[0-9]* | hypre-git)
hyprePACKAGE="${1%%/}"
unset hypreURL
unset HYPRE_ARCH_PATH # Avoid inconsistency
;;
petsc-[0-9]* | petsc-git)
petscPACKAGE="${1%%/}"
unset PETSC_ARCH_PATH # Avoid inconsistency
;;
@ -112,16 +110,30 @@ done
[ -n "$petscPACKAGE" ] || die "The petsc-VERSION was not specified"
# Nothing to build
if _foamIsNone $petscPACKAGE
if _foamIsNone "$petscPACKAGE"
then
echo "Using petsc-none (skip ThirdParty build of PETSC)"
exit 0
elif _foamIsSystem $petscPACKAGE
elif _foamIsSystem "$petscPACKAGE"
then
echo "Using petsc-system"
exit 0
fi
#------------------------------------------------------------------------------
# Integrations
# No hypre
if _foamIsNone "$hyprePACKAGE"
then
:
elif [ -n "$hyprePACKAGE" ]
then
# Clunky
: "${HYPRE_ARCH_PATH:=$installBASE$WM_SIZE_OPTIONS/$hyprePACKAGE}"
fi
#------------------------------------------------------------------------------
#
# Build PETSC
@ -129,27 +141,60 @@ fi
# PETSC_ARCH_PATH : installation directory
# PETSC_SOURCE_DIR : location of the original sources
PETSC_SOURCE_DIR=$sourceBASE/$petscPACKAGE
: ${PETSC_ARCH_PATH:=$installBASE$WM_SIZE_OPTIONS/$petscPACKAGE}
PETSC_SOURCE_DIR="$sourceBASE/$petscPACKAGE"
: "${PETSC_ARCH_PATH:=$installBASE$WM_SIZE_OPTIONS/$petscPACKAGE}"
[ -d "$PETSC_SOURCE_DIR" ] || {
echo "Missing sources: '$petscPACKAGE'"
exit 1
showDownloadHint PETSC
exit 2
}
# PETSC arch - same root as WM_OPTIONS (eg, DPInt32)
archOpt="$WM_SIZE_OPTIONS"
if [ -n "$optInplace" ]
then
unset installPrefix
# No install stage requires
makeInstall() { true; }
else
# Regular installation location
installPrefix="$PETSC_ARCH_PATH"
makeInstall() {
make PETSC_DIR="$PETSC_SOURCE_DIR" PETSC_ARCH="$archOpt" install
}
fi
echo "Starting build: $petscPACKAGE ($targetType)"
echo
(
# PETSC arch - same root as WM_OPTIONS (eg, DPInt32)
archOpt="$WM_SIZE_OPTIONS"
# Configuration options:
# Configuration options
configOpt="--with-cc=$(whichMpicc) --with-cxx=$(whichMpicxx)"
# Normally want hypre but this is really clunky
if [ -f "$HYPRE_ARCH_PATH/include/HYPRE.h" ]
then
echo "Has installed hypre: $hyprePACKAGE"
configOpt="$configOpt --with-hypre-dir=$HYPRE_ARCH_PATH"
elif [ -n "$urlHypre" ]
then
configOpt="$configOpt --download-hypre=$urlHypre"
fi
# Additional configure options
if [ "$1" = "--" ]
then
shift
configOpt="$configOpt $@"
fi
if [ "$targetType" = libso ]
then
configOpt="--with-shared-libraries"
configOpt="$configOpt --with-shared-libraries"
fi
if [ "$WM_LABEL_SIZE" = 64 ]
@ -166,25 +211,40 @@ echo
configOpt="$configOpt --with-precision=double"
fi
cd $PETSC_SOURCE_DIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
# We export compiler settings (above) but actually use the
# --with-cc and --with-cxx. So ignore them and flags
rm -rf $PETSC_ARCH_PATH
unset CC CXX
unset CFLAGS CXXFLAGS
cd "$PETSC_SOURCE_DIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
rm -rf "$PETSC_ARCH_PATH"
# No clean here, if we have multiple arch in the same directory
## without tests? --testdir=..
## configOpt="$configOpt --download-f2cblaslapack=1"
set -x
./configure \
--prefix=$PETSC_ARCH_PATH \
--with-petsc-arch=$archOpt \
${installPrefix:+--prefix="$installPrefix"} \
--PETSC_DIR="$PETSC_SOURCE_DIR" \
--with-petsc-arch="$archOpt" \
--with-clanguage=C \
--with-fc=0 \
--with-scalapack=0 \
--with-superlu_dist=0 \
--with-suitesparse=0 \
--download-f2cblaslapack=1 \
--with-x=0 \
$configOpt \
&& set +x \
&& echo "Configured: petsc" \
&& make PETSC_DIR=$PETSC_SOURCE_DIR PETSC_ARCH="$archOpt" all \
&& make ${WM_NCOMPPROCS:+-j $WM_NCOMPPROCS} \
PETSC_DIR="$PETSC_SOURCE_DIR" PETSC_ARCH="$archOpt" all \
&& echo "Built: petsc" \
&& make PETSC_DIR=$PETSC_SOURCE_DIR PETSC_ARCH="$archOpt" install
&& echo "Installed: petsc"
&& makeInstall \
&& echo "Installed: petsc - may require etc/pkgconfigPrefix to relocate"
) || {
echo "Error building: petsc"
exit 1

View File

@ -3,12 +3,14 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2011-2016 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.
#
# Script
# makeParaView
@ -25,7 +27,8 @@
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Run from third-party directory only
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
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
@ -70,7 +73,8 @@ usage() {
usage: ${0##*/} [OPTION] [paraview-VERSION] [CMAKE-OPTION]
options:
-gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
-gcc Force use of gcc/g++
-cmake PATH with cmake from the given path
-rebuild for repeated builds (-make -install) *use with caution*
-gl2 with new rendering backend (default: auto)
-mesa with mesa
@ -79,14 +83,14 @@ options:
-mesa-lib PATH path to mesa library (current: ${MESA_LIBRARY:-none})
-mpi with mpi
-mpi=N with max 'N' mpi processes. N=0 for no upper-limit.
-python with python
-python | -python2 | -python3
with python
-python-include DIR
location of python headers (current: ${PYTHON_INCLUDE:-none})
-python-lib PATH path to python library (current: ${PYTHON_LIBRARY:-none})
-cmake PATH with cmake from the path given
-qmake PATH with the Qt version corresponding to the qmake path given
-qmake PATH with QT version corresponding to the qmake in given path
-qt with extra Qt gui support (if not already enabled)
-qt-VER with Qt version corresponding to
-qt-VER with QT version corresponding to
\$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/qt-VER/bin/qmake
-verbose verbose output in Makefiles
-version VER specify an alternative version (current: $ParaView_VERSION)
@ -122,10 +126,11 @@ For example,
Or change the \$WM_PROJECT_DIR/etc/config.sh/paraview settings.
USAGE
showDownloadHint PARAVIEW
exit 1
}
#------------------------------------------------------------------------------
exportCompiler # Compiler info for CMake/configure
exportCompiler minimal # Minimal compiler info for CMake/configure
# Various building stages
unset runPATCH runCONFIG runMAKE runINSTALL
@ -232,8 +237,14 @@ do
-python)
withPYTHON=true
;;
-python2)
withPYTHON=true; withPYTHON3=false
;;
-python3)
withPYTHON=true; withPYTHON3=true
;;
-no-python)
withPYTHON=false
withPYTHON=false; unset withPYTHON3
;;
-python-include)
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
@ -263,7 +274,7 @@ do
-no-qt)
withQT=false
;;
-qt-[1-9]*)
-qt-[0-9]*)
withQT=true
QMAKE_PATH="$installBASE/${1##-}"
;;
@ -317,6 +328,16 @@ then
fi
fi
# ParaView-5.7.0 default is python3
if [ "$withPYTHON" = true ] && [ -z "$withPYTHON3" ]
then
case "${ParaView_VERSION}" in
(5.[7-9]* | [6-9]* | [1-9][0-9].*)
withPYTHON3=true
;;
esac
fi
if [ "$runDEFAULT" = true ]
then
: ${runPATCH:=true}
@ -365,6 +386,10 @@ Features selected
python ${withPYTHON:-false}
qt ${withQT:-false}
---------------------
Compiler
cxx ${CXX:-unknown}
flags ${CXXFLAGS:-none}
---------------------
Version information
paraview ${ParaView_VERSION:-unknown}
major ${ParaView_MAJOR:-unknown}

View File

@ -9,11 +9,12 @@
# mesa=mesa-11.2.2
# mesa=mesa-13.0.3
mesa=mesa-17.1.1
# mesa=mesa-17.1.1
mesa=mesa-18.3.4
set -x
./makeParaView \
-mpi=0 \
-mpi \
-mesa-prefix $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$mesa \
-python \
-suffix mesa-mpi-py \

33
makeQt
View File

@ -3,12 +3,14 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# 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.
#
# Script
# makeQt
@ -20,7 +22,8 @@
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Run from third-party directory only
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
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
@ -35,17 +38,21 @@ usage() {
usage: ${0##*/} [OPTION] [qt-VERSION] [-- configure-options]
options:
-gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX
-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
@ -54,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##*-}"
@ -91,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
@ -131,8 +142,8 @@ else
# ----------------------------
buildDIR=$buildBASE/$qtPACKAGE
cd $QT_SOURCE_DIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
cd "$QT_SOURCE_DIR" || exit
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
[ -e Makefile ] && make distclean 2>/dev/null
# Remove any existing build folder and recreate
@ -145,7 +156,7 @@ else
rm -f "$QT_SOURCE_DIR/src/corelib/global/qconfig.h" 2>/dev/null
rm -f "$QT_SOURCE_DIR/src/corelib/global/qconfig.cpp" 2>/dev/null
cd $buildDIR || exit 1
cd "$buildDIR" || exit
# Compile as opensource, accepting LGPL conditions (yes)
echo yes | $QT_SOURCE_DIR/configure \

336
makeSCOTCH Executable file
View File

@ -0,0 +1,336 @@
#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2019-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# makeSCOTCH
#
# Description
# Build the SCOTCH and PTSCOTCH libraries, optionally build binaries
#
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# 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
#------------------------------------------------------------------------------
_foamConfig scotch # Get SCOTCH_ARCH_PATH, SCOTCH_VERSION
scotchPACKAGE=${SCOTCH_VERSION:-scotch-system}
unset withMPI
case "$WM_MPLIB" in (*MPI*) [ "$FOAM_MPI" = dummy ] || withMPI=true ;; esac
#------------------------------------------------------------------------------
usage()
{
exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
/bin/cat<<USAGE
Usage: ${0##*/} [OPTION] [libso] [scotch-VERSION]
options:
-force Force compilation, even if include/library already exists
Also force build attempt of pt-scotch (mingw)
-gcc Force use of gcc/g++
-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
$scotchPACKAGE
USAGE
showDownloadHint SCOTCH
exit 1
}
#------------------------------------------------------------------------------
unset optBinaries optForce
# Parse options
while [ "$#" -gt 0 ]
do
case "$1" in
'') ;; # Ignore empty
-h | -help) usage ;;
-gcc) useGcc ;;
-force) optForce=true ;;
-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
;;
*)
die "unknown option/argument: '$1'"
;;
esac
shift
done
[ -n "$scotchPACKAGE" ] || die "The scotch-VERSION was not specified"
# Nothing to build
if _foamIsNone "$scotchPACKAGE"
then
echo "Using scotch-none (skip ThirdParty build of SCOTCH)"
exit 0
elif _foamIsSystem "$scotchPACKAGE"
then
echo "Using scotch-system"
exit 0
fi
requireExtLibBin
#------------------------------------------------------------------------------
# Needs generalizing, but works fairly well
for scotchMakefile in \
"OpenFOAM-$(uname -s)-${WM_COMPILER}.shlib" \
"OpenFOAM-$(uname -s).shlib" \
OpenFOAM-Linux.shlib \
;
do
scotchMakefile="etc/makeFiles/scotch/Makefile.inc.$scotchMakefile"
[ -f "$scotchMakefile" ] && break
done
# The relative link location within the "scotch/src/" directory
makefileInc="../../$scotchMakefile"
#------------------------------------------------------------------------------
#
# Build SCOTCH
#
# SCOTCH_ARCH_PATH : installation directory
# SCOTCH_SOURCE_DIR : location of the original sources
SCOTCH_SOURCE_DIR="$sourceBASE/$scotchPACKAGE"
: "${SCOTCH_ARCH_PATH:=$installBASE$WM_SIZE_OPTIONS/$scotchPACKAGE}"
[ -d "$SCOTCH_SOURCE_DIR/src" ] || {
echo "Missing sources: '$scotchPACKAGE'"
showDownloadHint SCOTCH
exit 2
}
echo
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 [ -z "$optForce" ] \
&& [ -f "$incDIR"/scotch.h ] \
&& haveLibso "$libDIR"/libscotch
then
echo " scotch include: $incDIR"
echo " scotch library: $libDIR"
elif [ -d "$SCOTCH_SOURCE_DIR" ]
then
(
# Older versions ok, but scotch-6.0.5a cannot build in parallel.
# Force serial build
export WM_NCOMPPROCS=1
echo "*** building scotch in serial ***"
echo
[ -f "$scotchMakefile" ] || {
echo " Error: no such makefile: $scotchMakefile"
exit 1
}
cd "$SCOTCH_SOURCE_DIR/src" || exit
export GIT_DIR="$SCOTCH_SOURCE_DIR/.git" # Mask seeing our own git-repo
rm -rf "$SCOTCH_ARCH_PATH"
applyPatch "$scotchPACKAGE" .. # patch at parent-level
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
fi
[ -f Makefile.inc ] || {
echo " Error: scotch needs an appropriate Makefile.inc"
exit 1
}
export CCS="$(whichCC)" # CCS (serial compiler)
export CCP="$(whichMpicc)" # CCP (parallel compiler) default=mpicc
# Consistency for Intel-MPI and non-icc compilers
[ -n "$I_MPI_CC" ] || export I_MPI_CC="$(whichCC)"
# The make targets
make_targets="libscotch"
if [ "$optBinaries" = true ]
then
make_targets="$make_targets scotch"
fi
make realclean 2>/dev/null # Extra safety
make -j $WM_NCOMPPROCS $make_targets \
&& make \
prefix="$prefixDIR" \
bindir="$binDIR" \
libdir="$libDIR" \
includedir="$incDIR" \
install
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
fi
# Build ptscotch when MPI (ThirdParty or system) is available
if [ "${withMPI}" != true ]
then
# Report that the above tests failed and pass-through the failure
echo "Skipping pt-scotch (no mpi)"
exit 0
fi
# Known build issues for mingw (MS-MPI source code annotations)
case "$WM_COMPILER" in
(Mingw*)
if [ -z "$optForce" ]
then
echo "Skipping pt-scotch - known compilation issues with $WM_COMPILER"
exit 0
else
echo "Warning: pt-scotch - known compilation issues with $WM_COMPILER"
fi
;;
esac
# Build ptscotch if normal scotch was built (has include and library)
# (reuse prefix/include/lib dirs set above)
if [ -f "$incDIR"/scotch.h ] \
&& haveLibso "$libDIR"/libscotch
then
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.
# Force serial build
export WM_NCOMPPROCS=1
echo "*** building pt-scotch in serial ***"
[ -f "$scotchMakefile" ] || {
echo " Error: no such makefile: $scotchMakefile"
exit 1
}
cd "$SCOTCH_SOURCE_DIR/src" || exit
export GIT_DIR="$SCOTCH_SOURCE_DIR/.git" # Mask seeing our own git-repo
echo
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
fi
[ -f Makefile.inc ] || {
echo " Error: ptscotch needs an appropriate Makefile.inc"
exit 1
}
export CCS="$(whichCC)" # CCS (serial compiler)
export CCP="$(whichMpicc)" # CCP (parallel compiler) default=mpicc
# Consistency for Intel-MPI and non-icc compilers
[ -n "$I_MPI_CC" ] || export I_MPI_CC="$(whichCC)"
# The make targets. No simple means of handling mpi-specific binaries
make_targets="libptscotch"
if [ "$optBinaries" = true ]
then
make_targets="$make_targets ptscotch"
fi
make realclean 2>/dev/null # Extra safety
make -j $WM_NCOMPPROCS $make_targets \
&& make \
prefix="$prefixDIR" \
bindir="$binDIR" \
libdir="$libDIR" \
includedir="$incDIR" \
install
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
# Verify existence of ptscotch include
[ -f "$SCOTCH_ARCH_PATH/include/$FOAM_MPI/ptscotch.h" ] || {
echo
echo " WARNING: required include file 'ptscotch.h' not found!"
}
# Could now remove $SCOTCH_SOURCE_DIR/src/Makefile.inc
#------------------------------------------------------------------------------

21
makeVTK
View File

@ -3,12 +3,13 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd.
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# 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
@ -27,7 +28,8 @@
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Run from third-party directory only
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
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
@ -63,7 +65,8 @@ usage() {
usage: ${0##*/} [OPTION] [vtk-VERSION] [CMAKE-OPTION]
options:
-gcc force g++ instead of the value from \$WM_CXX
-gcc Force use of gcc/g++
-cmake PATH with cmake from the given path
-rebuild for repeated builds (-make -install) *use with caution*
-gl2 with new rendering backend (default: auto)
-mesa with mesa (if not already enabled)
@ -73,7 +76,6 @@ options:
-osmesa with off-screen mesa only
-mpi with mpi (VTK_Group_MPI=ON)
-mpi=N with max 'N' mpi processes. N=0 for no upper-limit.
-cmake PATH with cmake from the path given
-verbose verbose output in Makefiles
-version VER specify an alternative version (current: $VTK_VERSION)
-buildType NAME specify the build type (default: Release)
@ -100,10 +102,11 @@ 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
}
#------------------------------------------------------------------------------
exportCompiler # Compiler info for CMake/configure
exportCompiler minimal # Minimal compiler info for CMake/configure
# Various building stages
unset runPATCH runCONFIG runMAKE runINSTALL
@ -293,6 +296,10 @@ Features selected
mesa ${withMESA:-false}
mpi ${withMPI:-false}
---------------------
Compiler
cxx ${CXX:-unknown}
cxxflags ${CXXFLAGS:-none}
---------------------
Version information
vtk ${VTK_VERSION:-unknown}
build ${BUILD_TYPE:-unknown}

View File

@ -2,10 +2,11 @@
# An example for building particular combinations of VTK with
# - mesa (off-screen only)
vtk=VTK-9.0.0
vtk=VTK-8.2.0
# mesa=mesa-11.2.2
# mesa=mesa-13.0.3
mesa=mesa-17.1.1
# mesa=mesa-17.1.1
mesa=mesa-18.3.4
# Module_vtkAcceleratorsVTKm : Request building vtkAcceleratorsVTKm
#
@ -13,11 +14,10 @@ mesa=mesa-17.1.1
set -x
./makeVTK \
-mpi \
-mpi \
-osmesa \
-mesa-prefix $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$mesa \
$vtk "$@" \
Module_vtkAcceleratorsVTKm=ON
#------------------------------------------------------------------------------

View File

@ -3,12 +3,13 @@
# ========= |
# \\ / 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) 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
@ -20,7 +21,8 @@
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Run from third-party directory only
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
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
@ -81,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
#------------------------------------------------------------------------------