CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [OpenFOAM.org] v6: Problems installing paraFoam (https://www.cfd-online.com/Forums/openfoam-installation/213609-v6-problems-installing-parafoam.html)

paulj January 3, 2019 06:11

v6: Problems installing paraFoam
 
Hi

I have to install OpenFoam on Centos 7.5 (no don't ask!) and following issues with the graphics I have moved to building from source.
I'm using openfoam-6
The actual openfoam is okay but issues with installing openFoam
I have a work around at the bottom but was wondering if anyone has the same issue.


Installing paraView /paraFoam

As per notes https://openfoam.org/download/source...arty-software/

Code:

[paulj@pjux3 ThirdParty-6]$ ./makeParaView             
...

After a long time
Code:

...
[ 99%] Linking CXX shared library ../../lib/libNonOrthogonalSource.so
[ 99%] Built target paraview
[ 99%] Built target NonOrthogonalSource
make: *** [all] Error 2

I save a log file using
Code:

[paulj@pjux3 ThirdParty-6]$ ./makeParaView -qmake $(which qmake-qt4) > log.makePV 2>&1
Looking for errors the only thing I could see was.
Code:

--------------
[ 99%] Compiling Qt help project StreamLinesRepresentation.qhp
Error copying directory from "/home/paulj/OpenFOAM/ThirdParty-6/ParaView-5.4.0/Plugins/StreamLinesRepresentation/doc" to "/home/paulj/OpenFOAM/ThirdParty-6/build/linux64Gcc/ParaView-5.4.0/Plugins/StreamLinesRepresentation/doc".
[ 99%] Compiling Qt help project NonOrthogonalSource.qhp
-------------------------

That is because the source folder does not exist, i.e. no doc folder.

As a consequence

Code:

[paulj@pjux3 cavity]$ paraFoam

FATAL ERROR: ParaView reader module libraries do not exist

Please build the reader module before continuing:
cd $FOAM_UTILITIES/postProcessing/graphics/PVReaders
./Allwclean
./Allwmake

So I do this but get

Code:

[paulj@pjux3 PVReaders]$ ./Allwmake
Allwmake applications/utilities/postProcessing/graphics/PVReaders
    ERROR: ParaView not found in /home/paulj/OpenFOAM/ThirdParty-6/platforms/linux64Gcc/ParaView-5.4.0

That is because the directory has the wrong name.


Code:

[paulj@pjux3 ~]$ ls /home/paulj/OpenFOAM/ThirdParty-6/platforms/
linux64GccDPInt32

Aside/Workaround
I copied the paraFoam from my Ubuntu box and initially got:

Code:

[paulj@pjux3 cavity]$ ~/paraFoam &
[1] 28895
[paulj@pjux3 cavity]$ FATAL ERROR: The official reader module for OpenFOAM data does not exist on
your system.  This means that the version of ParaView you are using was not
compiled with OpenFOAM, or distributed with a packaged version of OpenFOAM.

For information on packaged versions of OpenFOAM/ParaView and compilation of
OpenFOAM/ParaView, see https://openfoam.org/download

Alternatively, you might be able to view your OpenFOAM data with the reader
module provided with ParaView by running:
    paraFoam -builtin


[1]+  Exit 1                  ~/paraFoam

Trying this seems to work :-)

Code:

[paulj@pjux3 cavity]$ ~/paraFoam -builtin
Created temporary 'cavity.foam'


olesen January 6, 2019 08:56

Quote:

Originally Posted by paulj (Post 720680)
Trying this seems to work :-)

Code:

[paulj@pjux3 cavity]$ ~/paraFoam -builtin
Created temporary 'cavity.foam'


Remember that "paraFoam" is simply just a script, nothing magically.
With "paraFoam -builtin" you are really only doing this:

Code:

touch case.foam
paraview case.foam
rm case.foam


wyldckat January 6, 2019 16:14

Quick request @paulj: Any chance you can attach the complete log file (zipped, so it can be attached) to your next post?

I ask this because I have built OpenFOAM 6 and ParaView 5.4 on CentOS 7.5 without problems, as detailed here: https://openfoamwiki.net/index.php/I...7.5_.281804.29

paulj January 7, 2019 10:45

Attachment as requested
 
1 Attachment(s)
Here it is

wyldckat January 8, 2019 17:34

Quick answer: I knew this was really strange, given that I had managed to build without problems on CentOS 7.5...

So what I found from the log file you've shared is that CMake 3.11 or newer is being used, instead of CMake 2.8.12. Allow me to explain:
  • CMake 2.8.12 is the version provided in RHEL 7.5 by default, which can be used to build ParaView 5.4.0 without problems.
  • CMake 3.10 and 3.11 are mentioned in the log file. When I went to check what's available on EPEL EL7 repo, it's version CMake 3.12, which is the likely suspect of the version you are using to build ParaView.
