Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cd853a6270 | |||
| 2beb3cfbc9 | |||
| c8542bd70d | |||
| f84990e906 | |||
| ddfdec4cd9 | |||
| 834efe6dda | |||
| 69cff3b3d3 | |||
| c3aa2a4bfe | |||
| 9a3938551a | |||
| 28f482b836 | |||
| 53a1736aad | |||
| f197c721c8 | |||
| 11e3723f10 | |||
| 9a8a4852bc | |||
| 507c01e485 |
24
BUILD.md
24
BUILD.md
@ -441,7 +441,7 @@ you may have additional hurdles to using the newest versions of clang.
|
||||
| Name | Location
|
||||
|-----------------------|------------------------
|
||||
| [MESA][page mesa] | [download][link mesa] or [older 13][link mesa13], [older 11][link mesa11]
|
||||
| [ParaView][page ParaView] | [download][link ParaView] or older [paraview-56][link ParaView56], [paraview-55][link ParaView55] or [binaries][download ParaView]
|
||||
| [ParaView][page ParaView] | [download][link ParaView] or older [paraview-56][link ParaView56] 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.
|
||||
|
||||
|
||||
@ -524,13 +524,15 @@ easier to use `grep` and find the relevant pages and links.
|
||||
<!-- parallel -->
|
||||
[page adios]: https://csmd.ornl.gov/software/adios2
|
||||
[repo adios]: https://github.com/ornladios/ADIOS2
|
||||
[link adios]: https://github.com/ornladios/ADIOS2/archive/v2.4.0.tar.gz
|
||||
[link adios]: https://github.com/ornladios/ADIOS2/archive/v2.6.0.tar.gz
|
||||
|
||||
[page zfp]: http://computation.llnl.gov/projects/floating-point-compression/zfp-versions
|
||||
|
||||
[page scotch]: https://www.labri.fr/perso/pelegrin/scotch/
|
||||
[repo scotch]: https://gitlab.inria.fr/scotch/scotch
|
||||
[link scotch]: https://gforge.inria.fr/frs/download.php/file/38187/scotch_6.0.9.tar.gz
|
||||
[link scotch]: https://gforge.inria.fr/frs/download.php/file/38352/scotch_6.1.0.tar.gz
|
||||
[link scotch60_10]: https://gforge.inria.fr/frs/download.php/file/38350/scotch_6.0.10.tar.gz
|
||||
[link scotch60_9]: https://gforge.inria.fr/frs/download.php/file/38187/scotch_6.0.9.tar.gz
|
||||
[older scotch]: https://gforge.inria.fr/frs/download.php/file/38114/scotch_6.0.8.tar.gz
|
||||
[oldest scotch]: https://gforge.inria.fr/frs/download.php/file/37622/scotch_6.0.6.tar.gz
|
||||
|
||||
@ -546,10 +548,10 @@ easier to use `grep` and find the relevant pages and links.
|
||||
[link openmpi]: https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-4.0.3.tar.bz2
|
||||
|
||||
[page mpich]: http://www.mpich.org/
|
||||
[link mpich]: http://www.mpich.org/static/downloads/3.3/mpich-3.3.tar.gz
|
||||
[link mpich]: http://www.mpich.org/static/downloads/3.4.2/mpich-3.4.2.tar.gz
|
||||
|
||||
[page mvpapich]: http://mvapich.cse.ohio-state.edu/
|
||||
[link mvpapich]: http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.3.tar.gz
|
||||
[link mvpapich]: http://mvapich.cse.ohio-state.edu/download/mvapich/mv2/mvapich2-2.3.6.tar.gz
|
||||
|
||||
<!-- general -->
|
||||
[page cmake]: http://www.cmake.org/
|
||||
@ -565,7 +567,7 @@ easier to use `grep` and find the relevant pages and links.
|
||||
[link FFTW]: http://www.fftw.org/fftw-3.3.7.tar.gz
|
||||
|
||||
[page petsc]: https://www.mcs.anl.gov/petsc/
|
||||
[link petsc]: http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.13.2.tar.gz
|
||||
[link petsc]: https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.15.0.tar.gz
|
||||
|
||||
[page hypre]: https://computing.llnl.gov/projects/hypre-scalable-linear-solvers-multigrid-methods/
|
||||
[repo hypre]: https://github.com/hypre-space/hypre/
|
||||
@ -587,9 +589,11 @@ easier to use `grep` and find the relevant pages and links.
|
||||
[page ParaView]: http://www.paraview.org/
|
||||
[download ParaView]: https://www.paraview.org/download/
|
||||
[link ParaView54]: http://www.paraview.org/files/v5.4/ParaView-v5.4.1.tar.gz
|
||||
[link ParaView55]: http://www.paraview.org/files/v5.5/ParaView-v5.5.2.tar.gz
|
||||
[link ParaView56]: http://www.paraview.org/files/v5.6/ParaView-v5.6.3.tar.gz
|
||||
[link ParaView]: http://www.paraview.org/files/v5.7/ParaView-v5.7.0.tar.gz
|
||||
[link ParaView55]: http://www.paraview.org/files/v5.5/ParaView-v5.5.2.tar.xz
|
||||
[link ParaView56]: http://www.paraview.org/files/v5.6/ParaView-v5.6.3.tar.xz
|
||||
[link ParaView57]: http://www.paraview.org/files/v5.7/ParaView-v5.7.0.tar.xz
|
||||
[link ParaView58]: http://www.paraview.org/files/v5.8/ParaView-v5.8.1.tar.xz
|
||||
[link ParaView]: http://www.paraview.org/files/v5.9/ParaView-v5.9.1.tar.xz
|
||||
|
||||
[page mesa]: http://mesa3d.org/
|
||||
[link mesa]: ftp://ftp.freedesktop.org/pub/mesa/mesa-17.1.1.tar.xz
|
||||
@ -603,4 +607,4 @@ easier to use `grep` and find the relevant pages and links.
|
||||
|
||||
---
|
||||
|
||||
Copyright 2016-2020 OpenCFD Ltd
|
||||
Copyright 2016-2021 OpenCFD Ltd
|
||||
|
||||
@ -11,7 +11,7 @@ any third-party compilation.
|
||||
|
||||
For general functionality, the paraview version distributed with
|
||||
the operating system or a [binary package][download ParaView]
|
||||
is likely adequate for your needs.
|
||||
is likely [fully adequate for your needs][FAQ ParaView].
|
||||
|
||||
|
||||
***Please help us with keeping the information here up-to-date and accurate.***
|
||||
@ -28,11 +28,11 @@ sudo apt install paraview-dev
|
||||
```
|
||||
Depending on your setup, the following subset may also be enough:
|
||||
```
|
||||
sudo apt install cmake qt5base-dev qttools5-dev qttools5-dev-tools libqt5opengl5-dev libqt5x11extras5-dev libxt-dev
|
||||
sudo apt install cmake qtbase5-dev qttools5-dev qttools5-dev-tools libqt5opengl5-dev libqt5x11extras5-dev libxt-dev
|
||||
```
|
||||
|
||||
|
||||
### openSUSE
|
||||
### openSUSE (eg, Leap-15.2)
|
||||
|
||||
The full dependency list for building ParaView can be found from the
|
||||
corresponding [rpm spec][suse spec] file.
|
||||
@ -46,8 +46,8 @@ sudo zypper install paraview-devel
|
||||
Depending on your setup, the following subset may also be enough:
|
||||
```
|
||||
sudo zypper install Mesa-libEGL-devel
|
||||
sudo zypper install libqt5-qtbase-devel libqt5-qtsvg-devel libqt5-qttools-devel libqt5-qtx11extras
|
||||
sudo zypper install libXt-devel
|
||||
sudo zypper install libqt5-qtbase-devel libqt5-qtsvg-devel libqt5-qttools-devel libqt5-qtx11extras-devel
|
||||
sudo zypper install libxcb-devel libXt-devel
|
||||
```
|
||||
|
||||
|
||||
@ -56,6 +56,7 @@ sudo zypper install libXt-devel
|
||||
[download ParaView]: https://www.paraview.org/download/
|
||||
[debian control]: https://salsa.debian.org/science-team/paraview/-/blob/master/debian/control
|
||||
[suse spec]: https://build.opensuse.org/package/view_file/science/paraview/paraview.spec
|
||||
[FAQ ParaView]: https://discourse.paraview.org/t/i-want-to-visualize-my-openfoam-simulation-results-with-paraview-but-im-confused-which-version-should-i-use
|
||||
|
||||
|
||||
<!-- OpenFOAM -->
|
||||
@ -69,4 +70,4 @@ sudo zypper install libXt-devel
|
||||
[link third-require]: https://develop.openfoam.com/Development/ThirdParty-common/blob/develop/Requirements.md
|
||||
|
||||
---
|
||||
Copyright 2019-2020 OpenCFD Ltd
|
||||
Copyright 2019-2021 OpenCFD Ltd
|
||||
|
||||
26
SOURCES.txt
26
SOURCES.txt
@ -1,5 +1,31 @@
|
||||
Third-party software versions for recent OpenFOAM versions
|
||||
|
||||
OpenFOAM-2106
|
||||
---------------
|
||||
|
||||
ADIOS-2.6.0
|
||||
CGAL-4.12.2
|
||||
ParaView-5.9.1 *update*
|
||||
boost_1_66_0
|
||||
fftw-3.3.7
|
||||
openmpi-4.0.3
|
||||
scotch_6.1.0 *update*
|
||||
kahip-2.12
|
||||
|
||||
|
||||
OpenFOAM-2012
|
||||
---------------
|
||||
|
||||
ADIOS-2.6.0 *update*
|
||||
CGAL-4.12.2
|
||||
ParaView-5.6.3
|
||||
boost_1_66_0
|
||||
fftw-3.3.7
|
||||
openmpi-4.0.3
|
||||
scotch_6.0.9
|
||||
kahip-2.12
|
||||
|
||||
|
||||
OpenFOAM-2006
|
||||
---------------
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ CCS ?= $(CC)
|
||||
CCP ?= mpicc
|
||||
CCD = $(CCP)
|
||||
CFLAGS = $(WM_CFLAGS) -fPIC -O3 \
|
||||
-DCOMMON_FILE_COMPRESS_GZ \
|
||||
-UCOMMON_FILE_COMPRESS \
|
||||
-DCOMMON_RANDOM_FIXED_SEED \
|
||||
-DSCOTCH_DETERMINISTIC \
|
||||
-DSCOTCH_RENAME \
|
||||
@ -41,7 +41,7 @@ CFLAGS += -DINTSIZE64
|
||||
endif
|
||||
|
||||
CLIBFLAGS =
|
||||
LDFLAGS = $(WM_LDFLAGS) -lz -lm
|
||||
LDFLAGS = $(WM_LDFLAGS) -lm
|
||||
|
||||
MAKE = make
|
||||
CP = cp
|
||||
|
||||
@ -29,7 +29,7 @@ CCS ?= $(CC)
|
||||
CCP ?= mpicc
|
||||
CCD = $(CCP)
|
||||
CFLAGS = $(WM_CFLAGS) -fPIC -O3 \
|
||||
-DCOMMON_FILE_COMPRESS_GZ \
|
||||
-UCOMMON_FILE_COMPRESS \
|
||||
-DCOMMON_RANDOM_FIXED_SEED \
|
||||
-DSCOTCH_DETERMINISTIC \
|
||||
-DSCOTCH_RENAME \
|
||||
@ -41,7 +41,7 @@ CFLAGS += -DINTSIZE64
|
||||
endif
|
||||
|
||||
CLIBFLAGS = -shared
|
||||
LDFLAGS = -Xlinker --no-as-needed $(WM_LDFLAGS) -lz -lm -lrt
|
||||
LDFLAGS = -Xlinker --no-as-needed $(WM_LDFLAGS) -lm -lrt
|
||||
|
||||
MAKE = make
|
||||
CP = cp
|
||||
|
||||
48
etc/patches/scotch_6.1.0
Normal file
48
etc/patches/scotch_6.1.0
Normal file
@ -0,0 +1,48 @@
|
||||
--- scotch_6.0.6/src/libscotch/Makefile.orig 2019-04-29 14:59:53.957103493 +0200
|
||||
+++ scotch_6.0.6/src/libscotch/Makefile 2019-04-29 18:50:42.560080675 +0200
|
||||
@@ -51,6 +51,12 @@
|
||||
|
||||
.PHONY : ptscotch scotch ptinstall install clean realclean
|
||||
|
||||
+ifeq ($(WM_OSTYPE),MSwindows)
|
||||
+
|
||||
+libscotch : libscotch$(LIB) scotch.h
|
||||
+
|
||||
+endif
|
||||
+
|
||||
scotch :
|
||||
$(MAKE) CC="$(CCS)" CCD="$(CCS)" \
|
||||
scotch.h \
|
||||
@@ -438,6 +444,11 @@
|
||||
wgraph_part_zr$(OBJ) \
|
||||
wgraph_store$(OBJ)
|
||||
|
||||
+ifeq ($(WM_OSTYPE),MSwindows)
|
||||
+## Add into libscotch instead of having a separate library
|
||||
+LIBSCOTCHDEPS += library_error_exit$(OBJ)
|
||||
+endif
|
||||
+
|
||||
##
|
||||
## Todo list.
|
||||
##
|
||||
--- scotch_6.0.6/src/Makefile.orig 2018-07-14 17:24:49.000000000 +0200
|
||||
+++ scotch_6.0.6/src/Makefile 2019-04-29 18:39:16.365132864 +0200
|
||||
@@ -89,9 +89,18 @@
|
||||
$(mandir)/man1 : $(mandir)
|
||||
-$(MKDIR) $(mandir)/man1
|
||||
|
||||
+ifeq ($(WM_OSTYPE),MSwindows)
|
||||
+
|
||||
+libscotch : required
|
||||
+ (cd libscotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) libscotch && $(MAKE) install)
|
||||
+
|
||||
+else
|
||||
+
|
||||
libscotch : required
|
||||
(cd libscotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install)
|
||||
|
||||
+endif
|
||||
+
|
||||
scotch : libscotch
|
||||
(cd scotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install)
|
||||
(cd libscotchmetis ; $(MAKE) scotch && $(MAKE) install)
|
||||
@ -6,7 +6,7 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
# Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -114,18 +114,38 @@ setParaViewVersion()
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# Set CMake cache variables
|
||||
# Set CMake cache variables.
|
||||
# Automatically adds -D prefix it needed
|
||||
#
|
||||
addCMakeVariable()
|
||||
{
|
||||
local i
|
||||
for i
|
||||
do
|
||||
[ -n "$i" ] && CMAKE_VARIABLES="$CMAKE_VARIABLES -D$i"
|
||||
case "$i" in
|
||||
('') ;; # empty
|
||||
(-*) CMAKE_VARIABLES="${CMAKE_VARIABLES} ${i}" ;;
|
||||
(*) CMAKE_VARIABLES="${CMAKE_VARIABLES} -D${i}" ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# General settings (version-dependent)
|
||||
#
|
||||
addGeneral()
|
||||
{
|
||||
if printf "${ParaView_MAJOR}"'\n%s\n' 5.6 | sort -V -C
|
||||
then
|
||||
# Paraview 5.6 and older
|
||||
addCMakeVariable "BUILD_SHARED_LIBS=ON"
|
||||
else
|
||||
addCMakeVariable "PARAVIEW_BUILD_SHARED_LIBS=ON"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Verbose makefiles
|
||||
#
|
||||
@ -153,6 +173,10 @@ addMpiSupport()
|
||||
then
|
||||
addCMakeVariable "VTK_MPI_MAX_NUMPROCS=$MPI_MAX_PROCS"
|
||||
fi
|
||||
|
||||
echo "----"
|
||||
echo "MPI information:"
|
||||
echo " home : $MPI_HOME"
|
||||
}
|
||||
|
||||
|
||||
@ -244,7 +268,13 @@ addPythonSupport()
|
||||
exit 1
|
||||
}
|
||||
|
||||
addCMakeVariable "PARAVIEW_ENABLE_PYTHON=ON"
|
||||
if printf "${ParaView_MAJOR}"'\n%s\n' 5.7 | sort -V -C
|
||||
then
|
||||
# Paraview 5.7 and older
|
||||
addCMakeVariable "PARAVIEW_ENABLE_PYTHON=ON"
|
||||
else
|
||||
addCMakeVariable "PARAVIEW_USE_PYTHON=ON"
|
||||
fi
|
||||
addCMakeVariable "PYTHON_INCLUDE_DIRS=$PYTHON_INCLUDE"
|
||||
addCMakeVariable "PYTHON_LIBRARY=$PYTHON_LIBRARY"
|
||||
|
||||
@ -304,20 +334,27 @@ addQtSupport()
|
||||
QT_VERSION=none
|
||||
: ${withQT:=true} # default is on
|
||||
|
||||
local qmake qtLib
|
||||
local cmakeVarName="PARAVIEW_USE_QT"
|
||||
|
||||
if printf "${ParaView_MAJOR}"'\n%s\n' 5.7 | sort -V -C
|
||||
then
|
||||
# Paraview 5.7 and older
|
||||
cmakeVarName="PARAVIEW_BUILD_QT_GUI"
|
||||
fi
|
||||
|
||||
if [ "$withQT" = false ]
|
||||
then
|
||||
# Explicitly disabled
|
||||
addCMakeVariable "PARAVIEW_BUILD_QT_GUI=OFF"
|
||||
addCMakeVariable "$cmakeVarName=OFF"
|
||||
return
|
||||
fi
|
||||
|
||||
local qmake qtLib
|
||||
|
||||
# Check qmake can be found and handle version differences
|
||||
qmake=$(findQMake)
|
||||
if QT_VERSION=$($qmake -query QT_VERSION 2>/dev/null)
|
||||
then
|
||||
addCMakeVariable "PARAVIEW_BUILD_QT_GUI=ON"
|
||||
addCMakeVariable "$cmakeVarName=ON"
|
||||
|
||||
case "$QT_VERSION" in
|
||||
(3.* | 4.[0-4]*)
|
||||
@ -495,7 +532,9 @@ INFO
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Start with these general settings
|
||||
addCMakeVariable "BUILD_SHARED_LIBS=ON" "BUILD_TESTING=OFF"
|
||||
|
||||
# No testing
|
||||
addCMakeVariable "BUILD_TESTING=OFF"
|
||||
|
||||
# Include development files in "make install"
|
||||
addCMakeVariable "PARAVIEW_INSTALL_DEVELOPMENT_FILES=ON"
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
# Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -211,6 +211,16 @@ useGcc()
|
||||
export CXX=g++
|
||||
}
|
||||
|
||||
|
||||
# Force use of system gcc/g++ (wmake compilation) without changing the
|
||||
# WM_OPTIONS or output directories
|
||||
useGccWmake()
|
||||
{
|
||||
export WM_COMPILER=Gcc
|
||||
export WM_COMPILER_TYPE=system
|
||||
}
|
||||
|
||||
|
||||
# Scan arguments for a '-gcc' option, forcing gcc/g++ when found
|
||||
useGccFlag()
|
||||
{
|
||||
@ -258,13 +268,20 @@ whichCXX()
|
||||
}
|
||||
|
||||
|
||||
# Return <mpicc> by default or <mpiicc> if possible for INTELMPI.
|
||||
# Return
|
||||
# <mpicc> by default
|
||||
# <mpifcc> for FJMPI (if possible)
|
||||
# <mpiicc> for INTELMPI (if possible)
|
||||
#
|
||||
# Cray doesn't have <mpicc>, but its <cc> manages mpi paths directly.
|
||||
# NOTE: could further refine based on "wmake -show-c", but not yet needed
|
||||
whichMpicc()
|
||||
{
|
||||
local comp="$(command -v mpicc)"
|
||||
case "$WM_MPLIB" in
|
||||
(FJMPI)
|
||||
comp="$(command -v mpifcc)" # Fujitsu <mpifcc> available?
|
||||
;;
|
||||
(INTELMPI)
|
||||
comp="$(command -v mpiicc)" # Intel <mpiicc> available?
|
||||
;;
|
||||
@ -276,13 +293,20 @@ whichMpicc()
|
||||
}
|
||||
|
||||
|
||||
# Return <mpicxx> by default or <mpiicpc> if possible for INTELMPI.
|
||||
# Return
|
||||
# <mpicxx> by default
|
||||
# <mpiFCC> for FJMPI (if possible)
|
||||
# <mpiicpc> for INTELMPI (if possible)
|
||||
#
|
||||
# Cray doesn't have <mpicxx>, but its <CC> manages mpi paths directly.
|
||||
# NOTE: could further refine based on "wmake -show-cxx", but not yet needed
|
||||
whichMpicxx()
|
||||
{
|
||||
local comp="$(command -v mpicxx)"
|
||||
case "$WM_MPLIB" in
|
||||
(FJMPI)
|
||||
comp="$(command -v mpiFCC)" # Fujitsu <mpiFCC> available?
|
||||
;;
|
||||
(INTELMPI)
|
||||
comp="$(command -v mpiicpc)" # Intel <mpiicpc> available?
|
||||
;;
|
||||
@ -406,12 +430,15 @@ setBuildSuffix()
|
||||
#
|
||||
# Mostly building without wmake
|
||||
# - disable wmakeScheduler variables
|
||||
# - use max number of cores for building
|
||||
# - use max number of cores for building, unless already defined
|
||||
#
|
||||
unset WM_HOSTS WM_SCHEDULER
|
||||
|
||||
WM_NCOMPPROCS=$(getconf _NPROCESSORS_ONLN 2>/dev/null) || WM_NCOMPPROCS=1
|
||||
: ${WM_NCOMPPROCS:=1}
|
||||
if [ -z "$WM_NCOMPPROCS" ]
|
||||
then
|
||||
WM_NCOMPPROCS=$(getconf _NPROCESSORS_ONLN 2>/dev/null)
|
||||
: "${WM_NCOMPPROCS:=1}"
|
||||
fi
|
||||
export WM_NCOMPPROCS
|
||||
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
# Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -168,6 +168,10 @@ addMpiSupport()
|
||||
then
|
||||
addCMakeVariable "VTK_MPI_MAX_NUMPROCS=$MPI_MAX_PROCS"
|
||||
fi
|
||||
|
||||
echo "----"
|
||||
echo "MPI information:"
|
||||
echo " home : $MPI_HOME"
|
||||
}
|
||||
|
||||
|
||||
|
||||
69
makeAdios2
69
makeAdios2
@ -27,15 +27,26 @@ if [ "$1" = "-test" ]
|
||||
then
|
||||
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
|
||||
dir="${2%/}" # <- *_ARCH_PATH
|
||||
if [ -d "$dir/include" ] \
|
||||
&& [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libadios2$EXT_SO" ]
|
||||
then
|
||||
echo " adios2 include: $dir/include"
|
||||
echo " adios2 library: $dir/lib$WM_COMPILER_LIB_ARCH"
|
||||
exit 0
|
||||
else
|
||||
exit 2
|
||||
fi
|
||||
[ -d "$dir/include" ] || exit 2
|
||||
|
||||
package="adios2"
|
||||
libName="libadios2"
|
||||
libName2="libadios2_cxx11_mpi"
|
||||
for lib in \
|
||||
"$dir/lib/$libName$EXT_SO" \
|
||||
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName$EXT_SO" \
|
||||
"$dir/lib/$libName2$EXT_SO" \
|
||||
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName2$EXT_SO" \
|
||||
;
|
||||
do
|
||||
if [ -r "$lib" ]
|
||||
then
|
||||
echo " $package include: $dir/include"
|
||||
echo " $package library: ${lib%/*}"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
exit 2
|
||||
fi
|
||||
#------------------------------------------------------------------------------
|
||||
# Run from third-party directory only
|
||||
@ -52,6 +63,12 @@ _foamConfig adios2
|
||||
|
||||
adiosPACKAGE=${adios2_version:-adios-none}
|
||||
|
||||
# Hint for cmake findMPI
|
||||
if [ -d "$MPI_ARCH_PATH" ]
|
||||
then
|
||||
export MPI_HOME="$MPI_ARCH_PATH"
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
usage() {
|
||||
exec 1>&2
|
||||
@ -60,9 +77,10 @@ usage() {
|
||||
|
||||
usage: ${0##*/} [OPTION] [adios-VERSION]
|
||||
options:
|
||||
-force Force compilation, even if include/library already exists
|
||||
-gcc Force use of gcc/g++
|
||||
-cmake PATH With cmake from the given path
|
||||
-force Force compilation, even if include/library already exists
|
||||
-gcc Force use of gcc/g++
|
||||
-cmake PATH With cmake from the given path
|
||||
-mpi-home PATH With hint for MPI_HOME
|
||||
-help
|
||||
|
||||
* Build ADIOS2
|
||||
@ -91,6 +109,12 @@ do
|
||||
CMAKE_PATH="${2%%/}"
|
||||
shift
|
||||
;;
|
||||
-mpi-home) # mpi with hint
|
||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||
export MPI_HOME="${2%%/}"
|
||||
case "${MPI_HOME:-none}" in (false|none) unset MPI_HOME;; esac
|
||||
shift
|
||||
;;
|
||||
ADIOS2-[0-9]* | ADIOS2-git* | ADIOS-[0-9]* | ADIOS-git* | \
|
||||
adios2-[0-9]* | adios2-git* | adios-[0-9]* | adios-git*)
|
||||
adiosPACKAGE="${1%%/}"
|
||||
@ -115,6 +139,19 @@ then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Known build issues for mingw (various things)
|
||||
case "$WM_COMPILER" in
|
||||
(Mingw*)
|
||||
if [ "$optForce" = true ]
|
||||
then
|
||||
echo "Warning: adios2 - known compilation issues with $WM_COMPILER"
|
||||
else
|
||||
echo "Skipping adios2 - known compilation issues with $WM_COMPILER"
|
||||
exit 0
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Build ADIOS
|
||||
@ -135,10 +172,12 @@ echo
|
||||
# - for mpi-specific library locations
|
||||
if [ -z "$optForce" ] \
|
||||
&& [ -f "$ADIOS2_ARCH_PATH/include/adios2.h" ] \
|
||||
&& [ -r "$ADIOS2_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libadios2$EXT_SO" ]
|
||||
&& {
|
||||
[ -r "$ADIOS2_ARCH_PATH/lib/libadios2$EXT_SO" ] \
|
||||
|| [ -r "$ADIOS2_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libadios2$EXT_SO" ]
|
||||
}
|
||||
then
|
||||
echo " ADIOS2 header in $ADIOS2_ARCH_PATH/include"
|
||||
echo " ADIOS2 libs in $ADIOS2_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH"
|
||||
echo " ADIOS2 already built : $ADIOS2_ARCH_PATH"
|
||||
else
|
||||
# CMake options often lag the configure ones
|
||||
echo "Starting build: $adiosPACKAGE (using cmake)"
|
||||
|
||||
@ -73,7 +73,7 @@ do
|
||||
case "$1" in
|
||||
'') ;; # Ignore empty
|
||||
-h | -help) usage ;;
|
||||
-gcc) useGcc ;;
|
||||
-gcc) useGccWmake ;;
|
||||
|
||||
lib|libso)
|
||||
targetType="$1"
|
||||
|
||||
36
makeCGAL
36
makeCGAL
@ -35,7 +35,10 @@ if [ "$1" = "-test" ]
|
||||
then
|
||||
[ "$#" -eq 3 ] || { echo "${0##*/} -test : needs 2 argument"; exit 1; }
|
||||
dir="${2%/}" # <- *_ARCH_PATH
|
||||
if [ -d "$dir/include" ] && [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libCGAL$EXT_SO" ]
|
||||
[ -d "$dir/include" ] || exit 2
|
||||
|
||||
# 2020-08-10: Needs reworking for header-only installations!
|
||||
if [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libCGAL$EXT_SO" ]
|
||||
then
|
||||
echo " CGAL include: $dir/include"
|
||||
echo " CGAL library: $dir/lib$WM_COMPILER_LIB_ARCH"
|
||||
@ -115,7 +118,7 @@ USAGE
|
||||
#------------------------------------------------------------------------------
|
||||
exportCompiler # Compiler info for CMake/configure
|
||||
|
||||
unset optHeadersOnly optToolset
|
||||
unset optForce optHeadersOnly optToolset
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
@ -124,6 +127,7 @@ do
|
||||
'') ;; # Ignore empty
|
||||
-h | -help) usage ;;
|
||||
-gcc) useGcc ;;
|
||||
-force) optForce=true ;;
|
||||
|
||||
-cmake)
|
||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||
@ -243,16 +247,17 @@ then
|
||||
fi
|
||||
|
||||
# Use lib/ when lib64/ does not exist
|
||||
[ ! -d "$boostLib" -a -d "$libdir" ] && boostLib="$libdir"
|
||||
[ -d "$libdir" -a ! -d "$boostLib" ] && boostLib="$libdir"
|
||||
|
||||
elif [ -f "$boostInc/boost/version.hpp" ]
|
||||
elif [ -z "$optForce" ] \
|
||||
&& [ -f "$boostInc/boost/version.hpp" ]
|
||||
then
|
||||
echo "Using $boostPACKAGE"
|
||||
|
||||
libdir="$BOOST_ARCH_PATH/lib"
|
||||
|
||||
# Use lib when lib64 does not exist
|
||||
[ ! -d "$boostLib" -a -d "$libdir" ] && boostLib="$libdir"
|
||||
[ -d "$libdir" -a ! -d "$boostLib" ] && boostLib="$libdir"
|
||||
|
||||
else
|
||||
echo "Starting build: $boostPACKAGE"
|
||||
@ -260,14 +265,14 @@ else
|
||||
# Absolute path for --libdir
|
||||
|
||||
(
|
||||
# Configuration options:
|
||||
unset buildOpt
|
||||
|
||||
# Write user-config.jam into source directory
|
||||
cd "$BOOST_SOURCE_DIR" || exit
|
||||
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
|
||||
|
||||
rm -rf $BOOST_ARCH_PATH
|
||||
# Configuration options:
|
||||
unset buildOpt
|
||||
|
||||
# Compiler-specific adjustments
|
||||
case "$WM_COMPILER" in
|
||||
(Arm*)
|
||||
# Toolset for bootstrap
|
||||
@ -306,6 +311,11 @@ else
|
||||
;;
|
||||
esac
|
||||
|
||||
# End of configuration options
|
||||
# ----------------------------
|
||||
|
||||
rm -rf "$BOOST_ARCH_PATH"
|
||||
|
||||
./bootstrap.sh \
|
||||
--prefix="$BOOST_ARCH_PATH" \
|
||||
--libdir="$boostLib" \
|
||||
@ -481,13 +491,13 @@ cgalIsCurrent()
|
||||
}
|
||||
|
||||
|
||||
if cgalIsCurrent
|
||||
if [ -z "$optForce" ] \
|
||||
&& cgalIsCurrent
|
||||
then
|
||||
echo " ${CGAL_ARCH_PATH##*/} build appears to be up-to-date - skipping"
|
||||
echo
|
||||
exit 0
|
||||
fi
|
||||
|
||||
else
|
||||
(
|
||||
# Remove any existing build folder and recreate
|
||||
if [ -d "$CGAL_BUILD_DIR" ]
|
||||
@ -604,6 +614,7 @@ CMAKE_OPTIONS
|
||||
|
||||
unset cmakeDefs
|
||||
|
||||
# Compiler-specific adjustments
|
||||
case "$WM_COMPILER" in
|
||||
(Mingw*)
|
||||
cmakeDefs="$cmakeDefs -DCMAKE_SYSTEM_NAME=Windows"
|
||||
@ -658,5 +669,6 @@ CMAKE_OPTIONS
|
||||
|
||||
echo "Done CGAL"
|
||||
)
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
73
makeFFTW
73
makeFFTW
@ -28,15 +28,23 @@ if [ "$1" = "-test" ]
|
||||
then
|
||||
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
|
||||
dir="${2%/}" # <- *_ARCH_PATH
|
||||
if [ -d "$dir/include" ] \
|
||||
&& [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libfftw3$EXT_SO" ]
|
||||
then
|
||||
echo " fftw include: $dir/include"
|
||||
echo " fftw library: $dir/lib$WM_COMPILER_LIB_ARCH"
|
||||
exit 0
|
||||
else
|
||||
exit 2
|
||||
fi
|
||||
[ -d "$dir/include" ] || exit 2
|
||||
|
||||
package="fftw"
|
||||
libName="libfftw3"
|
||||
for lib in \
|
||||
"$dir/lib/$libName$EXT_SO" \
|
||||
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName$EXT_SO" \
|
||||
;
|
||||
do
|
||||
if [ -r "$lib" ]
|
||||
then
|
||||
echo " $package include: $dir/include"
|
||||
echo " $package library: ${lib%/*}"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
exit 2
|
||||
fi
|
||||
#------------------------------------------------------------------------------
|
||||
# Run from third-party directory only
|
||||
@ -52,7 +60,7 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
# FFTW version from OpenFOAM etc/config.sh file:
|
||||
_foamConfig FFTW
|
||||
|
||||
fftwPACKAGE=${fftw_version:-fftw-system}
|
||||
fftwPACKAGE="${fftw_version:-fftw-system}"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
usage() {
|
||||
@ -123,13 +131,17 @@ fi
|
||||
# FFTW_SOURCE_DIR : location of the original sources
|
||||
# FFTW_ARCH_PATH : installation directory
|
||||
|
||||
FFTW_SOURCE_DIR=$sourceBASE/$fftwPACKAGE
|
||||
FFTW_ARCH_PATH=$installBASE/$fftwPACKAGE
|
||||
FFTW_SOURCE_DIR="$sourceBASE/$fftwPACKAGE"
|
||||
FFTW_ARCH_PATH="$installBASE/$fftwPACKAGE"
|
||||
|
||||
if [ -z "$optForce" ] \
|
||||
&& [ -r "$FFTW_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libfftw3$EXT_SO" ]
|
||||
&& {
|
||||
[ -r "$FFTW_ARCH_PATH/lib/libfftw3$EXT_SO" ] \
|
||||
|| [ -r "$FFTW_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libfftw3$EXT_SO" ] \
|
||||
|| [ -r "$FFTW_ARCH_PATH/bin/libfftw3-3$EXT_SO" ] # Windows
|
||||
}
|
||||
then
|
||||
echo "Already has FFTW shared library"
|
||||
echo "FFTW already built : $FFTW_ARCH_PATH"
|
||||
else
|
||||
echo "Starting build: FFTW ($fftwPACKAGE)"
|
||||
echo
|
||||
@ -138,6 +150,21 @@ else
|
||||
# Configuration options:
|
||||
unset configOpt
|
||||
|
||||
# Compiler-specific adjustments
|
||||
case "$WM_COMPILER" in
|
||||
(Mingw*)
|
||||
# Cross-compiling
|
||||
# See http://www.fftw.org/install/windows.html
|
||||
configOpt="
|
||||
--host=x86_64-w64-mingw32
|
||||
--with-our-malloc
|
||||
--enable-threads --with-combined-threads
|
||||
--enable-sse2
|
||||
--with-incoming-stack-boundary=2
|
||||
"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Additional configure options
|
||||
if [ "$1" = "--" ]
|
||||
then
|
||||
@ -147,20 +174,20 @@ else
|
||||
|
||||
# End of configuration options
|
||||
# ----------------------------
|
||||
buildDIR=$buildBASE/$fftwPACKAGE
|
||||
buildDIR="$buildBASE/$fftwPACKAGE"
|
||||
|
||||
cd "$FFTW_SOURCE_DIR" || exit
|
||||
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
|
||||
|
||||
rm -rf $FFTW_ARCH_PATH
|
||||
rm -rf $buildDIR
|
||||
mkdir -p $buildDIR
|
||||
cd $buildDIR
|
||||
rm -rf "$FFTW_ARCH_PATH"
|
||||
rm -rf "$buildDIR"
|
||||
mkdir -p "$buildDIR"
|
||||
cd "$buildDIR"
|
||||
|
||||
set -x
|
||||
$FFTW_SOURCE_DIR/configure \
|
||||
--prefix=$FFTW_ARCH_PATH \
|
||||
--libdir=$FFTW_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH \
|
||||
"$FFTW_SOURCE_DIR"/configure \
|
||||
--prefix="$FFTW_ARCH_PATH" \
|
||||
--libdir="$FFTW_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" \
|
||||
--enable-shared --disable-static \
|
||||
--disable-fortran \
|
||||
$configOpt \
|
||||
@ -168,7 +195,7 @@ else
|
||||
&& make -j $WM_NCOMPPROCS \
|
||||
&& make install \
|
||||
&& echo "Built $fftwPACKAGE" \
|
||||
&& pkgconfigAdjust $FFTW_ARCH_PATH
|
||||
&& pkgconfigAdjust "$FFTW_ARCH_PATH"
|
||||
) || {
|
||||
echo "Error building: FFTW"
|
||||
exit 1
|
||||
|
||||
@ -64,6 +64,7 @@ while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
'') ;; # Ignore empty
|
||||
--) break;; # Extra configure options (leave on $@ for later detection)
|
||||
-h | -help) usage ;;
|
||||
-gcc) useGcc ;;
|
||||
-force) optForce=true ;;
|
||||
|
||||
39
makeKAHIP
39
makeKAHIP
@ -28,24 +28,25 @@ if [ "$1" = "-test" ]
|
||||
then
|
||||
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
|
||||
dir="${2%/}" # <- *_ARCH_PATH
|
||||
if [ -d "$dir/include" ]
|
||||
then
|
||||
for lib in \
|
||||
$FOAM_EXT_LIBBIN/libkahip$EXT_SO \
|
||||
$dir/lib/libkahip.a \
|
||||
$dir/lib/libkahip$EXT_SO \
|
||||
$dir/lib$WM_COMPILER_LIB_ARCH/libkahip.a \
|
||||
$dir/lib$WM_COMPILER_LIB_ARCH/libkahip$EXT_SO \
|
||||
;
|
||||
do
|
||||
if [ -r "$lib" ]
|
||||
then
|
||||
echo " kahip include: $dir/include"
|
||||
echo " kahip library: ${lib%/*}"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
fi
|
||||
[ -d "$dir/include" ] || exit 2
|
||||
|
||||
package="kahip"
|
||||
libName="libkahip"
|
||||
for lib in \
|
||||
"$FOAM_EXT_LIBBIN/$libName$EXT_SO" \
|
||||
"$dir/lib/$libName.a" \
|
||||
"$dir/lib/$libName$EXT_SO" \
|
||||
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName.a" \
|
||||
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName$EXT_SO" \
|
||||
;
|
||||
do
|
||||
if [ -r "$lib" ]
|
||||
then
|
||||
echo " $package include: $dir/include"
|
||||
echo " $package library: ${lib%/*}"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
exit 2
|
||||
fi
|
||||
#------------------------------------------------------------------------------
|
||||
@ -95,7 +96,7 @@ do
|
||||
case "$1" in
|
||||
'') ;; # Ignore empty
|
||||
-h | -help) usage ;;
|
||||
-gcc) useGcc ;;
|
||||
-gcc) useGccWmake ;;
|
||||
-force) optForce=true ;;
|
||||
|
||||
-cmake)
|
||||
|
||||
48
makeMETIS
48
makeMETIS
@ -28,24 +28,25 @@ if [ "$1" = "-test" ]
|
||||
then
|
||||
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
|
||||
dir="${2%/}" # <- *_ARCH_PATH
|
||||
if [ -d "$dir/include" ]
|
||||
then
|
||||
for lib in \
|
||||
$FOAM_EXT_LIBBIN/libmetis$EXT_SO \
|
||||
$dir/lib/libmetis.a \
|
||||
$dir/lib/libmetis$EXT_SO \
|
||||
$dir/lib$WM_COMPILER_LIB_ARCH/libmetis.a \
|
||||
$dir/lib$WM_COMPILER_LIB_ARCH/libmetis$EXT_SO \
|
||||
;
|
||||
do
|
||||
if [ -r "$lib" ]
|
||||
then
|
||||
echo " metis include: $dir/include"
|
||||
echo " metis library: ${lib%/*}"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
fi
|
||||
[ -d "$dir/include" ] || exit 2
|
||||
|
||||
package="metis"
|
||||
libName="libmetis"
|
||||
for lib in \
|
||||
"$FOAM_EXT_LIBBIN/$libName$EXT_SO" \
|
||||
"$dir/lib/$libName.a" \
|
||||
"$dir/lib/$libName$EXT_SO" \
|
||||
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName.a" \
|
||||
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName$EXT_SO" \
|
||||
;
|
||||
do
|
||||
if [ -r "$lib" ]
|
||||
then
|
||||
echo " $package include: $dir/include"
|
||||
echo " $package library: ${lib%/*}"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
exit 2
|
||||
fi
|
||||
#------------------------------------------------------------------------------
|
||||
@ -120,6 +121,17 @@ then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Known build issues for mingw (various things)
|
||||
case "$WM_COMPILER" in
|
||||
(Mingw*)
|
||||
if :
|
||||
then
|
||||
echo "Skipping metis - known compilation issues with $WM_COMPILER"
|
||||
exit 0
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
requireExtLibBin
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
11
makeMGridGen
11
makeMGridGen
@ -138,12 +138,13 @@ install()
|
||||
# - for shared library
|
||||
# - for mpi-specific library locations
|
||||
if [ -z "$optForce" ] \
|
||||
&& [ -f "$MGRIDGEN_ARCH_PATH/include/mgridgen.h" \
|
||||
&& [ -r "$MGRIDGEN_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmgrid.a" ]
|
||||
&& [ -f "$MGRIDGEN_ARCH_PATH/include/mgridgen.h" ] \
|
||||
&& {
|
||||
[ -r "$MGRIDGEN_ARCH_PATH/lib/libmgrid.a" ] \
|
||||
|| [ -r "$MGRIDGEN_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmgrid.a" ]
|
||||
}
|
||||
then
|
||||
echo " MGridGen header in $MGRIDGEN_ARCH_PATH/include"
|
||||
echo " MGridGen libs in $MGRIDGEN_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH" # static
|
||||
echo
|
||||
echo " MGridGen already built : $MGRIDGEN_ARCH_PATH"
|
||||
else
|
||||
(
|
||||
cd "$MGRIDGEN_SOURCE_DIR" || exit
|
||||
|
||||
44
makeMPICH
44
makeMPICH
@ -28,18 +28,24 @@ if [ "$1" = "-test" ]
|
||||
then
|
||||
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
|
||||
dir="${2%/}" # <- *_ARCH_PATH
|
||||
if [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
|
||||
then
|
||||
echo "Have mpich shared library (${dir##*/})"
|
||||
exit 0
|
||||
elif [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
|
||||
then
|
||||
echo "Have mpich static library (${dir##*/})"
|
||||
exit 0
|
||||
else
|
||||
echo "No mpich libraries found: ${dir:-not-specified}"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
package="mpich"
|
||||
libName="libmpi"
|
||||
for lib in \
|
||||
"$dir/lib/$libName.a" \
|
||||
"$dir/lib/$libName$EXT_SO" \
|
||||
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName.a" \
|
||||
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName$EXT_SO" \
|
||||
;
|
||||
do
|
||||
if [ -r "$lib" ]
|
||||
then
|
||||
echo "Have $package shared library (${dir##*/})"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
echo "No $package libraries found: ${dir:-not-specified}"
|
||||
exit 2
|
||||
fi
|
||||
#------------------------------------------------------------------------------
|
||||
# Run from third-party directory only
|
||||
@ -133,13 +139,19 @@ MPI_SOURCE_DIR=$sourceBASE/$mpiPACKAGE
|
||||
MPI_ARCH_PATH=$installBASE/$mpiPACKAGE
|
||||
|
||||
if [ -z "$optForce" ] \
|
||||
&& [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
|
||||
&& {
|
||||
[ -r "$MPI_ARCH_PATH/lib/libmpi$EXT_SO" ] \
|
||||
|| [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
|
||||
}
|
||||
then
|
||||
echo "Already has shared library"
|
||||
echo "Already has shared library: $MPI_ARCH_PATH"
|
||||
elif [ -z "$optForce" ] \
|
||||
&& [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
|
||||
&& {
|
||||
[ -r "$MPI_ARCH_PATH/lib/libmpi.a" ] \
|
||||
|| [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
|
||||
}
|
||||
then
|
||||
echo "Already has static library"
|
||||
echo "Already has static library: $MPI_ARCH_PATH"
|
||||
else
|
||||
echo "Starting build: $WM_MPLIB ($mpiPACKAGE)"
|
||||
echo
|
||||
|
||||
44
makeMVAPICH
44
makeMVAPICH
@ -28,18 +28,24 @@ if [ "$1" = "-test" ]
|
||||
then
|
||||
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
|
||||
dir="${2%/}" # <- *_ARCH_PATH
|
||||
if [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
|
||||
then
|
||||
echo "Have mpich shared library (${dir##*/})"
|
||||
exit 0
|
||||
elif [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
|
||||
then
|
||||
echo "Have mpich static library (${dir##*/})"
|
||||
exit 0
|
||||
else
|
||||
echo "No mpich libraries found: ${dir:-not-specified}"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
package="mvapich"
|
||||
libName="libmpi"
|
||||
for lib in \
|
||||
"$dir/lib/$libName.a" \
|
||||
"$dir/lib/$libName$EXT_SO" \
|
||||
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName.a" \
|
||||
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName$EXT_SO" \
|
||||
;
|
||||
do
|
||||
if [ -r "$lib" ]
|
||||
then
|
||||
echo "Have $package library (${dir##*/})"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
echo "No $package libraries found: ${dir:-not-specified}"
|
||||
exit 2
|
||||
fi
|
||||
#------------------------------------------------------------------------------
|
||||
# Run from third-party directory only
|
||||
@ -137,13 +143,19 @@ MPI_SOURCE_DIR=$sourceBASE/$mpiPACKAGE
|
||||
MPI_ARCH_PATH=$installBASE/$mpiPACKAGE
|
||||
|
||||
if [ -z "$optForce" ] \
|
||||
&& [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
|
||||
&& {
|
||||
[ -r "$MPI_ARCH_PATH/lib/libmpi$EXT_SO" ] \
|
||||
|| [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
|
||||
}
|
||||
then
|
||||
echo "Already has shared library"
|
||||
echo "Already has shared library: $MPI_ARCH_PATH"
|
||||
elif [ -z "$optForce" ] \
|
||||
&& [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
|
||||
&& {
|
||||
[ -r "$MPI_ARCH_PATH/lib/libmpi.a" ] \
|
||||
|| [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
|
||||
}
|
||||
then
|
||||
echo "Already has static library"
|
||||
echo "Already has static library: $MPI_ARCH_PATH"
|
||||
else
|
||||
echo "Starting build: $WM_MPLIB ($mpiPACKAGE)"
|
||||
echo
|
||||
|
||||
135
makeMesa
135
makeMesa
@ -6,7 +6,7 @@
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
# Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -23,6 +23,14 @@
|
||||
#
|
||||
# Building with mesa-11.x, mesa-13.x and mesa-17.x seems to be okay.
|
||||
#
|
||||
# Known dependencies (likely incomplete)
|
||||
#
|
||||
# openSUSE 15.2:
|
||||
#
|
||||
# dri2proto-devel
|
||||
# glproto-devel
|
||||
# libxshmfence-devel
|
||||
#
|
||||
# ----------------------------------------------
|
||||
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
|
||||
#------------------------------------------------------------------------------
|
||||
@ -132,6 +140,11 @@ fi
|
||||
#------------------------------------------------------------------------------
|
||||
# Locate third-party clang as required
|
||||
case "$withLLVM" in
|
||||
('' | none | false)
|
||||
withLLVM=none
|
||||
echo "No llvm"
|
||||
;;
|
||||
|
||||
(true | system)
|
||||
LLVM_ARCH_PATH="$(command -v clang)" || {
|
||||
echo "Error: could not properly locate llvm/clang"
|
||||
@ -141,25 +154,28 @@ case "$withLLVM" in
|
||||
# Root installation directory
|
||||
LLVM_ARCH_PATH="${LLVM_ARCH_PATH%/bin/clang}"
|
||||
|
||||
[ -d "$LLVM_ARCH_PATH" ] || {
|
||||
if [ -d "$LLVM_ARCH_PATH" ]
|
||||
then
|
||||
# Add to path (for llvm-config)
|
||||
PATH="$LLVM_ARCH_PATH/bin:$PATH"
|
||||
else
|
||||
echo "Error: could not properly locate llvm/clang"
|
||||
exit 2
|
||||
}
|
||||
;;
|
||||
|
||||
('' | none | false)
|
||||
withLLVM=none
|
||||
echo "No llvm"
|
||||
fi
|
||||
;;
|
||||
|
||||
(llvm-*)
|
||||
echo "check llvm = $withLLVM"
|
||||
LLVM_ARCH_PATH="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH/$withLLVM"
|
||||
|
||||
[ -d "$LLVM_ARCH_PATH" ] || {
|
||||
if [ -d "$LLVM_ARCH_PATH" ]
|
||||
then
|
||||
# Add to path (for llvm-config)
|
||||
PATH="$LLVM_ARCH_PATH/bin:$PATH"
|
||||
else
|
||||
echo "Error: could not properly locate llvm/clang"
|
||||
exit 2
|
||||
}
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
@ -172,20 +188,24 @@ esac
|
||||
# MESA_SOURCE_DIR : location of the original sources
|
||||
# MESA_ARCH_DIR : installation directory
|
||||
|
||||
MESA_SOURCE_DIR=$sourceBASE/$mesaPACKAGE
|
||||
MESA_ARCH_PATH=$installBASE/$mesaPACKAGE
|
||||
MESA_SOURCE_DIR="$sourceBASE/$mesaPACKAGE"
|
||||
MESA_ARCH_PATH="$installBASE/$mesaPACKAGE"
|
||||
|
||||
#
|
||||
# Manual adjustments to mesa
|
||||
# - avoid GLES (GLES1) since <GLES/gl.h> may mask the <GL/gl.h> header
|
||||
adjustMESA()
|
||||
{
|
||||
pkgconfigAdjust $MESA_ARCH_PATH
|
||||
pkgconfigAdjust "$MESA_ARCH_PATH"
|
||||
|
||||
\rm -rf $MESA_ARCH_PATH/include/GLES $MESA_ARCH_PATH/include/GLES1
|
||||
\rm -rf "$MESA_ARCH_PATH"/include/GLES "$MESA_ARCH_PATH"/include/GLES1
|
||||
echo "removed all gles1 includes"
|
||||
}
|
||||
|
||||
# Old MESA with autoconfig
|
||||
|
||||
if [ -e "$MESA_SOURCE_DIR"/configure ]
|
||||
then
|
||||
(
|
||||
# Configuration options:
|
||||
unset configOpt compFlags
|
||||
@ -210,16 +230,16 @@ adjustMESA()
|
||||
|
||||
# End of configuration options
|
||||
# ----------------------------
|
||||
buildDIR=$buildBASE/$mesaPACKAGE
|
||||
buildDIR="$buildBASE/$mesaPACKAGE"
|
||||
|
||||
cd "$MESA_SOURCE_DIR" || exit
|
||||
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
|
||||
|
||||
# Remove any existing build
|
||||
rm -rf $MESA_ARCH_PATH
|
||||
rm -rf $buildDIR
|
||||
mkdir -p $buildDIR
|
||||
cd $buildDIR
|
||||
rm -rf "$MESA_ARCH_PATH"
|
||||
rm -rf "$buildDIR"
|
||||
mkdir -p "$buildDIR"
|
||||
cd "$buildDIR"
|
||||
|
||||
echo "----"
|
||||
echo "Building $mesaPACKAGE"
|
||||
@ -240,7 +260,7 @@ adjustMESA()
|
||||
## autoreconf -fi
|
||||
set -x
|
||||
$MESA_SOURCE_DIR/configure \
|
||||
--prefix=$MESA_ARCH_PATH \
|
||||
--prefix="$MESA_ARCH_PATH" \
|
||||
--disable-xvmc \
|
||||
--disable-glx \
|
||||
--disable-dri \
|
||||
@ -260,4 +280,79 @@ adjustMESA()
|
||||
exit 1
|
||||
}
|
||||
|
||||
elif [ -e "$MESA_SOURCE_DIR"/meson.build ]
|
||||
then
|
||||
(
|
||||
# Configuration options:
|
||||
unset configOpt compFlags
|
||||
|
||||
# Sometimes for LLVM issues
|
||||
# compFlags="-D_GLIBCXX_USE_CXX11_ABI=0"
|
||||
|
||||
# Possibly for older mesa versions (see paraview wiki)
|
||||
# compFlags="-O2 -DDEFAULT_SOFTWARE_DEPTH_BITS=31"
|
||||
|
||||
# Additional configure options
|
||||
if [ "$1" = "--" ]
|
||||
then
|
||||
shift
|
||||
configOpt="$configOpt $@"
|
||||
fi
|
||||
|
||||
# End of configuration options
|
||||
# ----------------------------
|
||||
buildDIR="$buildBASE/$mesaPACKAGE"
|
||||
|
||||
cd "$MESA_SOURCE_DIR" || exit
|
||||
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
|
||||
|
||||
# Remove any existing build
|
||||
rm -rf $MESA_ARCH_PATH
|
||||
rm -rf $buildDIR
|
||||
mkdir -p $buildDIR
|
||||
cd $MESA_SOURCE_DIR
|
||||
|
||||
echo "----"
|
||||
echo "Building $mesaPACKAGE"
|
||||
echo " Source : $MESA_SOURCE_DIR"
|
||||
echo " Target : $MESA_ARCH_PATH"
|
||||
if [ -d "$LLVM_ARCH_PATH" ]
|
||||
then
|
||||
echo " llvm : $LLVM_ARCH_PATH"
|
||||
fi
|
||||
echo "----"
|
||||
|
||||
if [ -n "$compFlags" ]
|
||||
then
|
||||
CFLAGS="$CFLAGS $compFlags"
|
||||
CXXFLAGS="$CXXFLAGS $compFlags"
|
||||
fi
|
||||
|
||||
# Needs c++14 not c++11
|
||||
CXXFLAGS="$(echo "$CXXFLAGS" | sed 's/c++11/c++14/')"
|
||||
|
||||
set -x
|
||||
meson "$buildDIR" \
|
||||
--prefix="$MESA_ARCH_PATH" \
|
||||
-Dplatforms=x11 \
|
||||
-Dosmesa=gallium \
|
||||
-Dgallium-drivers=swrast \
|
||||
-Ddri-drivers=[] \
|
||||
-Dvulkan-drivers=[] \
|
||||
$configOpt \
|
||||
&& set +x \
|
||||
&& ninja -j $WM_NCOMPPROCS -C "$buildDIR" \
|
||||
&& ninja -C "$buildDIR" install \
|
||||
&& echo "Built $mesaPACKAGE" \
|
||||
&& adjustMESA
|
||||
) || {
|
||||
echo "Error building: MESA"
|
||||
exit 1
|
||||
}
|
||||
else
|
||||
echo "Error building: MESA. Not autoconfig or meson?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
40
makeOPENMPI
40
makeOPENMPI
@ -28,18 +28,24 @@ if [ "$1" = "-test" ]
|
||||
then
|
||||
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
|
||||
dir="${2%/}" # <- *_ARCH_PATH
|
||||
if [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
|
||||
then
|
||||
echo " Have openmpi shared library (${dir##*/})"
|
||||
exit 0
|
||||
elif [ -r "$dir/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
|
||||
then
|
||||
echo " Have openmpi static library (${dir##*/})"
|
||||
exit 0
|
||||
else
|
||||
echo "No openmpi libraries found: ${dir:-not-specified}"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
package="openmpi"
|
||||
libName="libmpi"
|
||||
for lib in \
|
||||
"$dir/lib/$libName.a" \
|
||||
"$dir/lib/$libName$EXT_SO" \
|
||||
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName.a" \
|
||||
"$dir/lib$WM_COMPILER_LIB_ARCH/$libName$EXT_SO" \
|
||||
;
|
||||
do
|
||||
if [ -r "$lib" ]
|
||||
then
|
||||
echo "Have $package library (${dir##*/})"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
echo "No $package libraries found: ${dir:-not-specified}"
|
||||
exit 2
|
||||
fi
|
||||
#------------------------------------------------------------------------------
|
||||
# Run from third-party directory only
|
||||
@ -139,11 +145,17 @@ MPI_SOURCE_DIR=$sourceBASE/$mpiPACKAGE
|
||||
MPI_ARCH_PATH=$installBASE/$mpiPACKAGE
|
||||
|
||||
if [ -z "$optForce" ] \
|
||||
&& [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
|
||||
&& {
|
||||
[ -r "$MPI_ARCH_PATH/lib/libmpi$EXT_SO" ] \
|
||||
|| [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi$EXT_SO" ]
|
||||
}
|
||||
then
|
||||
echo "Already has shared library: $MPI_ARCH_PATH"
|
||||
elif [ -z "$optForce" ] \
|
||||
&& [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
|
||||
&& {
|
||||
[ -r "$MPI_ARCH_PATH/lib/libmpi.a" ] \
|
||||
|| [ -r "$MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmpi.a" ]
|
||||
}
|
||||
then
|
||||
echo "Already has static library: $MPI_ARCH_PATH"
|
||||
else
|
||||
|
||||
118
makePETSC
118
makePETSC
@ -6,7 +6,7 @@
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||
# Copyright (C) 2018-2021 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -30,16 +30,13 @@ wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
|
||||
}
|
||||
. etc/tools/ThirdPartyFunctions
|
||||
#------------------------------------------------------------------------------
|
||||
_foamConfig hypre
|
||||
_foamConfig petsc
|
||||
|
||||
hyprePACKAGE="${hypre_version:-hypre-none}"
|
||||
petscPACKAGE="${petsc_version:-petsc-system}"
|
||||
targetType=libso
|
||||
|
||||
# Should be possible to build with download, but seems to fail
|
||||
# hypreURL="https://github.com/hypre-space/hypre/archive/v2.14.0.tar.gz"
|
||||
unset hypreURL
|
||||
unset hyprePACKAGE
|
||||
unset HYPRE_ARCH_PATH # Avoid inconsistency
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
usage() {
|
||||
@ -52,7 +49,9 @@ options:
|
||||
-force Force compilation, even if include/library already exists
|
||||
-gcc Force use of gcc/g++
|
||||
-inplace Build/install inplace (expert option)
|
||||
-no-hypre Disable automatic hypre detection
|
||||
-debug Build with debugging enabled
|
||||
-hypre=URL Specify hypre download location
|
||||
-no-hypre Disable automatic hypre download/detection
|
||||
-help
|
||||
|
||||
* build PETSC with
|
||||
@ -70,35 +69,40 @@ USAGE
|
||||
#------------------------------------------------------------------------------
|
||||
exportCompiler # Compiler info for CMake/configure
|
||||
|
||||
unset optForce optInplace
|
||||
unset optDebug optForce optInplace optHypre
|
||||
|
||||
# Parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
'') ;; # Ignore empty
|
||||
--) break;; # Extra configure options (leave on $@ for later detection)
|
||||
-h | -help) usage ;;
|
||||
-gcc) useGcc ;;
|
||||
-force) optForce=true ;;
|
||||
-inplace) optInplace=true ;;
|
||||
-debug) optDebug=true ;;
|
||||
|
||||
lib|libso)
|
||||
targetType="$1"
|
||||
lib|libso) targetType="$1" ;;
|
||||
|
||||
-hypre=*)
|
||||
optHypre="${1#*=}" # URL for download
|
||||
unset hyprePACKAGE HYPRE_ARCH_PATH
|
||||
;;
|
||||
|
||||
-no-hypre)
|
||||
unset hyprePACKAGE hypreURL
|
||||
unset HYPRE_ARCH_PATH
|
||||
optHypre=false
|
||||
unset hyprePACKAGE HYPRE_ARCH_PATH
|
||||
;;
|
||||
|
||||
hypre-[0-9]* | hypre-git)
|
||||
hyprePACKAGE="${1%%/}"
|
||||
unset hypreURL
|
||||
unset HYPRE_ARCH_PATH # Avoid inconsistency
|
||||
unset optHypre
|
||||
unset HYPRE_ARCH_PATH # Avoid inconsistency
|
||||
;;
|
||||
petsc-[0-9]* | petsc-git)
|
||||
petscPACKAGE="${1%%/}"
|
||||
unset PETSC_ARCH_PATH # Avoid inconsistency
|
||||
unset PETSC_ARCH_PATH # Avoid inconsistency
|
||||
;;
|
||||
*)
|
||||
die "unknown option/argument: '$1'"
|
||||
@ -123,13 +127,11 @@ fi
|
||||
#------------------------------------------------------------------------------
|
||||
# Integrations
|
||||
|
||||
# No hypre
|
||||
if _foamIsNone "$hyprePACKAGE"
|
||||
# Clunky
|
||||
if [ -z "$optHypre" ] && [ -n "$hyprePACKAGE" ] \
|
||||
&& ! _foamIsNone "$hyprePACKAGE"
|
||||
then
|
||||
:
|
||||
elif [ -n "$hyprePACKAGE" ]
|
||||
then
|
||||
# Clunky
|
||||
echo "Using $hyprePACKAGE"
|
||||
: "${HYPRE_ARCH_PATH:=$installBASE$WM_SIZE_OPTIONS/$hyprePACKAGE}"
|
||||
fi
|
||||
|
||||
@ -170,26 +172,35 @@ else
|
||||
fi
|
||||
|
||||
echo "Starting build: $petscPACKAGE ($targetType)"
|
||||
if [ "$WM_PRECISION_OPTION" = SP ]
|
||||
then
|
||||
optHypre=false # No single-precision hypre
|
||||
echo "No single-precision hypre"
|
||||
fi
|
||||
if [ -d "$PETSC_SOURCE_DIR/$archOpt/externalpackages" ]
|
||||
then
|
||||
echo "Removing old $archOpt/externalpackages"
|
||||
rm -rf "$PETSC_SOURCE_DIR/$archOpt/externalpackages"
|
||||
fi
|
||||
echo
|
||||
(
|
||||
# Configuration options
|
||||
configOpt="--with-cc=$(whichMpicc) --with-cxx=$(whichMpicxx)"
|
||||
|
||||
# Normally want hypre but this is really clunky
|
||||
if [ -f "$HYPRE_ARCH_PATH/include/HYPRE.h" ]
|
||||
then
|
||||
echo "Has installed hypre: $hyprePACKAGE"
|
||||
configOpt="$configOpt --with-hypre-dir=$HYPRE_ARCH_PATH"
|
||||
elif [ -n "$urlHypre" ]
|
||||
then
|
||||
configOpt="$configOpt --download-hypre=$urlHypre"
|
||||
fi
|
||||
# Compiler or MPI (but not both)
|
||||
# if [ -d "$MPI_ARCH_PATH" ]
|
||||
# then
|
||||
# configOpt="--with-mpi-dir=$MPI_ARCH_PATH"
|
||||
# else
|
||||
configOpt="--with-cc=$(whichMpicc) --with-cxx=$(whichMpicxx)"
|
||||
# fi
|
||||
|
||||
# Additional configure options
|
||||
if [ "$1" = "--" ]
|
||||
if [ "$optDebug" = true ]
|
||||
then
|
||||
shift
|
||||
configOpt="$configOpt $@"
|
||||
configOpt="$configOpt --with-debugging=1"
|
||||
else
|
||||
# A reasonable assumption for optimization
|
||||
configOpt="$configOpt --with-debugging=0"
|
||||
configOpt="$configOpt --COPTFLAGS=-O3 --CXXOPTFLAGS=-O3"
|
||||
fi
|
||||
|
||||
if [ "$targetType" = libso ]
|
||||
@ -211,21 +222,45 @@ echo
|
||||
configOpt="$configOpt --with-precision=double"
|
||||
fi
|
||||
|
||||
case "$optHypre" in
|
||||
false)
|
||||
configOpt="$configOpt --with-hypre=0"
|
||||
;;
|
||||
ftp:* | git:* | http:* | https:*)
|
||||
configOpt="$configOpt --download-hypre=$optHypre"
|
||||
;;
|
||||
*)
|
||||
# This is a really clunky way to use ThirdParty hypre
|
||||
if [ -f "$HYPRE_ARCH_PATH/include/HYPRE.h" ]
|
||||
then
|
||||
echo "Has installed hypre: $hyprePACKAGE"
|
||||
configOpt="$configOpt --with-hypre-dir=$HYPRE_ARCH_PATH"
|
||||
else
|
||||
configOpt="$configOpt --download-hypre"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# Additional configure options
|
||||
if [ "$1" = "--" ]
|
||||
then
|
||||
shift
|
||||
configOpt="$configOpt $@"
|
||||
fi
|
||||
|
||||
# We export compiler settings (above) but actually use the
|
||||
# --with-cc and --with-cxx. So ignore them and flags
|
||||
# --with-cc and --with-cxx. So ignore these environment variables.
|
||||
|
||||
unset CC CXX
|
||||
unset CFLAGS CXXFLAGS
|
||||
|
||||
cd "$PETSC_SOURCE_DIR" || exit
|
||||
export GIT_DIR="$PWD/.git" # Mask seeing our own git-repo
|
||||
unset GIT_DIR # No special git-repo handling
|
||||
|
||||
rm -rf "$PETSC_ARCH_PATH"
|
||||
# No clean here, if we have multiple arch in the same directory
|
||||
|
||||
## without tests? --testdir=..
|
||||
## configOpt="$configOpt --download-f2cblaslapack=1"
|
||||
|
||||
echo
|
||||
set -x
|
||||
./configure \
|
||||
${installPrefix:+--prefix="$installPrefix"} \
|
||||
@ -233,9 +268,6 @@ echo
|
||||
--with-petsc-arch="$archOpt" \
|
||||
--with-clanguage=C \
|
||||
--with-fc=0 \
|
||||
--with-scalapack=0 \
|
||||
--with-superlu_dist=0 \
|
||||
--with-suitesparse=0 \
|
||||
--with-x=0 \
|
||||
$configOpt \
|
||||
&& set +x \
|
||||
|
||||
22
makeParaView
22
makeParaView
@ -7,7 +7,7 @@
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
# Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -64,6 +64,12 @@ setParaViewVersion ${ParaView_VERSION:-none}
|
||||
# New rendering backend (starting with paraview 5.0).
|
||||
withGL2=auto # auto-config based on version
|
||||
|
||||
# Hint for cmake findMPI
|
||||
if [ -d "$MPI_ARCH_PATH" ]
|
||||
then
|
||||
export MPI_HOME="$MPI_ARCH_PATH"
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
usage() {
|
||||
exec 1>&2
|
||||
@ -83,6 +89,7 @@ options:
|
||||
-mesa-lib PATH path to mesa library (current: ${MESA_LIBRARY:-none})
|
||||
-mpi with mpi
|
||||
-mpi=N with max 'N' mpi processes. N=0 for no upper-limit.
|
||||
-mpi-home PATH with mpi and hint for MPI_HOME
|
||||
-python | -python2 | -python3
|
||||
with python
|
||||
-python-include DIR
|
||||
@ -90,13 +97,14 @@ options:
|
||||
-python-lib PATH path to python library (current: ${PYTHON_LIBRARY:-none})
|
||||
-qmake PATH with QT version corresponding to the qmake in given path
|
||||
-qt with extra Qt gui support (if not already enabled)
|
||||
-qt-VER with QT version corresponding to
|
||||
-qt-<VER> with QT version corresponding to
|
||||
\$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/qt-VER/bin/qmake
|
||||
-verbose verbose output in Makefiles
|
||||
-version VER specify an alternative version (current: $ParaView_VERSION)
|
||||
-major VER specify an alternative major version for special builds
|
||||
-buildType NAME specify the build type (default: Release)
|
||||
-suffix NAME specify a suffix to distinguish the build
|
||||
-DNAME=VALUE add cmake variable
|
||||
-help
|
||||
|
||||
The -no-FEATURE option can be used to forcibly disable these features:
|
||||
@ -147,7 +155,7 @@ do
|
||||
[0-9]* | paraview-[0-9]* | ParaView-[0-9]*) # paraview version
|
||||
setParaViewVersion "${1%%/}"
|
||||
;;
|
||||
[A-Z]*=*) # cmake variables
|
||||
-D[A-Z]*=* | [A-Z]*=*) # cmake variables
|
||||
addCMakeVariable "$1"
|
||||
;;
|
||||
-patch) # stage 0: patch sources
|
||||
@ -231,6 +239,13 @@ do
|
||||
withMPI=true
|
||||
MPI_MAX_PROCS="${1##*=}"
|
||||
;;
|
||||
-mpi-home) # mpi with hint
|
||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||
withMPI=true
|
||||
export MPI_HOME="${2%%/}"
|
||||
case "${MPI_HOME:-none}" in (false|none) unset MPI_HOME;; esac
|
||||
shift
|
||||
;;
|
||||
-no-mpi)
|
||||
withMPI=false
|
||||
;;
|
||||
@ -359,6 +374,7 @@ fi
|
||||
|
||||
# Set configure options
|
||||
#~~~~~~~~~~~~~~~~~~~~~~
|
||||
addGeneral # general settings (version-dependent)
|
||||
addVerbosity # verbose makefiles
|
||||
addMpiSupport # set MPI-specific options
|
||||
addPythonSupport # set Python-specific options
|
||||
|
||||
20
makeVTK
20
makeVTK
@ -6,7 +6,7 @@
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
# Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -53,10 +53,15 @@ case "$VTK_VERSION" in
|
||||
esac
|
||||
VTK_VERSION="${VTK_VERSION%%-*}" # Without suffix (eg, -mesa)
|
||||
|
||||
|
||||
# New rendering backend (starting with vtk 7?).
|
||||
withGL2=auto # auto-config based on version
|
||||
|
||||
# Hint for cmake findMPI
|
||||
if [ -d "$MPI_ARCH_PATH" ]
|
||||
then
|
||||
export MPI_HOME="$MPI_ARCH_PATH"
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
usage() {
|
||||
exec 1>&2
|
||||
@ -76,10 +81,12 @@ options:
|
||||
-osmesa with off-screen mesa only
|
||||
-mpi with mpi (VTK_Group_MPI=ON)
|
||||
-mpi=N with max 'N' mpi processes. N=0 for no upper-limit.
|
||||
-mpi-home PATH with mpi and hint for MPI_HOME
|
||||
-verbose verbose output in Makefiles
|
||||
-version VER specify an alternative version (current: $VTK_VERSION)
|
||||
-buildType NAME specify the build type (default: Release)
|
||||
-suffix NAME specify a suffix to distinguish the build
|
||||
-DNAME=VALUE add cmake variable
|
||||
-help
|
||||
|
||||
The -no-FEATURE option can be used to forcibly disable these features:
|
||||
@ -123,7 +130,7 @@ do
|
||||
[0-9]* | vtk-[0-9]* | VTK-[0-9]*) # VTK version
|
||||
setVtkVersion "${1%%/}"
|
||||
;;
|
||||
[A-Z]*=*) # cmake variables
|
||||
-D[A-Z]*=* | [A-Z]*=*) # cmake variables
|
||||
addCMakeVariable "$1"
|
||||
;;
|
||||
-patch) # stage 0: patch sources
|
||||
@ -204,6 +211,13 @@ do
|
||||
withMPI=true
|
||||
MPI_MAX_PROCS="${1##*=}"
|
||||
;;
|
||||
-mpi-home) # mpi with hint
|
||||
[ "$#" -ge 2 ] || die "'$1' option requires an argument"
|
||||
withMPI=true
|
||||
export MPI_HOME="${2%%/}"
|
||||
case "${MPI_HOME:-none}" in (false|none) unset MPI_HOME;; esac
|
||||
shift
|
||||
;;
|
||||
-no-mpi)
|
||||
withMPI=false
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user