22 Commits
v1712 ... v1806

Author SHA1 Message Date
a91157470d Merge branch 'develop' into 'master'
Final content for 1806 release

Closes #31 and #30

See merge request Development/ThirdParty-plus!6
2018-06-28 09:31:12 +01:00
8a53a789f7 DOC: update versions listed in SOURCES.txt
- update BUILD.md to mention the possible build issues related to Qt.

- additional comments about using binaries for ParaView instead of
  building from source
2018-06-27 17:03:31 +02:00
a42362f8b8 ENH: add paraview file series reader patch from upstream
- https://gitlab.kitware.com/paraview/paraview/merge_requests/2532

- bump ParaView to 5.5.2
2018-06-20 01:57:49 +02:00
4f844dabcf STYLE: use _foamConfig function instead of _foamEtc -config 2018-06-19 20:41:57 +02:00
d446ee8b31 ENH: add makeADIOS2 script 2018-06-19 20:30:19 +02:00
54efaa445a STYLE: additional comments about suffixes
- strip both prefix and suffix for VTK and ParaView builds
2018-06-11 10:19:18 +02:00
dab3042c45 CONFIG: update link and patch for paraview-5.5.1
- add note about building older Qt
2018-06-08 15:07:16 +02:00
52ad71871c CONFIG: add patches for ParaView Catalyst
- resolve problem with working directory:

    https://develop.openfoam.com/Community/catalyst/issues/4
    https://gitlab.kitware.com/paraview/paraview/merge_requests/2436
2018-05-11 12:10:16 +02:00
31ffa9c92c COMP: compilation of scotch on Darwin 2018-04-25 00:10:31 +02:00
5886ce9f65 COMP: add patch for VTKm cmake file
- https://gitlab.kitware.com/paraview/paraview/issues/18116
2018-04-23 12:04:50 +02:00
93b8816b3e COMP: remove makeTecio script
- removed foamToTecplot360 from the OpenFOAM source as not being
  reliably maintainable.
2018-04-23 11:54:45 +02:00
cbea5788a3 ENH: include qmake-qt5 in the search for qt
- some systems (eg, opensuse) use that since it has both qt4 and qt5
  installed. ParaView now needs qt5 (preferrably 5.9).

