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] error installing OF4.1 on ubuntu 14.04 (https://www.cfd-online.com/Forums/openfoam-installation/184178-error-installing-of4-1-ubuntu-14-04-a.html)

dupeng February 24, 2017 03:08

error installing OF4.1 on ubuntu 14.04
 
3 Attachment(s)
Hello foamers,
I am installing OF4.1 on ubuntu 14.04. I have installed it according to the OpenFoamWiki (https://openfoamwiki.net/index.php/I...u#Ubuntu_14.04) There is already OF3.0.1 on my computer. But I installed it using 'alias' to source each version. So the two versions should work separately. But when I compile OF using './Allwmake'. There is always an error:


Code:

In file included from lnInclude/CGALTriangulation3Ddefs.H:44:0,
                from DelaunayMeshTools/DelaunayMeshTools.H:45,
                from DelaunayMeshTools/DelaunayMeshTools.C:26:
lnInclude/indexedCell.H:41:71: fatal error: CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h: No such file or directory
 #include "CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h"
                                                                      ^
compilation terminated.
make[2]: *** [/home/dupeng/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt64Opt/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMeshTools/DelaunayMeshTools.o] Error 1
make[2]: Leaving directory `/home/dupeng/OpenFOAM/OpenFOAM-4.1/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh'
make[1]: *** [generation] Error 2
make[1]: Leaving directory `/home/dupeng/OpenFOAM/OpenFOAM-4.1/applications/utilities/mesh'
make: *** [mesh] Error 2

With this error, there are a lot of commands I can't use, like 'setFields', 'decomposePar'.... Some solvers can be used, like 'icoFoam'... It looks that there is something wrong about the CGAL. Here is the information when I compile the Thirdparty:

Code:

========================================
Start ThirdParty Allwmake
========================================

========================================
Build MPI libraries if required

========================================
Build Scotch decomposition library scotch_6.0.3
    /home/dupeng/OpenFOAM/ThirdParty-4.1/platforms/linux64GccDPInt64/scotch_6.0.3
    scotch header in /home/dupeng/OpenFOAM/ThirdParty-4.1/platforms/linux64GccDPInt64/scotch_6.0.3/include
    scotch libs  in /home/dupeng/OpenFOAM/ThirdParty-4.1/platforms/linux64GccDPInt64/lib

========================================
Build PTScotch decomposition library scotch_6.0.3 (uses MPI)
    /home/dupeng/OpenFOAM/ThirdParty-4.1/platforms/linux64GccDPInt64/scotch_6.0.3

    ptscotch header in /home/dupeng/OpenFOAM/ThirdParty-4.1/platforms/linux64GccDPInt64/scotch_6.0.3/include/openmpi-system
    ptscotch libs  in /home/dupeng/OpenFOAM/ThirdParty-4.1/platforms/linux64GccDPInt64/lib/openmpi-system

========================================
Build Metis decomposition
    optional component Metis was not found
========================================
Build CGAL
Using system installation of CGAL

========================================
Done ThirdParty Allwmake
========================================

Can anybody tell me where the problem is? The attachments are the logfiles when compiling. 'logmake.txt' is generated when compiling OF. 'logmakePV' is for paraview. 'logmakeCM' is for compiling the Thirdparty. Thanks.

Lisandro Maders March 20, 2017 15:24

Hello dupeng,

I have the same problem you had, but I am using openfoam 4.x version on ubuntu 14.04.

Did you solve your problem?

Regards,

Lisandro Maders

dupeng March 20, 2017 15:42

Lisandro Maders,

I haven't solved this problem yet. It seems that CGAL has been compiled for the previous version and it cannot be compiled again for the new version. Hope someone can help us!

Regards,

peng

ordinary March 20, 2017 16:46

Hello,

I recently installed OpenFOAM v4.1 via https://openfoam.org/download/4-1-ubuntu/ on ubuntu 16.04 LTS. It worked like charm. Your and my ubuntu versions are not same, but I just wanted to post anyway.

Good luck.

Lisandro Maders March 21, 2017 13:53

OpenFOAM 4.x compilation error in Ubuntu 14.04
 
2 Attachment(s)
I hope so too Peng..

I will post my log.make files as well..

At a first view, no errors in the log.makeCM and in the log.makePV files, only in the log.make, in the OpenFOAM compilation.

Looking forward for some answer, probably from Bruno Santos, who always save OF user's life haha.

OBS: log.makePV was too large and I could not upload.. but it seems ok to me

Regards,

Lisandro Maders

wyldckat March 22, 2017 18:11

Greetings to all!

I've gotten Lisandro's PM and I've taken a look at the installation instructions. My apologies for this issue and for not being able to look into this sooner.

According to the history records in the wiki page for 4.0, I unfortunately did not use a clean installation of Ubuntu 14.04, which had Ubuntu's CGAL installation already in it. Problem is that I still have to confirm if this was the case or not.

Therefore, for the time being, please do the following commands and hopefully this will build almost all of OpenFOAM's 4.1 and 4.x stack, but it will not build the meshers foamyHexMesh and foamyQuadMesh:
Code:

cd $WM_PROJECT_DIR
export QT_SELECT=qt4
./Allwmake -j 4 -k > log.make 2>&1

The "-k" option should build everything and ignore the parts that fail to build. Run the last command twice, so that you get the summary of what was successful and what failed to build, into the log file. The resulting log file will be needed if you notice anything else missing from OpenFOAM.

I'll review and test again the instructions and fix them during next weekend, if all goes well.

My apologies once again for this problem. This is one of my main expertises when it comes to OpenFOAM and somehow I missed this problem :(

Best regards,
Bruno

dupeng March 23, 2017 09:00

1 Attachment(s)
Hello Bruno Santos,

Your solution works great. Although I still get the error but everything works fine after the compilation.

Maybe other foamers can also try the "-k" option when encounter similar problems during the installation. It will ignore some errors but they may not influence the use of openfoam.

I also attached the log file for you to target the problem. The original file is too large, I just deleted something in the middle.

I have another problem about function object here:

https://www.cfd-online.com/Forums/op...onobjects.html

can you also take a look if possible? Thanks.

Regards,

Peng

wyldckat March 25, 2017 13:34

Hi Peng,

Thanks for log file. From what I can see, looks like it's just that CGAL was missing.

OK, I've finished testing and revising the instructions for installing OpenFOAM 4.* on Ubuntu 14.04:
Since you two have already gotten OpenFOAM mostly built, here are the steps that still need to be done:
  1. Activate the OpenFOAM 4.* shell environment.
  2. Run the following commands to get CGAL and Boost's source code and unpack it:
    Code:

    cd $WM_THIRD_PARTY_DIR
    mkdir download

    wget -P download https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.8/CGAL-4.8.tar.xz
    wget -P download http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.bz2

    tar -xJf download/CGAL-4.8.tar.xz
    tar -xjf download/boost_1_55_0.tar.bz2

  3. Now we need to modify the installation settings in OpenFOAM:
    Code:

    cd $WM_PROJECT_DIR
    sed -i -e 's/\(boost_version=\)boost-system/\1boost_1_55_0/' etc/config.sh/CGAL
    sed -i -e 's/\(cgal_version=\)cgal-system/\1CGAL-4.8/' etc/config.sh/CGAL
    sed -i -e 's=\-lmpfr=-lmpfr -lboost_thread=' wmake/rules/General/CGAL

  4. Now we need to update the environment:
    Code:

    wmRefresh
  5. Finally, lets try and finish up the build of the whole OpenFOAM stack:
    Code:

    cd $WM_PROJECT_DIR
    export QT_SELECT=qt4

    ./Allwmake -j > log.make 2>&1

    ./Allwmake -j > log.make 2>&1

Hopefully this fixes your builds.


As for what exactly happened: from what I can vaguely remember, I only copied and adapted the instructions from OpenFOAM 3.0.* for Ubuntu 14.04 and didn't follow up with testing the build. This was likely because I didn't have enough time back then and ended up not testing later on :(.

Best regards,
Bruno

dupeng March 26, 2017 06:18

Thanks Bruno,
Your solution works perfect.

Regards,

Peng

caduqued October 15, 2018 02:46

Thanks a lot Bruno!!!!!

I used your instruction for an installation under Slackware, and it worked really well. Thanks!

Quote:

Originally Posted by wyldckat (Post 642256)
Hi Peng,

Thanks for log file. From what I can see, looks like it's just that CGAL was missing.

OK, I've finished testing and revising the instructions for installing OpenFOAM 4.* on Ubuntu 14.04:
Since you two have already gotten OpenFOAM mostly built, here are the steps that still need to be done:
  1. Activate the OpenFOAM 4.* shell environment.
  2. Run the following commands to get CGAL and Boost's source code and unpack it:
    Code:

    cd $WM_THIRD_PARTY_DIR
    mkdir download

    wget -P download https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.8/CGAL-4.8.tar.xz
    wget -P download http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.bz2

    tar -xJf download/CGAL-4.8.tar.xz
    tar -xjf download/boost_1_55_0.tar.bz2

  3. Now we need to modify the installation settings in OpenFOAM:
    Code:

    cd $WM_PROJECT_DIR
    sed -i -e 's/\(boost_version=\)boost-system/\1boost_1_55_0/' etc/config.sh/CGAL
    sed -i -e 's/\(cgal_version=\)cgal-system/\1CGAL-4.8/' etc/config.sh/CGAL
    sed -i -e 's=\-lmpfr=-lmpfr -lboost_thread=' wmake/rules/General/CGAL

  4. Now we need to update the environment:
    Code:

    wmRefresh
  5. Finally, lets try and finish up the build of the whole OpenFOAM stack:
    Code:

    cd $WM_PROJECT_DIR
    export QT_SELECT=qt4

    ./Allwmake -j > log.make 2>&1

    ./Allwmake -j > log.make 2>&1

Hopefully this fixes your builds.


As for what exactly happened: from what I can vaguely remember, I only copied and adapted the instructions from OpenFOAM 3.0.* for Ubuntu 14.04 and didn't follow up with testing the build. This was likely because I didn't have enough time back then and ended up not testing later on :(.

Best regards,
Bruno



All times are GMT -4. The time now is 14:09.