The problem is that CMake 3.12 is too recent, in comparison with ParaView 5.4.0, therefore making it incompatible with ParaView 5.4.


My guess is that you've somehow installed CMake 3.12 from EPEL and then enforced /usr/bin/cmake to be the same as /usr/bin/cmake3, either through a symbolic link or something else. Perhaps it's the RPM itself that did this. But unfortunately, this is what broke the build.


There are two possible workarounds:
  1. Do a custom build of CMake 2.8.12, which OpenFOAM provides are somewhat easy way to do this... by running these commands:
    Code:

    cd $WM_THIRD_PARTY_DIR
    wget -P download https://www.cmake.org/files/v3.9/cmake-3.9.0.tar.gz
    ./makeCmake > log.makeCmake 2>&1
    wmRefresh

  2. Or install CMake 2.8.12 via Yum from the Base repository... as root:
    Code:

    yum install cmake

paulj January 9, 2019 04:05

Version of cmake
 
Hi
I did this because initially I got


Code:

[paulj@pjux3 ThirdParty-6]$ ./makeParaView
ParaView-5.4.0 exists.  Not downloading...

ParaView_SOURCE_DIR=/home/paulj/OpenFOAM/ThirdParty-6/ParaView-5.4.0
ParaView_BINARY_DIR=/home/paulj/OpenFOAM/ThirdParty-6/build/linux64Gcc/ParaView-5.4.0
ParaView_DIR=/home/paulj/OpenFOAM/ThirdParty-6/platforms/linux64Gcc/ParaView-5.4.0
sed: can't read /home/paulj/OpenFOAM/ThirdParty-6/ParaView-5.4.0/VTK/Utilities/kwsys/kwsysDateStamp.cmake: No such file or directory
date-stamp:

Build stages selected
---------------------
    -config  true
    -make    true
    -install  true
---------------------
Features selected
    mesa      false
    mpi      false
    python    false
    qt        true
---------------------
Version information
    qt        4.8.7
    version  5.4.0
    major    5.4
    build    Release
MISMATCH!
    specified 5.4.0
    found   
---------------------
removing old build directory
    /home/paulj/OpenFOAM/ThirdParty-6/build/linux64Gcc/ParaView-5.4.0
----
Configuring paraview-5.4.0 (major version: 5.4)
    MPI    support : false
    Python support : false
    MESA  support : false
    Qt dev support : true
    Source        : /home/paulj/OpenFOAM/ThirdParty-6/ParaView-5.4.0
    Build          : /home/paulj/OpenFOAM/ThirdParty-6/build/linux64Gcc/ParaView-5.4.0
    Target        : /home/paulj/OpenFOAM/ThirdParty-6/platforms/linux64Gcc/ParaView-5.4.0
    Build type    : Release
----

cmake -DCMAKE_INSTALL_PREFIX:PATH=/home/paulj/OpenFOAM/ThirdParty-6/platforms/linux64Gcc/ParaView-5.4.0 -DBUILD_SHARED_LIBS:BOOL=ON -DVTK_USE_RPATH:BOOL=OFF -DPARAVIEW_INSTALL_DEVELOPMENT_FILES:BOOL=ON -DBUILD_TESTING:BOOL=OFF -DPARAVIEW_BUILD_QT_GUI=ON -DPARAVIEW_QT_VERSION=4 -DVTK_RENDERING_BACKEND=OpenGL2 -DCMAKE_BUILD_TYPE:STRING=Release /home/paulj/OpenFOAM/ThirdParty-6/ParaView-5.4.0

----

CMake Error at CMakeLists.txt:31 (cmake_minimum_required):
  CMake 3.3 or higher is required.  You are running version 2.8.12.2


-- Configuring incomplete, errors occurred!
[paulj@pjux3 ThirdParty-6]$


wyldckat January 9, 2019 17:24

Quick answer: My apologies, I should have read my own instructions on the wiki more carefully :(
I had left in the system's "cmake" in the instructions, but after that, there are steps on how to compile CMake 3.9.0 from source code.

Please try the following commands, after activating the OpenFOAM shell environment:
Code:

cd $WM_THIRD_PARTY_DIR
mkdir download

wget -P download https://www.cmake.org/files/v3.9/cmake-3.9.0.tar.gz
tar -xzf download/cmake-3.9.0.tar.gz

./makeCmake > log.makeCmake 2>&1
wmRefresh

Then try compiling ParaView once again.

paulj January 10, 2019 08:13

Result
 
Working fine now!:)


All times are GMT -4. The time now is 11:22.