2017-10-22 00:09 BST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002412OpenFOAM[All Projects] Bugpublic2017-06-27 14:47
Reporterzyxhmt 
Assigned Tochris 
PrioritynormalSeveritytextReproducibilityalways
StatusclosedResolutionfixed 
PlatformGNU/LinuxOSOtherOS Version(please specify)
Product Version4.1 
Target VersionFixed in Version 
Summary0002412: after i enter ./Allwmake, it told me that required include file 'ptscotch.h' not found!
Descriptionafter i enter './Allwmake', it told me that ' required include file 'ptscotch.h' not found!'
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0007553

wyldckat (updater)

Questions:

 1. Which installation instructions did you follow?

    1.a. And did you do anything different from those instructions?

 2. Which packages did you download?

    - Specifically, I'm thinking about these instructions: http://openfoam.org/download/4-1-source/ - and whether you downloaded the 2 '.tar.gz' packages needed for the folders "OpenFOAM-4.1" and "ThirdParty-4.1".

 3. Which exact Linux Distribution and version are you using?

 4. Do you have an MPI toolbox installed in your system?

 5. Please run the Allwmake command and package the resulting log file, like this:

        ./Allwmake > log.make 2>&1
        gzip < log.make > log.make.gz

    Then attach the file "log.make.gz" to your next post.

~0007557

zyxhmt (reporter)

1.I followed :http://openfoam.org/download/4-1-source/
2.download the source code of OpenFOAM v4.1 and related third-party software in this page
3.Linux ln4 2.6.32-642.11.1.el6.x86_64 #1 SMP Fri Nov 18 19:25:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
4.openmpi2.0.0 and gcc6.2.0

~0007558

wyldckat (updater)

Many thanks for the details!
The problem is that the development files for the ZLib library are either not installed or not accessible from the shell environment. I can see this because the first critical error is this:

   gcc -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -Drestrict=__restrict -shared -fPIC -c common_memory.c -DSCOTCH_COMMON_RENAME -o common_memory.o
   common_file_compress.c:65:18: error: zlib.h: No such file or directory
   common_file_uncompress.c:65:18: error: zlib.h: No such file or directory

You could continue the build and ignore building Scotch and PTScotch for the time being, by running 'Allwmake' with the '-k' option:

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

Furthermore, if you want to the build to go faster, you can use the option -j to use as many cores you need. For more details on the available options, run:

  ./Allwmake -help


As for ZLib, either you need to install the 'zlib-devel' package in your machine, or compile ZLib from source code, or find where it's installed, e.g. by running:

  find /usr /opt -name "zlib.h"

~0007559

zyxhmt (reporter)

Thank you very much! I will try this.

~0007560

zyxhmt (reporter)

I use './Allwmake -k > log.make 2>&1',but it failed again. In 'log.make',the end of it is:

/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/Identity.H:80: error: only declarations of constructors can be ‘explicit’
/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/Identity.H:86: error: only declarations of constructors can be ‘explicit’
make[2]: *** [/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt32Opt/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.o] Error 1
make[2]: Target `/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt32Opt/bin/equilibriumFlameT' not remade because of errors.
make[2]: Leaving directory `/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/applications/utilities/thermophysical/equilibriumFlameT'
make[1]: *** [equilibriumFlameT] Error 2
/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/applications/utilities/thermophysical/mixtureAdiabaticFlameT
make[2]: Entering directory `/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/applications/utilities/thermophysical/mixtureAdiabaticFlameT'
Making dependency list for source file mixtureAdiabaticFlameT.C
make[2]: Leaving directory `/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/applications/utilities/thermophysical/mixtureAdiabaticFlameT'
make[2]: Entering directory `/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/applications/utilities/thermophysical/mixtureAdiabaticFlameT'
g++ -std=c++0x -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -DNoRepository -ftemplate-depth-100 -I/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/src/thermophysicalModels/specie/lnInclude -IlnInclude -I. -I/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude -I/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/src/OSspecific/POSIX/lnInclude -fPIC -c mixtureAdiabaticFlameT.C -o /home/mateng19900831/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt32Opt/applications/utilities/thermophysical/mixtureAdiabaticFlameT/mixtureAdiabaticFlameT.o
g++ -std=c++0x -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -DNoRepository -ftemplate-depth-100 -I/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/src/thermophysicalModels/specie/lnInclude -IlnInclude -I. -I/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude -I/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed /home/mateng19900831/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt32Opt/applications/utilities/thermophysical/mixtureAdiabaticFlameT/mixtureAdiabaticFlameT.o -L/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt32Opt/lib \
        -lspecie -lOpenFOAM -ldl \
         -lm -o /home/mateng19900831/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt32Opt/bin/mixtureAdiabaticFlameT
/usr/bin/ld: cannot find -lspecie
collect2: ld returned 1 exit status
make[2]: *** [/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt32Opt/bin/mixtureAdiabaticFlameT] Error 1
make[2]: Leaving directory `/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/applications/utilities/thermophysical/mixtureAdiabaticFlameT'
make[1]: *** [mixtureAdiabaticFlameT] Error 2
make[1]: Target `application' not remade because of errors.
make[1]: Leaving directory `/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/applications/utilities/thermophysical'
make: *** [thermophysical] Error 2
make: Target `application' not remade because of errors.

~0007561

wyldckat (updater)

There are two additional issues (beyond the problem with ZLib) that I can see from the log file:

  1. After a brief search, it seems like the error message about "only declarations of constructors can be ‘explicit’" may be a bug in the compiler, at least in 4.8.2, which was reported here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60686

     Therefore, please double check what the following commands give you:

        gcc --version
        g++ --version

     The second command might give you a different version number and instead of 6.2.0, it might be something else.


  2. You stated that you are using Open-MPI 2.0.0, but there are two error outputs that indicate that it is not properly configured or active in your shell environment:

        make: mpicc: Command not found
        Making dependency list for source file PstreamGlobals.C
        ...
        PstreamGlobals.H:41:17: error: mpi.h: No such file or directory

~0007564

zyxhmt (reporter)

I checked the gcc and changed it into 5.4.0.After I run OpenFOAM, I tried the code 'icoFoam' and it returned '
Build : 4.1
Exec : icoFoam
Date : Dec 29 2016
Time : 19:37:04
Host : "ln4"
PID : 13591
Case : /home/mateng19900831/OpenFOAM/OpenFOAM-4.1
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
Segmentation fault
'
what does 'Segmentation fault' mean?

~0007565

zyxhmt (reporter)

I see there are errors in log.make.
It says 'Target `application' not remade because of errors.'
The windows show that:
                 from lnInclude/conformalVoronoiMesh.H:46,
                 from lnInclude/initialPointsMethod.H:39,
                 from initialPointsMethod/autoDensity/autoDensity.H:39,
                 from initialPointsMethod/autoDensity/autoDensity.C:26:
lnInclude/CGALTriangulation3DKernel.H:36:43: fatal error: CGAL/Delaunay_triangulation_3.h: No such file or directory
compilation terminated.
make[2]: *** [/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt32Opt/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/autoDensity/autoDensity.o] Error 1
In file included from lnInclude/CGALTriangulation3Ddefs.H:41:0,
                 from lnInclude/conformalVoronoiMesh.H:46,
                 from lnInclude/initialPointsMethod.H:39,
                 from initialPointsMethod/rayShooting/rayShooting.H:37,
                 from initialPointsMethod/rayShooting/rayShooting.C:26:
