mirror of
https://github.com/OpenFOAM/ThirdParty-6.git
synced 2025-12-08 06:57:43 +00:00
README: Update ParaView instructions
This commit is contained in:
218
README.html
218
README.html
@ -4,7 +4,7 @@
|
|||||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>OpenFOAM-dev Third-Party packages</title>
|
<title>OpenFOAM-dev Third-Party packages</title>
|
||||||
<!-- 2017-07-21 Fri 11:38 -->
|
<!-- 2017-07-25 Tue 11:10 -->
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||||
<meta name="generator" content="Org-mode" />
|
<meta name="generator" content="Org-mode" />
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
@ -142,35 +142,24 @@ for the JavaScript code in this tag.
|
|||||||
<div id="text-table-of-contents">
|
<div id="text-table-of-contents">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#sec-1">1. Description</a></li>
|
<li><a href="#sec-1">1. Description</a></li>
|
||||||
<li><a href="#sec-2">2. Order of execution:</a>
|
<li><a href="#sec-2">2. Download and installation instructions</a></li>
|
||||||
|
<li><a href="#sec-3">3. Order of execution:</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#sec-2-1">2.1. Optional</a></li>
|
<li><a href="#sec-3-1">3.1. Optional</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="#sec-3">3. Versions and locations to download the third party packages</a>
|
<li><a href="#sec-4">4. Versions and locations to download the third party packages</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#sec-3-1">3.1. Gcc C++ Compiler</a></li>
|
<li><a href="#sec-4-1">4.1. Gcc C++ Compiler</a></li>
|
||||||
<li><a href="#sec-3-2">3.2. Parallel Processing</a>
|
<li><a href="#sec-4-2">4.2. Parallel Processing</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#sec-3-2-1">3.2.1. Scotch</a></li>
|
<li><a href="#sec-4-2-1">4.2.1. Scotch</a></li>
|
||||||
<li><a href="#sec-3-2-2">3.2.2. OpenMPI</a></li>
|
<li><a href="#sec-4-2-2">4.2.2. OpenMPI</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="#sec-3-3">3.3. ParaView</a></li>
|
<li><a href="#sec-4-3">4.3. ParaView</a></li>
|
||||||
<li><a href="#sec-3-4">3.4. CGAL</a></li>
|
<li><a href="#sec-4-4">4.4. CGAL</a></li>
|
||||||
<li><a href="#sec-3-5">3.5. Miscellaneous</a></li>
|
<li><a href="#sec-4-5">4.5. Miscellaneous</a></li>
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li><a href="#sec-4">4. Notes</a>
|
|
||||||
<ul>
|
|
||||||
<li><a href="#sec-4-1">4.1. Building ParaView-4.3.1/4.4.0/5.0.0/5.0.1</a></li>
|
|
||||||
<li><a href="#sec-4-2">4.2. Building ParaView-5.0.1 with gcc-6.1.0</a>
|
|
||||||
<ul>
|
|
||||||
<li><a href="#sec-4-2-1">4.2.1. Add support for gcc-6.?.?</a></li>
|
|
||||||
<li><a href="#sec-4-2-2">4.2.2. SciberQuestToolKit</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li><a href="#sec-4-3">4.3. Building ParaView-4.1.0</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -186,22 +175,23 @@ Scripts for building third-party packages.
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="outline-container-sec-2" class="outline-2">
|
<div id="outline-container-sec-2" class="outline-2">
|
||||||
<h2 id="sec-2"><span class="section-number-2">2</span> Order of execution:</h2>
|
<h2 id="sec-2"><span class="section-number-2">2</span> <a href="https://openfoam.org/download/source/third-party-software/">Download and installation instructions</a></h2>
|
||||||
<div class="outline-text-2" id="text-2">
|
</div>
|
||||||
|
<div id="outline-container-sec-3" class="outline-2">
|
||||||
|
<h2 id="sec-3"><span class="section-number-2">3</span> Order of execution:</h2>
|
||||||
|
<div class="outline-text-2" id="text-3">
|
||||||
<ul class="org-ul">
|
<ul class="org-ul">
|
||||||
<li>makeGcc (recommended if the system gcc is < 4.8)
|
<li>makeGcc (recommended if the system gcc is < 4.8)
|
||||||
</li>
|
</li>
|
||||||
<li>Allwmake (Builds OpenMPI, Scotch etc.)
|
<li>Allwmake (Builds OpenMPI, Scotch etc.)
|
||||||
</li>
|
</li>
|
||||||
<li>makeCmake (if the system cmake version is < 2.8.8)
|
|
||||||
</li>
|
|
||||||
<li>makeParaView
|
<li>makeParaView
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div id="outline-container-sec-2-1" class="outline-3">
|
<div id="outline-container-sec-3-1" class="outline-3">
|
||||||
<h3 id="sec-2-1"><span class="section-number-3">2.1</span> Optional</h3>
|
<h3 id="sec-3-1"><span class="section-number-3">3.1</span> Optional</h3>
|
||||||
<div class="outline-text-3" id="text-2-1">
|
<div class="outline-text-3" id="text-3-1">
|
||||||
<ul class="org-ul">
|
<ul class="org-ul">
|
||||||
<li>AllwmakeLibccmio (Only required for conversion of STAR-CCM+ meshes)
|
<li>AllwmakeLibccmio (Only required for conversion of STAR-CCM+ meshes)
|
||||||
</li>
|
</li>
|
||||||
@ -211,12 +201,12 @@ Scripts for building third-party packages.
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="outline-container-sec-3" class="outline-2">
|
<div id="outline-container-sec-4" class="outline-2">
|
||||||
<h2 id="sec-3"><span class="section-number-2">3</span> Versions and locations to download the third party packages</h2>
|
<h2 id="sec-4"><span class="section-number-2">4</span> Versions and locations to download the third party packages</h2>
|
||||||
<div class="outline-text-2" id="text-3">
|
<div class="outline-text-2" id="text-4">
|
||||||
</div><div id="outline-container-sec-3-1" class="outline-3">
|
</div><div id="outline-container-sec-4-1" class="outline-3">
|
||||||
<h3 id="sec-3-1"><span class="section-number-3">3.1</span> Gcc C++ Compiler</h3>
|
<h3 id="sec-4-1"><span class="section-number-3">4.1</span> Gcc C++ Compiler</h3>
|
||||||
<div class="outline-text-3" id="text-3-1">
|
<div class="outline-text-3" id="text-4-1">
|
||||||
<p>
|
<p>
|
||||||
The minimum version of gcc required is 4.8.0
|
The minimum version of gcc required is 4.8.0
|
||||||
</p>
|
</p>
|
||||||
@ -235,12 +225,12 @@ The minimum version of gcc required is 4.8.0
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="outline-container-sec-3-2" class="outline-3">
|
<div id="outline-container-sec-4-2" class="outline-3">
|
||||||
<h3 id="sec-3-2"><span class="section-number-3">3.2</span> Parallel Processing</h3>
|
<h3 id="sec-4-2"><span class="section-number-3">4.2</span> Parallel Processing</h3>
|
||||||
<div class="outline-text-3" id="text-3-2">
|
<div class="outline-text-3" id="text-4-2">
|
||||||
</div><div id="outline-container-sec-3-2-1" class="outline-4">
|
</div><div id="outline-container-sec-4-2-1" class="outline-4">
|
||||||
<h4 id="sec-3-2-1"><span class="section-number-4">3.2.1</span> Scotch</h4>
|
<h4 id="sec-4-2-1"><span class="section-number-4">4.2.1</span> Scotch</h4>
|
||||||
<div class="outline-text-4" id="text-3-2-1">
|
<div class="outline-text-4" id="text-4-2-1">
|
||||||
<p>
|
<p>
|
||||||
Scotch-6.0.3 is provided with ThirdParty-dev or the original source pack
|
Scotch-6.0.3 is provided with ThirdParty-dev or the original source pack
|
||||||
may be obtained from:
|
may be obtained from:
|
||||||
@ -251,9 +241,9 @@ may be obtained from:
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="outline-container-sec-3-2-2" class="outline-4">
|
<div id="outline-container-sec-4-2-2" class="outline-4">
|
||||||
<h4 id="sec-3-2-2"><span class="section-number-4">3.2.2</span> OpenMPI</h4>
|
<h4 id="sec-4-2-2"><span class="section-number-4">4.2.2</span> OpenMPI</h4>
|
||||||
<div class="outline-text-4" id="text-3-2-2">
|
<div class="outline-text-4" id="text-4-2-2">
|
||||||
<ul class="org-ul">
|
<ul class="org-ul">
|
||||||
<li>OpenMPI: <a href="https://www.open-mpi.org/software/ompi/v2.1/downloads/openmpi-2.1.1.tar.bz2">https://www.open-mpi.org/software/ompi/v2.1/downloads/openmpi-2.1.1.tar.bz2</a>
|
<li>OpenMPI: <a href="https://www.open-mpi.org/software/ompi/v2.1/downloads/openmpi-2.1.1.tar.bz2">https://www.open-mpi.org/software/ompi/v2.1/downloads/openmpi-2.1.1.tar.bz2</a>
|
||||||
</li>
|
</li>
|
||||||
@ -261,31 +251,40 @@ may be obtained from:
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="outline-container-sec-3-3" class="outline-3">
|
<div id="outline-container-sec-4-3" class="outline-3">
|
||||||
<h3 id="sec-3-3"><span class="section-number-3">3.3</span> ParaView</h3>
|
<h3 id="sec-4-3"><span class="section-number-3">4.3</span> ParaView</h3>
|
||||||
<div class="outline-text-3" id="text-3-3">
|
<div class="outline-text-3" id="text-4-3">
|
||||||
<p>
|
<p>
|
||||||
ParaView-5.0.1 patched to compile and install correctly is provided with
|
Patched versions of the ParaView source code were once provided for ParaView
|
||||||
ThirdParty-dev but older versions can be downloaded from <i>www.paraview.org</i>:
|
v5.0.1. With the current supported version of ParaView (v.5.4.0), the
|
||||||
|
source code
|
||||||
</p>
|
</p>
|
||||||
<ul class="org-ul">
|
<ul class="org-ul">
|
||||||
<li>cmake <a href="http://www.cmake.org/files/v3.2/cmake-3.2.1.tar.gz">http://www.cmake.org/files/v3.2/cmake-3.2.1.tar.gz</a>
|
|
||||||
</li>
|
|
||||||
<li>ParaView-4.4.0 <a href="http://www.paraview.org/files/v4.4/ParaView-v4.4.0-source.tar.gz">http://www.paraview.org/files/v4.4/ParaView-v4.4.0-source.tar.gz</a>
|
|
||||||
</li>
|
|
||||||
<li>ParaView-5.0.1 <a href="http://www.paraview.org/files/v5.0/ParaView-v5.0.1-source.tar.gz">http://www.paraview.org/files/v5.0/ParaView-v5.0.1-source.tar.gz</a>
|
|
||||||
</li>
|
|
||||||
<li>ParaView-5.4.0 <a href="http://www.paraview.org/files/v5.4/ParaView-v5.4.0.tar.gz">http://www.paraview.org/files/v5.4/ParaView-v5.4.0.tar.gz</a>
|
<li>ParaView-5.4.0 <a href="http://www.paraview.org/files/v5.4/ParaView-v5.4.0.tar.gz">http://www.paraview.org/files/v5.4/ParaView-v5.4.0.tar.gz</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>
|
<p>
|
||||||
but may need patching to compile (See <a href="#sec-4">4</a>).
|
is downloaded automatically and compiles without modification. ParaView is
|
||||||
|
compiled by running the <code>makeParaView</code> script, i.e.
|
||||||
</p>
|
</p>
|
||||||
|
<ul class="org-ul">
|
||||||
|
<li>./makeParaView
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<p>
|
||||||
|
Expect ParaView to take a long time to compile, typically several hours on a
|
||||||
|
desktop computer. Following compilation, update the environment by sourcing
|
||||||
|
the .bashrc (or .cshrc) file or by typing
|
||||||
|
</p>
|
||||||
|
<ul class="org-ul">
|
||||||
|
<li>wmRefresh
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="outline-container-sec-3-4" class="outline-3">
|
<div id="outline-container-sec-4-4" class="outline-3">
|
||||||
<h3 id="sec-3-4"><span class="section-number-3">3.4</span> CGAL</h3>
|
<h3 id="sec-4-4"><span class="section-number-3">4.4</span> CGAL</h3>
|
||||||
<div class="outline-text-3" id="text-3-4">
|
<div class="outline-text-3" id="text-4-4">
|
||||||
<ul class="org-ul">
|
<ul class="org-ul">
|
||||||
<li>CGAL <a href="https://github.com/CGAL/cgal/releases/download/releases/CGAL-4.8.1/CGAL-4.8.1.tar.xz">https://github.com/CGAL/cgal/releases/download/releases/CGAL-4.8.1/CGAL-4.8.1.tar.xz</a>
|
<li>CGAL <a href="https://github.com/CGAL/cgal/releases/download/releases/CGAL-4.8.1/CGAL-4.8.1.tar.xz">https://github.com/CGAL/cgal/releases/download/releases/CGAL-4.8.1/CGAL-4.8.1.tar.xz</a>
|
||||||
</li>
|
</li>
|
||||||
@ -294,9 +293,9 @@ but may need patching to compile (See <a href="#sec-4">4</a>).
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="outline-container-sec-3-5" class="outline-3">
|
<div id="outline-container-sec-4-5" class="outline-3">
|
||||||
<h3 id="sec-3-5"><span class="section-number-3">3.5</span> Miscellaneous</h3>
|
<h3 id="sec-4-5"><span class="section-number-3">4.5</span> Miscellaneous</h3>
|
||||||
<div class="outline-text-3" id="text-3-5">
|
<div class="outline-text-3" id="text-4-5">
|
||||||
<ul class="org-ul">
|
<ul class="org-ul">
|
||||||
<li>libccmio <a href="http://portal.nersc.gov/svn/visit/trunk/third_party/libccmio-2.6.1.tar.gz">http://portal.nersc.gov/svn/visit/trunk/third_party/libccmio-2.6.1.tar.gz</a>
|
<li>libccmio <a href="http://portal.nersc.gov/svn/visit/trunk/third_party/libccmio-2.6.1.tar.gz">http://portal.nersc.gov/svn/visit/trunk/third_party/libccmio-2.6.1.tar.gz</a>
|
||||||
</li>
|
</li>
|
||||||
@ -304,99 +303,10 @@ but may need patching to compile (See <a href="#sec-4">4</a>).
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="outline-container-sec-4" class="outline-2">
|
|
||||||
<h2 id="sec-4"><span class="section-number-2">4</span> Notes</h2>
|
|
||||||
<div class="outline-text-2" id="text-4">
|
|
||||||
</div><div id="outline-container-sec-4-1" class="outline-3">
|
|
||||||
<h3 id="sec-4-1"><span class="section-number-3">4.1</span> Building ParaView-4.3.1/4.4.0/5.0.0/5.0.1</h3>
|
|
||||||
<div class="outline-text-3" id="text-4-1">
|
|
||||||
<p>
|
|
||||||
The ParaView-4.3.1/4.4.0/5.0.0 source-pack provided by KitWare will not
|
|
||||||
build and install correctly without a minor correction: lines 653-656
|
|
||||||
(650-653 in ParaView-5.0.0, 659-662 in ParaView-5.0.1) must be removed or
|
|
||||||
commented from file
|
|
||||||
<i>ThirdParty-dev/ParaView-[45].?.?/Qt/Components/CMakeLists.txt</i> after
|
|
||||||
unpacking and renaming the ParaView-[45].?.? directory. This is because the
|
|
||||||
file ui_pqExportStateWizard.h referred to in
|
|
||||||
</p>
|
|
||||||
<div class="org-src-container">
|
|
||||||
|
|
||||||
<pre class="src src-C"><span style="color: #0000cd; font-weight: bold;">if</span>(PARAVIEW_INSTALL_DEVELOPMENT_FILES)
|
|
||||||
install(FILES <span style="color: #008b00;">"${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h"</span>
|
|
||||||
DESTINATION <span style="color: #008b00;">"${VTK_INSTALL_INCLUDE_DIR}"</span>)
|
|
||||||
endif()
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
<p>
|
|
||||||
does not exist and cannot be installed causing the build and installation to
|
|
||||||
fail.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Additionally for ParaView-4.4.0 there is a bug in the STL reader which can
|
|
||||||
be patched by running the following command from within the ThirdParty-???
|
|
||||||
directory:
|
|
||||||
</p>
|
|
||||||
<ul class="org-ul">
|
|
||||||
<li>wget <a href="https://raw.githubusercontent.com/Kitware/VTK/40937e934308e5009e80769dc0c451ee4f157749/IO/Geometry/vtkSTLReader.cxx">https://raw.githubusercontent.com/Kitware/VTK/40937e934308e5009e80769dc0c451ee4f157749/IO/Geometry/vtkSTLReader.cxx</a> -O ParaView-4.4.0/VTK/IO/Geometry/vtkSTLReader.cxx
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<p>
|
|
||||||
See also <a href="http://www.openfoam.org/mantisbt/view.php?id=1887">http://www.openfoam.org/mantisbt/view.php?id=1887</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="outline-container-sec-4-2" class="outline-3">
|
|
||||||
<h3 id="sec-4-2"><span class="section-number-3">4.2</span> Building ParaView-5.0.1 with gcc-6.1.0</h3>
|
|
||||||
<div class="outline-text-3" id="text-4-2">
|
|
||||||
</div><div id="outline-container-sec-4-2-1" class="outline-4">
|
|
||||||
<h4 id="sec-4-2-1"><span class="section-number-4">4.2.1</span> Add support for gcc-6.?.?</h4>
|
|
||||||
<div class="outline-text-4" id="text-4-2-1">
|
|
||||||
<p>
|
|
||||||
The following cmake files
|
|
||||||
</p>
|
|
||||||
<ul class="org-ul">
|
|
||||||
<li>ParaView-5.0.1/VTK/CMake/vtkCompilerExtras.cmake
|
|
||||||
</li>
|
|
||||||
<li>ParaView-5.0.1/VTK/CMake/GenerateExportHeader.cmake
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<p>
|
|
||||||
specifically limit the gcc versions supported. To add support gcc-6.?.?
|
|
||||||
replace '[345]' with '[3456]'
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="outline-container-sec-4-2-2" class="outline-4">
|
|
||||||
<h4 id="sec-4-2-2"><span class="section-number-4">4.2.2</span> SciberQuestToolKit</h4>
|
|
||||||
<div class="outline-text-4" id="text-4-2-2">
|
|
||||||
<p>
|
|
||||||
The SciberQuestToolKit plugin fails to compile with gcc-6.1.0 and causes
|
|
||||||
the compilation of ParaView to halt. The easiest solution is to delete
|
|
||||||
the ParaView-5.0.1/Plugins/SciberQuestToolKit directory.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="outline-container-sec-4-3" class="outline-3">
|
|
||||||
<h3 id="sec-4-3"><span class="section-number-3">4.3</span> Building ParaView-4.1.0</h3>
|
|
||||||
<div class="outline-text-3" id="text-4-3">
|
|
||||||
<p>
|
|
||||||
On Ubuntu 14.10 and higher, OpenSuSE 13.2 and probably other recent
|
|
||||||
GNU/Linux distributions there is an issue in the GL libraries requiring a
|
|
||||||
change to the vtkXOpenGLRenderWindow.cxx file in ParaView: Uncomment line 30
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
#define GLX_GLXEXT_LEGACY
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="postamble" class="status">
|
<div id="postamble" class="status">
|
||||||
<p class="date">Date: 21st July 2017</p>
|
<p class="date">Date: 25st July 2017</p>
|
||||||
<p class="date">Created: 2017-07-21 Fri 11:38</p>
|
<p class="date">Created: 2017-07-25 Tue 11:10</p>
|
||||||
<p class="creator"><a href="http://www.gnu.org/software/emacs/">Emacs</a> 25.1.91 (<a href="http://orgmode.org">Org</a> mode 8.2.10)</p>
|
<p class="creator"><a href="http://www.gnu.org/software/emacs/">Emacs</a> 25.1.91 (<a href="http://orgmode.org">Org</a> mode 8.2.10)</p>
|
||||||
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
60
README.org
60
README.org
@ -2,17 +2,17 @@
|
|||||||
#
|
#
|
||||||
#+TITLE: OpenFOAM-dev Third-Party packages
|
#+TITLE: OpenFOAM-dev Third-Party packages
|
||||||
#+AUTHOR: The OpenFOAM Foundation
|
#+AUTHOR: The OpenFOAM Foundation
|
||||||
#+DATE: 21st July 2017
|
#+DATE: 25st July 2017
|
||||||
#+LINK: http://www.openfoam.org
|
#+LINK: http://www.openfoam.org
|
||||||
#+OPTIONS: author:nil ^:{}
|
#+OPTIONS: author:nil ^:{}
|
||||||
# Copyright (c) 2014-2016 OpenFOAM Foundation.
|
# Copyright (c) 2014-2016 OpenFOAM Foundation.
|
||||||
|
|
||||||
* Description
|
* Description
|
||||||
Scripts for building third-party packages.
|
Scripts for building third-party packages.
|
||||||
|
* [[https://openfoam.org/download/source/third-party-software/][Download and installation instructions]]
|
||||||
* Order of execution:
|
* Order of execution:
|
||||||
+ makeGcc (recommended if the system gcc is < 4.8)
|
+ makeGcc (recommended if the system gcc is < 4.8)
|
||||||
+ Allwmake (Builds OpenMPI, Scotch etc.)
|
+ Allwmake (Builds OpenMPI, Scotch etc.)
|
||||||
+ makeCmake (if the system cmake version is < 2.8.8)
|
|
||||||
+ makeParaView
|
+ makeParaView
|
||||||
*** Optional
|
*** Optional
|
||||||
+ AllwmakeLibccmio (Only required for conversion of STAR-CCM+ meshes)
|
+ AllwmakeLibccmio (Only required for conversion of STAR-CCM+ meshes)
|
||||||
@ -35,57 +35,21 @@
|
|||||||
***** OpenMPI
|
***** OpenMPI
|
||||||
+ OpenMPI: https://www.open-mpi.org/software/ompi/v2.1/downloads/openmpi-2.1.1.tar.bz2
|
+ OpenMPI: https://www.open-mpi.org/software/ompi/v2.1/downloads/openmpi-2.1.1.tar.bz2
|
||||||
*** ParaView
|
*** ParaView
|
||||||
ParaView-5.0.1 patched to compile and install correctly is provided with
|
Patched versions of the ParaView source code were once provided for ParaView
|
||||||
ThirdParty-dev but older versions can be downloaded from [[www.paraview.org]]:
|
v5.0.1. With the current supported version of ParaView (v.5.4.0), the
|
||||||
+ cmake http://www.cmake.org/files/v3.2/cmake-3.2.1.tar.gz
|
source code
|
||||||
+ ParaView-4.4.0 http://www.paraview.org/files/v4.4/ParaView-v4.4.0-source.tar.gz
|
|
||||||
+ ParaView-5.0.1 http://www.paraview.org/files/v5.0/ParaView-v5.0.1-source.tar.gz
|
|
||||||
+ ParaView-5.4.0 http://www.paraview.org/files/v5.4/ParaView-v5.4.0.tar.gz
|
+ ParaView-5.4.0 http://www.paraview.org/files/v5.4/ParaView-v5.4.0.tar.gz
|
||||||
but may need patching to compile (See [[Notes]]).
|
is downloaded automatically and compiles without modification. ParaView is
|
||||||
|
compiled by running the =makeParaView= script, i.e.
|
||||||
|
+ ./makeParaView
|
||||||
|
Expect ParaView to take a long time to compile, typically several hours on a
|
||||||
|
desktop computer. Following compilation, update the environment by sourcing
|
||||||
|
the .bashrc (or .cshrc) file or by typing
|
||||||
|
+ wmRefresh
|
||||||
*** CGAL
|
*** CGAL
|
||||||
+ CGAL https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.8.1/CGAL-4.8.1.tar.xz
|
+ CGAL https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.8.1/CGAL-4.8.1.tar.xz
|
||||||
+ boost http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.bz2/download
|
+ boost http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.bz2/download
|
||||||
*** Miscellaneous
|
*** Miscellaneous
|
||||||
+ libccmio http://portal.nersc.gov/svn/visit/trunk/third_party/libccmio-2.6.1.tar.gz
|
+ libccmio http://portal.nersc.gov/svn/visit/trunk/third_party/libccmio-2.6.1.tar.gz
|
||||||
* Notes
|
|
||||||
*** Building ParaView-4.3.1/4.4.0/5.0.0/5.0.1
|
|
||||||
The ParaView-4.3.1/4.4.0/5.0.0 source-pack provided by KitWare will not
|
|
||||||
build and install correctly without a minor correction: lines 653-656
|
|
||||||
(650-653 in ParaView-5.0.0, 659-662 in ParaView-5.0.1) must be removed or
|
|
||||||
commented from file
|
|
||||||
/ThirdParty-dev/ParaView-[45].?.?/Qt/Components/CMakeLists.txt/ after
|
|
||||||
unpacking and renaming the ParaView-[45].?.? directory. This is because the
|
|
||||||
file ui_pqExportStateWizard.h referred to in
|
|
||||||
#+begin_src C
|
|
||||||
if(PARAVIEW_INSTALL_DEVELOPMENT_FILES)
|
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ui_pqExportStateWizard.h"
|
|
||||||
DESTINATION "${VTK_INSTALL_INCLUDE_DIR}")
|
|
||||||
endif()
|
|
||||||
#+end_src
|
|
||||||
does not exist and cannot be installed causing the build and installation to
|
|
||||||
fail.
|
|
||||||
|
|
||||||
Additionally for ParaView-4.4.0 there is a bug in the STL reader which can
|
|
||||||
be patched by running the following command from within the ThirdParty-???
|
|
||||||
directory:
|
|
||||||
+ wget https://raw.githubusercontent.com/Kitware/VTK/40937e934308e5009e80769dc0c451ee4f157749/IO/Geometry/vtkSTLReader.cxx -O ParaView-4.4.0/VTK/IO/Geometry/vtkSTLReader.cxx
|
|
||||||
See also http://www.openfoam.org/mantisbt/view.php?id=1887
|
|
||||||
*** Building ParaView-5.0.1 with gcc-6.1.0
|
|
||||||
***** Add support for gcc-6.?.?
|
|
||||||
The following cmake files
|
|
||||||
+ ParaView-5.0.1/VTK/CMake/vtkCompilerExtras.cmake
|
|
||||||
+ ParaView-5.0.1/VTK/CMake/GenerateExportHeader.cmake
|
|
||||||
specifically limit the gcc versions supported. To add support gcc-6.?.?
|
|
||||||
replace '[345]' with '[3456]'
|
|
||||||
***** SciberQuestToolKit
|
|
||||||
The SciberQuestToolKit plugin fails to compile with gcc-6.1.0 and causes
|
|
||||||
the compilation of ParaView to halt. The easiest solution is to delete
|
|
||||||
the ParaView-5.0.1/Plugins/SciberQuestToolKit directory.
|
|
||||||
*** Building ParaView-4.1.0
|
|
||||||
On Ubuntu 14.10 and higher, OpenSuSE 13.2 and probably other recent
|
|
||||||
GNU/Linux distributions there is an issue in the GL libraries requiring a
|
|
||||||
change to the vtkXOpenGLRenderWindow.cxx file in ParaView: Uncomment line 30
|
|
||||||
|
|
||||||
#define GLX_GLXEXT_LEGACY
|
|
||||||
|
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
|
|||||||
@ -1,530 +0,0 @@
|
|||||||
#---------------------------------*- sh -*-------------------------------------
|
|
||||||
# ========= |
|
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
# \\ / O peration |
|
|
||||||
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
|
||||||
# \\/ M anipulation |
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
# License
|
|
||||||
# This file is part of OpenFOAM.
|
|
||||||
#
|
|
||||||
# OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
# under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
# for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
# File
|
|
||||||
# etc/tools/ParaViewFunctions
|
|
||||||
#
|
|
||||||
# Description
|
|
||||||
# ParaView make/install helper functions
|
|
||||||
#
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
# buildBASE, installBASE defined from tools/ThirdPartyFunctions
|
|
||||||
|
|
||||||
#
|
|
||||||
# where things are or should be put
|
|
||||||
# ParaView_VERSION and ParaView_MAJOR should already have been set
|
|
||||||
#
|
|
||||||
# ParaView_SOURCE_DIR : location of the original sources
|
|
||||||
# ParaView_BINARY_DIR : location of the build
|
|
||||||
# ParaView_DIR : location of the installed program
|
|
||||||
#
|
|
||||||
setDirs()
|
|
||||||
{
|
|
||||||
ParaView_SOURCE_DIR=$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION
|
|
||||||
|
|
||||||
[ -d "$ParaView_SOURCE_DIR" ] || {
|
|
||||||
echo "did not find ParaView-$ParaView_VERSION in these directories:"
|
|
||||||
echo " WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR"
|
|
||||||
echo
|
|
||||||
echo "abort build"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION-$OBJ_ADD
|
|
||||||
ParaView_BINARY_DIR=$buildBASE/ParaView-$ParaView_VERSION
|
|
||||||
|
|
||||||
# ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION-$OBJ_ADD
|
|
||||||
ParaView_DIR=$installBASE/ParaView-$ParaView_VERSION
|
|
||||||
|
|
||||||
export ParaView_SOURCE_DIR ParaView_BINARY_DIR ParaView_DIR
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "ParaView_SOURCE_DIR=$ParaView_SOURCE_DIR"
|
|
||||||
echo "ParaView_BINARY_DIR=$ParaView_BINARY_DIR"
|
|
||||||
echo "ParaView_DIR=$ParaView_DIR"
|
|
||||||
|
|
||||||
# Forcefully override the .git path for the ParaView source code directory
|
|
||||||
export GIT_DIR=$ParaView_SOURCE_DIR/.git
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# set ParaView_VERSION and adjust ParaView_MAJOR accordingly
|
|
||||||
#
|
|
||||||
setVersion()
|
|
||||||
{
|
|
||||||
if [ "$#" -ge 1 ]
|
|
||||||
then
|
|
||||||
ParaView_VERSION="${1##paraview-}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# the major version is "<digits>.<digits>"
|
|
||||||
ParaView_MAJOR=$(echo $ParaView_VERSION | \
|
|
||||||
sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/')
|
|
||||||
|
|
||||||
export ParaView_VERSION ParaView_MAJOR
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#
|
|
||||||
# extract and echo date stamp information from
|
|
||||||
# VTK/Utilities/kwsys/kwsysDateStamp.cmake
|
|
||||||
# since the order of the entries is already correct, can use simple sed script
|
|
||||||
#
|
|
||||||
echoDateStamp()
|
|
||||||
{
|
|
||||||
(
|
|
||||||
set -- $(
|
|
||||||
sed -ne 's/^SET(KWSYS_DATE_STAMP_[A-Z]*\([ 0-9]*\)).*$/\1/p' \
|
|
||||||
$ParaView_SOURCE_DIR/VTK/Utilities/kwsys/kwsysDateStamp.cmake
|
|
||||||
)
|
|
||||||
|
|
||||||
IFS='-'
|
|
||||||
echo "date-stamp: $*"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# extract version information from
|
|
||||||
# CMakeLists.txt
|
|
||||||
# since the order of the entries is already correct, can use simple sed script
|
|
||||||
#
|
|
||||||
getVersion()
|
|
||||||
{
|
|
||||||
(
|
|
||||||
set -- $(
|
|
||||||
sed -ne 's/^SET(PARAVIEW_VERSION_[A-Z]*\([ 0-9]*\)).*$/\1/p' \
|
|
||||||
$ParaView_SOURCE_DIR/CMakeLists.txt
|
|
||||||
)
|
|
||||||
|
|
||||||
IFS='.'
|
|
||||||
echo "$*"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# compare version information
|
|
||||||
#
|
|
||||||
checkVersion()
|
|
||||||
{
|
|
||||||
local ver=$(getVersion)
|
|
||||||
if [ "$ParaView_VERSION" != "$ver" ]
|
|
||||||
then
|
|
||||||
echo "MISMATCH!"
|
|
||||||
echo " specified $ParaView_VERSION"
|
|
||||||
echo " found $ver"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# set CMake cache variables
|
|
||||||
#
|
|
||||||
addCMakeVariable()
|
|
||||||
{
|
|
||||||
while [ -n "$1" ]
|
|
||||||
do
|
|
||||||
CMAKE_VARIABLES="$CMAKE_VARIABLES -D$1"
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# verbose makefiles
|
|
||||||
#
|
|
||||||
addVerbosity()
|
|
||||||
{
|
|
||||||
if [ "${withVERBOSE:=false}" = true ]
|
|
||||||
then
|
|
||||||
addCMakeVariable "CMAKE_VERBOSE_MAKEFILE=TRUE"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# define options for mpi support
|
|
||||||
#
|
|
||||||
addMpiSupport()
|
|
||||||
{
|
|
||||||
if [ "${withMPI:=false}" != true ]
|
|
||||||
then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
OBJ_ADD="$OBJ_ADD-mpi"
|
|
||||||
|
|
||||||
addCMakeVariable "PARAVIEW_USE_MPI=ON VTK_USE_MPI=ON"
|
|
||||||
addCMakeVariable "VTK_MPI_MAX_NUMPROCS=$MPI_MAX_PROCS"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# define options for python support
|
|
||||||
#
|
|
||||||
addPythonSupport()
|
|
||||||
{
|
|
||||||
if [ "${withPYTHON:=false}" != true ]
|
|
||||||
then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
OBJ_ADD="$OBJ_ADD-py"
|
|
||||||
|
|
||||||
if pythonBin=$(which python 2>/dev/null)
|
|
||||||
then
|
|
||||||
if [ -n "$PYTHON_LIBRARY" ]
|
|
||||||
then
|
|
||||||
# check $PYTHON_LIBRARY if it has been set
|
|
||||||
if [ ! -e "$PYTHON_LIBRARY" ]
|
|
||||||
then
|
|
||||||
echo "*** Error: libpython not found at location specified " \
|
|
||||||
"by -pythnon-lib input: PYTHON_LIBRARY=$PYTHON_LIBRARY"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
# Try to get $PYTHON_LIBRARY from dynamically linked binary
|
|
||||||
PYTHON_LIBRARY=$(ldd $pythonBin | \
|
|
||||||
sed -ne '/libpython/s/.* => \(.*\) (.*/\1/p')
|
|
||||||
|
|
||||||
[ -e "$PYTHON_LIBRARY" ] || {
|
|
||||||
echo "*** Error: Unable to determine path to python library."
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ -e "$PYTHON_LIBRARY" ] || {
|
|
||||||
echo " Please set the full path to the python library "
|
|
||||||
echo " (including libpython) using the -python-lib option, "
|
|
||||||
echo " or deactivate python support by not using the -python "
|
|
||||||
echo " option"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
pythonMajor=$(echo $PYTHON_LIBRARY | sed 's/.*libpython\(.*\)\.so.*/\1/')
|
|
||||||
pythonInclude=/usr/include/python$pythonMajor
|
|
||||||
|
|
||||||
# note - we could also allow for a PYTHON_INCLUDE variable ...
|
|
||||||
[ -d "$pythonInclude" ] || {
|
|
||||||
echo " No python headers found in $pythonInclude/"
|
|
||||||
echo " Please install python headers or deactivate "
|
|
||||||
echo " python support by not using the -python option"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
addCMakeVariable "PARAVIEW_ENABLE_PYTHON=ON"
|
|
||||||
addCMakeVariable "PYTHON_INCLUDE_PATH=$pythonInclude"
|
|
||||||
addCMakeVariable "PYTHON_LIBRARY=$PYTHON_LIBRARY"
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
echo "Python information:"
|
|
||||||
echo " executable : $pythonBin"
|
|
||||||
echo " version : $pythonMajor"
|
|
||||||
echo " include path : $pythonInclude"
|
|
||||||
echo " library : $PYTHON_LIBRARY"
|
|
||||||
|
|
||||||
unset pythonBin pythonInclude pythonMajor
|
|
||||||
else
|
|
||||||
echo "*** Error: python not found"
|
|
||||||
echo "*** Deactivate python support by not using the -python "
|
|
||||||
echo "*** option"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# define options for mesa support
|
|
||||||
#
|
|
||||||
addMesaSupport()
|
|
||||||
{
|
|
||||||
if [ "${withMESA:=false}" != true ]
|
|
||||||
then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d "$MESA_INCLUDE" -a -f "$MESA_LIBRARY" ]
|
|
||||||
then
|
|
||||||
OBJ_ADD="$OBJ_ADD-mesa"
|
|
||||||
|
|
||||||
addCMakeVariable "VTK_OPENGL_HAS_OSMESA=ON"
|
|
||||||
addCMakeVariable "OSMESA_INCLUDE_DIR=$MESA_INCLUDE"
|
|
||||||
addCMakeVariable "OSMESA_LIBRARY=$MESA_LIBRARY"
|
|
||||||
|
|
||||||
else
|
|
||||||
echo "*** Error: no MESA information found"
|
|
||||||
echo "*** Deactivate MESA support by not using the -mesa option, "
|
|
||||||
echo "*** or set the correct paths for:"
|
|
||||||
echo "*** -mesa-include ($MESA_INCLUDE)"
|
|
||||||
echo "*** -mesa-lib ($MESA_LIBRARY)"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
addQtSupport()
|
|
||||||
{
|
|
||||||
QtVersion=none
|
|
||||||
if [ "${withQT:=false}" != true ]
|
|
||||||
then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
addCMakeVariable "PARAVIEW_BUILD_QT_GUI=ON"
|
|
||||||
|
|
||||||
unset qmakeExe
|
|
||||||
if [ -n "$QMAKE_PATH" ]
|
|
||||||
then
|
|
||||||
if [ -d "$QMAKE_PATH" ]
|
|
||||||
then
|
|
||||||
if [ -x "$QMAKE_PATH/qmake" ]
|
|
||||||
then
|
|
||||||
qmakeExe=$QMAKE_PATH/qmake
|
|
||||||
elif [ -x "$QMAKE_PATH/bin/qmake" ]
|
|
||||||
then
|
|
||||||
qmakeExe=$QMAKE_PATH/bin/qmake
|
|
||||||
fi
|
|
||||||
elif [ -x "$QMAKE_PATH" ]
|
|
||||||
then
|
|
||||||
qmakeExe=$QMAKE_PATH
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$qmakeExe" ]
|
|
||||||
then
|
|
||||||
# use absolute path
|
|
||||||
if [ "${qmakeExe#/}" = "$qmakeExe" ]
|
|
||||||
then
|
|
||||||
qmakeExe="$(cd ${qmakeExe%/qmake} 2>/dev/null && pwd)/qmake"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo
|
|
||||||
echo "qmake not found under specified QMAKE_PATH"
|
|
||||||
echo " QMAKE_PATH=$QMAKE_PATH"
|
|
||||||
echo "leaving unspecified"
|
|
||||||
echo
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# default to using qmake from the path
|
|
||||||
if [ -n "$qmakeExe" ]
|
|
||||||
then
|
|
||||||
addCMakeVariable "QT_QMAKE_EXECUTABLE:FILEPATH=$qmakeExe"
|
|
||||||
else
|
|
||||||
qmakeExe=qmake
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Check qmake can be found
|
|
||||||
if type $qmakeExe >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
# Check the Qt version selected
|
|
||||||
# parse -> "Using Qt version X.Y.Z in ..."
|
|
||||||
QtVersion=$($qmakeExe -query QT_VERSION)
|
|
||||||
|
|
||||||
# split Major.Minor.Revision - could also use IFS hacking
|
|
||||||
set -- $(echo "$QtVersion" | sed -e 's/\./ /g')
|
|
||||||
|
|
||||||
QtMajor=$1
|
|
||||||
QtMinor=$2
|
|
||||||
|
|
||||||
if [ $QtMajor -ne 4 -o $QtMajor -eq 4 -a $QtMinor -lt 5 ]
|
|
||||||
then
|
|
||||||
echo "*** Error: Qt version provided < 4.5"
|
|
||||||
echo "*** Please use the -qmake option to specify the location of a version of Qt >= 4.5 and < 5.0"
|
|
||||||
echo "*** e.g."
|
|
||||||
echo "*** -qmake /usr/local/qt-4.6.2/bin/qmake"
|
|
||||||
echo "*** -qmake $installBASE/qt-4.6.2/bin/qmake"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "*** Error: cannot find qmake either at \$QMAKE_PATH or in current \$PATH"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# configure via cmake, but don't actually build anything
|
|
||||||
#
|
|
||||||
configParaView()
|
|
||||||
{
|
|
||||||
unset cmakeExe
|
|
||||||
if [ -n "$CMAKE_PATH" ]
|
|
||||||
then
|
|
||||||
if [ -d "$CMAKE_PATH" ]
|
|
||||||
then
|
|
||||||
if [ -x "$CMAKE_PATH/cmake" ]
|
|
||||||
then
|
|
||||||
cmakeExe=$CMAKE_PATH/cmake
|
|
||||||
elif [ -x "$CMAKE_PATH/bin/cmake" ]
|
|
||||||
then
|
|
||||||
cmakeExe=$CMAKE_PATH/bin/cmake
|
|
||||||
fi
|
|
||||||
elif [ -x "$CMAKE_PATH" ]
|
|
||||||
then
|
|
||||||
cmakeExe=$CMAKE_PATH
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$cmakeExe" ]
|
|
||||||
then
|
|
||||||
# use absolute path
|
|
||||||
if [ "${cmakeExe#/}" = "$cmakeExe" ]
|
|
||||||
then
|
|
||||||
cmakeExe="$(cd ${cmakeExe%/cmake} 2>/dev/null && pwd)/cmake"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo
|
|
||||||
echo "cmake not found under specified CMAKE_PATH"
|
|
||||||
echo " CMAKE_PATH=$CMAKE_PATH"
|
|
||||||
echo "leaving unspecified"
|
|
||||||
echo
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# default to using cmake from the path
|
|
||||||
if [ -z "$cmakeExe" ]
|
|
||||||
then
|
|
||||||
cmakeExe=cmake
|
|
||||||
fi
|
|
||||||
|
|
||||||
# remove any existing build folder and recreate
|
|
||||||
if [ -d $ParaView_BINARY_DIR ]
|
|
||||||
then
|
|
||||||
echo "removing old build directory"
|
|
||||||
echo " $ParaView_BINARY_DIR"
|
|
||||||
rm -rf $ParaView_BINARY_DIR
|
|
||||||
fi
|
|
||||||
mkdir -p $ParaView_BINARY_DIR
|
|
||||||
|
|
||||||
cd $ParaView_BINARY_DIR || exit 1 # change to build folder
|
|
||||||
|
|
||||||
echo "----"
|
|
||||||
echo "Configuring paraview-$ParaView_VERSION (major version: $ParaView_MAJOR)"
|
|
||||||
echo " MPI support : ${withMPI:-false}"
|
|
||||||
echo " Python support : ${withPYTHON:-false}"
|
|
||||||
echo " MESA support : ${withMESA:-false}"
|
|
||||||
echo " Qt dev support : ${withQT:-false}"
|
|
||||||
echo " Source : $ParaView_SOURCE_DIR"
|
|
||||||
echo " Build : $ParaView_BINARY_DIR"
|
|
||||||
echo " Target : $ParaView_DIR"
|
|
||||||
echo "----"
|
|
||||||
echo
|
|
||||||
echo "$cmakeExe" \
|
|
||||||
-DCMAKE_INSTALL_PREFIX:PATH=$ParaView_DIR \
|
|
||||||
$CMAKE_VARIABLES \
|
|
||||||
$ParaView_SOURCE_DIR
|
|
||||||
echo
|
|
||||||
echo "----"
|
|
||||||
echo
|
|
||||||
|
|
||||||
# run cmake to create Makefiles
|
|
||||||
$cmakeExe \
|
|
||||||
-DCMAKE_INSTALL_PREFIX:PATH=$ParaView_DIR \
|
|
||||||
$CMAKE_VARIABLES \
|
|
||||||
$ParaView_SOURCE_DIR
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# invoke make
|
|
||||||
# also link bin/ to lib/paraview-* for development without installation
|
|
||||||
#
|
|
||||||
makeParaView()
|
|
||||||
{
|
|
||||||
cd $ParaView_BINARY_DIR || exit 1 # change to build folder
|
|
||||||
echo " Starting make"
|
|
||||||
time make -j $WM_NCOMPPROCS
|
|
||||||
echo " Done make"
|
|
||||||
|
|
||||||
# remove lib if it is a link
|
|
||||||
# (how this was previously handled before 'make install' worked)
|
|
||||||
if [ -L lib ]
|
|
||||||
then
|
|
||||||
rm lib 2>/dev/null
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# install the program
|
|
||||||
#
|
|
||||||
installParaView()
|
|
||||||
{
|
|
||||||
cd $ParaView_BINARY_DIR || exit 1 # change to build folder
|
|
||||||
echo " Installing ParaView to $ParaView_DIR"
|
|
||||||
|
|
||||||
make install
|
|
||||||
|
|
||||||
# hack for missing files after install of version 3.14.1
|
|
||||||
echo "Copying missing files to install folder"
|
|
||||||
CMAKE_SRC_DIR=$ParaView_SOURCE_DIR/CMake
|
|
||||||
CMAKE_INSTALL_DIR=$ParaView_DIR/lib/paraview-$ParaView_MAJOR/CMake
|
|
||||||
cp -f $ParaView_SOURCE_DIR/ParaViewUse.cmake $CMAKE_INSTALL_DIR
|
|
||||||
cp -f $CMAKE_SRC_DIR/generate_proxydocumentation.cmake $CMAKE_INSTALL_DIR
|
|
||||||
cp -f $CMAKE_SRC_DIR/smxml_to_xml.xsl $CMAKE_INSTALL_DIR
|
|
||||||
cp -f $CMAKE_SRC_DIR/xml_to_html.xsl $CMAKE_INSTALL_DIR
|
|
||||||
cp -f $CMAKE_SRC_DIR/xml_to_wiki.xsl.in $CMAKE_INSTALL_DIR
|
|
||||||
cp -f $CMAKE_SRC_DIR/generate_qhp.cmake $CMAKE_INSTALL_DIR
|
|
||||||
unset CMAKE_SRC_DIR CMAKE_INSTALL_DIR
|
|
||||||
# --- end hack
|
|
||||||
|
|
||||||
cat<< INFO
|
|
||||||
---
|
|
||||||
Installation complete for paraview-$ParaView_VERSION
|
|
||||||
Set environment variables:
|
|
||||||
|
|
||||||
export ParaView_DIR=$ParaView_DIR
|
|
||||||
export PATH=\$ParaView_DIR/bin:\$PATH
|
|
||||||
export PV_PLUGIN_PATH=\$FOAM_LIBBIN/paraview-$ParaView_MAJOR
|
|
||||||
---
|
|
||||||
INFO
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
# clear the referenced variables before using any of the functions
|
|
||||||
unset withMPI withVERBOSE
|
|
||||||
unset withQT QMAKE_PATH
|
|
||||||
unset withMESA MESA_INCLUDE MESA_LIBRARY
|
|
||||||
unset withPYTHON PYTHON_INCLUDE PYTHON_LIBRARY
|
|
||||||
unset CMAKE_VARIABLES
|
|
||||||
unset OBJ_ADD
|
|
||||||
|
|
||||||
|
|
||||||
# start with these general settings
|
|
||||||
addCMakeVariable "VTK_USE_TK:BOOL=OFF"
|
|
||||||
addCMakeVariable "BUILD_SHARED_LIBS:BOOL=ON VTK_USE_RPATH:BOOL=OFF"
|
|
||||||
addCMakeVariable "CMAKE_BUILD_TYPE:STRING=Release"
|
|
||||||
|
|
||||||
# include development files in "make install"
|
|
||||||
addCMakeVariable "PARAVIEW_INSTALL_DEVELOPMENT:BOOL=ON"
|
|
||||||
|
|
||||||
# don't build test tree
|
|
||||||
addCMakeVariable "BUILD_TESTING:BOOL=OFF"
|
|
||||||
|
|
||||||
# remove dependency on WebKit
|
|
||||||
# addCMakeVariable VTK_QT_USE_WEBKIT:BOOL=OFF
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
331
makeParaView3
331
makeParaView3
@ -1,331 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
# ========= |
|
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
# \\ / O peration |
|
|
||||||
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
|
||||||
# \\/ M anipulation |
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
# License
|
|
||||||
# This file is part of OpenFOAM.
|
|
||||||
#
|
|
||||||
# OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
# under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
# for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
# Script
|
|
||||||
# makeParaView3
|
|
||||||
#
|
|
||||||
# Description
|
|
||||||
# Make and install paraview for version 3.14.1 and higher
|
|
||||||
# - place the paraview source under $WM_THIRD_PARTY_DIR/ParaView-VERSION
|
|
||||||
# (note capitalisation)
|
|
||||||
#
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
# run from third-party directory only
|
|
||||||
cd ${0%/*} || exit 1
|
|
||||||
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
|
|
||||||
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
|
|
||||||
echo " The environment variables are inconsistent with the installation."
|
|
||||||
echo " Check the OpenFOAM entries in your dot-files and source them."
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
. etc/tools/ThirdPartyFunctions
|
|
||||||
. etc/tools/ParaView3Functions
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# USER OPTIONS:
|
|
||||||
# ~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
# MPI support:
|
|
||||||
withMPI=false
|
|
||||||
MPI_MAX_PROCS=32
|
|
||||||
|
|
||||||
# Python support:
|
|
||||||
# note: script will try to determine the appropriate python library.
|
|
||||||
# If it fails, specify the path using the PYTHON_LIBRARY variable
|
|
||||||
withPYTHON=false
|
|
||||||
PYTHON_LIBRARY=""
|
|
||||||
# PYTHON_LIBRARY="/usr/lib64/libpython2.6.so.1.0"
|
|
||||||
|
|
||||||
# MESA graphics support:
|
|
||||||
withMESA=false
|
|
||||||
MESA_INCLUDE="/usr/include/GL"
|
|
||||||
MESA_LIBRARY="/usr/lib64/libOSMesa.so"
|
|
||||||
|
|
||||||
# extra QT gui support (useful for some third party apps)
|
|
||||||
withQT=true
|
|
||||||
|
|
||||||
# Set the path to the Qt-4.5 (or later) qmake if the system Qt is older
|
|
||||||
QMAKE_PATH=""
|
|
||||||
|
|
||||||
# Set the path to cmake
|
|
||||||
CMAKE_PATH=""
|
|
||||||
|
|
||||||
#
|
|
||||||
# NO FURTHER EDITING BELOW THIS LINE
|
|
||||||
#
|
|
||||||
#-----------------------------------------------------------------------------
|
|
||||||
Script=${0##*/}
|
|
||||||
|
|
||||||
usage() {
|
|
||||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
|
||||||
cat<<USAGE
|
|
||||||
|
|
||||||
usage: $Script [OPTION] [CMAKE-OPTION]
|
|
||||||
options:
|
|
||||||
-rebuild for repeated builds (-make -install) *use with caution*
|
|
||||||
-mesa with mesa (if not already enabled)
|
|
||||||
-mpi with mpi (if not already enabled)
|
|
||||||
-python with python (if not already enabled)
|
|
||||||
-cmake PATH with the cmake version corresponding to the cmake path given
|
|
||||||
-qmake PATH with the Qt version corresponding to the qmake path given
|
|
||||||
-qt with extra Qt gui support (if not already enabled)
|
|
||||||
-qt-VER with Qt version corresponding to
|
|
||||||
\$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/qt-VER/bin/qmake
|
|
||||||
-gcc force g++ instead of the value from \$WM_CXX
|
|
||||||
-verbose verbose output in Makefiles
|
|
||||||
-version VER specify an alternative version (current value: $ParaView_VERSION)
|
|
||||||
-major VER specify an alternative major version for special builds
|
|
||||||
-mesa-include DIR
|
|
||||||
location of mesa headers (current value: ${MESA_INCLUDE:-none})
|
|
||||||
-mesa-lib PATH path to mesa library (current value: ${MESA_LIBRARY:-none})
|
|
||||||
-python-lib PATH path to python library (current value: ${PYTHON_LIBRARY:-none})
|
|
||||||
-help
|
|
||||||
|
|
||||||
The -no-FEATURE option can be disable these features (if not already disabled):
|
|
||||||
mesa mpi python qt
|
|
||||||
|
|
||||||
CMake options start with a capital letter and contain an '='.
|
|
||||||
For example,
|
|
||||||
$Script BUILD_TESTING=ON PARAVIEW_GENERATE_PROXY_DOCUMENTATION=OFF
|
|
||||||
to add tests and avoid building documentation
|
|
||||||
|
|
||||||
For finer control, the build stages can be selected or deselected individually:
|
|
||||||
-config -no-config
|
|
||||||
-make -no-make
|
|
||||||
-install -no-install
|
|
||||||
|
|
||||||
|
|
||||||
* Make and install paraview-$ParaView_VERSION located under
|
|
||||||
\$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION
|
|
||||||
-> \$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-$ParaView_VERSION
|
|
||||||
|
|
||||||
USAGE
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
# ensure CMake gets the correct C++ compiler
|
|
||||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
|
||||||
|
|
||||||
#
|
|
||||||
# add options based on script name:
|
|
||||||
#
|
|
||||||
case "$Script" in *-mesa*) withMESA=true;; esac
|
|
||||||
case "$Script" in *-mpi*) withMPI=true;; esac
|
|
||||||
case "$Script" in *-python*) withPYTHON=true;; esac
|
|
||||||
case "$Script" in *-qt*) withQT=true;; esac
|
|
||||||
|
|
||||||
# set ParaView_MAJOR based on current value of ParaView_VERSION
|
|
||||||
setVersion
|
|
||||||
|
|
||||||
#
|
|
||||||
# various building stages
|
|
||||||
#
|
|
||||||
unset runCONFIG runMAKE runINSTALL
|
|
||||||
runDEFAULT=true
|
|
||||||
|
|
||||||
# parse options
|
|
||||||
while [ "$#" -gt 0 ]
|
|
||||||
do
|
|
||||||
case "$1" in
|
|
||||||
-h | -help)
|
|
||||||
usage
|
|
||||||
;;
|
|
||||||
[A-Z]*=*) # cmake variables
|
|
||||||
addCMakeVariable "$1"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-gcc)
|
|
||||||
export CXX=g++ # use g++
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-config) # stage 1: config only
|
|
||||||
runCONFIG=true
|
|
||||||
unset runDEFAULT
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-no-config)
|
|
||||||
runCONFIG=false
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-make) # stage 2: make only
|
|
||||||
runMAKE=true
|
|
||||||
unset runDEFAULT
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-no-make)
|
|
||||||
runMAKE=false
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-install) # stage 3: install only
|
|
||||||
runINSTALL=true
|
|
||||||
unset runDEFAULT
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-no-install)
|
|
||||||
runINSTALL=false
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-rebuild) # shortcut for rebuilding
|
|
||||||
runMAKE=true
|
|
||||||
runINSTALL=true
|
|
||||||
unset runDEFAULT
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-mesa)
|
|
||||||
withMESA=true
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-no-mesa)
|
|
||||||
withMESA=false
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-mesa-include)
|
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
|
||||||
MESA_INCLUDE="$2"
|
|
||||||
shift 2
|
|
||||||
;;
|
|
||||||
-mesa-lib)
|
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
|
||||||
MESA_LIBRARY="$2"
|
|
||||||
shift 2
|
|
||||||
;;
|
|
||||||
-mpi)
|
|
||||||
withMPI=true
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-no-mpi)
|
|
||||||
withMPI=false
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-python)
|
|
||||||
withPYTHON=true
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-no-python)
|
|
||||||
withPYTHON=false
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-python-lib)
|
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
|
||||||
PYTHON_LIBRARY="$2"
|
|
||||||
shift 2
|
|
||||||
;;
|
|
||||||
-cmake)
|
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
|
||||||
CMAKE_PATH=$2
|
|
||||||
shift 2
|
|
||||||
;;
|
|
||||||
-qmake)
|
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
|
||||||
QMAKE_PATH=$2
|
|
||||||
shift 2
|
|
||||||
;;
|
|
||||||
-qt)
|
|
||||||
withQT=true
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-no-qt)
|
|
||||||
withQT=false
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-qt-[1-9]*)
|
|
||||||
QMAKE_PATH="$installBASE/${1##-}"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-verbose)
|
|
||||||
withVERBOSE=true
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-version)
|
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
|
||||||
setVersion "$2"
|
|
||||||
shift 2
|
|
||||||
;;
|
|
||||||
-major)
|
|
||||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
|
||||||
export ParaView_MAJOR="$2"
|
|
||||||
shift 2
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
usage "unknown option/argument: '$*'"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
if [ "$runDEFAULT" = true ]
|
|
||||||
then
|
|
||||||
: ${runCONFIG:=true}
|
|
||||||
: ${runMAKE:=true}
|
|
||||||
: ${runINSTALL:=true}
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Set configure options
|
|
||||||
#~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
addVerbosity # verbose makefiles
|
|
||||||
addMpiSupport # set MPI-specific options
|
|
||||||
addPythonSupport # set Python-specific options
|
|
||||||
addMesaSupport # set MESA-specific options
|
|
||||||
addQtSupport # add extra Qt support
|
|
||||||
|
|
||||||
setDirs # where things are or should be put
|
|
||||||
echoDateStamp # report kitware source code date-stamp
|
|
||||||
|
|
||||||
|
|
||||||
# Build and install
|
|
||||||
# ~~~~~~~~~~~~~~~~~
|
|
||||||
cat<<SUMMARY
|
|
||||||
|
|
||||||
Build stages selected
|
|
||||||
---------------------
|
|
||||||
-config ${runCONFIG:-false}
|
|
||||||
-make ${runMAKE:-false}
|
|
||||||
-install ${runINSTALL:-false}
|
|
||||||
---------------------
|
|
||||||
Features selected
|
|
||||||
mesa ${withMESA:-false}
|
|
||||||
mpi ${withMPI:-false}
|
|
||||||
python ${withPYTHON:-false}
|
|
||||||
qt ${withQT:-false}
|
|
||||||
---------------------
|
|
||||||
Version information
|
|
||||||
qt ${QtVersion:-none}
|
|
||||||
version ${ParaView_VERSION:-unknown}
|
|
||||||
major ${ParaView_MAJOR:-unknown}
|
|
||||||
$(checkVersion)
|
|
||||||
---------------------
|
|
||||||
SUMMARY
|
|
||||||
|
|
||||||
[ "$runCONFIG" = true ] && configParaView
|
|
||||||
[ "$runMAKE" = true ] && makeParaView
|
|
||||||
[ "$runINSTALL" = true ] && installParaView
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo Done
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
Reference in New Issue
Block a user