CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums

ParaView 3.12.0 SuperBuild on OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Rate this Entry

ParaView 3.12.0 SuperBuild on OpenFOAM

Posted January 21, 2012 at 20:39 by wyldckat
Updated July 26, 2015 at 16:14 by wyldckat (r2 released. Revision made in May 26th 2013.)

<-- Related issues to ParaView with OpenFOAM - Fixes and solutions

Beginning with ParaView 3.12.0, a new method for building every single package that ParaView needs can be done via "SuperBuild", which is a sub-folder in the ParaView source code structure. The idea is simple:
  1. Run:
    Code:
    cmake-gui
    or similar, such as ccmake or cmake-qt-gui.
  2. Choose the "ParaVIew-3.12.0/SuperBuild" folder as the source code and pick some other folder as the folder for the building stage.
  3. Hit the "Configure" button. Find the line that has the words "CMAKE" and "PREFIX" and adapt that field to the place where you want it to be installed.
  4. Hit the "Configure" button and then "Generate".
  5. Quit the GUI and go to the build folder and run:
    Code:
    make -j 4
    cd ParaView-build
    make install
  6. And it's done! Assuming of course that everything went well.
Now, since there is always something more that needs tending to, here is the quick way of doing all of this. Keep in mind that these instructions have only been tested with OpenFOAM 2.1.x, but should work with other versions as well.
  1. Go to the ThirdParty folder and remove or move the ParaView-3.12.0 folder. To remove, run:
    Code:
    foam3rdParty
    rm -rf ParaView-3.12.0
    The first command is an alias for jumping to the ThirdParty folder.
  2. Get the source code and place it where it needs to be:
    • Directly from git:
      Code:
      git clone git://git.code.sf.net/p/unofficial-paraview-sdk/paraview3120 ParaView-3.12.0.git
      mv ParaView-3.12.0.git/ParaView-3.12.0 ParaView-3.12.0
    • Or from a tar.bz2 file:
      Code:
      wget http://unofficial-paraview-dev-install.googlecode.com/files/ParaView-3.12.0.unofficial.r2.tar.bz2
      tar -xjf ParaView-3.12.0.unofficial.r2.tar.bz2
    After this, run the following command, to fix one of the files:
    Code:
    sed -i -e 's/03e27c977f34dc6e9a5f3864153c24fe/d864e383f25b5b047b98aa2d5562d379/' ParaView-3.12.0/SuperBuild/PackageVersions.cmake
  3. Now lets build ParaView via SuperBuild:
    Code:
    mkdir -p $WM_THIRD_PARTY_DIR/build/linux64Gcc/SuperBuild
    cd $WM_THIRD_PARTY_DIR/build/linux64Gcc/SuperBuild
    cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX:PATH=$ParaView_DIR -DParaView_INSTALL_DEVELOPMENT:BOOL=ON -DParaView_MPI_SUPERBUILD:BOOL=OFF $WM_THIRD_PARTY_DIR/ParaView-3.12.0/SuperBuild
    
    make -j 4 > make.log 2>&1
    Check the file "$WM_THIRD_PARTY_DIR/build/linux64Gcc/SuperBuild/make.log" for errors before continuing; some of the errors will be gone if you run the last line more than once.
    Note: if you want it to build its own version of MPICH2, instead of using Open-MPI or the MPI used with OpenFOAM, then remove the option "-DParaView_MPI_SUPERBUILD:BOOL=OFF".
  4. Now you can take care of installing things:
    Code:
    cd ParaView-build && make install > install.log 2>&1
    Check the file "$WM_THIRD_PARTY_DIR/build/linux64Gcc/SuperBuild/ParaView-build/install.log" for errors.