STYLE: update version information for ParaView and Qt
2018-04-12 10:48:05 +02:00
6d7ef8dc42 COMP: adjust make scripts for systems with .dylib instead of .so 2018-04-11 16:28:32 +02:00
455551b48b COMP: adjust Allwmake to build scotch-6.0.5a (fixes #31)
- only builds properly in serial.
  Allwmake adjusted accordingly, or simply build with '-j 1'
2018-03-05 16:32:38 +01:00
231733bc15 STYLE: use foamEtcFile with -config option instead of config.sh/ 2018-01-22 16:05:19 +01:00
5ecf33d4d8 COMP: compile llvm with openmp if the tools/openmp directory has content 2018-01-22 14:41:05 +01:00
475220cfae COMP: unset ParaView_DIR from PATH, LD_LIBRARY_PATH when building
- potential symbol conflicts and build errors if building from the git
  version since it uses the last major number (eg, 5.4) but may have a
  layout similar to the next release (eg, 5.5) and thus different
  sizes for classes etc.
2018-01-22 11:29:06 +01:00
de7ac04146 COMP: adjustments to makeCGAL for compilation with alternative mpfr/gmp
- document special steps for using ThirdParty mpfr/gmp with clang etc
2018-01-15 13:04:49 +01:00
7419702a85 DOC: note that min clang version 3.5 is required for building CGAL 2018-01-10 18:05:03 +01:00
43cbb24ddd COMP: check for wmake toolchain when building third-party (fixes #30) 2018-01-08 13:43:29 +01:00
f49d26dad5 COMP: more stringent checks for WM compiler settings (issue #29)
- only export the WM_* settings to their plain counterparts

     (eg, export CC=$WM_CC)

  when they actually point to an accessible program

  This helps in particular when bootstrapping builds with third-party
  compilers.
2018-01-03 13:41:12 +01:00
4c049afb40 ENH: add configure options for makeFFTW 2018-01-03 12:43:51 +01:00
30 changed files with 1427 additions and 430 deletions

View File

@ -4,7 +4,7 @@
# \\ / 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.
# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
@ -19,6 +19,9 @@
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Dynamic library endings (default is .so)
[ "$(uname -s)" = Darwin ] && SO=dylib || SO=so
# Run from third-party directory only
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
@ -32,13 +35,8 @@ 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()
@ -94,17 +92,26 @@ 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
scotchMakefile=etc/makeFiles/scotch/Makefile.inc.OpenFOAM-"$(uname -s)".shlib
[ -f $scotchMakefile ] || \
scotchMakefile=${scotchMakefile%/*}/Makefile.inc.OpenFOAM-Linux.shlib
if [ -f $SCOTCH_ARCH_PATH/include/scotch.h \
-a -r $FOAM_EXT_LIBBIN/libscotch.so \
-a -r $FOAM_EXT_LIBBIN/libscotcherrexit.so ]
-a -r $FOAM_EXT_LIBBIN/libscotch.$SO \
-a -r $FOAM_EXT_LIBBIN/libscotcherrexit.$SO ]
then
echo " scotch include: $SCOTCH_ARCH_PATH/include"
echo " scotch library: $FOAM_EXT_LIBBIN"
elif [ -d "$SCOTCH_SOURCE_DIR" ]
then
(
# Older versions ok, but scotch-6.0.5a cannot build in parallel.
# Force serial build
export WM_NCOMPPROCS=1
echo "*** building scotch in serial ***"
echo
cd $SCOTCH_SOURCE_DIR/src || exit 1
export GIT_DIR=$SCOTCH_SOURCE_DIR/.git # Mask seeing our own git-repo
rm -rf $SCOTCH_ARCH_PATH
@ -119,6 +126,9 @@ then
mkdir -p $incDIR 2>/dev/null
mkdir -p $libDIR 2>/dev/null
# Makefile relative to this directory
scotchMakefile=../../$scotchMakefile
if [ -f $scotchMakefile ]
then
rm -f Makefile.inc
@ -153,7 +163,7 @@ fi
# 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 ] || \
-a -r $FOAM_EXT_LIBBIN/libscotch.$SO ] || \
{
# Report that the above tests failed and pass-through the failure
echo
@ -167,13 +177,18 @@ then
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 ]
-a -r $FOAM_EXT_LIBBIN/$FOAM_MPI/libptscotch.$SO \
-a -r $FOAM_EXT_LIBBIN/$FOAM_MPI/libptscotcherrexit.$SO ]
then
echo " ptscotch include: $SCOTCH_ARCH_PATH/include/$FOAM_MPI"
echo " ptscotch library: $FOAM_EXT_LIBBIN/$FOAM_MPI"
else
(
# Older versions ok, but scotch-6.0.5a cannot build in parallel.
# Force serial build
export WM_NCOMPPROCS=1
echo "*** building pt-scotch in serial ***"
cd $SCOTCH_SOURCE_DIR/src || exit 1
export GIT_DIR=$SCOTCH_SOURCE_DIR/.git # Mask seeing our own git-repo
echo

150
BUILD.md
View File

@ -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 | |
|--------------------------------------------------------------------------|
-->
@ -83,9 +83,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 +93,75 @@ 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 but highly recommended)*
- This is optional, but extremely useful for visualization and for
run-time post-processing function objects.
You can build this at a later point in time, but then you should
remember to rebuild the post-processing function objects and the
reader module as well.
5. Make any additional optional components
3. Make any additional optional components
#### Optional Components
@ -151,9 +196,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 +222,16 @@ and save some disk space.
## Build Notes
### CGAL
- The zlib library and zlib development headers are required.
### Scotch
- The zlib library and zlib 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.
@ -198,17 +243,17 @@ and save some disk space.
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.5.2/VTK VTK-9.0.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
$ cat ParaView-v5.5.2/VTK/CMake/vtkVersion.cmake
# VTK version number components.
set(VTK_MAJOR_VERSION 8)
set(VTK_MINOR_VERSION 1)
set(VTK_MAJOR_VERSION 9)
set(VTK_MINOR_VERSION 0)
set(VTK_BUILD_VERSION 0)
### ParaView
@ -217,6 +262,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.5.x binary package
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,15 +314,15 @@ 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.5.2
- ParaView versions prior to 5.3.0 do not properly support QT5.
@ -254,6 +331,11 @@ 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
@ -294,7 +376,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.5.
*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 +403,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]
@ -340,9 +421,9 @@ 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-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>
@ -355,9 +436,10 @@ The minimum CMake requirements for building various components.
2.8.12.2 llvm-3.7.0
2.8.12.2 llvm-3.8.0
2.8.4 cmake-3.6.0
3.3 ParaView-5.4.1
3.3 ParaView-5.5.2
3.4.3 llvm-3.9.1
3.4.3 llvm-4.0.0
3.4.3 llvm-4.0.0 - llvm-6.0.0
3.6 ADIOS2
### GCC Minimum Requirements <a name="min-gcc"></a>
@ -409,6 +491,7 @@ that clang compiler for building the newer llvm/clang version.
[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/37398/scotch_6.0.5a.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
@ -438,9 +521,6 @@ 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
@ -448,16 +528,18 @@ that clang compiler for building the newer llvm/clang version.
<!-- 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 ParaView]: http://www.paraview.org/files/v5.5/ParaView-v5.5.2.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 -->
@ -480,4 +562,4 @@ that clang compiler for building the newer llvm/clang version.
---
Copyright 2016-2017 OpenCFD Ltd
Copyright 2016-2018 OpenCFD Ltd

View File

@ -1,5 +1,16 @@
Short summary of third-party software versions for recent OpenFOAM versions.
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 +52,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 +60,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 +69,7 @@ scotch_6.0.3 *update*
---------------
OpenFOAM-v2.3
OpenFOAM-2.3
---------------
CGAL-4.3
ParaView-4.1.0

View File

@ -0,0 +1,45 @@
#-------------------------------*- makefile -*---------------------------------
# OpenFOAM notes:
#
# WM_CFLAGS, WM_LDFLAGS contain "-m32 -fPIC" etc
# WM_LABEL_SIZE == 64 for 'long' instead of 'int' for OpenFOAM labels
#
# - compiled without pthread
#
# 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) -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
#------------------------------------------------------------------------------

1
etc/patches/paraview-5.5.1 Symbolic link
View File

@ -0,0 +1 @@
paraview-5.5.2

655
etc/patches/paraview-5.5.2 Normal file
View File

@ -0,0 +1,655 @@
--- 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-->

View File

@ -3,7 +3,7 @@
# \\ / 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.
# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
@ -304,7 +304,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 +450,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)

View File

@ -3,7 +3,7 @@
# \\ / 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.
# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
@ -24,8 +24,43 @@ 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
# Dynamic library endings (default is .so)
[ "$(uname -s)" = Darwin ] && SO=dylib || SO=so
unset BUILD_SUFFIX
#------------------------------------------------------------------------------
# Export WM compiler settings (and flags) for CMake/configure
# $1 = true: export compiler flags too
exportCompiler()
{
if test -n "$WM_CC" && command -v "$WM_CC" >/dev/null
then
export CC="$WM_CC"
if [ "$1" = true -a -n "$WM_CFLAGS" ]
then
export CFLAGS="$WM_CFLAGS"
fi
fi
if test -n "$WM_CXX" && command -v "$WM_CXX" >/dev/null
then
export CXX="$WM_CXX"
if [ "$1" = true -a -n "$WM_CXXFLAGS" ]
then
export CXXFLAGS="$WM_CXXFLAGS"
fi
fi
}
# Export WM linker settings for CMake/configure
exportLinker()
{
if [ -n "$WM_LDFLAGS" ]
then
export LDFLAGS="$WM_LDFLAGS"
fi
}
# Force use of gcc/g++
useGcc()
{
@ -63,21 +98,50 @@ whichMpicc()
echo "${mpicc:-mpicc}"
}
# The presence of wmkdep etc required for building with wmake
requireWMakeToolchain()
{
local dir="${WM_DIR:-$WM_PROJECT_DIR/wmake}"
local src="$dir/src"
local bin="$dir/platforms/$WM_ARCH$WM_COMPILER/wmkdep"
test -x $bin || {
echo "Warning: the 'wmkdep' binary is missing - attempting to build it"
( cd $src && make -s )
}
test -x $bin || {
exec 1>&2
echo
echo "Error: cannot use wmake build for '${0##*/}"
echo " The 'wmkdep' binary is missing"
echo " Please run the top-level OpenFOAM Allwmake first"
echo
exit 1
}
}
#------------------------------------------------------------------------------
# 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 $@)"; }
#------------------------------------------------------------------------------
@ -103,19 +167,18 @@ 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=$(egrep -c "^processor" /proc/cpuinfo 2>/dev/null) || \
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
@ -210,21 +273,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 +350,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 +399,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 +447,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 +560,5 @@ applyPatch()
fi
}
#------------------------------------------------------------------------------

