Compare commits
54 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4c4a11755a | |||
| 3c852a8929 | |||
| 867d96ec54 | |||
| 16b59832cc | |||
| ddd4176269 | |||
| ae5b2326c0 | |||
| bbbc7b2953 | |||
| 5ac0e3624f | |||
| a7c2a4bfb9 | |||
| c6e6c0abbf | |||
| fbbb275862 | |||
| 770e22bf51 | |||
| 830e92194a | |||
| 8df5d377e7 | |||
| aa9fc0efd2 | |||
| f968a67362 | |||
| c8135cc48e | |||
| adfe28332e | |||
| 3fe5c2beb5 | |||
| 6e0c9f9d8b | |||
| 013c7154ff | |||
| 28e7982258 | |||
| 7e5bdfd747 | |||
| f64c88a1cf | |||
| b71a60d122 | |||
| 7aee88cf92 | |||
| d2334fe051 | |||
| a77852ae18 | |||
| 0e599b7a64 | |||
| 1a1c624422 | |||
| 2dd42d8c6c | |||
| ff162da2f8 | |||
| a91157470d | |||
| 8a53a789f7 | |||
| a42362f8b8 | |||
| 4f844dabcf | |||
| d446ee8b31 | |||
| 54efaa445a | |||
| dab3042c45 | |||
| 52ad71871c | |||
| 31ffa9c92c | |||
| 5886ce9f65 | |||
| 93b8816b3e | |||
| cbea5788a3 | |||
| 6d7ef8dc42 | |||
| 455551b48b | |||
| 231733bc15 | |||
| 5ecf33d4d8 | |||
| 475220cfae | |||
| de7ac04146 | |||
| 7419702a85 | |||
| 43cbb24ddd | |||
| f49d26dad5 | |||
| 4c049afb40 |
6
Allclean
6
Allclean
@ -3,8 +3,10 @@
|
||||
# ========= |
|
||||
# \\ / 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 | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# | Copyright (C) 2011 OpenFOAM Foundation
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
|
||||
191
Allwmake
191
Allwmake
@ -3,8 +3,10 @@
|
||||
# ========= |
|
||||
# \\ / 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 | Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
@ -32,36 +34,18 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
}
|
||||
. etc/tools/ThirdPartyFunctions
|
||||
#------------------------------------------------------------------------------
|
||||
# Compiler/linker settings for CMake/configure
|
||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||
[ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS"
|
||||
[ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS"
|
||||
[ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS"
|
||||
|
||||
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
|
||||
@ -74,158 +58,10 @@ 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.i686_pc_linux2.shlib-OpenFOAM
|
||||
|
||||
if [ -f $SCOTCH_ARCH_PATH/include/scotch.h \
|
||||
-a -r $FOAM_EXT_LIBBIN/libscotch.so \
|
||||
-a -r $FOAM_EXT_LIBBIN/libscotcherrexit.so ]
|
||||
then
|
||||
echo " scotch include: $SCOTCH_ARCH_PATH/include"
|
||||
echo " scotch library: $FOAM_EXT_LIBBIN"
|
||||
elif [ -d "$SCOTCH_SOURCE_DIR" ]
|
||||
then
|
||||
(
|
||||
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
|
||||
|
||||
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
|
||||
(
|
||||
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
|
||||
|
||||
./makeSCOTCH
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
echo
|
||||
echo ========================================
|
||||
# Get KAHIP_ARCH_PATH
|
||||
@ -239,13 +75,12 @@ then
|
||||
./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
|
||||
@ -257,7 +92,7 @@ then
|
||||
./makeMETIS -test "$METIS_ARCH_PATH" || \
|
||||
./makeMETIS || warnBuildIssues METIS
|
||||
else
|
||||
warnNotFound METIS # METIS is optional
|
||||
warnNotFound METIS # is optional
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -269,7 +104,7 @@ then
|
||||
./makeCGAL -test "$CGAL_ARCH_PATH" "$BOOST_ARCH_PATH" || \
|
||||
./makeCGAL || warnBuildIssues CGAL
|
||||
else
|
||||
warnNotFound CGAL # CGAL is optional
|
||||
warnNotFound CGAL # is optional
|
||||
fi
|
||||
|
||||
echo
|
||||
@ -280,7 +115,7 @@ then
|
||||
./makeFFTW -test "$FFTW_ARCH_PATH" || \
|
||||
./makeFFTW || warnBuildIssues FFTW
|
||||
else
|
||||
warnNotFound FFTW # FFTW is optional
|
||||
warnNotFound FFTW # is optional
|
||||
fi
|
||||
|
||||
echo
|
||||
|
||||
273
BUILD.md
273
BUILD.md
@ -1,21 +1,9 @@
|
||||
<!--
|
||||
|--------------------------------------------------------------------------|
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | |
|
||||
| \\ / A nd | Copyright (C) 2016-2017 OpenCFD Ltd. |
|
||||
| \\/ M anipulation | |
|
||||
|--------------------------------------------------------------------------|
|
||||
-->
|
||||
|
||||
---
|
||||
|
||||
# OpenFOAM® 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
|
||||
@ -41,15 +29,16 @@ and its corresponding third-party installation.
|
||||
Nonethess, 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,9 +50,9 @@ 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.
|
||||
For many config files, there are several configuration possibilities:
|
||||
@ -83,9 +72,9 @@ automatically as part of the top-level OpenFOAM `Allwmake`.
|
||||
Nonetheless it may be necessary or useful to build various
|
||||
ThirdParty components prior to building OpenFOAM itself.
|
||||
|
||||
### Bootstrapping *(optional)*
|
||||
|
||||
### Build Sequence
|
||||
1. `makeGcc` _or_ `makeLLVM` <a name="makeGcc"></a> *(optional)*
|
||||
* `makeGcc` _or_ `makeLLVM` <a name="makeGcc"></a>
|
||||
- Makes a third-party [gcc](#gcc-compiler) or [clang](#clang-compiler) installation,
|
||||
which is needed if the system gcc is [too old](#gcc-compiler).
|
||||
If your system compiler is recent enough, you can skip this step.
|
||||
@ -93,30 +82,74 @@ ThirdParty components prior to building OpenFOAM itself.
|
||||
OpenFOAM `etc/bashrc` or your equivalent `prefs.sh` file:
|
||||
- `WM_COMPILER_TYPE=ThirdParty`
|
||||
- `WM_COMPILER=Gcc48` (for example)
|
||||
- or `WM_COMPILER=Clang` and adjust the `clang_version` entry in the OpenFOAM
|
||||
- `WM_COMPILER=Clang40` (for example)
|
||||
- or `WM_COMPILER=Clang` and adjust `clang_version` in the OpenFOAM
|
||||
`etc/config.sh/compiler` or equivalent.
|
||||
- More description is contained in the header comments of the
|
||||
`makeGcc` and `makeLLVM` files.
|
||||
- *Attention*: If you are building a newer version of clang, you may need to
|
||||
update your CMake beforehand.
|
||||
2. `makeCmake` *(optional)*
|
||||
* `makeCmake`
|
||||
- Makes a third-party [CMake](#general-packages) installation, which is
|
||||
needed if a system CMake does not exist or is [too old](#min-cmake),
|
||||
- Note that CMake is being used by an number of third-party packages
|
||||
(CGAL, LLVM, ParaView, VTK, ...)
|
||||
so this may become an increasingly important aspect of the build.
|
||||
3. `Allwmake`
|
||||
|
||||
Note that the order of the bootstrapping process may need to be
|
||||
reversed, or even require a few loops. For example, if you may need a
|
||||
newer version of CMake before being able to build LLVM/Clang and
|
||||
subsequently use the newly build clang to create a newer version of
|
||||
CMake in the desired location.
|
||||
|
||||
Additionally, if you are using clang but with ThirdParty locations for
|
||||
gmp/mpfr you will need some extra work. Here is an example:
|
||||
|
||||
* Compile a new ThirdParty clang version:
|
||||
```
|
||||
./makeLLVM llvm-4.0.1
|
||||
```
|
||||
* Now adjust the OpenFOAM `prefs.sh` to use the new compiler settings,
|
||||
and update the OpenFOAM environment (eg, `wmRefresh`)
|
||||
|
||||
* Next use (abuse) the `makeGcc` script to compile gmp/mpfr libraries.
|
||||
It is best to pass the desired versions explicitly, and necessary
|
||||
to set the CC/CXX variables so that the correct compiler is used:
|
||||
```
|
||||
CC=clang CXX=clang++ ./makeGcc gmp-6.1.2 mpfr-4.0.0 gcc-system
|
||||
```
|
||||
specifying `gcc-system` effectively disables building of gcc,
|
||||
but will build the gmp/mpfr components.
|
||||
|
||||
* As a final step, it will be necessary to add the ThirdParty
|
||||
gmp/mpfr locations in the OpenFOAM config files since they are
|
||||
normally only used in combination with a ThirdParty gcc.
|
||||
The location to make these changes is in the `etc/config.sh/CGAL`,
|
||||
since this is the component that uses the mpfr library.
|
||||
For example,
|
||||
```
|
||||
gmp_version=gmp-6.1.2
|
||||
mpfr_version=mpfr-4.0.0
|
||||
export GMP_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gmp_version
|
||||
export GMP_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpfr_version
|
||||
```
|
||||
* Update update the OpenFOAM environment (eg, `wmRefresh`) again.
|
||||
|
||||
|
||||
### Build Sequence
|
||||
|
||||
1. `Allwmake`
|
||||
- This will be automatically invoked by the top-level OpenFOAM `Allwmake`, but
|
||||
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.
|
||||
4. `makeParaView` *(optional but highly recommended)*
|
||||
2. `makeParaView` *(optional)*
|
||||
- This is optional, but extremely useful for visualization and for
|
||||
run-time post-processing function objects.
|
||||
You can build this at a later point in time, but then you should
|
||||
remember to rebuild the post-processing function objects and the
|
||||
reader module as well.
|
||||
5. Make any additional optional components
|
||||
3. Make any additional optional components
|
||||
|
||||
|
||||
#### Optional Components
|
||||
@ -151,9 +184,6 @@ ThirdParty components prior to building OpenFOAM itself.
|
||||
`makeCCMIO`
|
||||
- Only required for conversion to/from STARCD/STARCCM+ files.
|
||||
|
||||
`makeTecio`
|
||||
- Only required for conversion of results to Tecplot format.
|
||||
|
||||
`makeMesa`, `makeVTK`
|
||||
- Additional support for building offscreen rendering components.
|
||||
Useful if you want to render on computer servers without graphics cards.
|
||||
@ -180,13 +210,16 @@ and save some disk space.
|
||||
|
||||
## Build Notes
|
||||
|
||||
### CGAL
|
||||
- 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
|
||||
- Needed for off-screen rendering.
|
||||
- Building with [mesa-11][older11 mesa] and [mesa-13][older13 mesa] both
|
||||
- Building with [mesa-11][link mesa11] and [mesa-13][link mesa13] both
|
||||
seem okay, as does building with [mesa-17][link mesa].
|
||||
- Building with mesa-12 is not possible since it fails to create
|
||||
the necessary `include/GL` directory and `osmesa.h` file.
|
||||
@ -197,19 +230,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.4.1/VTK VTK-8.1.0
|
||||
|
||||
```
|
||||
ln -s ParaView-v5.6.0/VTK VTK-8.2.0
|
||||
```
|
||||
The appropriate VTK version number can be found from the contents of
|
||||
the `vtkVersion.cmake` file.
|
||||
For example,
|
||||
|
||||
$ cat ParaView-v5.4.1/VTK/CMake/vtkVersion.cmake
|
||||
|
||||
# VTK version number components.
|
||||
set(VTK_MAJOR_VERSION 8)
|
||||
set(VTK_MINOR_VERSION 1)
|
||||
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.
|
||||
@ -217,6 +253,38 @@ and save some disk space.
|
||||
required.
|
||||
See additional notes below about [making Qt](#makeQt) if necessary.
|
||||
|
||||
**NOTE** this step may not be entirely successful for your particular
|
||||
system. Building ParaView itself is generally not a significant problem
|
||||
but its dependency on particular Qt versions can be a problem.
|
||||
|
||||
If you fail at this step due to Qt dependencies, you may have success
|
||||
building a slightly older Qt version. Another alternative may be to
|
||||
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.
|
||||
|
||||
|
||||
#### 5.6.x, 5.5.x binary packages
|
||||
|
||||
For general functionality, the paraview version distributed with
|
||||
the operating system or a [binary package][download ParaView]
|
||||
may be sufficient for your needs.
|
||||
- No known issues with the native OpenFOAM reader.
|
||||
|
||||
|
||||
Using a binary package does mean you miss these elements (which may or
|
||||
may not be important for you):
|
||||
- cannot visualize a `blockMeshDict`
|
||||
- cannot build Catalyst insitu visualization
|
||||
- no alternative OpenFOAM reader module for some special features not
|
||||
found in the native OpenFOAM reader.
|
||||
|
||||
#### 5.5.x
|
||||
- Requires patching for the vtk-m configuration (on some systems).
|
||||
- Recommended patching for ParaView Catalyst.
|
||||
- Recommended patching for file series
|
||||
No known issues with the native OpenFOAM reader.
|
||||
|
||||
#### 5.4.x
|
||||
- Compiles without patching.
|
||||
No known issues with the native OpenFOAM reader.
|
||||
@ -237,16 +305,16 @@ and save some disk space.
|
||||
- Building a third-party Qt installation (prior to building ParaView) requires
|
||||
some additional effort, but should nonetheless work smoothly.
|
||||
|
||||
1. Download a [*qt-everywhere-opensource-src*][link Qt] package and
|
||||
1. Download a [*qt-everywhere-opensource-src*][link Qt5] package and
|
||||
unpack in the third-party directory.
|
||||
2. Use the `makeQt` script with the QT version number. For example,
|
||||
|
||||
./makeQt 4.8.7
|
||||
|
||||
```
|
||||
./makeQt 5.9.3
|
||||
```
|
||||
3. Build ParaView using this third-party QT. For example,
|
||||
|
||||
./makeParaView -qt-4.8.7 5.4.1
|
||||
|
||||
```
|
||||
./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
|
||||
@ -254,13 +322,18 @@ and save some disk space.
|
||||
central location), you will need to use the `etc/relocateQt` script
|
||||
afterwards.
|
||||
|
||||
*Note* On some older systems it can be quite difficult to build the
|
||||
latest QT. In these cases, it is sometimes possible to build a
|
||||
slightly older QT (eg, [qt-5.6.3][link Qt56]) instead.
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Versions
|
||||
|
||||
### 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
|
||||
|-------------------|--------------------------------------------
|
||||
@ -294,7 +367,7 @@ install the 32-bit development libraries by default.
|
||||
|
||||
### Clang Compiler <a name="clang-compiler"></a>
|
||||
|
||||
The minimum version of clang required is 3.3.
|
||||
The minimum version of clang required is **3.7**
|
||||
|
||||
*Attention*: If you are building a newer version of clang, you may need to
|
||||
update your CMake beforehand since GNU *configure* can only be used prior
|
||||
@ -321,7 +394,6 @@ you may have additional hurdles to using the newest versions of clang.
|
||||
| [CGAL][page CGAL] | [download][link CGAL]
|
||||
| [FFTW][page FFTW] | [download][link FFTW]
|
||||
| [ADF/CGNS][page CGNS], ccm | [link ccmio][link ccmio]
|
||||
| [tecio][page tecio] | [link tecio][link tecio]
|
||||
| gperftools | [repo][repo gperftools] or [download][link gperftools]
|
||||
|
||||
|
||||
@ -331,8 +403,8 @@ you may have additional hurdles to using the newest versions of clang.
|
||||
|-----------------------|------------------------
|
||||
| [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]
|
||||
| [kahip][page kahip] | [download][link kahip]
|
||||
| [scotch, ptscotch][page scotch] | [download][link scotch] or [newer][newer scotch]
|
||||
| [kahip][page kahip] | [download][link kahip] or [newer][newer kahip]
|
||||
| [metis][page metis] | [download][link metis]
|
||||
|
||||
|
||||
@ -340,34 +412,36 @@ you may have additional hurdles to using the newest versions of clang.
|
||||
|
||||
| Name | Location
|
||||
|-----------------------|------------------------
|
||||
| [MESA][page mesa] | [download][link mesa] or [older 13][older13 mesa], [older 11][older11 mesa]
|
||||
| [ParaView][page ParaView] | [download][link ParaView]
|
||||
| [Qt][page Qt] | Either the [older QT4][link Qt4] or the [newer QT5][link Qt5], which only works with ParaView-5.3.0 and later.
|
||||
| [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]
|
||||
| [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.4.1
|
||||
3.4.3 llvm-3.9.1
|
||||
3.4.3 llvm-4.0.0
|
||||
|
||||
```
|
||||
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
|
||||
```
|
||||
|
||||
### 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
|
||||
@ -381,9 +455,9 @@ 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.0.tar.bz2
|
||||
[link mpfr]: ftp://ftp.gnu.org/gnu/mpfr/mpfr-3.1.4.tar.bz2
|
||||
[link mpc]: ftp://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz
|
||||
[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 mpc]: ftp://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz
|
||||
|
||||
|
||||
<!-- clang-related -->
|
||||
@ -403,23 +477,31 @@ 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
|
||||
[link adios]: https://github.com/ornladios/ADIOS/archive/v1.13.1.tar.gz
|
||||
[altlink adios]: http://users.nccs.gov/~pnorbert/adios-1.13.1.tar.gz
|
||||
[page zfp]: http://computation.llnl.gov/projects/floating-point-compression/zfp-versions
|
||||
|
||||
[page scotch]: https://www.labri.fr/perso/pelegrin/scotch/
|
||||
[link scotch]: https://gforge.inria.fr/frs/download.php/file/34099/scotch_6.0.3.tar.gz
|
||||
[link scotch]: https://gforge.inria.fr/frs/download.php/file/37622/scotch_6.0.6.tar.gz
|
||||
[newer scotch]: https://gforge.inria.fr/frs/download.php/file/38040/scotch_6.0.7.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
|
||||
[newer kahip]: http://algo2.iti.kit.edu/schulz/software_releases/KaHIP_2.10.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
|
||||
[link openmpi]: https://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.7.tar.bz2
|
||||
[newer openmpi]: https://www.open-mpi.org/software/ompi/v2.1/downloads/openmpi-2.1.1.tar.bz2
|
||||
|
||||
[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/
|
||||
@ -438,32 +520,42 @@ that clang compiler for building the newer llvm/clang version.
|
||||
[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)
|
||||
|
||||
[page tecio]: http://www.tecplot.com/
|
||||
[link tecio]: http://www.tecplot.com/my/tecio-library/ (needs registration)
|
||||
|
||||
[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 -->
|
||||
|
||||
[page ParaView]: http://www.paraview.org/
|
||||
[link ParaView]: http://www.paraview.org/files/v5.4/ParaView-v5.4.1.tar.gz
|
||||
[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
|
||||
|
||||
[page mesa]: http://mesa3d.org/
|
||||
[link mesa]: ftp://ftp.freedesktop.org/pub/mesa/mesa-17.1.1.tar.xz
|
||||
[older13 mesa]: ftp://ftp.freedesktop.org/pub/mesa/13.0.6/mesa-13.0.6.tar.xz
|
||||
[older11 mesa]: ftp://ftp.freedesktop.org/pub/mesa/older-versions/11.x/11.2.2/mesa-11.2.2.tar.xz
|
||||
[link mesa13]: ftp://ftp.freedesktop.org/pub/mesa/13.0.6/mesa-13.0.6.tar.xz
|
||||
[link mesa11]: ftp://ftp.freedesktop.org/pub/mesa/older-versions/11.x/11.2.2/mesa-11.2.2.tar.xz
|
||||
|
||||
[page Qt]: https://www.qt.io/download-open-source/
|
||||
[repo Qt]: http://code.qt.io/cgit/qt-creator/qt-creator.git
|
||||
[link Qt4]: http://download.qt.io/official_releases/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz
|
||||
[link Qt56]: http://download.qt.io/official_releases/qt/5.6/5.6.3/single/qt-everywhere-opensource-src-5.6.3.tar.xz
|
||||
[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
|
||||
[link openfoam-readme]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/README.md
|
||||
[link openfoam-config]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/doc/Config.md
|
||||
[link openfoam-build]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/doc/Build.md
|
||||
[link openfoam-require]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/doc/Requirements.md
|
||||
[link third-readme]: https://develop.openfoam.com/Development/ThirdParty-plus/blob/develop/README.md
|
||||
[link third-build]: https://develop.openfoam.com/Development/ThirdParty-plus/blob/develop/BUILD.md
|
||||
[link third-require]: https://develop.openfoam.com/Development/ThirdParty-plus/blob/develop/Requirements.md
|
||||
|
||||
|
||||
---
|
||||
|
||||
@ -471,7 +563,6 @@ that clang compiler for building the newer llvm/clang version.
|
||||
## 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)
|
||||
@ -480,4 +571,4 @@ that clang compiler for building the newer llvm/clang version.
|
||||
|
||||
---
|
||||
|
||||
Copyright 2016-2017 OpenCFD Ltd
|
||||
Copyright 2016-2019 OpenCFD Ltd
|
||||
|
||||
89
README.md
89
README.md
@ -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® 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,24 +41,84 @@ 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**.
|
||||
|
||||
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/
|
||||
|
||||
More details can be found the ThirdParty BUILD.md information.
|
||||
|
||||
<!-- 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-plus/blob/develop/README.md
|
||||
[link openfoam-config]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/doc/Config.md
|
||||
[link openfoam-build]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/doc/Build.md
|
||||
[link openfoam-require]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/doc/Requirements.md
|
||||
[link third-readme]: https://develop.openfoam.com/Development/ThirdParty-plus/blob/develop/README.md
|
||||
[link third-build]: https://develop.openfoam.com/Development/ThirdParty-plus/blob/develop/BUILD.md
|
||||
[link third-require]: https://develop.openfoam.com/Development/ThirdParty-plus/blob/develop/Requirements.md
|
||||
|
||||
---
|
||||
|
||||
@ -78,7 +126,6 @@ More details can be found the ThirdParty BUILD.md information.
|
||||
## 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)
|
||||
@ -87,4 +134,4 @@ More details can be found the ThirdParty BUILD.md information.
|
||||
|
||||
---
|
||||
|
||||
Copyright 2016-2017 OpenCFD Ltd
|
||||
Copyright 2016-2019 OpenCFD Ltd
|
||||
|
||||
51
Requirements.md
Normal file
51
Requirements.md
Normal file
@ -0,0 +1,51 @@
|
||||
## OpenFOAM® ThirdParty System Requirements
|
||||
|
||||
For building some particular third-party libraries from source,
|
||||
the normal [OpenFOAM System Requirements][link openfoam-require]
|
||||
will be insufficient.
|
||||
|
||||
This is most notably the case for ParaView and/or QT compilation.
|
||||
As duly noted in [BUILD][link third-build] and [README][link third-readme] and information,
|
||||
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.
|
||||
|
||||
|
||||
**Please help us with keeping the information here up-to-date and accurate.**
|
||||
|
||||
### Ubuntu
|
||||
|
||||
Dependencies:
|
||||
```
|
||||
sudo apt-get install qt4-dev-tools libqt4-dev libqt4-opengl-dev freeglut3-dev libqtwebkit-dev libxt-dev
|
||||
```
|
||||
|
||||
### openSUSE
|
||||
|
||||
Dependencies:
|
||||
|
||||
```
|
||||
sudo zypper install glu-devel
|
||||
sudo zypper install libQtWebKit-devel libqt4-devel qt4-assistant-adp-devel qt4-x11-tools
|
||||
```
|
||||
|
||||
<!-- Quick links -->
|
||||
|
||||
[download ParaView]: https://www.paraview.org/download/
|
||||
|
||||
|
||||
<!-- OpenFOAM -->
|
||||
|
||||
[link openfoam-readme]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/README.md
|
||||
[link openfoam-config]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/doc/Config.md
|
||||
[link openfoam-build]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/doc/Build.md
|
||||
[link openfoam-require]: https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/doc/Requirements.md
|
||||
[link third-readme]: https://develop.openfoam.com/Development/ThirdParty-plus/blob/develop/README.md
|
||||
[link third-build]: https://develop.openfoam.com/Development/ThirdParty-plus/blob/develop/BUILD.md
|
||||
[link third-require]: https://develop.openfoam.com/Development/ThirdParty-plus/blob/develop/Requirements.md
|
||||
|
||||
---
|
||||
Copyright 2019 OpenCFD Ltd
|
||||
41
SOURCES.txt
41
SOURCES.txt
@ -1,5 +1,40 @@
|
||||
Short summary of third-party software versions for recent OpenFOAM versions.
|
||||
|
||||
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
|
||||
---------------
|
||||
|
||||
CGAL-4.9.1
|
||||
ParaView-5.6.0 *update*
|
||||
boost_1_64_0
|
||||
fftw-3.3.7
|
||||
openmpi-1.10.4
|
||||
scotch_6.0.6 *minor*
|
||||
kahip-2.00d
|
||||
|
||||
|
||||
OpenFOAM-1806
|
||||
---------------
|
||||
CGAL-4.9.1
|
||||
ParaView-5.5.2 *update*
|
||||
boost_1_64_0
|
||||
fftw-3.3.7
|
||||
openmpi-1.10.4
|
||||
scotch_6.0.3
|
||||
kahip-2.00d
|
||||
|
||||
|
||||
OpenFOAM-1712
|
||||
---------------
|
||||
CGAL-4.9.1
|
||||
@ -41,7 +76,7 @@ openmpi-1.10.2 *minor*
|
||||
scotch_6.0.3
|
||||
|
||||
|
||||
OpenFOAM-v3.0+
|
||||
OpenFOAM-3.0+
|
||||
---------------
|
||||
CGAL-4.7 *update*
|
||||
ParaView-4.4.0 *update*
|
||||
@ -49,7 +84,7 @@ openmpi-1.10.0 *update*
|
||||
scotch_6.0.3
|
||||
|
||||
|
||||
OpenFOAM-v2.4
|
||||
OpenFOAM-2.4
|
||||
---------------
|
||||
CGAL-4.6 *update*
|
||||
ParaView-4.1.0
|
||||
@ -58,7 +93,7 @@ scotch_6.0.3 *update*
|
||||
|
||||
|
||||
---------------
|
||||
OpenFOAM-v2.3
|
||||
OpenFOAM-2.3
|
||||
---------------
|
||||
CGAL-4.3
|
||||
ParaView-4.1.0
|
||||
|
||||
@ -13,3 +13,5 @@ EXE_INC = \
|
||||
-I$(KAHIP_LIB_SRC)/partition/uncoarsening/refinement/quotient_graph_refinement/flow_refinement
|
||||
|
||||
LIB_LIBS =
|
||||
|
||||
PROJECT_LIBS =
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
/* NOTE: make any changes to this file in etc/makeFiles/ */
|
||||
|
||||
/* EXE_INC = */
|
||||
EXE_INC =
|
||||
|
||||
LIB_LIBS =
|
||||
|
||||
PROJECT_LIBS =
|
||||
|
||||
56
etc/makeFiles/scotch/Makefile.inc.OpenFOAM-Darwin.shlib
Normal file
56
etc/makeFiles/scotch/Makefile.inc.OpenFOAM-Darwin.shlib
Normal file
@ -0,0 +1,56 @@
|
||||
#-------------------------------*- 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 enviroment since using '$(shell ...)' here does not
|
||||
# always work well.
|
||||
#
|
||||
# Notes:
|
||||
# - compiled without pthread
|
||||
#
|
||||
# Normally set CCS, CCP by caller
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
EXE =
|
||||
LIB = .dylib
|
||||
OBJ = .o
|
||||
|
||||
AR = $(CC)
|
||||
ARFLAGS = $(WM_CFLAGS) -dynamiclib -undefined dynamic_lookup -o
|
||||
CCS ?= $(CC)
|
||||
CCP ?= mpicc
|
||||
CCD = $(CCP)
|
||||
CFLAGS = $(WM_CFLAGS) -fPIC -O3 \
|
||||
-DCOMMON_FILE_COMPRESS_GZ \
|
||||
-DCOMMON_RANDOM_FIXED_SEED \
|
||||
-DSCOTCH_DETERMINISTIC \
|
||||
-DSCOTCH_RENAME \
|
||||
-Drestrict=__restrict
|
||||
|
||||
# 32-bit vs. 64-bit labels
|
||||
ifeq ($(WM_LABEL_SIZE),64)
|
||||
CFLAGS += -DINTSIZE64
|
||||
endif
|
||||
|
||||
CLIBFLAGS =
|
||||
LDFLAGS = $(WM_LDFLAGS) -lz -lm
|
||||
|
||||
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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
64
etc/makeFiles/scotch/Makefile.inc.OpenFOAM-Linux-Mingw.shlib
Normal file
64
etc/makeFiles/scotch/Makefile.inc.OpenFOAM-Linux-Mingw.shlib
Normal file
@ -0,0 +1,64 @@
|
||||
#-------------------------------*- 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 enviroment 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
|
||||
|
||||
AR = x86_64-w64-mingw32-gcc
|
||||
ARFLAGS = $(CFLAGS) -shared -Wl,--output-def,libscotch.def,--out-implib,libscotch.a,--enable-auto-import,--strip-all -o
|
||||
CC = x86_64-w64-mingw32-gcc $(CFLAGS_CROSS)
|
||||
CCS = x86_64-w64-mingw32-gcc
|
||||
CCP = x86_64-w64-mingw32-gcc
|
||||
CCD = gcc
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -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 enviroment 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 \
|
||||
155
etc/patches/gcc-4.8.5-with-gcc-7
Normal file
155
etc/patches/gcc-4.8.5-with-gcc-7
Normal file
@ -0,0 +1,155 @@
|
||||
#
|
||||
# Patch for building older gcc versions with gcc-7
|
||||
#
|
||||
--- gcc-4.8.5/gcc/cp/cfns.gperf.orig 2013-01-10 21:38:27.000000000 +0100
|
||||
+++ gcc-4.8.5/gcc/cp/cfns.gperf 2016-02-25 16:36:41.000000000 +0100
|
||||
@@ -1,5 +1,7 @@
|
||||
+%language=C++
|
||||
+%define class-name libc_name
|
||||
%{
|
||||
-/* Copyright (C) 2000-2013 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2000-2014 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
@@ -16,14 +18,6 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GCC; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
-#ifdef __GNUC__
|
||||
-__inline
|
||||
-#endif
|
||||
-static unsigned int hash (const char *, unsigned int);
|
||||
-#ifdef __GNUC__
|
||||
-__inline
|
||||
-#endif
|
||||
-const char * libc_name_p (const char *, unsigned int);
|
||||
%}
|
||||
%%
|
||||
# The standard C library functions, for feeding to gperf; the result is used
|
||||
--- gcc-4.8.5/gcc/cp/cfns.h.orig 2013-01-10 21:38:27.000000000 +0100
|
||||
+++ gcc-4.8.5/gcc/cp/cfns.h 2016-02-25 16:36:41.000000000 +0100
|
||||
@@ -1,5 +1,5 @@
|
||||
-/* ANSI-C code produced by gperf version 3.0.3 */
|
||||
-/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */
|
||||
+/* C++ code produced by gperf version 3.0.4 */
|
||||
+/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ --output-file cfns.h cfns.gperf */
|
||||
|
||||
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
||||
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
|
||||
@@ -28,9 +28,9 @@
|
||||
#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
|
||||
#endif
|
||||
|
||||
-#line 1 "cfns.gperf"
|
||||
+#line 3 "cfns.gperf"
|
||||
|
||||
-/* Copyright (C) 2000-2013 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2000-2014 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
@@ -47,25 +47,18 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GCC; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
-#ifdef __GNUC__
|
||||
-__inline
|
||||
-#endif
|
||||
-static unsigned int hash (const char *, unsigned int);
|
||||
-#ifdef __GNUC__
|
||||
-__inline
|
||||
-#endif
|
||||
-const char * libc_name_p (const char *, unsigned int);
|
||||
/* maximum key range = 391, duplicates = 0 */
|
||||
|
||||
-#ifdef __GNUC__
|
||||
-__inline
|
||||
-#else
|
||||
-#ifdef __cplusplus
|
||||
-inline
|
||||
-#endif
|
||||
-#endif
|
||||
-static unsigned int
|
||||
-hash (register const char *str, register unsigned int len)
|
||||
+class libc_name
|
||||
+{
|
||||
+private:
|
||||
+ static inline unsigned int hash (const char *str, unsigned int len);
|
||||
+public:
|
||||
+ static const char *libc_name_p (const char *str, unsigned int len);
|
||||
+};
|
||||
+
|
||||
+inline unsigned int
|
||||
+libc_name::hash (register const char *str, register unsigned int len)
|
||||
{
|
||||
static const unsigned short asso_values[] =
|
||||
{
|
||||
@@ -122,14 +115,8 @@
|
||||
return hval + asso_values[(unsigned char)str[len - 1]];
|
||||
}
|
||||
|
||||
-#ifdef __GNUC__
|
||||
-__inline
|
||||
-#ifdef __GNUC_STDC_INLINE__
|
||||
-__attribute__ ((__gnu_inline__))
|
||||
-#endif
|
||||
-#endif
|
||||
const char *
|
||||
-libc_name_p (register const char *str, register unsigned int len)
|
||||
+libc_name::libc_name_p (register const char *str, register unsigned int len)
|
||||
{
|
||||
enum
|
||||
{
|
||||
--- gcc-4.8.5/gcc/cp/except.c.orig 2013-10-25 15:49:48.000000000 +0200
|
||||
+++ gcc-4.8.5/gcc/cp/except.c 2018-07-27 13:11:11.825369497 +0200
|
||||
@@ -1025,7 +1025,7 @@
|
||||
unless the system headers are playing rename tricks, and if
|
||||
they are, we don't want to be confused by them. */
|
||||
id = DECL_NAME (fn);
|
||||
- return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
|
||||
+ return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
|
||||
}
|
||||
|
||||
/* Returns nonzero if an exception of type FROM will be caught by a
|
||||
--- gcc-4.8.5/libgcc/config/i386/linux-unwind.h.orig 2013-02-04 20:06:20.000000000 +0100
|
||||
+++ gcc-4.8.5/libgcc/config/i386/linux-unwind.h 2018-07-27 12:51:18.305390871 +0200
|
||||
@@ -58,7 +58,7 @@
|
||||
if (*(unsigned char *)(pc+0) == 0x48
|
||||
&& *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
|
||||
{
|
||||
- struct ucontext *uc_ = context->cfa;
|
||||
+ ucontext_t *uc_ = context->cfa;
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
The aliasing warning is correct, but should not be a problem
|
||||
because it does not alias anything. */
|
||||
@@ -138,7 +138,7 @@
|
||||
siginfo_t *pinfo;
|
||||
void *puc;
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_ = context->cfa;
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
The aliasing warning is correct, but should not be a problem
|
||||
--- gcc-4.8.5/libsanitizer/asan/asan_linux.cc.orig 2013-01-23 12:41:33.000000000 +0100
|
||||
+++ gcc-4.8.5/libsanitizer/asan/asan_linux.cc 2018-07-27 12:51:45.641390381 +0200
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#include <pthread.h>
|
||||
+#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <unwind.h>
|
||||
--- gcc-4.8.5/libsanitizer/tsan/tsan_platform_linux.cc.orig 2013-02-21 11:57:10.000000000 +0100
|
||||
+++ gcc-4.8.5/libsanitizer/tsan/tsan_platform_linux.cc 2018-07-27 13:17:32.417362682 +0200
|
||||
@@ -292,7 +292,7 @@
|
||||
#ifndef TSAN_GO
|
||||
int ExtractResolvFDs(void *state, int *fds, int nfd) {
|
||||
int cnt = 0;
|
||||
- __res_state *statp = (__res_state*)state;
|
||||
+ struct __res_state *statp = (struct __res_state*)state;
|
||||
for (int i = 0; i < MAXNS && cnt < nfd; i++) {
|
||||
if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
|
||||
fds[cnt++] = statp->_u._ext.nssocks[i];
|
||||
87
etc/patches/gcc-4.9.4-with-gcc-7
Normal file
87
etc/patches/gcc-4.9.4-with-gcc-7
Normal file
@ -0,0 +1,87 @@
|
||||
#
|
||||
# Patch for building older gcc versions with gcc-7
|
||||
#
|
||||
--- gcc-4.9.4/libgcc/config/i386/linux-unwind.h.orig 2014-01-02 23:25:22.000000000 +0100
|
||||
+++ gcc-4.9.4/libgcc/config/i386/linux-unwind.h 2018-07-27 10:43:46.021527909 +0200
|
||||
@@ -58,7 +58,7 @@
|
||||
if (*(unsigned char *)(pc+0) == 0x48
|
||||
&& *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
|
||||
{
|
||||
- struct ucontext *uc_ = context->cfa;
|
||||
+ ucontext_t *uc_ = context->cfa;
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
The aliasing warning is correct, but should not be a problem
|
||||
because it does not alias anything. */
|
||||
@@ -138,7 +138,7 @@
|
||||
siginfo_t *pinfo;
|
||||
void *puc;
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_ = context->cfa;
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
The aliasing warning is correct, but should not be a problem
|
||||
--- gcc-4.9.4/libsanitizer/asan/asan_linux.cc.orig 2013-12-05 10:18:38.000000000 +0100
|
||||
+++ gcc-4.9.4/libsanitizer/asan/asan_linux.cc 2018-07-27 11:11:52.085497715 +0200
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#include <pthread.h>
|
||||
+#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <unwind.h>
|
||||
--- gcc-4.9.4/libsanitizer/sanitizer_common/sanitizer_linux.cc.orig 2013-12-05 10:18:38.000000000 +0100
|
||||
+++ gcc-4.9.4/libsanitizer/sanitizer_common/sanitizer_linux.cc 2018-07-27 10:43:02.405528690 +0200
|
||||
@@ -599,8 +599,7 @@
|
||||
return internal_syscall(__NR_prctl, option, arg2, arg3, arg4, arg5);
|
||||
}
|
||||
|
||||
-uptr internal_sigaltstack(const struct sigaltstack *ss,
|
||||
- struct sigaltstack *oss) {
|
||||
+uptr internal_sigaltstack(const void *ss, void *oss) {
|
||||
return internal_syscall(__NR_sigaltstack, (uptr)ss, (uptr)oss);
|
||||
}
|
||||
|
||||
--- gcc-4.9.4/libsanitizer/sanitizer_common/sanitizer_linux.h.orig 2013-12-05 10:18:38.000000000 +0100
|
||||
+++ gcc-4.9.4/libsanitizer/sanitizer_common/sanitizer_linux.h 2018-07-27 10:42:29.845529273 +0200
|
||||
@@ -18,7 +18,6 @@
|
||||
#include "sanitizer_platform_limits_posix.h"
|
||||
|
||||
struct link_map; // Opaque type returned by dlopen().
|
||||
-struct sigaltstack;
|
||||
|
||||
namespace __sanitizer {
|
||||
// Dirent structure for getdents(). Note that this structure is different from
|
||||
@@ -28,8 +27,7 @@
|
||||
// Syscall wrappers.
|
||||
uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
|
||||
uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5);
|
||||
-uptr internal_sigaltstack(const struct sigaltstack* ss,
|
||||
- struct sigaltstack* oss);
|
||||
+uptr internal_sigaltstack(const void* ss, void* oss);
|
||||
uptr internal_sigaction(int signum, const __sanitizer_kernel_sigaction_t *act,
|
||||
__sanitizer_kernel_sigaction_t *oldact);
|
||||
uptr internal_sigprocmask(int how, __sanitizer_kernel_sigset_t *set,
|
||||
--- gcc-4.9.4/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc.orig 2013-12-05 11:28:59.000000000 +0100
|
||||
+++ gcc-4.9.4/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc 2018-07-27 10:41:32.053530308 +0200
|
||||
@@ -238,7 +238,7 @@
|
||||
|
||||
// Alternate stack for signal handling.
|
||||
InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize);
|
||||
- struct sigaltstack handler_stack;
|
||||
+ stack_t handler_stack;
|
||||
internal_memset(&handler_stack, 0, sizeof(handler_stack));
|
||||
handler_stack.ss_sp = handler_stack_memory.data();
|
||||
handler_stack.ss_size = kHandlerStackSize;
|
||||
--- gcc-4.9.4/libsanitizer/tsan/tsan_platform_linux.cc.orig 2013-12-05 10:18:38.000000000 +0100
|
||||
+++ gcc-4.9.4/libsanitizer/tsan/tsan_platform_linux.cc 2018-07-27 10:40:13.781531710 +0200
|
||||
@@ -351,7 +351,7 @@
|
||||
// closes within glibc. The code is a pure hack.
|
||||
int ExtractResolvFDs(void *state, int *fds, int nfd) {
|
||||
int cnt = 0;
|
||||
- __res_state *statp = (__res_state*)state;
|
||||
+ struct __res_state *statp = (struct __res_state*)state;
|
||||
for (int i = 0; i < MAXNS && cnt < nfd; i++) {
|
||||
if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
|
||||
fds[cnt++] = statp->_u._ext.nssocks[i];
|
||||
82
etc/patches/gcc-6.3.0-with-gcc-7
Normal file
82
etc/patches/gcc-6.3.0-with-gcc-7
Normal file
@ -0,0 +1,82 @@
|
||||
#
|
||||
# Patch for building older gcc versions with gcc-7
|
||||
#
|
||||
diff -u gcc-6.3.0/libgcc/config/i386/linux-unwind.h.orig gcc-6.3.0/libgcc/config/i386/linux-unwind.h
|
||||
--- gcc-6.3.0/libgcc/config/i386/linux-unwind.h.orig 2016-01-04 23:30:50.000000000 +0900
|
||||
+++ gcc-6.3.0/libgcc/config/i386/linux-unwind.h 2017-10-29 23:01:21.717240052 +0900
|
||||
@@ -58,7 +58,7 @@
|
||||
if (*(unsigned char *)(pc+0) == 0x48
|
||||
&& *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
|
||||
{
|
||||
- struct ucontext *uc_ = context->cfa;
|
||||
+ ucontext_t *uc_ = context->cfa;
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
The aliasing warning is correct, but should not be a problem
|
||||
because it does not alias anything. */
|
||||
@@ -138,7 +138,7 @@
|
||||
siginfo_t *pinfo;
|
||||
void *puc;
|
||||
siginfo_t info;
|
||||
- struct ucontext uc;
|
||||
+ ucontext_t uc;
|
||||
} *rt_ = context->cfa;
|
||||
/* The void * cast is necessary to avoid an aliasing warning.
|
||||
The aliasing warning is correct, but should not be a problem
|
||||
diff -u gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_linux.cc.orig gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_linux.cc
|
||||
--- gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_linux.cc.orig 2015-11-23 18:07:18.000000000 +0900
|
||||
+++ gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_linux.cc 2017-10-29 23:09:00.490577558 +0900
|
||||
@@ -546,8 +546,7 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
-uptr internal_sigaltstack(const struct sigaltstack *ss,
|
||||
- struct sigaltstack *oss) {
|
||||
+uptr internal_sigaltstack(const void *ss, void *oss) {
|
||||
return internal_syscall(SYSCALL(sigaltstack), (uptr)ss, (uptr)oss);
|
||||
}
|
||||
|
||||
diff -u gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_linux.h.orig gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_linux.h
|
||||
--- gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_linux.h.orig 2015-10-21 16:32:45.000000000 +0900
|
||||
+++ gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_linux.h 2017-10-29 23:09:43.907244619 +0900
|
||||
@@ -19,7 +19,6 @@
|
||||
#include "sanitizer_platform_limits_posix.h"
|
||||
|
||||
struct link_map; // Opaque type returned by dlopen().
|
||||
-struct sigaltstack;
|
||||
|
||||
namespace __sanitizer {
|
||||
// Dirent structure for getdents(). Note that this structure is different from
|
||||
@@ -28,8 +27,7 @@
|
||||
|
||||
// Syscall wrappers.
|
||||
uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
|
||||
-uptr internal_sigaltstack(const struct sigaltstack* ss,
|
||||
- struct sigaltstack* oss);
|
||||
+uptr internal_sigaltstack(const void* ss, void* oss);
|
||||
uptr internal_sigprocmask(int how, __sanitizer_sigset_t *set,
|
||||
__sanitizer_sigset_t *oldset);
|
||||
void internal_sigfillset(__sanitizer_sigset_t *set);
|
||||
diff -u gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc.orig gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
|
||||
--- gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc.orig 2015-10-21 16:32:45.000000000 +0900
|
||||
+++ gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc 2017-10-29 23:08:07.260577074 +0900
|
||||
@@ -267,7 +267,7 @@
|
||||
|
||||
// Alternate stack for signal handling.
|
||||
InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize);
|
||||
- struct sigaltstack handler_stack;
|
||||
+ stack_t handler_stack;
|
||||
internal_memset(&handler_stack, 0, sizeof(handler_stack));
|
||||
handler_stack.ss_sp = handler_stack_memory.data();
|
||||
handler_stack.ss_size = kHandlerStackSize;
|
||||
diff -u gcc-6.3.0/libsanitizer/tsan/tsan_platform_linux.cc.orig gcc-6.3.0/libsanitizer/tsan/tsan_platform_linux.cc
|
||||
--- gcc-6.3.0/libsanitizer/tsan/tsan_platform_linux.cc.orig 2016-08-12 17:53:46.000000000 +0900
|
||||
+++ gcc-6.3.0/libsanitizer/tsan/tsan_platform_linux.cc 2017-10-29 23:10:38.817245120 +0900
|
||||
@@ -291,7 +291,7 @@
|
||||
int ExtractResolvFDs(void *state, int *fds, int nfd) {
|
||||
#if SANITIZER_LINUX
|
||||
int cnt = 0;
|
||||
- __res_state *statp = (__res_state*)state;
|
||||
+ struct __res_state *statp = (struct __res_state*)state;
|
||||
for (int i = 0; i < MAXNS && cnt < nfd; i++) {
|
||||
if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
|
||||
fds[cnt++] = statp->_u._ext.nssocks[i];
|
||||
1
etc/patches/paraview-5.5.1
Symbolic link
1
etc/patches/paraview-5.5.1
Symbolic link
@ -0,0 +1 @@
|
||||
paraview-5.5.2
|
||||
780
etc/patches/paraview-5.5.2
Normal file
780
etc/patches/paraview-5.5.2
Normal file
@ -0,0 +1,780 @@
|
||||
--- ParaView-git/CMake/ParaViewMacros.cmake.orig 2018-07-22 17:38:33.933614131 +0200
|
||||
+++ ParaView-git/CMake/ParaViewMacros.cmake 2018-07-22 17:42:12.457612519 +0200
|
||||
@@ -353,8 +353,9 @@
|
||||
set(qt_binary_dir_hints "${Qt5_DIR}/../../../bin")
|
||||
endif()
|
||||
|
||||
+ # The qhelpgenerator program may be installed as qhelpgenerator-qt5
|
||||
find_program(QT_HELP_GENERATOR
|
||||
- qhelpgenerator
|
||||
+ NAMES qhelpgenerator qhelpgenerator-qt5
|
||||
HINTS "${qt_binary_dir_hints}"
|
||||
DOC "qhelpgenerator used to compile Qt help project files")
|
||||
mark_as_advanced(QT_HELP_GENERATOR)
|
||||
--- ParaView-v5.5.2/VTK/ThirdParty/hdf5/vtkhdf5/src/H5detect.c.orig 2018-06-15 21:09:45.000000000 +0200
|
||||
+++ ParaView-v5.5.2/VTK/ThirdParty/hdf5/vtkhdf5/src/H5detect.c 2018-07-07 13:20:40.641815285 +0200
|
||||
@@ -1360,8 +1360,8 @@
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
-static void
|
||||
-detect_C89_integers(void) HDF_NO_UBSAN
|
||||
+static void HDF_NO_UBSAN
|
||||
+detect_C89_integers(void)
|
||||
{
|
||||
DETECT_BYTE(signed char, SCHAR, d_g[nd_g]); nd_g++;
|
||||
DETECT_BYTE(unsigned char, UCHAR, d_g[nd_g]); nd_g++;
|
||||
@@ -1388,8 +1388,8 @@
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
-static void
|
||||
-detect_C89_floats(void) HDF_NO_UBSAN
|
||||
+static void HDF_NO_UBSAN
|
||||
+detect_C89_floats(void)
|
||||
{
|
||||
DETECT_F(float, FLOAT, d_g[nd_g]); nd_g++;
|
||||
DETECT_F(double, DOUBLE, d_g[nd_g]); nd_g++;
|
||||
@@ -1410,8 +1410,8 @@
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
-static void
|
||||
-detect_C99_integers8(void) HDF_NO_UBSAN
|
||||
+static void HDF_NO_UBSAN
|
||||
+detect_C99_integers8(void)
|
||||
{
|
||||
#if H5_SIZEOF_INT8_T>0
|
||||
#if H5_SIZEOF_INT8_T==1
|
||||
@@ -1472,8 +1472,8 @@
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
-static void
|
||||
-detect_C99_integers16(void) HDF_NO_UBSAN
|
||||
+static void HDF_NO_UBSAN
|
||||
+detect_C99_integers16(void)
|
||||
{
|
||||
#if H5_SIZEOF_INT16_T>0
|
||||
DETECT_I(int16_t, INT16, d_g[nd_g]); nd_g++;
|
||||
@@ -1510,8 +1510,8 @@
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
-static void
|
||||
-detect_C99_integers32(void) HDF_NO_UBSAN
|
||||
+static void HDF_NO_UBSAN
|
||||
+detect_C99_integers32(void)
|
||||
{
|
||||
#if H5_SIZEOF_INT32_T>0
|
||||
DETECT_I(int32_t, INT32, d_g[nd_g]); nd_g++;
|
||||
@@ -1548,8 +1548,8 @@
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
-static void
|
||||
-detect_C99_integers64(void) HDF_NO_UBSAN
|
||||
+static void HDF_NO_UBSAN
|
||||
+detect_C99_integers64(void)
|
||||
{
|
||||
#if H5_SIZEOF_INT64_T>0
|
||||
DETECT_I(int64_t, INT64, d_g[nd_g]); nd_g++;
|
||||
@@ -1599,8 +1599,8 @@
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
-static void
|
||||
-detect_C99_integers(void) HDF_NO_UBSAN
|
||||
+static void HDF_NO_UBSAN
|
||||
+detect_C99_integers(void)
|
||||
{
|
||||
/* break it down to more subroutines so that each module subroutine */
|
||||
/* is smaller and takes less time to compile with optimization on. */
|
||||
@@ -1625,8 +1625,8 @@
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
-static void
|
||||
-detect_C99_floats(void) HDF_NO_UBSAN
|
||||
+static void HDF_NO_UBSAN
|
||||
+detect_C99_floats(void)
|
||||
{
|
||||
#if H5_SIZEOF_DOUBLE == H5_SIZEOF_LONG_DOUBLE
|
||||
/*
|
||||
@@ -1656,8 +1656,8 @@
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
-static void
|
||||
-detect_alignments(void) HDF_NO_UBSAN
|
||||
+static void HDF_NO_UBSAN
|
||||
+detect_alignments(void)
|
||||
{
|
||||
/* Detect structure alignment for pointers, hvl_t, hobj_ref_t, hdset_reg_ref_t */
|
||||
DETECT_M(void *, POINTER, m_g[na_g]); na_g++;
|
||||
@@ -1744,8 +1744,8 @@
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
-int
|
||||
-main(void) HDF_NO_UBSAN
|
||||
+int HDF_NO_UBSAN
|
||||
+main(void)
|
||||
{
|
||||
|
||||
#if defined(H5_HAVE_SETSYSINFO) && defined(SSI_NVPAIRS)
|
||||
--- ParaView-v5.5.0/VTK/ThirdParty/vtkm/vtk-m/CMake/VTKmDetermineVersion.cmake.orig 2018-04-06 22:03:33.000000000 +0200
|
||||
+++ ParaView-v5.5.0/VTK/ThirdParty/vtkm/vtk-m/CMake/VTKmDetermineVersion.cmake 2018-04-23 12:00:23.708544206 +0200
|
||||
@@ -51,6 +51,8 @@
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_STRIP_TRAILING_WHITESPACE)
|
||||
+ else()
|
||||
+ set(output)
|
||||
endif()
|
||||
else()
|
||||
set(result 0)
|
||||
@@ -75,7 +77,7 @@
|
||||
|
||||
# Extracts components from a version string. See determine_version() for usage.
|
||||
function(extract_version_components version_string var_prefix)
|
||||
- string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)[-]*(.*)"
|
||||
+ string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)[-]*(.*)$"
|
||||
version_matches "${version_string}")
|
||||
if(CMAKE_MATCH_0)
|
||||
set(full ${CMAKE_MATCH_0})
|
||||
--- ParaView-v5.5.0/CoProcessing/Catalyst/vtkCPProcessor.cxx.orig 2018-04-06 22:03:33.000000000 +0200
|
||||
+++ ParaView-v5.5.0/CoProcessing/Catalyst/vtkCPProcessor.cxx 2018-05-11 12:02:26.894772713 +0200
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "vtkStringArray.h"
|
||||
|
||||
#include <list>
|
||||
+#include <vtksys/SystemTools.hxx>
|
||||
|
||||
struct vtkCPProcessorInternals
|
||||
{
|
||||
@@ -47,12 +48,13 @@
|
||||
};
|
||||
|
||||
vtkStandardNewMacro(vtkCPProcessor);
|
||||
-vtkMultiProcessController* vtkCPProcessor::Controller = NULL;
|
||||
+vtkMultiProcessController* vtkCPProcessor::Controller = nullptr;
|
||||
//----------------------------------------------------------------------------
|
||||
vtkCPProcessor::vtkCPProcessor()
|
||||
{
|
||||
this->Internal = new vtkCPProcessorInternals;
|
||||
- this->InitializationHelper = NULL;
|
||||
+ this->InitializationHelper = nullptr;
|
||||
+ this->WorkingDirectory = nullptr;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -61,14 +63,15 @@
|
||||
if (this->Internal)
|
||||
{
|
||||
delete this->Internal;
|
||||
- this->Internal = NULL;
|
||||
+ this->Internal = nullptr;
|
||||
}
|
||||
|
||||
if (this->InitializationHelper)
|
||||
{
|
||||
this->InitializationHelper->Delete();
|
||||
- this->InitializationHelper = NULL;
|
||||
+ this->InitializationHelper = nullptr;
|
||||
}
|
||||
+ this->SetWorkingDirectory(nullptr);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -95,7 +98,7 @@
|
||||
{
|
||||
if (which < 0 || which >= this->GetNumberOfPipelines())
|
||||
{
|
||||
- return NULL;
|
||||
+ return nullptr;
|
||||
}
|
||||
int counter = 0;
|
||||
vtkCPProcessorInternals::PipelineListIterator iter = this->Internal->Pipelines.begin();
|
||||
@@ -108,7 +111,7 @@
|
||||
counter++;
|
||||
iter++;
|
||||
}
|
||||
- return NULL;
|
||||
+ return nullptr;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -130,17 +133,41 @@
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
-int vtkCPProcessor::Initialize()
|
||||
+int vtkCPProcessor::Initialize(const char* workingDirectory)
|
||||
{
|
||||
- if (this->InitializationHelper == NULL)
|
||||
+ if (this->InitializationHelper == nullptr)
|
||||
{
|
||||
this->InitializationHelper = this->NewInitializationHelper();
|
||||
}
|
||||
+ // make sure the directory exists here so that we only do it once
|
||||
+ if (workingDirectory)
|
||||
+ {
|
||||
+ vtkMultiProcessController* controller = vtkMultiProcessController::GetGlobalController();
|
||||
+ int success = 1;
|
||||
+ if (controller == nullptr || controller->GetLocalProcessId() == 0)
|
||||
+ {
|
||||
+ success = vtksys::SystemTools::MakeDirectory(workingDirectory) == true ? 1 : 0;
|
||||
+ if (success == 0)
|
||||
+ {
|
||||
+ vtkWarningMacro("Could not make "
|
||||
+ << workingDirectory << " directory. "
|
||||
+ << "Results will be generated in current working directory instead.");
|
||||
+ }
|
||||
+ }
|
||||
+ if (controller)
|
||||
+ {
|
||||
+ controller->Broadcast(&success, 1, 0);
|
||||
+ }
|
||||
+ if (success)
|
||||
+ {
|
||||
+ this->SetWorkingDirectory(workingDirectory);
|
||||
+ }
|
||||
+ }
|
||||
return 1;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
-int vtkCPProcessor::Initialize(vtkMPICommunicatorOpaqueComm& comm)
|
||||
+int vtkCPProcessor::Initialize(vtkMPICommunicatorOpaqueComm& comm, const char* workingDirectory)
|
||||
{
|
||||
#ifdef PARAVIEW_USE_MPI
|
||||
if (vtkCPProcessor::Controller)
|
||||
@@ -148,7 +175,7 @@
|
||||
vtkErrorMacro("Can only initialize with a communicator once per process.");
|
||||
return 0;
|
||||
}
|
||||
- if (this->InitializationHelper == NULL)
|
||||
+ if (this->InitializationHelper == nullptr)
|
||||
{
|
||||
vtkMPICommunicator* communicator = vtkMPICommunicator::New();
|
||||
communicator->InitializeExternal(&comm);
|
||||
@@ -157,12 +184,12 @@
|
||||
this->Controller = controller;
|
||||
this->Controller->SetGlobalController(controller);
|
||||
communicator->Delete();
|
||||
- return this->Initialize();
|
||||
+ return this->Initialize(workingDirectory);
|
||||
}
|
||||
return 1;
|
||||
#else
|
||||
static_cast<void>(&comm); // get rid of variable not used warning
|
||||
- return this->Initialize();
|
||||
+ return this->Initialize(workingDirectory);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -225,6 +252,13 @@
|
||||
input->GetFieldData()->AddArray(catalystChannel);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ std::string originalWorkingDirectory;
|
||||
+ if (this->WorkingDirectory)
|
||||
+ {
|
||||
+ originalWorkingDirectory = vtksys::SystemTools::GetCurrentWorkingDirectory();
|
||||
+ vtksys::SystemTools::ChangeDirectory(this->WorkingDirectory);
|
||||
+ }
|
||||
for (vtkCPProcessorInternals::PipelineListIterator iter = this->Internal->Pipelines.begin();
|
||||
iter != this->Internal->Pipelines.end(); iter++)
|
||||
{
|
||||
@@ -248,6 +282,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
+ if (originalWorkingDirectory.empty() == false)
|
||||
+ {
|
||||
+ vtksys::SystemTools::ChangeDirectory(originalWorkingDirectory);
|
||||
+ }
|
||||
// we want to reset everything here to make sure that new information
|
||||
// is properly passed in the next time.
|
||||
dataDescription->ResetAll();
|
||||
@@ -259,7 +297,7 @@
|
||||
{
|
||||
if (this->Controller)
|
||||
{
|
||||
- this->Controller->SetGlobalController(NULL);
|
||||
+ this->Controller->SetGlobalController(nullptr);
|
||||
this->Controller->Finalize(1);
|
||||
this->Controller->Delete();
|
||||
}
|
||||
--- ParaView-v5.5.0/CoProcessing/Catalyst/vtkCPProcessor.h.orig 2018-04-06 22:03:33.000000000 +0200
|
||||
+++ ParaView-v5.5.0/CoProcessing/Catalyst/vtkCPProcessor.h 2018-05-11 12:02:26.894772713 +0200
|
||||
@@ -76,14 +76,16 @@
|
||||
virtual void RemoveAllPipelines();
|
||||
|
||||
/// Initialize the co-processor. Returns 1 if successful and 0
|
||||
- /// otherwise.
|
||||
/// otherwise. If Catalyst is built with MPI then Initialize()
|
||||
/// can also be called with a specific MPI communicator if
|
||||
/// MPI_COMM_WORLD isn't the proper one. Catalyst is initialized
|
||||
- /// to use MPI_COMM_WORLD by default.
|
||||
- virtual int Initialize();
|
||||
+ /// to use MPI_COMM_WORLD by default. Both methods have an optional
|
||||
+ /// workingDirectory argument which will set *WorkingDirectory* so
|
||||
+ /// that files will be put relative to this directory.
|
||||
+ virtual int Initialize(const char* workingDirectory = nullptr);
|
||||
#ifndef __WRAP__
|
||||
- virtual int Initialize(vtkMPICommunicatorOpaqueComm& comm);
|
||||
+ virtual int Initialize(
|
||||
+ vtkMPICommunicatorOpaqueComm& comm, const char* workingDirectory = nullptr);
|
||||
#endif
|
||||
|
||||
/// The Catalyst input field data string array name. This array will
|
||||
@@ -111,6 +113,13 @@
|
||||
/// implementation an opportunity to clean up, before it is destroyed.
|
||||
virtual int Finalize();
|
||||
|
||||
+ /// Get the current working directory for outputting Catalyst files.
|
||||
+ /// If not set then Catalyst output files will be relative to the
|
||||
+ /// current working directory. This will not affect where Catalyst
|
||||
+ /// looks for Python scripts. *WorkingDirectory* gets set through
|
||||
+ /// the *Initialize()* methods.
|
||||
+ vtkGetStringMacro(WorkingDirectory);
|
||||
+
|
||||
protected:
|
||||
vtkCPProcessor();
|
||||
virtual ~vtkCPProcessor();
|
||||
@@ -118,6 +127,11 @@
|
||||
/// Create a new instance of the InitializationHelper.
|
||||
virtual vtkObject* NewInitializationHelper();
|
||||
|
||||
+ /// Set the current working directory for outputting Catalyst files.
|
||||
+ /// This is a protected method since simulation code adaptors should
|
||||
+ /// set this through the *Initialize()* methods.
|
||||
+ vtkSetStringMacro(WorkingDirectory);
|
||||
+
|
||||
private:
|
||||
vtkCPProcessor(const vtkCPProcessor&) = delete;
|
||||
void operator=(const vtkCPProcessor&) = delete;
|
||||
@@ -125,6 +139,7 @@
|
||||
vtkCPProcessorInternals* Internal;
|
||||
vtkObject* InitializationHelper;
|
||||
static vtkMultiProcessController* Controller;
|
||||
+ char* WorkingDirectory;
|
||||
};
|
||||
|
||||
#endif
|
||||
--- ParaView-v5.5.0/CoProcessing/Catalyst/vtkCPXMLPWriterPipeline.cxx.orig 2018-04-06 22:03:33.000000000 +0200
|
||||
+++ ParaView-v5.5.0/CoProcessing/Catalyst/vtkCPXMLPWriterPipeline.cxx 2018-05-11 12:02:26.894772713 +0200
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <vtkSmartPointer.h>
|
||||
#include <vtkUnstructuredGrid.h>
|
||||
|
||||
+#include <algorithm>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
@@ -174,7 +175,7 @@
|
||||
|
||||
for (unsigned int i = 0; i < dataDescription->GetNumberOfInputDescriptions(); i++)
|
||||
{
|
||||
- const char* inputName = dataDescription->GetInputDescriptionName(i);
|
||||
+ std::string inputName = dataDescription->GetInputDescriptionName(i);
|
||||
vtkCPInputDataDescription* idd = dataDescription->GetInputDescription(i);
|
||||
vtkDataObject* grid = idd->GetGrid();
|
||||
if (grid == nullptr)
|
||||
@@ -206,6 +207,8 @@
|
||||
vtkSMStringVectorProperty* fileName =
|
||||
vtkSMStringVectorProperty::SafeDownCast(writer->GetProperty("FileName"));
|
||||
|
||||
+ // If we have a / in the channel name we take it out of the filename we're going to write to
|
||||
+ inputName.erase(std::remove(inputName.begin(), inputName.end(), '/'), inputName.end());
|
||||
std::ostringstream o;
|
||||
if (this->Path.empty() == false)
|
||||
{
|
||||
--- ParaView-v5.5.0/Wrapping/Python/paraview/coprocessing.py.orig 2018-04-06 22:03:33.000000000 +0200
|
||||
+++ ParaView-v5.5.0/Wrapping/Python/paraview/coprocessing.py 2018-05-11 12:02:27.038772408 +0200
|
||||
@@ -11,22 +11,12 @@
|
||||
from paraview.vtk.vtkPVVTKExtensionsCore import *
|
||||
import math
|
||||
|
||||
-# -----------------------------------------------------------------------------
|
||||
-def IsInModulo(timestep, frequencyArray):
|
||||
- """
|
||||
- Return True if the given timestep is in one of the provided frequency.
|
||||
- This can be interpreted as follow::
|
||||
-
|
||||
- isFM = IsInModulo(timestep, [2,3,7])
|
||||
-
|
||||
- is similar to::
|
||||
+# If the user created a filename in a location that doesn't exist by default we'll
|
||||
+# make the directory for them. This can be changed though by setting createDirectoriesIfNeeded
|
||||
+# to False.
|
||||
+createDirectoriesIfNeeded = True
|
||||
|
||||
- isFM = (timestep % 2 == 0) or (timestep % 3 == 0) or (timestep % 7 == 0)
|
||||
- """
|
||||
- for frequency in frequencyArray:
|
||||
- if frequency > 0 and (timestep % frequency == 0):
|
||||
- return True
|
||||
- return False
|
||||
+# -----------------------------------------------------------------------------
|
||||
|
||||
class CoProcessor(object):
|
||||
"""Base class for co-processing Pipelines.
|
||||
@@ -68,6 +58,9 @@
|
||||
self.__CinemaTracks = {}
|
||||
self.__InitialFrequencies = {}
|
||||
self.__PrintEnsightFormatString = False
|
||||
+ self.__TimeStepToStartOutputAt=0
|
||||
+ self.__ForceOutputAtFirstCall=False
|
||||
+ self.__FirstTimeStepIndex = None
|
||||
|
||||
def SetPrintEnsightFormatString(self, enable):
|
||||
"""If outputting ExodusII files with the purpose of reading them into
|
||||
@@ -87,6 +80,17 @@
|
||||
"Incorrect argument type: %s, must be a dict" % type(frequencies))
|
||||
self.__InitialFrequencies = frequencies
|
||||
|
||||
+ def SetInitialOutputOptions(self, timeStepToStartOutputAt, forceOutputAtFirstCall):
|
||||
+ """Set the frequencies at which the pipeline needs to be updated.
|
||||
+ Typically, this is called by the subclass once it has determined what
|
||||
+ timesteps co-processing will be needed to be done.
|
||||
+ frequencies is a map, with key->string name of for the simulation
|
||||
+ input, and value is a list of frequencies.
|
||||
+ """
|
||||
+
|
||||
+ self.__TimeStepToStartOutputAt=timeStepToStartOutputAt
|
||||
+ self.__ForceOutputAtFirstCall=forceOutputAtFirstCall
|
||||
+
|
||||
def EnableLiveVisualization(self, enable, frequency = 1):
|
||||
"""Call this method to enable live-visualization. When enabled,
|
||||
DoLiveVisualization() will communicate with ParaView server if possible
|
||||
@@ -115,7 +119,7 @@
|
||||
# if this is a time step to do live then all of the inputs
|
||||
# must be made available. note that we want the pipeline built
|
||||
# before we do the actual first live connection.
|
||||
- if self.__EnableLiveVisualization and timestep % self.__LiveVisualizationFrequency == 0 \
|
||||
+ if self.__EnableLiveVisualization and self.NeedToOutput(timestep, self.__LiveVisualizationFrequency) \
|
||||
and self.__LiveVisualizationLink:
|
||||
if self.__LiveVisualizationLink.Initialize(servermanager.ActiveConnection.Session.GetSessionProxyManager()):
|
||||
num_inputs = datadescription.GetNumberOfInputDescriptions()
|
||||
@@ -132,13 +136,13 @@
|
||||
# hasn't been set up yet). If we don't have live enabled
|
||||
# we know that the output frequencies aren't changed and can
|
||||
# just use the initial frequencies.
|
||||
- if self.__InitialFrequencies or not self.__EnableLiveVisualization:
|
||||
+ if self.__ForceOutputAtFirstCall or self.__InitialFrequencies or not self.__EnableLiveVisualization:
|
||||
num_inputs = datadescription.GetNumberOfInputDescriptions()
|
||||
for cc in range(num_inputs):
|
||||
input_name = datadescription.GetInputDescriptionName(cc)
|
||||
|
||||
freqs = self.__InitialFrequencies.get(input_name, [])
|
||||
- if self.__EnableLiveVisualization or ( self and IsInModulo(timestep, freqs) ):
|
||||
+ if self.__EnableLiveVisualization or ( self and self.IsInModulo(timestep, freqs) ):
|
||||
datadescription.GetInputDescription(cc).AllFieldsOn()
|
||||
datadescription.GetInputDescription(cc).GenerateMeshOn()
|
||||
else:
|
||||
@@ -149,15 +153,14 @@
|
||||
for writer in self.__WritersList:
|
||||
frequency = writer.parameters.GetProperty(
|
||||
"WriteFrequency").GetElement(0)
|
||||
- if (timestep % frequency) == 0 or \
|
||||
- datadescription.GetForceOutput() == True:
|
||||
+ if self.NeedToOutput(timestep, frequency) or datadescription.GetForceOutput() == True:
|
||||
writerinputs = cpstate.locate_simulation_inputs(writer)
|
||||
for writerinput in writerinputs:
|
||||
datadescription.GetInputDescriptionByName(writerinput).AllFieldsOn()
|
||||
datadescription.GetInputDescriptionByName(writerinput).GenerateMeshOn()
|
||||
|
||||
for view in self.__ViewsList:
|
||||
- if (view.cpFrequency and timestep % view.cpFrequency == 0) or \
|
||||
+ if (view.cpFrequency and self.NeedToOutput(timestep, view.cpFrequency)) or \
|
||||
datadescription.GetForceOutput() == True:
|
||||
viewinputs = cpstate.locate_simulation_inputs_for_view(view)
|
||||
for viewinput in viewinputs:
|
||||
@@ -192,8 +195,7 @@
|
||||
for writer in self.__WritersList:
|
||||
frequency = writer.parameters.GetProperty(
|
||||
"WriteFrequency").GetElement(0)
|
||||
- if (timestep % frequency) == 0 or \
|
||||
- datadescription.GetForceOutput() == True:
|
||||
+ if self.NeedToOutput(timestep, frequency) or datadescription.GetForceOutput() == True:
|
||||
fileName = writer.parameters.GetProperty("FileName").GetElement(0)
|
||||
paddingamount = writer.parameters.GetProperty("PaddingAmount").GetElement(0)
|
||||
helperName = writer.GetXMLName()
|
||||
@@ -203,6 +205,23 @@
|
||||
else:
|
||||
ts = str(timestep).rjust(paddingamount, '0')
|
||||
writer.FileName = fileName.replace("%t", ts)
|
||||
+ if '/' in writer.FileName and createDirectoriesIfNeeded:
|
||||
+ oktowrite = [1.]
|
||||
+ import vtk
|
||||
+ comm = vtk.vtkMultiProcessController.GetGlobalController()
|
||||
+ if comm.GetLocalProcessId() == 0:
|
||||
+ import os
|
||||
+ newDir = writer.FileName[0:writer.FileName.rfind('/')]
|
||||
+ try:
|
||||
+ os.makedirs(newDir)
|
||||
+ except OSError:
|
||||
+ if not os.path.isdir(newDir):
|
||||
+ print ("ERROR: Cannot make directory for", writer.FileName, ". No data will be written.")
|
||||
+ oktowrite[0] = 0.
|
||||
+ comm.Broadcast(oktowrite, 1, 0)
|
||||
+ if oktowrite[0] == 0:
|
||||
+ # we can't make the directory so no reason to update the pipeline
|
||||
+ return
|
||||
writer.UpdatePipeline(datadescription.GetTime())
|
||||
|
||||
def WriteImages(self, datadescription, rescale_lookuptable=False,
|
||||
@@ -240,7 +259,7 @@
|
||||
|
||||
cinema_dirs = []
|
||||
for view in self.__ViewsList:
|
||||
- if (view.cpFrequency and timestep % view.cpFrequency == 0) or \
|
||||
+ if (view.cpFrequency and self.NeedToOutput(timestep, view.cpFrequency)) or \
|
||||
datadescription.GetForceOutput() == True:
|
||||
fname = view.cpFileName
|
||||
ts = str(timestep).rjust(padding_amount, '0')
|
||||
@@ -267,6 +286,24 @@
|
||||
if dirname:
|
||||
cinema_dirs.append(dirname)
|
||||
else:
|
||||
+ if '/' in fname and createDirectoriesIfNeeded:
|
||||
+ oktowrite = [1.]
|
||||
+ import vtk
|
||||
+ comm = vtk.vtkMultiProcessController.GetGlobalController()
|
||||
+ if comm.GetLocalProcessId() == 0:
|
||||
+ import os
|
||||
+ newDir = fname[0:fname.rfind('/')]
|
||||
+ try:
|
||||
+ os.makedirs(newDir)
|
||||
+ except OSError:
|
||||
+ if not os.path.isdir(newDir):
|
||||
+ print ("ERROR: Cannot make directory for", fname, ". No image will be output.")
|
||||
+ oktowrite[0] = 0.
|
||||
+ comm.Broadcast(oktowrite, 1, 0)
|
||||
+ if oktowrite[0] == 0:
|
||||
+ # we can't make the directory so no reason to update the pipeline
|
||||
+ return
|
||||
+
|
||||
if image_quality is None and fname.endswith('png'):
|
||||
# for png quality = 0 means no compression. compression can be a potentially
|
||||
# very costly serial operation on process 0
|
||||
@@ -307,7 +344,7 @@
|
||||
|
||||
|
||||
timeStep = datadescription.GetTimeStep()
|
||||
- if self.__EnableLiveVisualization and timeStep % self.__LiveVisualizationFrequency == 0:
|
||||
+ if self.__EnableLiveVisualization and self.NeedToOutput(timeStep, self.__LiveVisualizationFrequency):
|
||||
if not self.__LiveVisualizationLink.Initialize(servermanager.ActiveConnection.Session.GetSessionProxyManager()):
|
||||
return
|
||||
|
||||
@@ -412,7 +449,7 @@
|
||||
"""
|
||||
controller = servermanager.ParaViewPipelineController()
|
||||
# assume that a client only proxy with the same name as a writer
|
||||
- # is available in "insitu_writer_paramters"
|
||||
+ # is available in "insitu_writer_parameters"
|
||||
|
||||
# Since coprocessor sometimes pass writer as a custom object and not
|
||||
# a proxy, we need to handle that. Just creating any arbitrary writer
|
||||
@@ -666,3 +703,42 @@
|
||||
#restore what we showed
|
||||
pv_introspect.restore_visibility(pxystate)
|
||||
return os.path.basename(vfname)
|
||||
+
|
||||
+ def IsInModulo(self, timestep, frequencies):
|
||||
+ """
|
||||
+ Return True if the given timestep is in one of the provided frequency.
|
||||
+ This can be interpreted as follow::
|
||||
+
|
||||
+ isFM = IsInModulo(timestep-timeStepToStartOutputAt, [2,3,7])
|
||||
+
|
||||
+ is similar to::
|
||||
+
|
||||
+ isFM = (timestep-timeStepToStartOutputAt % 2 == 0) or (timestep-timeStepToStartOutputAt % 3 == 0) or (timestep-timeStepToStartOutputAt % 7 == 0)
|
||||
+
|
||||
+ The timeStepToStartOutputAt is the first timestep that will potentially be output.
|
||||
+ """
|
||||
+ if timestep < self.__TimeStepToStartOutputAt and not self.__ForceOutputAtFirstCall:
|
||||
+ return False
|
||||
+ for frequency in frequencies:
|
||||
+ if frequency > 0 and self.NeedToOutput(timestep, frequency):
|
||||
+ return True
|
||||
+
|
||||
+ return False
|
||||
+
|
||||
+
|
||||
+ def NeedToOutput(self, timestep, frequency):
|
||||
+ """
|
||||
+ Return True if we need to output based on the input timestep and frequency. Checks based
|
||||
+ __FirstTimeStepIndex, __FirstTimeStepIndex, __ForceOutputAtFirstCall and __TimeStepToStartOutputAt
|
||||
+ member variables.
|
||||
+ """
|
||||
+ if self.__FirstTimeStepIndex == None:
|
||||
+ self.__FirstTimeStepIndex = timestep
|
||||
+
|
||||
+ if self.__ForceOutputAtFirstCall and self.__FirstTimeStepIndex == timestep:
|
||||
+ return True
|
||||
+
|
||||
+ if self.__TimeStepToStartOutputAt <= timestep and (timestep-self.__TimeStepToStartOutputAt) % frequency == 0:
|
||||
+ return True
|
||||
+
|
||||
+ return False
|
||||
--- ParaView-v5.5.1/ParaViewCore/ServerManager/SMApplication/Resources/readers.xml.orig 2018-06-01 21:23:15.000000000 +0200
|
||||
+++ ParaView-v5.5.1/ParaViewCore/ServerManager/SMApplication/Resources/readers.xml 2018-06-19 20:50:55.128914062 +0200
|
||||
@@ -3769,7 +3769,7 @@
|
||||
<Documentation>Available timestep values.</Documentation>
|
||||
</DoubleVectorProperty>
|
||||
<Hints>
|
||||
- <ReaderFactory extensions="vtm vtmb"
|
||||
+ <ReaderFactory extensions="vtm vtm.series vtmb vtmb.series"
|
||||
file_description="VTK MultiBlock Data Files" />
|
||||
</Hints>
|
||||
<!-- end of XMLMultiBlockDataReader -->
|
||||
@@ -3824,7 +3824,7 @@
|
||||
<Documentation>Available timestep values.</Documentation>
|
||||
</DoubleVectorProperty>
|
||||
<Hints>
|
||||
- <ReaderFactory extensions="vthb vth"
|
||||
+ <ReaderFactory extensions="vthb vthb.series vth vth.series"
|
||||
file_description="VTK Hierarchical Box Data Files" />
|
||||
</Hints>
|
||||
<!-- end of XMLUniformGridAMRReader -->
|
||||
@@ -3933,7 +3933,7 @@
|
||||
<Documentation>Available timestep values.</Documentation>
|
||||
</DoubleVectorProperty>
|
||||
<Hints>
|
||||
- <ReaderFactory extensions="vtp"
|
||||
+ <ReaderFactory extensions="vtp vtp.series"
|
||||
file_description="VTK PolyData Files" />
|
||||
</Hints>
|
||||
</SourceProxy>
|
||||
@@ -3990,7 +3990,7 @@
|
||||
<Documentation>Available timestep values.</Documentation>
|
||||
</DoubleVectorProperty>
|
||||
<Hints>
|
||||
- <ReaderFactory extensions="vtt"
|
||||
+ <ReaderFactory extensions="vtt vtt.series"
|
||||
file_description="VTK Table Files" />
|
||||
</Hints>
|
||||
</SourceProxy>
|
||||
@@ -4050,7 +4050,7 @@
|
||||
<Documentation>Available timestep values.</Documentation>
|
||||
</DoubleVectorProperty>
|
||||
<Hints>
|
||||
- <ReaderFactory extensions="vtu"
|
||||
+ <ReaderFactory extensions="vtu vtu.series"
|
||||
file_description="VTK UnstructuredGrid Files" />
|
||||
</Hints>
|
||||
</SourceProxy>
|
||||
@@ -4108,7 +4108,7 @@
|
||||
<Documentation>Available timestep values.</Documentation>
|
||||
</DoubleVectorProperty>
|
||||
<Hints>
|
||||
- <ReaderFactory extensions="vti"
|
||||
+ <ReaderFactory extensions="vti vti.series"
|
||||
file_description="VTK ImageData Files" />
|
||||
</Hints>
|
||||
</SourceProxy>
|
||||
@@ -4166,7 +4166,7 @@
|
||||
<Documentation>Available timestep values.</Documentation>
|
||||
</DoubleVectorProperty>
|
||||
<Hints>
|
||||
- <ReaderFactory extensions="vts"
|
||||
+ <ReaderFactory extensions="vts vts.series"
|
||||
file_description="VTK StructuredGrid Files" />
|
||||
</Hints>
|
||||
</SourceProxy>
|
||||
@@ -4224,7 +4224,7 @@
|
||||
<Documentation>Available timestep values.</Documentation>
|
||||
</DoubleVectorProperty>
|
||||
<Hints>
|
||||
- <ReaderFactory extensions="vtr"
|
||||
+ <ReaderFactory extensions="vtr vtr.series"
|
||||
file_description="VTK RectilinearGrid Files" />
|
||||
</Hints>
|
||||
</SourceProxy>
|
||||
@@ -4284,7 +4284,7 @@
|
||||
<Documentation>Available timestep values.</Documentation>
|
||||
</DoubleVectorProperty>
|
||||
<Hints>
|
||||
- <ReaderFactory extensions="pvtp"
|
||||
+ <ReaderFactory extensions="pvtp pvtp.series"
|
||||
file_description="VTK PolyData Files (partitioned)" />
|
||||
</Hints>
|
||||
</SourceProxy>
|
||||
@@ -4346,7 +4346,7 @@
|
||||
<Documentation>Available timestep values.</Documentation>
|
||||
</DoubleVectorProperty>
|
||||
<Hints>
|
||||
- <ReaderFactory extensions="pvtu"
|
||||
+ <ReaderFactory extensions="pvtu pvtu.series"
|
||||
file_description="VTK UnstructuredGrid Files (partitioned)" />
|
||||
</Hints>
|
||||
</SourceProxy>
|
||||
@@ -4406,7 +4406,7 @@
|
||||
<Documentation>Available timestep values.</Documentation>
|
||||
</DoubleVectorProperty>
|
||||
<Hints>
|
||||
- <ReaderFactory extensions="pvtt"
|
||||
+ <ReaderFactory extensions="pvtt pvtt.series"
|
||||
file_description="VTK Table (partitioned)" />
|
||||
</Hints>
|
||||
</SourceProxy>
|
||||
@@ -4467,7 +4467,7 @@
|
||||
<Documentation>Available timestep values.</Documentation>
|
||||
</DoubleVectorProperty>
|
||||
<Hints>
|
||||
- <ReaderFactory extensions="pvti"
|
||||
+ <ReaderFactory extensions="pvti pvti.series"
|
||||
file_description="VTK ImageData Files (partitioned)" />
|
||||
</Hints>
|
||||
</SourceProxy>
|
||||
@@ -4529,7 +4529,7 @@
|
||||
<Documentation>Available timestep values.</Documentation>
|
||||
</DoubleVectorProperty>
|
||||
<Hints>
|
||||
- <ReaderFactory extensions="pvts"
|
||||
+ <ReaderFactory extensions="pvts pvts.series"
|
||||
file_description="VTK StructuredGrid Files (partitioned)" />
|
||||
</Hints>
|
||||
</SourceProxy>
|
||||
@@ -4591,7 +4591,7 @@
|
||||
<Documentation>Available timestep values.</Documentation>
|
||||
</DoubleVectorProperty>
|
||||
<Hints>
|
||||
- <ReaderFactory extensions="pvtr"
|
||||
+ <ReaderFactory extensions="pvtr pvtr.series"
|
||||
file_description="VTK RectilinearGrid Files (partitioned)" />
|
||||
</Hints>
|
||||
</SourceProxy>
|
||||
@@ -4702,7 +4702,7 @@
|
||||
Partitioned Legacy VTK reader.</Documentation>
|
||||
</StringVectorProperty>
|
||||
<Hints>
|
||||
- <ReaderFactory extensions="pvtk"
|
||||
+ <ReaderFactory extensions="pvtk pvtk.series"
|
||||
file_description="Legacy VTK Files (partitioned)" />
|
||||
</Hints>
|
||||
<!-- End pvtkfile -->
|
||||
@@ -5102,7 +5102,7 @@
|
||||
<Documentation>Available timestep values.</Documentation>
|
||||
</DoubleVectorProperty>
|
||||
<Hints>
|
||||
- <ReaderFactory extensions="ply"
|
||||
+ <ReaderFactory extensions="ply ply.series"
|
||||
file_description="PLY Polygonal File Format" />
|
||||
</Hints>
|
||||
</SourceProxy>
|
||||
@@ -5230,7 +5230,7 @@
|
||||
<Documentation>Available timestep values.</Documentation>
|
||||
</DoubleVectorProperty>
|
||||
<Hints>
|
||||
- <ReaderFactory extensions="stl"
|
||||
+ <ReaderFactory extensions="stl stl.series"
|
||||
file_description="Stereo Lithography" />
|
||||
</Hints>
|
||||
<!-- End stlreader-->
|
||||
48
etc/patches/scotch_6.0.6
Normal file
48
etc/patches/scotch_6.0.6
Normal file
@ -0,0 +1,48 @@
|
||||
--- scotch_6.0.6/src/libscotch/Makefile.orig 2019-04-29 14:59:53.957103493 +0200
|
||||
+++ scotch_6.0.6/src/libscotch/Makefile 2019-04-29 18:50:42.560080675 +0200
|
||||
@@ -51,6 +51,12 @@
|
||||
|
||||
.PHONY : ptscotch scotch ptinstall install clean realclean
|
||||
|
||||
+ifeq ($(WM_OSTYPE),MSwindows)
|
||||
+
|
||||
+libscotch : libscotch$(LIB) scotch.h
|
||||
+
|
||||
+endif
|
||||
+
|
||||
scotch :
|
||||
$(MAKE) CC="$(CCS)" CCD="$(CCS)" \
|
||||
scotch.h \
|
||||
@@ -438,6 +444,11 @@
|
||||
wgraph_part_zr$(OBJ) \
|
||||
wgraph_store$(OBJ)
|
||||
|
||||
+ifeq ($(WM_OSTYPE),MSwindows)
|
||||
+## Add into libscotch instead of having a separate library
|
||||
+LIBSCOTCHDEPS += library_error_exit$(OBJ)
|
||||
+endif
|
||||
+
|
||||
##
|
||||
## Todo list.
|
||||
##
|
||||
--- scotch_6.0.6/src/Makefile.orig 2018-07-14 17:24:49.000000000 +0200
|
||||
+++ scotch_6.0.6/src/Makefile 2019-04-29 18:39:16.365132864 +0200
|
||||
@@ -89,9 +89,18 @@
|
||||
$(mandir)/man1 : $(mandir)
|
||||
-$(MKDIR) $(mandir)/man1
|
||||
|
||||
+ifeq ($(WM_OSTYPE),MSwindows)
|
||||
+
|
||||
+libscotch : required
|
||||
+ (cd libscotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) libscotch && $(MAKE) install)
|
||||
+
|
||||
+else
|
||||
+
|
||||
libscotch : required
|
||||
(cd libscotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install)
|
||||
|
||||
+endif
|
||||
+
|
||||
scotch : libscotch
|
||||
(cd scotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install)
|
||||
(cd libscotchmetis ; $(MAKE) scotch && $(MAKE) install)
|
||||
@ -3,8 +3,10 @@
|
||||
# ========= |
|
||||
# \\ / 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 | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# | Copyright (C) 2011 OpenFOAM Foundation
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
|
||||
45
etc/testThirdPartyFunctions
Executable file
45
etc/testThirdPartyFunctions
Executable file
@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
#------------------------------------------------------------------------------
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# 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 ========================================
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -2,8 +2,10 @@
|
||||
# ========= |
|
||||
# \\ / 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 | Copyright (C) 2016-2018 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
@ -137,7 +139,7 @@ addVerbosity()
|
||||
|
||||
|
||||
#
|
||||
# Define options for mpi support
|
||||
# MPI support for PARAVIEW
|
||||
#
|
||||
addMpiSupport()
|
||||
{
|
||||
@ -146,7 +148,7 @@ addMpiSupport()
|
||||
return
|
||||
fi
|
||||
|
||||
addCMakeVariable "PARAVIEW_USE_MPI=ON" "VTK_USE_MPI=ON"
|
||||
addCMakeVariable "PARAVIEW_USE_MPI=ON"
|
||||
if [ "${MPI_MAX_PROCS:=0}" -gt 1 ]
|
||||
then
|
||||
addCMakeVariable "VTK_MPI_MAX_NUMPROCS=$MPI_MAX_PROCS"
|
||||
@ -304,7 +306,7 @@ addQtSupport()
|
||||
local qmake qtLib
|
||||
|
||||
# Check qmake can be found and handle version differences
|
||||
qmake=$(findQtMake)
|
||||
qmake=$(findQMake)
|
||||
if QT_VERSION=$($qmake -query QT_VERSION 2>/dev/null)
|
||||
then
|
||||
addCMakeVariable "PARAVIEW_BUILD_QT_GUI=ON"
|
||||
@ -450,7 +452,7 @@ installParaView()
|
||||
|
||||
# System or non-system installation of QT?
|
||||
local qmake qtLib QT_VERSION
|
||||
if qmake=$(findQtMake 2>/dev/null)
|
||||
if qmake=$(findQMake 2>/dev/null)
|
||||
then
|
||||
qtLib=$($qmake -query QT_INSTALL_LIBS)
|
||||
QT_VERSION=$($qmake -query QT_VERSION 2>/dev/null)
|
||||
@ -467,11 +469,13 @@ You may need to update the OpenFOAM environment by running:
|
||||
INFO
|
||||
|
||||
# Non-system installation of QT?
|
||||
if [ "$qmake" != /usr/bin/qmake -a -d "$qtLib" ]
|
||||
case "$qtLib" in (/usr/lib | /usr/lib64) unset qtLib ;; esac
|
||||
|
||||
if [ "${qmake%/*}" != /usr/bin -a -d "$qtLib" ]
|
||||
then
|
||||
/bin/cat<<INFO
|
||||
|
||||
And adjust your LD_LIBRARY_PATH to include the following:
|
||||
Your LD_LIBRARY_PATH may require adjustment to include the following:
|
||||
$qtLib
|
||||
INFO
|
||||
fi
|
||||
|
||||
@ -2,8 +2,10 @@
|
||||
# ========= |
|
||||
# \\ / 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 | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# | Copyright (C) 2011 OpenFOAM Foundation
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
|
||||
@ -2,8 +2,10 @@
|
||||
# ========= |
|
||||
# \\ / 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 | Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
@ -17,19 +19,103 @@
|
||||
#
|
||||
# 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
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# The normal locations for source, build and installation (prefix-dir)
|
||||
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
|
||||
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"
|
||||
|
||||
# Synthetic value combining precision and label size (Eg, DPInt32)
|
||||
WM_SIZE_OPTIONS="${WM_PRECISION_OPTION}Int${WM_LABEL_SIZE}"
|
||||
|
||||
# Dynamic library ending (default is .so)
|
||||
EXT_SO="$(wmake -show-ext-so 2>/dev/null)"
|
||||
if [ -z "$EXT_SO" ]
|
||||
then
|
||||
[ "$(uname -s)" = Darwin ] && EXT_SO=.dylib || EXT_SO=.so
|
||||
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
|
||||
#------------------------------------------------------------------------------
|
||||
# Force use of gcc/g++
|
||||
# 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)
|
||||
exportCompiler()
|
||||
{
|
||||
local comp flag
|
||||
|
||||
# C compiler and flags
|
||||
comp="$(wmake -show-c 2>/dev/null)" && \
|
||||
flag="$(wmake -show-cflags 2>/dev/null)" || {
|
||||
comp="$WM_CC"
|
||||
flag="$WM_CFLAGS"
|
||||
}
|
||||
|
||||
if test -n "$comp" && command -v "$comp" >/dev/null
|
||||
then
|
||||
export CC="$comp"
|
||||
if [ -n "$flag" ]
|
||||
then
|
||||
export CFLAGS="$flag"
|
||||
fi
|
||||
fi
|
||||
|
||||
# C++ compiler and flags
|
||||
comp="$(wmake -show-cxx 2>/dev/null)" && \
|
||||
flag="$(wmake -show-cxxflags 2>/dev/null)" || {
|
||||
comp="$WM_CXX"
|
||||
flag="$WM_CXXFLAGS"
|
||||
}
|
||||
|
||||
if test -n "$comp" && command -v "$comp" >/dev/null
|
||||
then
|
||||
export CXX="$comp"
|
||||
if [ -n "$flag" ]
|
||||
then
|
||||
export CXXFLAGS="$flag"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Export linker settings for CMake/configure
|
||||
exportLinker()
|
||||
{
|
||||
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="$flag"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# Force use of gcc/g++, but the values of CFLAGS, CXXFLAGS may be incorrect
|
||||
useGcc()
|
||||
{
|
||||
export CC=gcc # Use gcc/g++
|
||||
export CC=gcc
|
||||
export CXX=g++
|
||||
}
|
||||
|
||||
@ -46,38 +132,125 @@ useGccFlag()
|
||||
done
|
||||
}
|
||||
|
||||
# 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 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
|
||||
# NOTE: could further refine based on "wmake -show-c", but not yet needed
|
||||
whichMpicc()
|
||||
{
|
||||
local mpicc=$(command -v mpicc)
|
||||
local comp="$(command -v mpicc)"
|
||||
case "$WM_MPLIB" in
|
||||
(INTELMPI)
|
||||
mpicc=$(command -v mpiicc) # Intel <mpiicc> available?
|
||||
comp="$(command -v mpiicc)" # Intel <mpiicc> available?
|
||||
;;
|
||||
(CRAY-MPI*)
|
||||
: ${mpicc:=cc} # Cray <cc> if there is no <mpicc>
|
||||
: "${comp:=cc}" # Cray <cc> if there is no <mpicc>
|
||||
;;
|
||||
esac
|
||||
echo "${mpicc:-mpicc}"
|
||||
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
|
||||
requireWMakeToolchain()
|
||||
{
|
||||
local wmDir="${WM_DIR:-$WM_PROJECT_DIR/wmake}"
|
||||
local archDir="$wmDir/platforms/$WM_ARCH$WM_COMPILER"
|
||||
|
||||
if [ -x "$archDir/wmkdepend" ] || [ -x "$archDir/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" ] || {
|
||||
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
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Some functions as per OpenFOAM etc/config.sh/functions
|
||||
|
||||
unset -f _foamAddLib _foamAddMan _foamAddPath # Get settings only
|
||||
unset -f _foamEtc
|
||||
unset -f _foamAddLib _foamAddLibAuto _foamAddMan _foamAddPath # Get settings only
|
||||
unset -f _foamClean _foamConfig
|
||||
|
||||
# Source an etc file
|
||||
_foamEtc()
|
||||
{
|
||||
local file
|
||||
if [ $# -gt 0 ] && file=$($WM_PROJECT_DIR/bin/foamEtcFile "$@")
|
||||
then
|
||||
. $file
|
||||
fi
|
||||
}
|
||||
if [ -x "$WM_PROJECT_DIR/bin/foamCleanPath" ]
|
||||
then
|
||||
# Cleaning environment variables
|
||||
_foamClean()
|
||||
{
|
||||
local var=$1
|
||||
shift
|
||||
eval $($WM_PROJECT_DIR/bin/foamCleanPath -sh-env=$var "$@")
|
||||
}
|
||||
else
|
||||
_foamClean() { echo "No foamCleanPath" 1>&2; }
|
||||
fi
|
||||
|
||||
# Source an etc/config.sh file
|
||||
_foamConfig() { eval "$($WM_PROJECT_DIR/bin/foamEtcFile -sh -config $@)"; }
|
||||
|
||||
# Source an etc file (as per OpenFOAM functions). Eg, for mpi setup.
|
||||
_foamEtc() { eval "$($WM_PROJECT_DIR/bin/foamEtcFile -sh $@)"; }
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -103,19 +276,16 @@ setBuildSuffix()
|
||||
# - use max number of cores for building
|
||||
#
|
||||
unset WM_HOSTS WM_SCHEDULER
|
||||
if [ -r /proc/cpuinfo ]
|
||||
then
|
||||
WM_NCOMPPROCS=$(egrep "^processor" /proc/cpuinfo | wc -l)
|
||||
else
|
||||
WM_NCOMPPROCS=1
|
||||
fi
|
||||
|
||||
WM_NCOMPPROCS=$(getconf _NPROCESSORS_ONLN 2>/dev/null) || WM_NCOMPPROCS=1
|
||||
: ${WM_NCOMPPROCS:=1}
|
||||
export WM_NCOMPPROCS
|
||||
|
||||
|
||||
#
|
||||
# If WM_CONTINUE_ON_ERROR not set activate the shell option "stop on error"
|
||||
#
|
||||
if [ -z "${WM_CONTINUE_ON_ERROR}" ]
|
||||
if [ -z "$WM_CONTINUE_ON_ERROR" ]
|
||||
then
|
||||
set -e
|
||||
fi
|
||||
@ -132,6 +302,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()
|
||||
{
|
||||
@ -210,21 +398,26 @@ NOT_FOUND
|
||||
fi
|
||||
fi
|
||||
|
||||
# Default to use the path. Resolve so we know what we are using.
|
||||
foundExe=$(command -v cmake 2> /dev/null) || foundExe=false
|
||||
# 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
|
||||
done
|
||||
: ${foundExe:=false}
|
||||
|
||||
echo "Using cmake=$foundExe" 1>&2
|
||||
echo $foundExe
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# try to locate qmake according to the QMAKE_PATH
|
||||
# Try to locate qmake or qmake-qt5 according to the QMAKE_PATH
|
||||
#
|
||||
# On success: return the resolved value as output.
|
||||
# On failure: just report what is found in the path.
|
||||
#
|
||||
unset QMAKE_PATH # clear when first loaded
|
||||
findQtMake()
|
||||
findQMake()
|
||||
{
|
||||
local candidate foundExe
|
||||
|
||||
@ -282,8 +475,14 @@ NOT_FOUND
|
||||
fi
|
||||
fi
|
||||
|
||||
# Default to use the path, try resolving (so we know what we are using)
|
||||
foundExe=$(command -v qmake 2> /dev/null) || foundExe=false
|
||||
# Default to use the path, try resolving (so we know what we are using).
|
||||
# Some systems have qmake-qt5 as well as qmake
|
||||
for candidate in qmake-qt5 qmake
|
||||
do
|
||||
foundExe=$(command -v $candidate 2>/dev/null) && break
|
||||
done
|
||||
: ${foundExe:=false}
|
||||
|
||||
echo "Using qmake=$foundExe" 1>&2
|
||||
echo $foundExe
|
||||
}
|
||||
@ -325,7 +524,7 @@ pkgconfigNewPrefix()
|
||||
if [ -f "$i" -a ! -L "$i" ]
|
||||
then
|
||||
nfiles="x$nfiles"
|
||||
sed -i -e 's@^\(prefix=\).*$@\1'"$dir@" $i
|
||||
sed -i~ -e 's@^\(prefix=\).*$@\1'"$dir@" $i
|
||||
fi
|
||||
done
|
||||
echo " $libdir/*.pc (edited ${#nfiles})"
|
||||
@ -373,7 +572,7 @@ pkgconfigAdjust()
|
||||
if [ -f "$i" -a ! -L "$i" ]
|
||||
then
|
||||
nfiles="x$nfiles"
|
||||
sed -i \
|
||||
sed -i~ \
|
||||
-e 's@^\(includedir=\)'"$dir/"'@\1${prefix}/@' \
|
||||
-e 's@^\(libdir=\)'"$dir/"'@\1${prefix}/@' \
|
||||
-e 's@\(_location=\)'"$dir/"'@\1${prefix}/@' \
|
||||
@ -486,4 +685,5 @@ applyPatch()
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -148,6 +148,28 @@ configVTK()
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# MPI support for VTK
|
||||
#
|
||||
unset -f addMpiSupport 2>/dev/null
|
||||
addMpiSupport()
|
||||
{
|
||||
if [ "${withMPI:=false}" != true ]
|
||||
then
|
||||
return
|
||||
fi
|
||||
|
||||
addCMakeVariable "VTK_Group_MPI=ON"
|
||||
addCMakeVariable "Module_vtkRenderingParallel=ON"
|
||||
addCMakeVariable "Module_vtkParallelMPI=ON"
|
||||
|
||||
if [ "${MPI_MAX_PROCS:=0}" -gt 1 ]
|
||||
then
|
||||
addCMakeVariable "VTK_MPI_MAX_NUMPROCS=$MPI_MAX_PROCS"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Invoke make
|
||||
# also link bin/ to lib/paraview-* for development without installation
|
||||
|
||||
14
makeADIOS
14
makeADIOS
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -29,7 +29,7 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# ADIOS version from OpenFOAM etc/config.sh file:
|
||||
_foamEtc config.sh/ADIOS
|
||||
_foamConfig ADIOS
|
||||
|
||||
adiosPACKAGE=${adios_version:-adios-none}
|
||||
|
||||
@ -41,8 +41,8 @@ usage() {
|
||||
|
||||
usage: ${0##*/} [OPTION] [adios-VERSION] [-- configure-options]
|
||||
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 ADIOS
|
||||
@ -52,11 +52,7 @@ USAGE
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
# Compiler settings for CMake/configure
|
||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||
[ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS"
|
||||
[ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS"
|
||||
exportCompiler true # Compiler info + flags for CMake/configure
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
|
||||
172
makeADIOS2
Executable file
172
makeADIOS2
Executable file
@ -0,0 +1,172 @@
|
||||
#!/bin/sh
|
||||
#------------------------------------------------------------------------------
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# This file is part of OpenFOAM, licensed under the GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Script
|
||||
# makeADIOS2
|
||||
#
|
||||
# Description
|
||||
# Build script for ADIOS2
|
||||
#
|
||||
# ----------------------------------------------
|
||||
# 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
|
||||
#------------------------------------------------------------------------------
|
||||
# ADIOS2 version from OpenFOAM etc/config.sh file:
|
||||
_foamConfig ADIOS2
|
||||
|
||||
adios2PACKAGE=${adios2_version:-adios-none}
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
usage() {
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
|
||||
usage: ${0##*/} [OPTION] [adios-VERSION]
|
||||
options:
|
||||
-gcc Force use of gcc/g++
|
||||
-cmake PATH With cmake from the given path
|
||||
-help
|
||||
|
||||
* Build ADIOS2
|
||||
$adios2PACKAGE
|
||||
|
||||
USAGE
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
exportCompiler true # Compiler info + flags for CMake/configure
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
'') ;; # Ignore empty
|
||||
-h | -help) usage ;;
|
||||
-gcc) useGcc ;;
|
||||
|
||||
-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%%/}"
|
||||
;;
|
||||
*)
|
||||
die "unknown option/argument: '$1'"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
[ -n "$adios2PACKAGE" ] || die "The adios2-VERSION was not specified"
|
||||
|
||||
# nothing to build
|
||||
if _foamIsNone "$adios2PACKAGE"
|
||||
then
|
||||
echo "Using adios-none (skip ThirdParty build of ADIOS)"
|
||||
exit 0
|
||||
elif _foamIsSystem "$adios2PACKAGE"
|
||||
then
|
||||
echo "Using adios-system"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Build ADIOS
|
||||
# ADIOS2_SOURCE_DIR : location of the original sources
|
||||
# ADIOS2_ARCH_PATH : installation directory
|
||||
|
||||
ADIOS2_SOURCE_DIR=$sourceBASE/$adios2PACKAGE
|
||||
ADIOS2_ARCH_PATH=$installBASE/$adios2PACKAGE
|
||||
|
||||
# Some hacked in value, for binding in ADIOS1 as well (for the reader)
|
||||
# Don't know if this is still needed
|
||||
if [ -n "$ADIOS1_ARCH_PATH" ]
|
||||
then
|
||||
ADIOS1_ARCH_PATH=$installBASE/ADIOS-1.13.0
|
||||
fi
|
||||
if [ -d "$ADIOS1_ARCH_PATH" ]
|
||||
then
|
||||
export ADIOS1_ROOT="$ADIOS1_ARCH_PATH"
|
||||
fi
|
||||
|
||||
|
||||
: ${FOAM_MPI:=dummy}
|
||||
|
||||
echo
|
||||
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 ]
|
||||
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
|
||||
else
|
||||
# CMake options often lag the configure ones
|
||||
echo "Starting build: $adios2PACKAGE (using cmake)"
|
||||
echo
|
||||
(
|
||||
buildDIR=$buildBASE/$adios2PACKAGE
|
||||
cd $ADIOS2_SOURCE_DIR || exit 1
|
||||
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
|
||||
|
||||
applyPatch $adios2PACKAGE $ADIOS2_SOURCE_DIR
|
||||
|
||||
# Remove any existing build folder and recreate
|
||||
rm -rf $ADIOS2_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=$ADIOS2_ARCH_PATH \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DADIOS2_USE_Fortran=FALSE \
|
||||
-DADIOS1_USE_STATIC_LIBS=TRUE \
|
||||
${WM_QUIET:+-DCMAKE_RULE_MESSAGES=OFF} \
|
||||
$ADIOS2_SOURCE_DIR \
|
||||
&& make -j $WM_NCOMPPROCS all \
|
||||
&& make install \
|
||||
&& echo "Built: $adios2PACKAGE"
|
||||
) || {
|
||||
echo "Error building: $adios2PACKAGE"
|
||||
}
|
||||
fi
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
17
makeCCMIO
17
makeCCMIO
@ -3,8 +3,10 @@
|
||||
# ========= |
|
||||
# \\ / 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 | Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
@ -19,6 +21,9 @@
|
||||
# ----------------------------------------------
|
||||
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||
#------------------------------------------------------------------------------
|
||||
# Dynamic library ending (default is .so)
|
||||
[ "$(uname -s)" = Darwin ] && EXT_SO=.dylib || EXT_SO=.so
|
||||
|
||||
# Run from third-party directory only
|
||||
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
|
||||
@ -34,7 +39,7 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# libccmio version from OpenFOAM etc/config.sh file:
|
||||
_foamEtc config.sh/ccmio
|
||||
_foamConfig ccmio
|
||||
|
||||
ccmioPACKAGE=${ccmio_version:-libccmio-2.6.1}
|
||||
targetType=lib # Default is static linkage
|
||||
@ -48,7 +53,7 @@ usage()
|
||||
|
||||
Usage: ${0##*/} [OPTION] [lib|libso] [libccmio-VERSION]
|
||||
options:
|
||||
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
||||
-gcc Force use of gcc/g++
|
||||
-help
|
||||
|
||||
* Compile the proprietary libccmio library
|
||||
@ -89,6 +94,8 @@ do
|
||||
shift
|
||||
done
|
||||
|
||||
requireWMakeToolchain
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Build LIBCCMIO
|
||||
@ -122,7 +129,7 @@ echo
|
||||
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
|
||||
|
||||
|
||||
275
makeCGAL
275
makeCGAL
@ -3,8 +3,10 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
# \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
@ -25,21 +27,24 @@
|
||||
# ----------------------------------------------
|
||||
# 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 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%/}" # <- CGAL_ARCH_PATH
|
||||
if [ -d "$dir/include" -a -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" ]
|
||||
-a -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"
|
||||
@ -60,13 +65,12 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
}
|
||||
. etc/tools/ThirdPartyFunctions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
unset BOOST_ARCH_PATH CGAL_ARCH_PATH # Purge current values
|
||||
unset BOOST_ARCH_PATH CGAL_ARCH_PATH GMP_ARCH_PATH MPFR_ARCH_PATH # Purge old
|
||||
|
||||
# CGAL, boost and gmp/mpfr versions from OpenFOAM etc/config.sh files.
|
||||
# Get compiler first and let CGAL config override GMP (eg, when there is no GMP)
|
||||
_foamEtc config.sh/compiler
|
||||
_foamEtc config.sh/CGAL
|
||||
# Get compiler first and let CGAL config override GMP and MPFR
|
||||
_foamConfig compiler
|
||||
_foamConfig CGAL
|
||||
|
||||
boostPACKAGE=${boost_version:-boost-system}
|
||||
gmpPACKAGE=${gmp_version:-gmp-system}
|
||||
@ -81,10 +85,11 @@ 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 Compile CGAL for use in headers only mode (since CGAL 4.9)
|
||||
-toolset=NAME Use named toolset in bootstrap
|
||||
-system Use system versions for boost/gmp/mpfr
|
||||
-help
|
||||
|
||||
* build CGAL with
|
||||
@ -104,12 +109,9 @@ USAGE
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
# Compiler settings for CMake/configure
|
||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||
|
||||
unset optHeadersOnly
|
||||
exportCompiler # Compiler info for CMake/configure
|
||||
|
||||
unset optHeadersOnly optToolset
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
@ -123,28 +125,33 @@ do
|
||||
CMAKE_PATH="${2%%/}"
|
||||
shift
|
||||
;;
|
||||
-toolset=*)
|
||||
optToolset="${1*=}"
|
||||
;;
|
||||
-sys*)
|
||||
gmpPACKAGE="gmp-system"
|
||||
mpfrPACKAGE="mpfr-system"
|
||||
boostPACKAGE="boost-system"
|
||||
unset BOOST_ARCH_PATH # avoid inconsistency
|
||||
unset BOOST_ARCH_PATH GMP_ARCH_PATH MPFR_ARCH_PATH
|
||||
;;
|
||||
-no-lib)
|
||||
optHeadersOnly=true
|
||||
;;
|
||||
gmp-[4-9]* | gmp-system | gmp-none)
|
||||
gmpPACKAGE="${1%%/}"
|
||||
unset GMP_ARCH_PATH
|
||||
;;
|
||||
mpfr-[2-9]* | mpfr-system | mpfr-none)
|
||||
mpfrPACKAGE="${1%%/}"
|
||||
;;
|
||||
CGAL-[0-9]*)
|
||||
cgalPACKAGE="${1%%/}"
|
||||
unset CGAL_ARCH_PATH # avoid inconsistency
|
||||
unset MPFR_ARCH_PATH
|
||||
;;
|
||||
boost-[0-9]* | boost_[0-9]* | boost-system )
|
||||
boostPACKAGE="${1%%/}"
|
||||
unset BOOST_ARCH_PATH # avoid inconsistency
|
||||
unset BOOST_ARCH_PATH
|
||||
;;
|
||||
CGAL-[0-9]*)
|
||||
cgalPACKAGE="${1%%/}"
|
||||
unset CGAL_ARCH_PATH
|
||||
;;
|
||||
*)
|
||||
die "unknown option/argument: '$1'"
|
||||
@ -189,31 +196,88 @@ then
|
||||
echo "Using boost-system (skip ThirdParty build of BOOST)"
|
||||
|
||||
# Tagged as 'system' but could actually point to a central location
|
||||
[ -d "$BOOST_ARCH_PATH/include" ] || {
|
||||
|
||||
if [ -d "$boostInc" ]
|
||||
then
|
||||
if BOOST_ARCH_PATH=$(cd $BOOST_ARCH_PATH 2>/dev/null && pwd -P)
|
||||
then
|
||||
boostPACKAGE=${BOOST_ARCH_PATH##*/}
|
||||
else
|
||||
echo "ERROR: bad path for BOOST_ARCH_PATH"
|
||||
echo "stopping build"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
libdir="$BOOST_ARCH_PATH/lib"
|
||||
else
|
||||
boostInc="/usr/include"
|
||||
boostLib="/usr/lib$WM_COMPILER_LIB_ARCH"
|
||||
}
|
||||
libdir="/usr/lib"
|
||||
fi
|
||||
|
||||
# Use lib/ when lib64/ does not exist
|
||||
[ ! -d "$boostLib" -a -d "$libdir" ] && boostLib="$libdir"
|
||||
|
||||
elif [ -f "$boostInc/boost/version.hpp" ]
|
||||
then
|
||||
echo "Using $boostPACKAGE"
|
||||
|
||||
libdir="$BOOST_ARCH_PATH/lib"
|
||||
|
||||
# Use lib when lib64 does not exist
|
||||
[ ! -d "$boostLib" -a -d "$libdir" ] && boostLib="$libdir"
|
||||
|
||||
else
|
||||
echo "Starting build: $boostPACKAGE"
|
||||
echo
|
||||
# Absolute path for --libdir
|
||||
|
||||
(
|
||||
# Configuration options:
|
||||
unset buildOpt
|
||||
|
||||
cd $BOOST_SOURCE_DIR || exit 1
|
||||
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
|
||||
[ -n "$optToolset" ] || optToolset="$(whichCC)"
|
||||
buildOpt="toolset=$optToolset"
|
||||
;;
|
||||
esac
|
||||
|
||||
./bootstrap.sh \
|
||||
--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"
|
||||
@ -221,7 +285,7 @@ else
|
||||
}
|
||||
fi
|
||||
|
||||
# nothing left to build
|
||||
# Nothing left to build
|
||||
if _foamIsSystem $cgalPACKAGE
|
||||
then
|
||||
echo "Using cgal-system (skip ThirdParty build of CGAL)"
|
||||
@ -242,18 +306,6 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cat<<SUMMARY
|
||||
CGAL configuration
|
||||
------------------
|
||||
CGAL = $cgalPACKAGE
|
||||
BOOST = $boostPACKAGE
|
||||
GMP = $gmpPACKAGE
|
||||
MPFR = $mpfrPACKAGE
|
||||
------------------
|
||||
SUMMARY
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Build CGAL
|
||||
@ -271,22 +323,61 @@ CGAL_BUILD_DIR=$buildBASE/$cgalPACKAGE
|
||||
: ${CGAL_ARCH_PATH:=$installBASE/$cgalPACKAGE} # Fallback
|
||||
|
||||
# gmp/mpfr are installed without compiler name
|
||||
installBASE=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
||||
|
||||
GMP_ARCH_PATH=$installBASE/$gmpPACKAGE
|
||||
MPFR_ARCH_PATH=$installBASE/$mpfrPACKAGE
|
||||
mpfrBASE=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
||||
|
||||
# Enable/disable gmp/mpfr together
|
||||
if _foamIsNone $gmpPACKAGE || _foamIsNone $mpfrPACKAGE
|
||||
then
|
||||
GMP_ARCH_PATH=none
|
||||
MPFR_ARCH_PATH=none
|
||||
elif _foamIsSystem $GMP_ARCH_PATH || _foamIsSystem $MPFR_ARCH_PATH
|
||||
elif _foamIsSystem $gmpPACKAGE || _foamIsSystem $mpfrPACKAGE
|
||||
then
|
||||
GMP_ARCH_PATH=system # for an accurate record
|
||||
MPFR_ARCH_PATH=system
|
||||
# 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)
|
||||
then
|
||||
gmpPACKAGE=${GMP_ARCH_PATH##*/}
|
||||
else
|
||||
echo "ERROR: bad path for GMP_ARCH_PATH"
|
||||
echo "stopping build"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
GMP_ARCH_PATH=system
|
||||
fi
|
||||
|
||||
if [ -d "$MPFR_ARCH_PATH" ]
|
||||
then
|
||||
if MPFR_ARCH_PATH=$(cd $MPFR_ARCH_PATH 2>/dev/null && pwd -P)
|
||||
then
|
||||
mpfrPACKAGE=${MPFR_ARCH_PATH##*/}
|
||||
else
|
||||
echo "ERROR: bad path for MPFR_ARCH_PATH"
|
||||
echo "stopping build"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
MPFR_ARCH_PATH=system
|
||||
fi
|
||||
else
|
||||
GMP_ARCH_PATH=$mpfrBASE/$gmpPACKAGE
|
||||
MPFR_ARCH_PATH=$mpfrBASE/$mpfrPACKAGE
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cat<<SUMMARY
|
||||
CGAL configuration
|
||||
------------------
|
||||
CGAL = $cgalPACKAGE
|
||||
BOOST = $boostPACKAGE
|
||||
GMP = $gmpPACKAGE
|
||||
MPFR = $mpfrPACKAGE
|
||||
------------------
|
||||
SUMMARY
|
||||
|
||||
#
|
||||
# build information recorded for later use
|
||||
@ -314,7 +405,7 @@ BUILD_INFO
|
||||
}
|
||||
|
||||
|
||||
# compare expected vs what is extracted as KEY=... in text
|
||||
# Compare expected vs what is extracted as KEY=... in text
|
||||
# $1 = key
|
||||
# $2 = expected
|
||||
# $3 = text to extract from
|
||||
@ -330,10 +421,11 @@ infoValueEq()
|
||||
fi
|
||||
}
|
||||
|
||||
# needs build
|
||||
# Needs build
|
||||
cgalIsCurrent()
|
||||
{
|
||||
local info=$(cat $buildInfoFile 2>/dev/null)
|
||||
# Only need VAR=... (also avoids embedded '#' that bothers some shells)
|
||||
local info=$(sed -n -e '/^[A-Z]/p' $buildInfoFile 2>/dev/null)
|
||||
[ -n "$info" ] || return 1
|
||||
|
||||
local libDirName="lib$WM_COMPILER_LIB_ARCH"
|
||||
@ -384,24 +476,27 @@ fi
|
||||
# See http://doc.cgal.org/latest/Manual/installation.html
|
||||
if _foamIsSystem $boostPACKAGE
|
||||
then
|
||||
echo " system : boost"
|
||||
# Tagged as 'system' but could actually point to a central location
|
||||
if [ -d "$BOOST_ARCH_PATH/include" ]
|
||||
then
|
||||
echo " boost : ${BOOST_ARCH_PATH##*/}"
|
||||
configBoost="-DBOOST_ROOT=$BOOST_ARCH_PATH"
|
||||
else
|
||||
echo " boost : system"
|
||||
fi
|
||||
|
||||
## For system - possible that /usr/lib64 not being found?
|
||||
## configBoost="-DBoost_LIBRARY_DIRS=$boostLib"
|
||||
elif [ -d "$BOOST_ARCH_PATH" ]
|
||||
then
|
||||
echo " ThirdParty : boost"
|
||||
echo " boost : $boostPACKAGE"
|
||||
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
|
||||
)
|
||||
@ -409,48 +504,78 @@ CMAKE_OPTIONS
|
||||
|
||||
if _foamIsSystem $GMP_ARCH_PATH
|
||||
then
|
||||
echo " system : gmp"
|
||||
echo " gmp : system"
|
||||
elif _foamIsNone $GMP_ARCH_PATH
|
||||
then
|
||||
echo " disabled : gmp"
|
||||
echo " gmp : disabled"
|
||||
configGmp="-DCGAL_DISABLE_GMP=TRUE" # Also used for mpfr
|
||||
elif [ -d "$GMP_ARCH_PATH" ]
|
||||
then
|
||||
echo " ThirdParty : gmp"
|
||||
configGmp=$(cat <<CMAKE_OPTIONS
|
||||
echo " gmp : $gmpPACKAGE"
|
||||
|
||||
for libdir in \
|
||||
$GMP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH \
|
||||
$GMP_ARCH_PATH/lib \
|
||||
;
|
||||
do
|
||||
if [ -f "$libdir/libgmp$EXT_SO" ]
|
||||
then
|
||||
configGmp=$(cat <<CMAKE_OPTIONS
|
||||
-DGMP_INCLUDE_DIR=$GMP_ARCH_PATH/include
|
||||
-DGMP_LIBRARIES_DIR=$GMP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
|
||||
-DGMP_LIBRARIES=$GMP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libgmp.so
|
||||
-DGMPXX_INCLUDE_DIR=$GMP_ARCH_PATH/include
|
||||
-DGMPXX_LIBRARIES=$GMP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libgmpxx.so
|
||||
-DGMP_LIBRARIES_DIR=$libdir
|
||||
-DGMP_LIBRARIES=$libdir/libgmp$EXT_SO
|
||||
CMAKE_OPTIONS
|
||||
)
|
||||
break
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo " system : gmp (did not find $GMP_ARCH_PATH)"
|
||||
fi
|
||||
|
||||
if _foamIsSystem $MPFR_ARCH_PATH
|
||||
then
|
||||
echo " system : mpfr"
|
||||
echo " mpfr : system"
|
||||
elif _foamIsNone $MPFR_ARCH_PATH
|
||||
then
|
||||
echo " disabled : mpfr"
|
||||
echo " mpfr : disabled"
|
||||
configGmp="-DCGAL_DISABLE_GMP=TRUE" # Also used for mpfr
|
||||
elif [ -d "$MPFR_ARCH_PATH" ]
|
||||
then
|
||||
echo " ThirdParty : mpfr"
|
||||
configMpfr=$(cat <<CMAKE_OPTIONS
|
||||
echo " mpfr : $mpfrPACKAGE"
|
||||
|
||||
for libdir in \
|
||||
$MPFR_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH \
|
||||
$MPFR_ARCH_PATH/lib \
|
||||
;
|
||||
do
|
||||
if [ -f "$libdir/libmpfr$EXT_SO" ]
|
||||
then
|
||||
configMpfr=$(cat <<CMAKE_OPTIONS
|
||||
-DMPFR_INCLUDE_DIR=$MPFR_ARCH_PATH/include
|
||||
-DMPFR_LIBRARIES_DIR=$MPFR_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
|
||||
-DMPFR_LIBRARIES=$MPFR_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpfr.so
|
||||
-DMPFR_LIBRARIES_DIR=$libdir
|
||||
-DMPFR_LIBRARIES=$libdir/libmpfr$EXT_SO
|
||||
CMAKE_OPTIONS
|
||||
)
|
||||
break
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo " system : mpfr (did not find $MPFR_ARCH_PATH)"
|
||||
echo " mpfr : system (did not find $MPFR_ARCH_PATH)"
|
||||
fi
|
||||
|
||||
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
|
||||
|
||||
# For CGAL < 4.9, for installation into lib64/, not lib/
|
||||
# Name only (not path) for CGAL_INSTALL_LIB_DIR
|
||||
echo "----"
|
||||
@ -459,8 +584,10 @@ CMAKE_OPTIONS
|
||||
-DCMAKE_INSTALL_PREFIX=$CGAL_ARCH_PATH \
|
||||
-DCGAL_INSTALL_LIB_DIR=lib$WM_COMPILER_LIB_ARCH \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DWITH_CGAL_Core=OFF \
|
||||
-DWITH_CGAL_ImageIO=OFF \
|
||||
-DWITH_CGAL_Qt5=OFF \
|
||||
$cmakeDefs \
|
||||
${optHeadersOnly:+-DCGAL_HEADER_ONLY=TRUE} \
|
||||
$configBoost $configGmp $configMpfr \
|
||||
${WM_QUIET:+-DCMAKE_RULE_MESSAGES=OFF} \
|
||||
@ -484,7 +611,7 @@ CMAKE_OPTIONS
|
||||
fi
|
||||
done
|
||||
|
||||
# record our build-status
|
||||
# Record our build-status
|
||||
recordCGALinfo
|
||||
|
||||
echo "Done CGAL"
|
||||
|
||||
14
makeCmake
14
makeCmake
@ -3,8 +3,10 @@
|
||||
# ========= |
|
||||
# \\ / 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 | Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# | Copyright (C) 2011 OpenFOAM Foundation
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
@ -42,8 +44,8 @@ usage() {
|
||||
|
||||
usage: ${0##*/} [OPTION] cmake-VERSION
|
||||
options:
|
||||
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
||||
-link Create additional symlink as 'cmake-system'
|
||||
-gcc Force use of gcc/g++
|
||||
-link Create additional symlink as 'cmake-system'
|
||||
-help
|
||||
|
||||
* build cmake
|
||||
@ -53,9 +55,7 @@ USAGE
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
# Compiler settings for CMake/configure
|
||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||
exportCompiler # Compiler info for CMake/configure
|
||||
|
||||
unset optLink
|
||||
# Parse options
|
||||
|
||||
35
makeFFTW
35
makeFFTW
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -19,12 +19,15 @@
|
||||
# ----------------------------------------------
|
||||
# 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" # <- FFTW_ARCH_PATH
|
||||
if [ -d "$dir/include" -a -r "$dir/lib$WM_COMPILER_LIB_ARCH/libfftw3.so" ]
|
||||
dir="${2%/}" # <- FFTW_ARCH_PATH
|
||||
if [ -d "$dir/include" -a -r "$dir/lib$WM_COMPILER_LIB_ARCH/libfftw3$EXT_SO" ]
|
||||
then
|
||||
echo " fftw include: $dir/include"
|
||||
echo " fftw library: $dir/lib$WM_COMPILER_LIB_ARCH"
|
||||
@ -44,7 +47,7 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# FFTW version from OpenFOAM etc/config.sh file:
|
||||
_foamEtc config.sh/FFTW
|
||||
_foamConfig FFTW
|
||||
|
||||
fftwPACKAGE=${fftw_version:-fftw-system}
|
||||
|
||||
@ -54,9 +57,9 @@ usage() {
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
|
||||
usage: ${0##*/} [OPTION] [fftw-VERSION]
|
||||
usage: ${0##*/} [OPTION] [fftw-VERSION] [-- configure-options]
|
||||
options:
|
||||
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
||||
-gcc Force use of gcc/g++
|
||||
-help
|
||||
|
||||
* build FFTW with
|
||||
@ -66,15 +69,14 @@ USAGE
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
# Compiler settings for CMake/configure
|
||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||
exportCompiler # Compiler info for CMake/configure
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
'') ;; # Ignore empty
|
||||
--) break;; # Extra configure options (leave on $@ for later detection)
|
||||
-h | -help) usage ;;
|
||||
-gcc) useGcc ;;
|
||||
|
||||
@ -116,7 +118,7 @@ fi
|
||||
FFTW_SOURCE_DIR=$sourceBASE/$fftwPACKAGE
|
||||
FFTW_ARCH_PATH=$installBASE/$fftwPACKAGE
|
||||
|
||||
if [ -r "$FFTW_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libfftw3.so" ]
|
||||
if [ -r "$FFTW_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libfftw3$EXT_SO" ]
|
||||
then
|
||||
echo "Already has FFTW shared library"
|
||||
else
|
||||
@ -124,6 +126,18 @@ else
|
||||
echo
|
||||
|
||||
(
|
||||
# Configuration options:
|
||||
unset configOpt
|
||||
|
||||
# Additional configure options
|
||||
if [ "$1" = "--" ]
|
||||
then
|
||||
shift
|
||||
configOpt="$configOpt $@"
|
||||
fi
|
||||
|
||||
# End of configuration options
|
||||
# ----------------------------
|
||||
buildDIR=$buildBASE/$fftwPACKAGE
|
||||
|
||||
cd $FFTW_SOURCE_DIR || exit 1
|
||||
@ -140,6 +154,7 @@ else
|
||||
--libdir=$FFTW_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH \
|
||||
--enable-shared --disable-static \
|
||||
--disable-fortran \
|
||||
$configOpt \
|
||||
&& set +x \
|
||||
&& make -j $WM_NCOMPPROCS \
|
||||
&& make install \
|
||||
|
||||
21
makeGcc
21
makeGcc
@ -3,8 +3,10 @@
|
||||
# ========= |
|
||||
# \\ / 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 | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
@ -39,12 +41,13 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
}
|
||||
. etc/tools/ThirdPartyFunctions
|
||||
#------------------------------------------------------------------------------
|
||||
unset GMP_ARCH_PATH MPFR_ARCH_PATH # Purge old
|
||||
|
||||
[ "${WM_COMPILER#Gcc}" = "$WM_COMPILER" ] && WM_COMPILER=Gcc # Force gcc
|
||||
WM_COMPILER_TYPE=ThirdParty # Ensure we get the correct settings
|
||||
|
||||
# Default GCC, mpfr, gmp and mpc versions from OpenFOAM etc/config.sh file:
|
||||
_foamEtc config.sh/compiler
|
||||
_foamConfig compiler
|
||||
|
||||
gmpPACKAGE=${gmp_version:-gmp-system}
|
||||
mpfrPACKAGE=${mpfr_version:-mpfr-system}
|
||||
@ -59,6 +62,7 @@ usage() {
|
||||
|
||||
usage: ${0##*/} [OPTION] [gcc-VERSION] [gmp-VERSION] [mpfr-VERSION] [mpc-VERSION]
|
||||
options:
|
||||
-clang Force clang/clang++ for building
|
||||
-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)
|
||||
@ -85,6 +89,10 @@ do
|
||||
case "$1" in
|
||||
'') ;; # Ignore empty
|
||||
-h | -help) usage ;;
|
||||
-clang) # Force use of clang/clang++ for building
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
;;
|
||||
|
||||
-multi*)
|
||||
optMultilib=enable
|
||||
@ -99,12 +107,15 @@ do
|
||||
gmpPACKAGE="gmp-system"
|
||||
mpfrPACKAGE="mpfr-system"
|
||||
mpcPACKAGE="mpc-system"
|
||||
unset GMP_ARCH_PATH MPFR_ARCH_PATH
|
||||
;;
|
||||
gmp-[4-9]* | gmp-system)
|
||||
gmpPACKAGE="${1%%/}"
|
||||
unset GMP_ARCH_PATH
|
||||
;;
|
||||
mpfr-[2-9]* | mpfr-system)
|
||||
mpfrPACKAGE="${1%%/}"
|
||||
unset MPFR_ARCH_PATH
|
||||
;;
|
||||
mpc-[0-9]* | mpc-system)
|
||||
mpcPACKAGE="${1%%/}"
|
||||
@ -129,6 +140,8 @@ GCC configuration
|
||||
MPFR = $mpfrPACKAGE
|
||||
MPC = $mpcPACKAGE
|
||||
------------------
|
||||
Using CC = $CC $CFLAGS
|
||||
Using CXX = $CXX $CXXFLAGS
|
||||
SUMMARY
|
||||
|
||||
# Set 32 or 64 bit ABI
|
||||
@ -169,7 +182,7 @@ addLib()
|
||||
# Build GMP
|
||||
# ================
|
||||
echo "---------------"
|
||||
if [ -d $GMP_ARCH_PATH ]
|
||||
if [ -d "$GMP_ARCH_PATH" ]
|
||||
then
|
||||
echo "Already built: $gmpPACKAGE"
|
||||
elif _foamIsSystem $GMP_ARCH_PATH
|
||||
|
||||
@ -3,8 +3,10 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
# \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# | Copyright (C) 2012 OpenFOAM Foundation
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
@ -29,7 +31,7 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Gperftools version from OpenFOAM etc/config.sh file:
|
||||
_foamEtc config.sh/gperftools
|
||||
_foamConfig gperftools
|
||||
|
||||
gperftoolsPACKAGE=${gperftools_version:-gperftools-system}
|
||||
|
||||
@ -41,7 +43,7 @@ usage() {
|
||||
|
||||
usage: ${0##*/} [gperftools-VERSION]
|
||||
options:
|
||||
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
||||
-gcc Force use of gcc/g++
|
||||
-help
|
||||
|
||||
* build gperftools
|
||||
@ -51,9 +53,7 @@ USAGE
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
# Compiler settings for CMake/configure
|
||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||
exportCompiler # Compiler info for CMake/configure
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
|
||||
172
makeHYPRE
Executable file
172
makeHYPRE
Executable file
@ -0,0 +1,172 @@
|
||||
#!/bin/sh
|
||||
#------------------------------------------------------------------------------
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Script
|
||||
# makeHYPRE
|
||||
#
|
||||
# Description
|
||||
# Build script for HYPRE
|
||||
#
|
||||
# ----------------------------------------------
|
||||
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||
#------------------------------------------------------------------------------
|
||||
# Dynamic library ending (default is .so)
|
||||
[ "$(uname -s)" = Darwin ] && EXT_SO=.dylib || EXT_SO=.so
|
||||
|
||||
# Short-circuit test for an installation
|
||||
if [ "$1" = "-test" ]
|
||||
then
|
||||
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
|
||||
dir="${2%/}" # <- HYPRE_ARCH_PATH
|
||||
if [ -d "$dir/include" ]
|
||||
then
|
||||
for lib in \
|
||||
$FOAM_EXT_LIBBIN/libhypre$EXT_SO \
|
||||
$dir/lib/libhypre.a \
|
||||
$dir/lib/libhypre$EXT_SO \
|
||||
$dir/lib$WM_COMPILER_LIB_ARCH/libhypre.a \
|
||||
$dir/lib$WM_COMPILER_LIB_ARCH/libhypre$EXT_SO \
|
||||
;
|
||||
do
|
||||
if [ -r "$lib" ]
|
||||
then
|
||||
echo " hypre include: $dir/include"
|
||||
echo " hypre library: ${lib%/*}"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
fi
|
||||
exit 2
|
||||
fi
|
||||
#------------------------------------------------------------------------------
|
||||
# Run from third-party directory only
|
||||
cd ${0%/*} && 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}
|
||||
targetType=libso
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
usage() {
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
|
||||
usage: ${0##*/} [OPTION] [lib|libso] [HYPRE-VERSION]
|
||||
options:
|
||||
-gcc Force use of gcc/g++
|
||||
-help
|
||||
|
||||
* build HYPRE with
|
||||
${hyprePACKAGE:-'unspecified hypre version'}
|
||||
|
||||
USAGE
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
exportCompiler # Compiler info for CMake/configure
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
'') ;; # Ignore empty
|
||||
-h | -help) usage ;;
|
||||
-gcc) useGcc ;;
|
||||
|
||||
lib|libso)
|
||||
targetType="$1"
|
||||
;;
|
||||
|
||||
hypre-[0-9]*)
|
||||
hyprePACKAGE="${1%%/}"
|
||||
unset HYPRE_ARCH_PATH # Avoid inconsistency
|
||||
;;
|
||||
*)
|
||||
die "unknown option/argument: '$1'"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
[ -n "$hyprePACKAGE" ] || die "The hypre-VERSION was not specified"
|
||||
|
||||
# Nothing to build
|
||||
if _foamIsNone $hyprePACKAGE
|
||||
then
|
||||
echo "Using hypre-none (skip ThirdParty build of HYPRE)"
|
||||
exit 0
|
||||
elif _foamIsSystem $hyprePACKAGE
|
||||
then
|
||||
echo "Using hypre-system"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Build HYPRE
|
||||
#
|
||||
# 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}"
|
||||
|
||||
[ -d "$HYPRE_SOURCE_DIR" ] || {
|
||||
echo "Missing sources: '$hyprePACKAGE'"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
# Compilers
|
||||
CC="$(whichMpicc)"
|
||||
CXX="$(whichMpicxx)"
|
||||
|
||||
echo "Starting build: $hyprePACKAGE ($targetType)"
|
||||
echo
|
||||
(
|
||||
# Configuration options:
|
||||
unset configOpt
|
||||
|
||||
cd $HYPRE_SOURCE_DIR/src || exit 1
|
||||
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 \
|
||||
--disable-fortran \
|
||||
--enable-shared \
|
||||
$configOpt \
|
||||
&& make -j $WM_NCOMPPROCS \
|
||||
&& echo "Built: hypre" \
|
||||
&& make install \
|
||||
&& echo "Installed: hypre"
|
||||
) || {
|
||||
echo "Error building: hypre"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
23
makeKAHIP
23
makeKAHIP
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -19,19 +19,22 @@
|
||||
# ----------------------------------------------
|
||||
# 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" # <- KAHIP_ARCH_PATH
|
||||
dir="${2%/}" # <- KAHIP_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" ]
|
||||
@ -58,7 +61,7 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
}
|
||||
. etc/tools/ThirdPartyFunctions
|
||||
#------------------------------------------------------------------------------
|
||||
_foamEtc config.sh/kahip
|
||||
_foamConfig kahip
|
||||
|
||||
kahipPACKAGE=${KAHIP_VERSION:-kahip-system}
|
||||
targetType=libso
|
||||
@ -72,7 +75,7 @@ usage()
|
||||
|
||||
Usage: ${0##*/} [OPTION] [lib|libso] [kahip-VERSION]
|
||||
options:
|
||||
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
||||
-gcc Force use of gcc/g++
|
||||
-help
|
||||
|
||||
* Compile KaHIP
|
||||
@ -95,7 +98,7 @@ do
|
||||
targetType="$1"
|
||||
;;
|
||||
|
||||
kahip-[1-9]* | kahip-git)
|
||||
kahip-[1-9]* | kahip-git | KaHIP_* | KaHIP-[1-9]*)
|
||||
kahipPACKAGE="${1%%/}"
|
||||
unset KAHIP_ARCH_PATH # Avoid inconsistency
|
||||
;;
|
||||
@ -119,6 +122,8 @@ then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
requireWMakeToolchain
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Build KaHIP
|
||||
@ -160,7 +165,7 @@ echo
|
||||
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
|
||||
rm -f $FOAM_EXT_LIBBIN/libkahip$EXT_SO
|
||||
|
||||
libdir=$KAHIP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
|
||||
|
||||
|
||||
27
makeLLVM
27
makeLLVM
@ -3,8 +3,10 @@
|
||||
# ========= |
|
||||
# \\ / 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 | Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
@ -50,7 +52,7 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
WM_COMPILER_TYPE=ThirdParty # Ensure we get the correct settings
|
||||
|
||||
# LLVM/Clang version from OpenFOAM etc/config.sh file:
|
||||
_foamEtc config.sh/compiler
|
||||
_foamConfig compiler
|
||||
|
||||
llvmPACKAGE=$clang_version
|
||||
|
||||
@ -62,8 +64,8 @@ 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
|
||||
@ -72,10 +74,8 @@ options:
|
||||
USAGE
|
||||
exit 1
|
||||
}
|
||||
#-----------------------------------------------------------------------------
|
||||
# Compiler settings for CMake/configure
|
||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||
#------------------------------------------------------------------------------
|
||||
exportCompiler # Compiler info for CMake/configure
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
@ -164,9 +164,17 @@ else
|
||||
echo "Starting build: $llvmPACKAGE (using cmake)"
|
||||
echo
|
||||
(
|
||||
# Configuration options:
|
||||
unset configOpt
|
||||
|
||||
cd $LLVM_SOURCE_DIR || exit 1
|
||||
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
|
||||
|
||||
if [ -f tools/openmp/CMakeLists.txt ]
|
||||
then
|
||||
configOpt="$configOpt -DLLVM_TOOL_OPENMP_BUILD=ON"
|
||||
fi
|
||||
|
||||
rm -rf $LLVM_BUILD_DIR
|
||||
mkdir -p $LLVM_BUILD_DIR
|
||||
cd $LLVM_BUILD_DIR
|
||||
@ -178,6 +186,7 @@ else
|
||||
-DCMAKE_INSTALL_PREFIX=$LLVM_ARCH_PATH \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
$configOpt \
|
||||
$LLVM_SOURCE_DIR \
|
||||
&& set +x \
|
||||
&& make -j $WM_NCOMPPROCS \
|
||||
|
||||
29
makeMETIS
29
makeMETIS
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -19,19 +19,22 @@
|
||||
# ----------------------------------------------
|
||||
# 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" # <- METIS_ARCH_PATH
|
||||
dir="${2%/}" # <- METIS_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" ]
|
||||
@ -58,7 +61,7 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
}
|
||||
. etc/tools/ThirdPartyFunctions
|
||||
#------------------------------------------------------------------------------
|
||||
_foamEtc config.sh/metis
|
||||
_foamConfig metis
|
||||
|
||||
metisPACKAGE=${METIS_VERSION:-metis-system}
|
||||
targetType=libso
|
||||
@ -71,7 +74,7 @@ usage() {
|
||||
|
||||
usage: ${0##*/} [OPTION] [lib|libso] [METIS-VERSION]
|
||||
options:
|
||||
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
||||
-gcc Force use of gcc/g++
|
||||
-help
|
||||
|
||||
* build METIS with
|
||||
@ -81,9 +84,7 @@ USAGE
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
# Compiler settings for CMake/configure
|
||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||
exportCompiler # Compiler info for CMake/configure
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
@ -129,7 +130,7 @@ fi
|
||||
# METIS_SOURCE_DIR : location of the original sources
|
||||
|
||||
METIS_SOURCE_DIR=$sourceBASE/$metisPACKAGE
|
||||
: ${METIS_ARCH_PATH:=$installBASE$WM_PRECISION_OPTION$WM_LABEL_OPTION/$metisPACKAGE}
|
||||
: "${METIS_ARCH_PATH:=$installBASE$WM_SIZE_OPTIONS/$metisPACKAGE}"
|
||||
|
||||
[ -d "$METIS_SOURCE_DIR" ] || {
|
||||
echo "Missing sources: '$metisPACKAGE'"
|
||||
@ -145,10 +146,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
|
||||
}
|
||||
@ -167,7 +168,7 @@ echo
|
||||
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'=' \
|
||||
|
||||
30
makeMGridGen
30
makeMGridGen
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -30,7 +30,7 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# mgridgen version from OpenFOAM etc/config.sh file:
|
||||
_foamEtc config.sh/mgridgen
|
||||
_foamConfig mgridgen
|
||||
|
||||
mgridgenPACKAGE=${MGRIDGEN_VERSION:-mgridgen-none}
|
||||
|
||||
@ -42,7 +42,7 @@ usage() {
|
||||
|
||||
usage: ${0##*/} [OPTION] [mgridgen-VERSION]
|
||||
options:
|
||||
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
||||
-gcc Force use of gcc/g++
|
||||
-help
|
||||
|
||||
* Build MGridGen
|
||||
@ -53,20 +53,16 @@ USAGE
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Compiler settings for CMake/configure
|
||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||
exportCompiler # Compiler info for CMake/configure
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
-h | -help)
|
||||
usage
|
||||
;;
|
||||
-gcc)
|
||||
useGcc # Use gcc/g++
|
||||
;;
|
||||
'') ;; # Ignore empty
|
||||
-h | -help) usage ;;
|
||||
-gcc) useGcc ;;
|
||||
|
||||
mgridgen-[1-9]* | MGridGen-[1-9]* | parmgridgen-[1-9]* | ParMGridGen-[1-9]*)
|
||||
mgridgenPACKAGE="${1%%/}"
|
||||
;;
|
||||
@ -98,7 +94,7 @@ fi
|
||||
# MGRIDGEN_ARCH_PATH : installation directory
|
||||
|
||||
MGRIDGEN_SOURCE_DIR=$WM_THIRD_PARTY_DIR/$mgridgenPACKAGE
|
||||
MGRIDGEN_ARCH_PATH=$installBASE$WM_PRECISION_OPTION$WM_LABEL_OPTION/$mgridgenPACKAGE
|
||||
MGRIDGEN_ARCH_PATH="$installBASE$WM_SIZE_OPTIONS/$mgridgenPACKAGE"
|
||||
|
||||
: ${FOAM_MPI:=dummy}
|
||||
|
||||
@ -149,8 +145,8 @@ else
|
||||
# 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"
|
||||
@ -158,8 +154,8 @@ else
|
||||
make \
|
||||
COPTIONS="-fPIC" \
|
||||
LDOPTIONS="-fPIC" \
|
||||
CC=$serial \
|
||||
LD=$serial \
|
||||
CC="$serial" \
|
||||
LD="$serial" \
|
||||
LIBDIR="-L../.." \
|
||||
LIBS="-L../.. -lmgrid -lm" \
|
||||
make=make \
|
||||
|
||||
27
makeMPICH
27
makeMPICH
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -14,21 +14,24 @@
|
||||
# makeMPICH
|
||||
#
|
||||
# Description
|
||||
# Build script for mpich - legacy (unmaintained) build code!
|
||||
# Build script for mpich [unmaintained]
|
||||
#
|
||||
# ----------------------------------------------
|
||||
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||
#------------------------------------------------------------------------------
|
||||
# Dynamic library ending (default is .so)
|
||||
[ "$(uname -s)" = Darwin ] && EXT_SO=.dylib || EXT_SO=.so
|
||||
|
||||
# Short-circuit test for an installation
|
||||
if [ "$1" = "-test" ]
|
||||
then
|
||||
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
|
||||
dir="$2" # <- MPI_ARCH_PATH
|
||||
if [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpich.so" ]
|
||||
dir="${2%/}" # <- MPI_ARCH_PATH
|
||||
if [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
|
||||
then
|
||||
echo "Have mpich shared library (${dir##*/})"
|
||||
exit 0
|
||||
elif [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpich.a" ]
|
||||
elif [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
|
||||
then
|
||||
echo "Have mpich static library (${dir##*/})"
|
||||
exit 0
|
||||
@ -55,7 +58,7 @@ _foamAddPath() { true; }
|
||||
WM_MPLIB=MPICH # Ensure we get the correct MPI
|
||||
|
||||
# mpich version from OpenFOAM etc/config.sh file:
|
||||
_foamEtc config.sh/mpi
|
||||
_foamConfig mpi
|
||||
|
||||
mpiPACKAGE=${FOAM_MPI:-mpich-system}
|
||||
|
||||
@ -67,7 +70,7 @@ usage() {
|
||||
|
||||
usage: ${0##*/} [OPTION] [mpich-VERSION] [-- configure-options]
|
||||
options:
|
||||
-gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
||||
-gcc Force use of gcc/g++
|
||||
-help
|
||||
|
||||
* build mpich with
|
||||
@ -77,9 +80,7 @@ USAGE
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
# Compiler settings for CMake/configure
|
||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||
exportCompiler # Compiler info for CMake/configure
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
@ -124,10 +125,10 @@ fi
|
||||
MPI_SOURCE_DIR=$sourceBASE/$mpiPACKAGE
|
||||
MPI_ARCH_PATH=$installBASE/$mpiPACKAGE
|
||||
|
||||
if [ -r "$MPI_ARCH_PATH/lib_ARCH/libmpi.so" ]
|
||||
if [ -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 [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
|
||||
then
|
||||
echo "Already has static library"
|
||||
else
|
||||
@ -148,6 +149,8 @@ else
|
||||
# End of configuration options
|
||||
# ----------------------------
|
||||
|
||||
buildDIR=$buildBASE/$mpiPACKAGE
|
||||
|
||||
cd $MPI_SOURCE_DIR || exit 1
|
||||
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
|
||||
[ -e Makefile ] && make distclean 2>/dev/null
|
||||
|
||||
185
makeMVAPICH
Executable file
185
makeMVAPICH
Executable file
@ -0,0 +1,185 @@
|
||||
#!/bin/sh
|
||||
#------------------------------------------------------------------------------
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# 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%/}" # <- MPI_ARCH_PATH
|
||||
if [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
|
||||
then
|
||||
echo "Have mpich shared library (${dir##*/})"
|
||||
exit 0
|
||||
elif [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
|
||||
then
|
||||
echo "Have mpich static library (${dir##*/})"
|
||||
exit 0
|
||||
else
|
||||
echo "No mpich libraries found: ${dir:-not-specified}"
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
#------------------------------------------------------------------------------
|
||||
# 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
|
||||
# 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:
|
||||
-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
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
exportCompiler # Compiler info for CMake/configure
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
'') ;; # Ignore empty
|
||||
--) break;; # Extra configure options (leave on $@ for later detection)
|
||||
-h | -help) usage ;;
|
||||
-gcc) useGcc ;;
|
||||
|
||||
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 [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
|
||||
then
|
||||
echo "Already has shared library"
|
||||
elif [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
|
||||
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 1
|
||||
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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
106
makeMesa
106
makeMesa
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -34,10 +34,10 @@ 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:
|
||||
_foamEtc config.sh/vtk
|
||||
_foamConfig vtk
|
||||
|
||||
mesaPACKAGE=$mesa_version
|
||||
|
||||
@ -49,7 +49,8 @@ usage() {
|
||||
|
||||
usage: ${0##*/} [OPTION] mesa-VERSION [-- configure-options]
|
||||
options:
|
||||
-gcc Force gcc/g++ instead of the values from \$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
|
||||
@ -59,17 +60,27 @@ USAGE
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
# Compiler settings for CMake/configure
|
||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||
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
|
||||
|
||||
@ -82,12 +93,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'"
|
||||
;;
|
||||
@ -110,27 +128,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
|
||||
@ -151,11 +185,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
|
||||
@ -180,17 +220,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
12
makeMesa.example
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
# An example for building mesa with llvm
|
||||
|
||||
mesa=mesa-18.3.4
|
||||
llvm=llvm-4.0.1
|
||||
|
||||
set -x
|
||||
./makeMesa \
|
||||
$mesa $llvm
|
||||
"$@"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
19
makeOPENMPI
19
makeOPENMPI
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -19,12 +19,15 @@
|
||||
# ----------------------------------------------
|
||||
# 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" # <- MPI_ARCH_PATH
|
||||
if [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpi.so" ]
|
||||
dir="${2%/}" # <- MPI_ARCH_PATH
|
||||
if [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
|
||||
then
|
||||
echo " Have openmpi shared library (${dir##*/})"
|
||||
exit 0
|
||||
@ -55,7 +58,7 @@ _foamAddPath() { true; }
|
||||
WM_MPLIB=OPENMPI # Ensure we get the correct MPI
|
||||
|
||||
# openmpi version from OpenFOAM etc/config.sh file:
|
||||
_foamEtc config.sh/mpi
|
||||
_foamConfig mpi
|
||||
|
||||
mpiPACKAGE=${FOAM_MPI:-openmpi-system}
|
||||
|
||||
@ -67,7 +70,7 @@ usage() {
|
||||
|
||||
usage: ${0##*/} [OPTION] [openmpi-VERSION] [-- configure-options]
|
||||
options:
|
||||
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
||||
-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,9 +83,7 @@ USAGE
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
# Compiler settings for CMake/configure
|
||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||
exportCompiler # Compiler info for CMake/configure
|
||||
|
||||
unset optMemchecker optThreaded
|
||||
|
||||
@ -132,7 +133,7 @@ fi
|
||||
MPI_SOURCE_DIR=$sourceBASE/$mpiPACKAGE
|
||||
MPI_ARCH_PATH=$installBASE/$mpiPACKAGE
|
||||
|
||||
if [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.so" ]
|
||||
if [ -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" ]
|
||||
|
||||
194
makePETSC
Executable file
194
makePETSC
Executable file
@ -0,0 +1,194 @@
|
||||
#!/bin/sh
|
||||
#------------------------------------------------------------------------------
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Script
|
||||
# makePETSC
|
||||
#
|
||||
# Description
|
||||
# Build script for PETSC
|
||||
#
|
||||
# ----------------------------------------------
|
||||
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||
#------------------------------------------------------------------------------
|
||||
# Dynamic library ending (default is .so)
|
||||
[ "$(uname -s)" = Darwin ] && EXT_SO=.dylib || EXT_SO=.so
|
||||
|
||||
# Short-circuit test for an installation
|
||||
if [ "$1" = "-test" ]
|
||||
then
|
||||
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
|
||||
dir="${2%/}" # <- PETSC_ARCH_PATH
|
||||
if [ -d "$dir/include" ]
|
||||
then
|
||||
for lib in \
|
||||
$FOAM_EXT_LIBBIN/libpetsc$EXT_SO \
|
||||
$dir/lib/libpetsc.a \
|
||||
$dir/lib/libpetsc$EXT_SO \
|
||||
$dir/lib$WM_COMPILER_LIB_ARCH/libpetsc.a \
|
||||
$dir/lib$WM_COMPILER_LIB_ARCH/libpetsc$EXT_SO \
|
||||
;
|
||||
do
|
||||
if [ -r "$lib" ]
|
||||
then
|
||||
echo " petsc include: $dir/include"
|
||||
echo " petsc library: ${lib%/*}"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
fi
|
||||
exit 2
|
||||
fi
|
||||
#------------------------------------------------------------------------------
|
||||
# Run from third-party directory only
|
||||
cd ${0%/*} && 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 petsc
|
||||
|
||||
petscPACKAGE=${petsc_version:-petsc-system}
|
||||
targetType=libso
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
usage() {
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
|
||||
usage: ${0##*/} [OPTION] [lib|libso] [PETSC-VERSION]
|
||||
options:
|
||||
-gcc Force use of gcc/g++
|
||||
-help
|
||||
|
||||
* build PETSC with
|
||||
${petscPACKAGE:-'unspecified petsc version'}
|
||||
|
||||
USAGE
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
exportCompiler # Compiler info for CMake/configure
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
'') ;; # Ignore empty
|
||||
-h | -help) usage ;;
|
||||
-gcc) useGcc ;;
|
||||
|
||||
lib|libso)
|
||||
targetType="$1"
|
||||
;;
|
||||
|
||||
petsc-[0-9]*)
|
||||
petscPACKAGE="${1%%/}"
|
||||
unset PETSC_ARCH_PATH # Avoid inconsistency
|
||||
;;
|
||||
*)
|
||||
die "unknown option/argument: '$1'"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
[ -n "$petscPACKAGE" ] || die "The petsc-VERSION was not specified"
|
||||
|
||||
# Nothing to build
|
||||
if _foamIsNone $petscPACKAGE
|
||||
then
|
||||
echo "Using petsc-none (skip ThirdParty build of PETSC)"
|
||||
exit 0
|
||||
elif _foamIsSystem $petscPACKAGE
|
||||
then
|
||||
echo "Using petsc-system"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Build PETSC
|
||||
#
|
||||
# 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}"
|
||||
|
||||
[ -d "$PETSC_SOURCE_DIR" ] || {
|
||||
echo "Missing sources: '$petscPACKAGE'"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
echo "Starting build: $petscPACKAGE ($targetType)"
|
||||
echo
|
||||
(
|
||||
# PETSC arch - same root as WM_OPTIONS (eg, DPInt32)
|
||||
archOpt="$WM_SIZE_OPTIONS"
|
||||
|
||||
# Configuration options:
|
||||
configOpt="--with-cc=$(whichMpicc) --with-cxx=$(whichMpicxx)"
|
||||
|
||||
if [ "$targetType" = libso ]
|
||||
then
|
||||
configOpt="--with-shared-libraries"
|
||||
fi
|
||||
|
||||
if [ "$WM_LABEL_SIZE" = 64 ]
|
||||
then
|
||||
configOpt="$configOpt --with-64-bit-indices=1"
|
||||
else
|
||||
configOpt="$configOpt --with-64-bit-indices=0"
|
||||
fi
|
||||
|
||||
if [ "$WM_PRECISION_OPTION" = SP ]
|
||||
then
|
||||
configOpt="$configOpt --with-precision=single"
|
||||
else
|
||||
configOpt="$configOpt --with-precision=double"
|
||||
fi
|
||||
|
||||
cd $PETSC_SOURCE_DIR || exit 1
|
||||
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
|
||||
|
||||
rm -rf $PETSC_ARCH_PATH
|
||||
|
||||
./configure \
|
||||
--prefix=$PETSC_ARCH_PATH \
|
||||
--with-petsc-arch=$archOpt \
|
||||
--with-clanguage=C \
|
||||
--with-scalapack=0 \
|
||||
--with-superlu_dist=0 \
|
||||
--with-suitesparse=0 \
|
||||
--download-f2cblaslapack=1 \
|
||||
$configOpt \
|
||||
&& echo "Configured: petsc" \
|
||||
&& make 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"
|
||||
) || {
|
||||
echo "Error building: petsc"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
36
makeParaView
36
makeParaView
@ -3,8 +3,10 @@
|
||||
# ========= |
|
||||
# \\ / 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 | Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
@ -37,9 +39,23 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
unset ParaView_VERSION # Purge current values
|
||||
|
||||
# ParaView_VERSION from etc/config.sh file:
|
||||
_foamEtc config.sh/paraview
|
||||
_foamConfig paraview
|
||||
|
||||
# Avoid any potential conflicts (especially if building from git)
|
||||
if [ -d "$ParaView_DIR" ]
|
||||
then
|
||||
_foamClean PATH "$ParaView_DIR"
|
||||
_foamClean LD_LIBRARY_PATH "$ParaView_DIR"
|
||||
fi
|
||||
unset ParaView_DIR ParaView_INCLUDE_DIR PV_PLUGIN_PATH
|
||||
|
||||
case "$ParaView_VERSION" in
|
||||
[Pp]*)
|
||||
ParaView_VERSION="${ParaView_VERSION##*-}" # Without "ParaView-" prefix
|
||||
;;
|
||||
esac
|
||||
ParaView_VERSION="${ParaView_VERSION%%-*}" # Without suffix (eg, -python)
|
||||
|
||||
ParaView_VERSION="${ParaView_VERSION##*-}" # Without prefix
|
||||
|
||||
# Set initial ParaView_MAJOR based on current value of ParaView_VERSION
|
||||
setParaViewVersion ${ParaView_VERSION:-none}
|
||||
@ -56,7 +72,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
|
||||
@ -69,10 +86,9 @@ options:
|
||||
-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)
|
||||
@ -111,9 +127,7 @@ USAGE
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
# Compiler settings for CMake/configure
|
||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||
exportCompiler # Compiler info for CMake/configure
|
||||
|
||||
# Various building stages
|
||||
unset runPATCH runCONFIG runMAKE runINSTALL
|
||||
|
||||
@ -2,15 +2,22 @@
|
||||
# An example for building particular combinations of ParaView with
|
||||
# - mpi (0 = no upper-limit on processes)
|
||||
# - mesa
|
||||
# - python (required for Catalyst)
|
||||
#
|
||||
# NOTE: must modify etc/config.*/paraview to use this particular version
|
||||
# and combination, or use chaining as per etc/config.*/example/paraview
|
||||
|
||||
# mesa=mesa-11.2.2
|
||||
# mesa=mesa-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 \
|
||||
-suffix mesa \
|
||||
-python \
|
||||
-suffix mesa-mpi-py \
|
||||
"$@"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
14
makeQt
14
makeQt
@ -3,8 +3,10 @@
|
||||
# ========= |
|
||||
# \\ / 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 | Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# | Copyright (C) 2011 OpenFOAM Foundation
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
@ -35,7 +37,7 @@ usage() {
|
||||
|
||||
usage: ${0##*/} [OPTION] [qt-VERSION] [-- configure-options]
|
||||
options:
|
||||
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
||||
-gcc Force use of gcc/g++
|
||||
-help
|
||||
|
||||
* build $qtTYPE, version ${qtVERSION:-undefined}
|
||||
@ -44,11 +46,7 @@ USAGE
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
# Compiler/linker settings for CMake/configure
|
||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||
[ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS"
|
||||
[ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS"
|
||||
exportCompiler true # Compiler info + flags for CMake/configure
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
|
||||
290
makeSCOTCH
Executable file
290
makeSCOTCH
Executable file
@ -0,0 +1,290 @@
|
||||
#!/bin/sh
|
||||
#------------------------------------------------------------------------------
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Script
|
||||
# makeSCOTCH
|
||||
#
|
||||
# Description
|
||||
# Build the SCOTCH and PTSCOTCH libraries
|
||||
#
|
||||
# ----------------------------------------------
|
||||
# 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
|
||||
}
|
||||
[ -n "$FOAM_EXT_LIBBIN" ] || {
|
||||
echo "Error (${0##*/}) : \$FOAM_EXT_LIBBIN not set"
|
||||
echo " Check your OpenFOAM environment and installation"
|
||||
exit 1
|
||||
}
|
||||
. etc/tools/ThirdPartyFunctions
|
||||
#------------------------------------------------------------------------------
|
||||
_foamConfig scotch # Get SCOTCH_ARCH_PATH, SCOTCH_VERSION
|
||||
|
||||
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:
|
||||
-gcc Force use of gcc/g++
|
||||
-no-mpi Suppress build of pt-scotch
|
||||
-help
|
||||
|
||||
* Compile SCOTCH
|
||||
$kahipPACKAGE
|
||||
|
||||
USAGE
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
'') ;; # Ignore empty
|
||||
-h | -help) usage ;;
|
||||
-gcc) useGcc ;;
|
||||
|
||||
-no-mpi)
|
||||
unset withMPI
|
||||
;;
|
||||
scotch-[1-9]* | scotch-git | scotch_* | scotch-[1-9]*)
|
||||
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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# 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" ] || {
|
||||
echo "Missing sources: '$scotchPACKAGE'"
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo
|
||||
echo ========================================
|
||||
echo "scotch decomposition ($scotchPACKAGE)"
|
||||
echo " Makefile.inc : ${makefileInc##*/}"
|
||||
|
||||
# Test installation. May or may not have libscotcherrexit.so
|
||||
if [ -f "$SCOTCH_ARCH_PATH/include/scotch.h" ] \
|
||||
&& [ -r "$FOAM_EXT_LIBBIN/libscotch$EXT_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
|
||||
|
||||
[ -f "$scotchMakefile" ] || {
|
||||
echo " Error: no such makefile: $scotchMakefile"
|
||||
exit 1
|
||||
}
|
||||
|
||||
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 "$scotchPACKAGE" .. # patch at parent-level
|
||||
|
||||
prefixDIR=$SCOTCH_ARCH_PATH
|
||||
incDIR=$SCOTCH_ARCH_PATH/include
|
||||
libDIR=$FOAM_EXT_LIBBIN
|
||||
|
||||
mkdir -p $prefixDIR 2>/dev/null
|
||||
mkdir -p $incDIR 2>/dev/null
|
||||
mkdir -p $libDIR 2>/dev/null
|
||||
|
||||
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)"
|
||||
|
||||
make realclean 2>/dev/null # Extra safety
|
||||
make -j $WM_NCOMPPROCS libscotch \
|
||||
&& make \
|
||||
prefix=$prefixDIR \
|
||||
includedir=$incDIR \
|
||||
libdir=$libDIR \
|
||||
install
|
||||
|
||||
rmdir "$SCOTCH_ARCH_PATH/bin" 2> /dev/null || true # Superfluous bin?
|
||||
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
|
||||
|
||||
[ "${withMPI}" = true ] || {
|
||||
# Report that the above tests failed and pass-through the failure
|
||||
echo "Skipping pt-scotch (no mpi)"
|
||||
exit 0
|
||||
}
|
||||
|
||||
echo
|
||||
echo ========================================
|
||||
echo "pt-scotch decomposition ($scotchPACKAGE with $FOAM_MPI)"
|
||||
|
||||
# Build ptscotch if normal scotch was built (has include and library)
|
||||
[ -f "$SCOTCH_ARCH_PATH/include/scotch.h" ] && \
|
||||
[ -r "$FOAM_EXT_LIBBIN/libscotch$EXT_SO" ] || \
|
||||
{
|
||||
# Report that the above tests failed and pass-through the failure
|
||||
echo
|
||||
echo " skipping - no <scotch.h> found"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ -f "$SCOTCH_ARCH_PATH/include/$FOAM_MPI/ptscotch.h" ] && \
|
||||
[ -r "$FOAM_EXT_LIBBIN/$FOAM_MPI/libptscotch$EXT_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 ***"
|
||||
|
||||
[ -f "$scotchMakefile" ] || {
|
||||
echo " Error: no such makefile: $scotchMakefile"
|
||||
exit 1
|
||||
}
|
||||
|
||||
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 "$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)"
|
||||
|
||||
make realclean 2>/dev/null # Extra safety
|
||||
make -j $WM_NCOMPPROCS libptscotch \
|
||||
&& make \
|
||||
prefix=$prefixDIR \
|
||||
includedir=$incDIR \
|
||||
libdir=$libDIR \
|
||||
install
|
||||
|
||||
rmdir "$SCOTCH_ARCH_PATH/bin" 2> /dev/null || true # Superfluous bin?
|
||||
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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
186
makeTecio
186
makeTecio
@ -1,186 +0,0 @@
|
||||
#!/bin/sh
|
||||
#------------------------------------------------------------------------------
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, licensed under GNU General Public License
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Script
|
||||
# makeTecio
|
||||
#
|
||||
# Description
|
||||
# Build Tecplot library
|
||||
#
|
||||
# ----------------------------------------------
|
||||
# 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
|
||||
}
|
||||
[ -n "$FOAM_EXT_LIBBIN" ] || {
|
||||
echo "Error (${0##*/}) : \$FOAM_EXT_LIBBIN not set"
|
||||
echo " Check your OpenFOAM environment and installation"
|
||||
exit 1
|
||||
}
|
||||
. etc/tools/ThirdPartyFunctions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Boost version (headers only) from OpenFOAM etc/config.sh file:
|
||||
_foamEtc config.sh/CGAL
|
||||
|
||||
boostPACKAGE=${boost_version:-boost-system}
|
||||
tecioPACKAGE=tecio
|
||||
targetType=lib
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
usage()
|
||||
{
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
/bin/cat<<USAGE
|
||||
|
||||
Usage: ${0##*/} [OPTION] [boost-VERSION] [tecio-VERSION]
|
||||
options:
|
||||
-cmake PATH With cmake from the path given
|
||||
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
|
||||
-help
|
||||
|
||||
* Compile the proprietary libtecio library
|
||||
$tecioPACKAGE
|
||||
with $boostPACKAGE
|
||||
|
||||
USAGE
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
# Compiler settings for CMake/configure
|
||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
'') ;; # Ignore empty
|
||||
-h | -help) usage ;;
|
||||
-gcc) useGcc ;;
|
||||
|
||||
-cmake)
|
||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||
CMAKE_PATH="${2%%/}"
|
||||
shift
|
||||
;;
|
||||
boost-[0-9]* | boost_[0-9]* | boost-system )
|
||||
boostPACKAGE="${1%%/}"
|
||||
;;
|
||||
tecio*)
|
||||
tecioPACKAGE="${1%%/}"
|
||||
;;
|
||||
*)
|
||||
die "unknown option/argument: '$1'"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Build TECIO library
|
||||
#
|
||||
# TECIO_SOURCE_DIR : location of the original sources
|
||||
# TECIO_BUILD_DIR : location of the build
|
||||
# TECIO_ARCH_PATH : location of the installed program
|
||||
|
||||
TECIO_SOURCE_DIR=$sourceBASE/$tecioPACKAGE/teciosrc
|
||||
TECIO_BUILD_DIR=$buildBASE/$tecioPACKAGE
|
||||
TECIO_ARCH_PATH=$installBASE/$tecioPACKAGE
|
||||
|
||||
# Sources must be available
|
||||
[ -d "$TECIO_SOURCE_DIR" ] || die "Missing sources '$tecioPACKAGE'"
|
||||
|
||||
|
||||
# Get Boost information
|
||||
# - only headers are required
|
||||
: ${BOOST_ARCH_PATH:=$installBASE/$boostPACKAGE} # Fallback
|
||||
|
||||
boostInc="$BOOST_ARCH_PATH/include"
|
||||
|
||||
if _foamIsSystem $boostPACKAGE
|
||||
then
|
||||
echo "Using boost-system"
|
||||
|
||||
# Tagged as 'system' but could actually point to a central location
|
||||
[ -d "$BOOST_ARCH_PATH/include" ] || {
|
||||
boostInc="/usr/include"
|
||||
}
|
||||
elif [ -f "$boostInc/boost/version.hpp" ]
|
||||
then
|
||||
echo "Using $boostPACKAGE"
|
||||
fi
|
||||
|
||||
|
||||
if [ -d "$TECIO_SOURCE_DIR" ]
|
||||
then
|
||||
(
|
||||
# Remove any existing build folder and recreate
|
||||
if [ -d $TECIO_BUILD_DIR ]
|
||||
then
|
||||
echo "removing old build directory"
|
||||
echo " $TECIO_BUILD_DIR"
|
||||
rm -rf $TECIO_BUILD_DIR
|
||||
fi
|
||||
mkdir -p $TECIO_BUILD_DIR
|
||||
|
||||
rm -rf $TECIO_ARCH_PATH
|
||||
|
||||
unset configBoost
|
||||
echo "----"
|
||||
echo "Configuring $tecioPACKAGE with boost $BOOST_VERSION"
|
||||
echo " Source : $TECIO_SOURCE_DIR"
|
||||
echo " Build : $TECIO_BUILD_DIR"
|
||||
echo " Target : $TECIO_ARCH_PATH"
|
||||
|
||||
if [ -d "$BOOST_ARCH_PATH" ]
|
||||
then
|
||||
echo " Boost : ThirdParty (${BOOST_ARCH_PATH##*/})"
|
||||
else
|
||||
echo " Boost : system"
|
||||
fi
|
||||
|
||||
cmake=$(findCMake)
|
||||
|
||||
echo "----"
|
||||
set -x
|
||||
cd $TECIO_BUILD_DIR && $cmake \
|
||||
-DCMAKE_INSTALL_PREFIX=$TECIO_ARCH_PATH \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBoost_INCLUDE_DIR=$boostInc \
|
||||
$TECIO_SOURCE_DIR \
|
||||
&& make -j $WM_NCOMPPROCS \
|
||||
&& { \
|
||||
# Tecio doesn't offer to install, but fortunately only a few files,
|
||||
# so just install in a single directory
|
||||
mkdir -p $TECIO_ARCH_PATH 2>/dev/null
|
||||
|
||||
/bin/cp -pv \
|
||||
$TECIO_BUILD_DIR/libtecio.a \
|
||||
$TECIO_SOURCE_DIR/TECIO.h \
|
||||
$TECIO_SOURCE_DIR/tecio_Exports.h \
|
||||
$TECIO_ARCH_PATH
|
||||
|
||||
chmod 0644 $TECIO_ARCH_PATH/*
|
||||
} \
|
||||
&& echo "Built: $tecioPACKAGE"
|
||||
) || {
|
||||
echo "Error building: $tecioPACKAGE"
|
||||
}
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
24
makeVTK
24
makeVTK
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -40,9 +40,17 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
unset vtk_version mesa_version # Purge current values
|
||||
|
||||
# vtk version from OpenFOAM etc/config.sh file:
|
||||
_foamEtc config.sh/vtk
|
||||
_foamConfig vtk
|
||||
|
||||
VTK_VERSION="$vtk_version"
|
||||
|
||||
case "$VTK_VERSION" in
|
||||
[Vv]*)
|
||||
VTK_VERSION="${VTK_VERSION##*-}" # Without "VTK-" prefix
|
||||
;;
|
||||
esac
|
||||
VTK_VERSION="${VTK_VERSION%%-*}" # Without suffix (eg, -mesa)
|
||||
|
||||
VTK_VERSION="${vtk_version##*-}" # Without prefix
|
||||
|
||||
# New rendering backend (starting with vtk 7?).
|
||||
withGL2=auto # auto-config based on version
|
||||
@ -55,7 +63,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)
|
||||
@ -63,9 +72,8 @@ options:
|
||||
-mesa-include DIR location of mesa headers (current: ${MESA_INCLUDE:-none})
|
||||
-mesa-lib PATH path to mesa library (current: ${MESA_LIBRARY:-none})
|
||||
-osmesa with off-screen mesa only
|
||||
-mpi with mpi
|
||||
-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)
|
||||
@ -95,9 +103,7 @@ USAGE
|
||||
exit 1
|
||||
}
|
||||
#------------------------------------------------------------------------------
|
||||
# Compiler settings for CMake/configure
|
||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||
exportCompiler # Compiler info for CMake/configure
|
||||
|
||||
# Various building stages
|
||||
unset runPATCH runCONFIG runMAKE runINSTALL
|
||||
|
||||
@ -2,15 +2,22 @@
|
||||
# An example for building particular combinations of VTK with
|
||||
# - mesa (off-screen only)
|
||||
|
||||
vtk=VTK-8.1.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
|
||||
#
|
||||
# -mpi implies VTK_Group_MPI : Request building MPI modules
|
||||
|
||||
set -x
|
||||
./makeVTK \
|
||||
$vtk \
|
||||
-mpi \
|
||||
-osmesa \
|
||||
-mesa-prefix $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$mesa \
|
||||
"$@"
|
||||
$vtk "$@" \
|
||||
Module_vtkAcceleratorsVTKm=ON
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user