If all goes well, it should be able to:
  • Detect the currently installed Qt version, but if none detected, it probably should be able to build its own version.
  • It will build with MPI capabilities, but it will be with a custom build of MPICH2 (I'm not sure why...).
  • When done, it should be as ready to be used as when building with makeParaView, except you should now have more stuff installed on this custom built version. The list of stuff should be shown here: http://www.paraview.org/Wiki/ParaVie...12.0_and_above
Final Notes:
« Prev     Main     Next »
Total Comments 11

Comments

  1. Old Comment
    Dear Bruno,

    Thanks for the tip!
    Unfortunately there seems to be a few MD5 mismatch issues with at least szip and Boost.. And I also had cmake complain about not being able to find ImageMagick at one point, although the compilation continued.

    After circumventing the MD5 mismatch issue, my compilation adventures stopped somewhere along the way anyhow, when compiling MPICH2. After trying on two different systems, I had to give up once again.. :-( Paraview wins again by knock-out! Such a difficult beast to tame when things go wrong...

    Anyways, keep up the good work!

    Kind regards,

    Francois.
    permalink
    Posted January 25, 2012 at 11:31 by Fransje Fransje is offline
  2. Old Comment
    Hi Francois,


    Quote:
    Originally Posted by Fransje View Comment
    Unfortunately there seems to be a few MD5 mismatch issues with at least szip and Boost.. And I also had cmake complain about not being able to find ImageMagick at one point, although the compilation continued.
    Looks like you didn't use the source code version from the unofficial project.

    Quote:
    Originally Posted by Fransje View Comment
    After circumventing the MD5 mismatch issue, my compilation adventures stopped somewhere along the way anyhow, when compiling MPICH2. After trying on two different systems, I had to give up once again.. :-( Paraview wins again by knock-out! Such a difficult beast to tame when things go wrong...
    I can add an option on the unofficial project to build with Open-MPI in Linux, instead of MPICH2. Or better yet, use an already existing MPI

    If you can tell me which Linux distribution and version you are using, then I might be able to re-create and debug the build process, to figure out where the crowbar needs to be jammed in
    By the way, if my memory doesn't fail me, these instructions were tested on a machine with Ubuntu 11.10 x86_64.

    Best regards,
    Bruno
    permalink
    Posted January 25, 2012 at 18:21 by wyldckat wyldckat is offline
  3. Old Comment
    Good Afternoon Bruno,

    Well, I was using Suse 11, and I had issues accessing the git repo altogether.. I was getting the message:
    Quote:
    fatal: https://code.google.com/p/unofficial...120//info/refs not found: did you run git update-server-info on the server?
    Anyways, I was able to access git from an other system, and then copied the folder to my Suse system. However, I still get the same error:
    Quote:
    -- Found ZLIB: /usr/include (found version "1.2.3")
    -- Could NOT find ImageMagick (missing: ImageMagick_FOUND)
    and compilation fails when reaching the MPICH2 point.

    It would be geat if you could indeed add an option to build using OpenMPI, knowing that is is also most often used when compiling OpenFOAM.

    Kind regards,

    Francois.
    permalink
    Posted January 27, 2012 at 11:24 by Fransje Fransje is offline
  4. Old Comment
    Hi Francois,

    I'm sorry, but I haven't had any time to add an option to use a pre-compiled MPI. As for the ImageMagick error, I think I got it too, but it doesn't stop the building process.

    In the mean time, there is a new effort to make the SuperBuild feature more interlinked with the system's libraries, as show on the following email at ParaView Users mailing list: http://markmail.org/message/o7q572qmm7w7lkr2

    edit: I got some time and inspiration and finally implemented the additional option for using the pre-built Open-MPI, but it's auto-detected. So be sure that the MPI version you want is properly visible (having the OpenFOAM environment up and running should be enough).

    Best regards,
    Bruno
    permalink
    Posted February 12, 2012 at 09:55 by wyldckat wyldckat is offline
    Updated February 12, 2012 at 14:36 by wyldckat (r2 released.)
  5. Old Comment
    I am sorry for posting on a old post. But I am kind of desperate having been tried to install paraview for two weeks. I followed the same steps described in the very first post of the thread by Bruno. But finally running make -j 4 for more than 5 or 6 times I get the same massage.CMake Error at Silo-prefix/src/Silo-stamp/download-Silo.cmake:6 (file):
    file DOWNLOAD MD5 mismatch

    for file: [/home/suranga/OpenFOAM/ThirdParty-2.1.x/build/linux64Gcc/SuperBuild/silo-4.8-bsd.tar.gz]
    expected MD5 sum: [03e27c977f34dc6e9a5f3864153c24fe]
    actual MD5 sum: [d864e383f25b5b047b98aa2d5562d379]



    make[2]: *** [Silo-prefix/src/Silo-stamp/Silo-download] Error 1
    make[1]: *** [CMakeFiles/Silo.dir/all] Error 2
    make: *** [all] Error 2

    What would be the reason for this and how may I fix this.

    Thanks
    Suranga.
    permalink
    Posted May 23, 2013 at 02:22 by sdharmar sdharmar is offline
  6. Old Comment
    Hi Suranga,

    Two weeks? You could have said something sooner...

    I haven't tried these instructions in quite a while now... but the problem you're seeing is possibly because "silo-4.8-bsd.tar.gz" was changed once again on the original website.
    The trick is to edit the file "SuperBuild/PackageVersions.cmake", find the this block of code:
    Code:
    set(SILO_MAJOR 4)
    set(SILO_MINOR 8)
    set(SILO_PATCH 0)
    set(SILO_VERSION ${SILO_MAJOR}.${SILO_MINOR}.${SILO_PATCH})
    set(SILO_URL http://www.paraview.org/files/v3.14/dependencies/)
    set(SILO_GZ silo-${SILO_MAJOR}.${SILO_MINOR}-bsd.tar.gz)
    set(SILO_MD5 03e27c977f34dc6e9a5f3864153c24fe)
    And replace the last line with this:
    Code:
    set(SILO_MD5 d864e383f25b5b047b98aa2d5562d379)
    Best regards,
    Bruno
    permalink
    Posted May 23, 2013 at 20:00 by wyldckat wyldckat is offline
  7. Old Comment
    Thanks Bruno,
    Actually I found this modification from you another post and did. It got me through this error but gave me another.
    [/CODE]
    make[5]: *** [src/thread/src/CMakeFiles/boost_thread-mt-shared.dir/pthread/once.cpp.o] Error 1
    make[5]: *** [src/thread/src/CMakeFiles/boost_thread-mt-static.dir/pthread/once.cpp.o] Error 1
    make[4]: *** [src/thread/src/CMakeFiles/boost_thread-mt-shared.dir/all] Error 2
    make[4]: *** [src/thread/src/CMakeFiles/boost_thread-mt-static.dir/all] Error 2
    make[3]: *** [all] Error 2
    make[2]: *** [Boost-prefix/src/Boost-stamp/Boost-build] Error 2
    make[1]: *** [CMakeFiles/Boost.dir/all] Error 2
    make: *** [all] Error 2
    [/code]

    What can I do for this. Please help me.
    Suranga.
    permalink
    Posted May 23, 2013 at 21:21 by sdharmar sdharmar is offline
  8. Old Comment
    Hi Suranga,

    I have not been able to reproduce the same error you've gotten. I've used Ubuntu 12.04 x86_64 without any problems.

    Which specific Linux distribution and version are you using?

    Best regards,
    Bruno
    permalink
    Posted May 26, 2013 at 11:02 by wyldckat wyldckat is offline
  9. Old Comment
    Hi Bruno,
    Thank you very much for trying to help me.I am using Debian/Linux 7.0 wheezy amd64. I was keep on trying to build paraview. Finally I executed ./makeparaview just to see whether it works. Then I did a icoFoam tutorial and typed paraFoam on the terminal and it gave me following.



    Code:
    FATAL ERROR: ParaView reader module libraries do not exist
    
    Please build the reader module before continuing:
    cd $FOAM_UTILITIES/postProcessing/graphics/PV3Readers
    ./Allwclean
    ./Allwmake
    Then I navigated to the given PV3Readers directory and executed

    Code:
    /Allwclean
    and
    Code:
    ./Allwmake.


    Then it gave me following errors at the end.
    Code:
    CMake Error at CMakeLists.txt:12 (FIND_PACKAGE):
      Could not find module FindParaView.cmake or a configuration file for
      package ParaView.
    
      Adjust CMAKE_MODULE_PATH to find FindParaView.cmake or set ParaView_DIR to
      the directory containing a CMake configuration file for ParaView.  The file
      will have one of the following names:
    
        ParaViewConfig.cmake
        paraview-config.cmake
    
    
    
    CMake Error at CMakeLists.txt:13 (INCLUDE):
      include called with wrong number of arguments.  Include only takes one
      file.
    
    
    CMake Error at CMakeLists.txt:43 (QT4_WRAP_CPP):
      Unknown CMake command "QT4_WRAP_CPP".
    
    
    -- Configuring incomplete, errors occurred!
    + make
    make: *** No targets specified and no makefile found.  Stop.
    I tried a lot an failed every instance. Can you find any clue.


    Regards,
    Suranga.
    permalink
    Posted May 27, 2013 at 02:03 by sdharmar sdharmar is offline
  10. Old Comment
    Hi Suranga,

    Try following these instructions: http://openfoamwiki.net/index.php/In...u#Ubuntu_12.04

    The instructions are meant for Ubuntu 12.04, but Debian Wheezy should be very similar.

    Best regards,
    Bruno
    permalink
    Posted May 27, 2013 at 17:36 by wyldckat wyldckat is offline
  11. Old Comment

    It works.

    Yes. This works. Thank you very much Bruno. I guess this version 2.2.0 is a stable version.

    Best
    Suranga.
    permalink
    Posted May 28, 2013 at 23:30 by sdharmar sdharmar is offline
 

All times are GMT -4. The time now is 10:59.