View File

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

163
makeADIOS2 Executable file
View File

@ -0,0 +1,163 @@
#!/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:
-cmake PATH With cmake from the path given
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
-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
: ${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
# HACK
export ADIOS1_ROOT=/local/home/mark/openfoam/ThirdParty-plus/platforms/linux64Gcc/ADIOS-1.12.0
cmake=$(findCMake)
# Install into lib64/
cd $buildDIR && $cmake \
-DCMAKE_INSTALL_PREFIX=$ADIOS2_ARCH_PATH \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_FORTRAN=FALSE \
-DADIOS1_USE_STATIC_LIBS=TRUE \
${WM_QUIET:+-DCMAKE_RULE_MESSAGES=OFF} \
$ADIOS2_SOURCE_DIR \
&& make -j $WM_NCOMPPROCS all \
&& make install \
&& echo "Built: $adios2PACKAGE"
) || {
echo "Error building: $adios2PACKAGE"
}
fi
# -----------------------------------------------------------------------------

View File

@ -4,7 +4,7 @@
# \\ / 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.
# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
@ -19,6 +19,9 @@
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Dynamic library endings (default is .so)
[ "$(uname -s)" = Darwin ] && SO=dylib || SO=so
# Run from third-party directory only
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
@ -34,7 +37,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
@ -89,6 +92,8 @@ do
shift
done
requireWMakeToolchain
#------------------------------------------------------------------------------
#
# Build LIBCCMIO
@ -122,7 +127,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.$SO
libdir=$CCMIO_ARCH_PATH/lib