lnInclude/CGALTriangulation3DKernel.H:36:43: fatal error: CGAL/Delaunay_triangulation_3.h: No such file or directory
compilation terminated.
make[2]: *** [/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt32Opt/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/rayShooting/rayShooting.o] Error 1
make[2]: Target `libso' not remade because of errors.
+ wmake libso conformalVoronoi2DMesh
+ wmake foamyQuadMesh
In file included from CGALTriangulation2Ddefs.H:44:0,
                 from CV2D.H:122,
                 from CV2D.C:26:
CGALTriangulation2DKernel.H:36:43: fatal error: CGAL/Delaunay_triangulation_2.h: No such file or directory
compilation terminated.
make[2]: *** [/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt32Opt/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2D.o] Error 1
In file included from CGALTriangulation2Ddefs.H:44:0,
                 from CV2D.H:122,
                 from insertFeaturePoints.C:26:
CGALTriangulation2DKernel.H:36:43: fatal error: CGAL/Delaunay_triangulation_2.h: No such file or directory
compilation terminated.
make[2]: *** [/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt32Opt/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertFeaturePoints.o] Error 1
In file included from CGALTriangulation2Ddefs.H:44:0,
                 from CV2D.H:122,
                 from insertSurfaceNearestPointPairs.C:26:
CGALTriangulation2DKernel.H:36:43: fatal error: CGAL/Delaunay_triangulation_2.h: No such file or directory
compilation terminated.
make[2]: *** [/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt32Opt/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertSurfaceNearestPointPairs.o] Error 1
In file included from CGALTriangulation2Ddefs.H:44:0,
                 from CV2D.H:122,
                 from insertSurfaceNearPointPairs.C:26:
CGALTriangulation2DKernel.H:36:43: fatal error: CGAL/Delaunay_triangulation_2.h: No such file or directory
compilation terminated.
make[2]: *** [/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt32Opt/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertSurfaceNearPointPairs.o] Error 1
In file included from CGALTriangulation2Ddefs.H:44:0,
                 from CV2D.H:122,
                 from insertBoundaryConformPointPairs.C:26:
CGALTriangulation2DKernel.H:36:43: fatal error: CGAL/Delaunay_triangulation_2.h: No such file or directory
compilation terminated.
make[2]: *** [/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt32Opt/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertBoundaryConformPointPairs.o] Error 1
In file included from CGALTriangulation2Ddefs.H:44:0,
                 from CV2D.H:122,
                 from CV2DIO.C:26:
CGALTriangulation2DKernel.H:36:43: fatal error: CGAL/Delaunay_triangulation_2.h: No such file or directory
compilation terminated.
make[2]: *** [/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt32Opt/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2DIO.o] Error 1
In file included from CGALTriangulation2Ddefs.H:44:0,
                 from CV2D.H:122,
                 from shortEdgeFilter2D.H:39,
                 from shortEdgeFilter2D.C:26:
CGALTriangulation2DKernel.H:36:43: fatal error: CGAL/Delaunay_triangulation_2.h: No such file or directory
compilation terminated.
make[2]: *** [/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt32Opt/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/shortEdgeFilter2D.o] Error 1
In file included from CGALTriangulation2Ddefs.H:44:0,
                 from CV2D.H:122,
                 from foamyQuadMesh.C:34:
CGALTriangulation2DKernel.H:36:43: fatal error: CGAL/Delaunay_triangulation_2.h: No such file or directory
compilation terminated.
make[2]: *** [/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt32Opt/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/foamyQuadMesh.o] Error 1
make[2]: Target `/home/mateng19900831/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt32Opt/bin/foamyQuadMesh' not remade because of errors.
+ wmake foamyHexMesh
In file included from ../conformalVoronoiMesh/lnInclude/CGALTriangulation3Ddefs
.H:41:0,
                 from ../conformalVoronoiMesh/lnInclude/conformalVoronoiMesh.H:
46,
                 from foamyHexMesh.C:36:
../conformalVoronoiMesh/lnInclude/CGALTriangulation3DKernel.H:36:43: fatal erro
r: CGAL/Delaunay_triangulation_3.h: No such file or directory

~0007566

wyldckat (updater)

Usually that means that there was an unexpected memory access.

If you tried to continue the build that was started with GCC 6.2.0, then you should first clean up the existing build and rebuild with the new GCC version.

You can either delete the two folders for OpenFOAM/ThirdParty 4.1 and start over, or simply run the following commands to do the clean up:

   foam
   wcleanPlatform

   cd $WM_THIRD_PARTY_DIR
   rm -r platforms

~0007567

wyldckat (updater)

The latest error is because CGAL is not installed. Check the contents of the file "ThirdParty-4.1/README.org" for more details on where to download CGAL and Boost from. Also available online: https://github.com/OpenFOAM/ThirdParty-4.x/blob/master/README.org

Nonetheless, CGAL is only needed if you need to build the mesh generators "foamy*Mesh".

~0007570

zyxhmt (reporter)

About CGAL and Boost, I just need to unpack into 'ThirdParty-4.1' or have to install it?

~0007576

wyldckat (updater)