205
makeCGAL
View File

@ -4,7 +4,7 @@
# \\ / 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.
# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
@ -25,12 +25,15 @@
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Dynamic library endings (default is .so)
[ "$(uname -s)" = Darwin ] && SO=dylib || SO=so
# Short-circuit test for an installation
if [ "$1" = "-test" ]
then
[ "$#" -eq 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" ]
if [ -d "$dir/include" -a -r "$dir/lib$WM_COMPILER_LIB_ARCH/libCGAL.$SO" ]
then
echo " CGAL include: $dir/include"
echo " CGAL library: $dir/lib$WM_COMPILER_LIB_ARCH"
@ -39,7 +42,7 @@ then
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.$SO" ]
then
echo " boost include: $root/include"
echo " boost library: $root/lib$WM_COMPILER_LIB_ARCH"
@ -60,13 +63,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}
@ -104,12 +106,9 @@ 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 optHeadersOnly
# Parse options
while [ "$#" -gt 0 ]
do
@ -127,24 +126,26 @@ do
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,14 +190,37 @@ 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
@ -221,7 +245,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 +266,6 @@ else
exit 1
fi
#------------------------------------------------------------------------------
cat<<SUMMARY
CGAL configuration
------------------
CGAL = $cgalPACKAGE
BOOST = $boostPACKAGE
GMP = $gmpPACKAGE
MPFR = $mpfrPACKAGE
------------------
SUMMARY
#------------------------------------------------------------------------------
#
# Build CGAL
@ -271,22 +283,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 +365,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 +381,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 +436,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.$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_VERSION=$BOOST_VERSION
CMAKE_OPTIONS
)
@ -409,44 +464,64 @@ 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.$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.$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.$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.$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)
@ -484,7 +559,7 @@ CMAKE_OPTIONS
fi
done
# record our build-status
# Record our build-status
recordCGALinfo
echo "Done CGAL"

View File

@ -4,7 +4,7 @@
# \\ / 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.
# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
@ -53,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
unset optLink
# Parse options

View File

@ -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
@ -19,12 +19,15 @@
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Dynamic library endings (default is .so)
[ "$(uname -s)" = Darwin ] && SO=dylib || SO=so
# Short-circuit test for an installation
if [ "$1" = "-test" ]
then
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
dir="$2" # <- FFTW_ARCH_PATH
if [ -d "$dir/include" -a -r "$dir/lib$WM_COMPILER_LIB_ARCH/libfftw3.so" ]
if [ -d "$dir/include" -a -r "$dir/lib$WM_COMPILER_LIB_ARCH/libfftw3.$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,7 +57,7 @@ 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
-help
@ -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.$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 \

View File

@ -39,12 +39,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}
@ -99,12 +100,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%%/}"
@ -169,7 +173,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

View File

@ -4,7 +4,7 @@
# \\ / 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.
# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
@ -29,7 +29,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}
@ -51,9 +51,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 ]

View File

@ -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,6 +19,9 @@
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Dynamic library endings (default is .so)
[ "$(uname -s)" = Darwin ] && SO=dylib || SO=so
# Short-circuit test for an installation
if [ "$1" = "-test" ]
then
@ -27,11 +30,11 @@ then
if [ -d "$dir/include" ]
then
for lib in \
$FOAM_EXT_LIBBIN/libkahip.so \
$FOAM_EXT_LIBBIN/libkahip.$SO \
$dir/lib/libkahip.a \
$dir/lib/libkahip.so \
$dir/lib/libkahip.$SO \
$dir/lib$WM_COMPILER_LIB_ARCH/libkahip.a \
$dir/lib$WM_COMPILER_LIB_ARCH/libkahip.so \
$dir/lib$WM_COMPILER_LIB_ARCH/libkahip.$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
@ -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.$SO
libdir=$KAHIP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH

View File

@ -4,7 +4,7 @@
# \\ / 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.
# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
@ -50,7 +50,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
@ -72,10 +72,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 +162,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 +184,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 \

View File

@ -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,6 +19,9 @@
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Dynamic library endings (default is .so)
[ "$(uname -s)" = Darwin ] && SO=dylib || SO=so
# Short-circuit test for an installation
if [ "$1" = "-test" ]
then
@ -27,11 +30,11 @@ then
if [ -d "$dir/include" ]
then
for lib in \
$FOAM_EXT_LIBBIN/libmetis.so \
$FOAM_EXT_LIBBIN/libmetis.$SO \
$dir/lib/libmetis.a \
$dir/lib/libmetis.so \
$dir/lib/libmetis.$SO \
$dir/lib$WM_COMPILER_LIB_ARCH/libmetis.a \
$dir/lib$WM_COMPILER_LIB_ARCH/libmetis.so \
$dir/lib$WM_COMPILER_LIB_ARCH/libmetis.$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
@ -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 ]
@ -145,10 +146,10 @@ install()
if [ "$targetType" = libso ]
then
\mv $libdir/libmetis.so $FOAM_EXT_LIBBIN
\mv $libdir/libmetis.$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.$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.$SO
# Adjust metis integer size to match OpenFOAM label-size
sed -i -e 's=\(#define IDXTYPEWIDTH\).*=\1 '$WM_LABEL_SIZE'=' \

View File

@ -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
@ -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}
@ -53,9 +53,7 @@ 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 ]

View File

@ -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,12 +19,15 @@
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Dynamic library endings (default is .so)
[ "$(uname -s)" = Darwin ] && SO=dylib || SO=so
# Short-circuit test for an installation
if [ "$1" = "-test" ]
then
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
dir="$2" # <- MPI_ARCH_PATH
if [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpich.so" ]
if [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpich.$SO" ]
then
echo "Have mpich shared 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}
@ -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,7 +125,7 @@ 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_ARCH/libmpi.$SO" ]
then
echo "Already has shared library"
elif [ -r "$MPI_ARCH_PATH/lib/libmpi.a" ]

View File

@ -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
@ -37,7 +37,7 @@ cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
unset vtk_version mesa_version # Purge current values
# mesa version from OpenFOAM etc/config.sh file:
_foamEtc config.sh/vtk
_foamConfig vtk
mesaPACKAGE=$mesa_version
@ -59,9 +59,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
# Non-standard location for clang?
case "$WM_COMPILER_TYPE-$WM_COMPILER" in

View File

@ -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,12 +19,15 @@
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Dynamic library endings (default is .so)
[ "$(uname -s)" = Darwin ] && SO=dylib || SO=so
# Short-circuit test for an installation
if [ "$1" = "-test" ]
then
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
dir="$2" # <- MPI_ARCH_PATH
if [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpi.so" ]
if [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpi.$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}
@ -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.$SO" ]
then
echo "Already has shared library: $MPI_ARCH_PATH"
elif [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]

View File

@ -4,7 +4,7 @@
# \\ / 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.
# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
@ -37,9 +37,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}
@ -111,9 +125,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

View File

@ -2,15 +2,21 @@
# 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
set -x
./makeParaView \
-mpi=0 \
-mesa-prefix $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$mesa \
-suffix mesa \
-python \
-suffix mesa-mpi-py \
"$@"
#------------------------------------------------------------------------------

8
makeQt
View File

@ -4,7 +4,7 @@
# \\ / 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.
# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
@ -44,11 +44,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 ]

186
makeTecio
View File

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

18
makeVTK
View File

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

View File

@ -2,15 +2,29 @@
# An example for building particular combinations of VTK with
# - mesa (off-screen only)
vtk=VTK-8.1.0
vtk=VTK-9.0.0
# mesa=mesa-11.2.2
# mesa=mesa-13.0.3
mesa=mesa-17.1.1
# Request building MPI modules
# VTK_Group_MPI=ON
#
# Request building vtkAcceleratorsVTKm
# Module_vtkAcceleratorsVTKm=OFF
#
# Request building vtkParallelMPI
# Module_vtkParallelMPI=ON
set -x
./makeVTK \
$vtk \
-mpi=0 \
-osmesa \
-mesa-prefix $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$mesa \
"$@"
$vtk "$@" \
VTK_Group_MPI=ON \
Module_vtkAcceleratorsVTKm=ON \
Module_vtkParallelMPI=ON
#------------------------------------------------------------------------------