You need to unpack them inside the 'ThirdParty-4.1' folder. Then you need to edit the file "OpenFOAM-4.1/etc/config.sh/CGAL" and change the version values to:

 boost_version=boost_1_55_0
 cgal_version=CGAL-4.8


The script 'Thirdparty-4.1/Allwmake' will do the build automatically.

~0007589

chris (manager)

zyxhmt, is this issue resolved for you now?

Can anyone explain the failure point in the compilation instructions (if any)?

If we do not establish a failure point and improve the compilation instructions, this effort has been support for one person only, without improving OpenFOAM for the public good.

~0007591

wyldckat (updater)

From what I could figure out, what we've learned and the potential improvements for the compilation instructions are as follows:

 - Situations when the end-user cannot ask the administrator to install additional development packages, in this case, "zlib-devel" was not installed, so it was necessary to build ZLib from source code and it had to be added to the search paths. ZLib was needed for Scotch, if I remember correctly.

 - I couldn't find any specific instructions at openfoam.org on how to download, unpack (although README is mentioned) and on how to set-up the settings in "etc/config.sh/CGAL". The latter will hopefully be improved once I manage to complete what I described here: https://bugs.openfoam.org/view.php?id=2330#c7251 - i.e. a simpler and more direct way to set-up the 3rd party dependencies.

 - I didn't get enough feedback, but it seemed that something weird was happening with GCC 6.2.0. It's possible that the installation of that GCC (gcc/g++) version was incorrectly done on zyxhmt's machine, or that a specific bug in 6.2.0 resulted in the flaw. I haven't managed to find a Linux Distribution that uses this specific version by default, so I haven't figured out yet if it's a specific bug with GCC 6.2.0 or not.

 - Although using "./Allwmake > log.make 2>&1" is more of a shell-thing (bash & dash), it makes it easier to help diagnose compilation issues, given that all output is provided inside the log file. On csh it simply is "./Allwmake >& log.make"

   - Related to this, the use of the command "gzip < log.make > log.make.gz" is for keeping the original log file, otherwise gzip will delete the original file once the compression is done.

~0007592

zyxhmt (reporter)

wyldckat,thanks for your answers. OpenFOAM is already installed on my machine.

~0007593

zyxhmt (reporter)

chris, thanks for wyldckat's help, my issue has resolved.

~0008274

chris (manager)

Issue is resolved
+Notes

-Issue History
Date Modified Username Field Change
2016-12-27 07:32 zyxhmt New Issue
2016-12-27 14:59 wyldckat Priority high => normal
2016-12-27 14:59 wyldckat Category Contribution => Bug
2016-12-27 15:06 wyldckat Note Added: 0007553
2016-12-28 07:10 zyxhmt File Added: log.make.gz
2016-12-28 07:10 zyxhmt Note Added: 0007557
2016-12-28 12:26 wyldckat Note Added: 0007558
2016-12-28 12:39 zyxhmt Note Added: 0007559
2016-12-28 14:02 zyxhmt Note Added: 0007560
2016-12-28 14:08 zyxhmt File Added: log.make-2.gz
2016-12-28 14:16 wyldckat Note Added: 0007561
2016-12-29 11:48 zyxhmt File Added: log.make-3.gz
2016-12-29 11:48 zyxhmt Note Added: 0007564
2016-12-29 11:57 zyxhmt Note Added: 0007565
2016-12-29 12:00 wyldckat Note Added: 0007566
2016-12-29 12:03 wyldckat Note Added: 0007567
2016-12-29 13:44 zyxhmt Note Added: 0007570
2017-01-01 17:51 wyldckat Note Added: 0007576
2017-01-04 09:34 chris Note Added: 0007589
2017-01-04 11:06 wyldckat Note Added: 0007591
2017-01-04 12:13 zyxhmt Note Added: 0007592
2017-01-04 12:15 zyxhmt Note Added: 0007593
2017-06-14 13:18 Samar Tag Attached: dynamicMesh
2017-06-14 13:18 Samar Tag Detached: dynamicMesh
2017-06-27 14:38 chris Assigned To => chris
2017-06-27 14:38 chris Status new => closed
2017-06-27 14:38 chris Resolution open => fixed
2017-06-27 14:38 chris Note Added: 0008274
+Issue History