Build report Debian testing (stretch)

Discussion about building and installing Elmer
Post Reply
KaiMartin
Posts: 42
Joined: 02 Jun 2013, 00:07
Antispam: Yes
Location: Hannover, Germany
Contact:

Build report Debian testing (stretch)

Post by KaiMartin »

Here is a report of an effort to build elmer on a machine running current Debian testing, akka "stretch".
I used the messages presented by cmake-gui to guide me which packages to install. Turns out, libvtk as offered by stretch leads to build failures because it is based on QT5 but elmer requires QT4.

Here are the packages I installed to satisfy cmake:
  • apt-get install libblas-dev
    apt-get install liblapack-dev
    apt-get install qt4-qmake
    apt-get install libqt4-dev
    apt-get install libqwt-dev
    apt-get install libvtk5-dev <---------- Debian stable only
    apt-get install libvtk5-qt-dev <---------- Debian stable only
    apt-get install libpythonqt-dev
    apt-get install liboce-ocaf-dev
    apt-get install liboce-ocaf-lite-dev
    apt-get install liboce-modeling-dev
    apt-get install liboce-foundation-dev
    apt-get install liboce-visualization-dev
aptitude install paraview
Comment: apt-get insisted to remove libvtk5 and a few other packages elmer needs from Debian stable (jessie). This is not a valid option because vtk5 is needed by OpenCascade and presentation of results within ElmerGUI. Fortunately, aptitude can suggest alternative choices, which also resolve the dependencies. So I typed "n" until aptitude came up with this suggestion:
  • Remove the following packages:
    1) libjsoncpp0v5
    Install the following packages:
    2) libjsoncpp0 [0.6.0~rc2-3.1 (stable)]
    3) openmpi-bin [1.6.5-9.1 (stable)]
    4) paraview [4.1.0+dfsg+1-1 (stable)]
    Keep the following packages at their current version:
    5) libopenmpi1.10 [Not Installed]
    6) libvtk6.2 [Not Installed]
    7) libvtk6.2-qt [Not Installed]
    8) paraview-python [Not Installed]
    9) python-mpi4py [Not Installed]
    10) python-vtk6 [Not Installed]
    Upgrade the following packages:
    11) cmake [3.4.1-2 (now) -> 3.5.1-1 (testing)]
    12) cmake-data [3.4.1-2 (now) -> 3.5.1-1 (testing)]
    13) cmake-qt-gui [3.4.1-2 (now) -> 3.5.1-1 (testing)]
    Downgrade the following packages:
    14) libopenmpi-dev [1.6.5-11 (now) -> 1.6.5-9.1 (stable)]
    15) libopenmpi1.6 [1.6.5-11 (now) -> 1.6.5-9.1 (stable)]
    16) openmpi-common [1.6.5-11 (now) -> 1.6.5-9.1 (stable)]
    Leave the following dependencies unresolved:
    17) paraview recommends paraview-python
    Accept this solution? [Y/n/q/?]
With these packages in place, I was able to build with most of the options cmake-gui offered.
Exceptions:

WITH matc fails
/usr/bin/ld: listheaders: TLS definition in ../../matc/src/libmatc.so section .tbss mismatches non-TLS reference in CMakeFiles/ElmerGUI.dir/vtkpost/matc.cpp.o
../../matc/src/libmatc.so: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/build.make:1837: recipe for target 'ElmerGUI/Application/ElmerGUI' failed
make[2]: *** [ElmerGUI/Application/ElmerGUI] Error 1
CMakeFiles/Makefile2:17099: recipe for target 'ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/all' failed
make[1]: *** [ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/all] Error 2

WITH hypre cannot be configured
aptitude install libhypre-dev
inadvertently wants to remove the libvtk5 packages

WITH Trilinos cannot be configured
aptitude install trilinos-all-dev
inadvertently wants to remove the libvtk5 packages

WITH ElmerGUItester needs a fix
The build of ElmerGUItester looks for mainform.ui file in the wrong folder.
Quick fix:

Code: Select all

ln ../elmerfem/ElmerGUItester/forms/mainform.ui ../elmerfem/ElmerGUItester/src/mainform.ui
The successful build includes both, VTK and OpenCascade.This is huge, because OpenCascade allows me to import complex geometries designed with a third party mechanical CAD application. And with VTK in place, the ElmerGUI presents beautiful 3D results with very little hassle. Big thank you to the developers!

-------------------
TL.DR:
The good: My compile of ElmerGUI on Debian finally works with OpenCascade.
Not so good: I was unable to compile with trilinos, mumps, matc and hypre. Some important libraries like libVTK and libopenmpi had to be taken from Debian stable.
---<)kaimartin(>---
KaiMartin
Posts: 42
Joined: 02 Jun 2013, 00:07
Antispam: Yes
Location: Hannover, Germany
Contact:

Re: Build report Debian testing (stretch)

Post by KaiMartin »

Here is the log cmake produced for my build of Elmer on current Debian testing. I highlighted the two warnings it contains.

-----------------------------------------------------------------------------------
Checking whether GFortran version >= 4.8 -- yes
A library with BLAS API found.
A library with BLAS API found.
A library with LAPACK API found.
Checking whether /usr/bin/f95 supports PROCEDURE POINTER
Checking whether /usr/bin/f95 supports PROCEDURE POINTER -- yes
Checking whether /usr/bin/f95 supports CONTIGUOUS
Checking whether /usr/bin/f95 supports CONTIGUOUS -- yes
Checking whether /usr/bin/f95 supports EXECUTE_COMMAND_LINE
Checking whether /usr/bin/f95 supports EXECUTE_COMMAND_LINE -- yes
Adding optional package ElmerIce
Skipping test WinkelPoissonMetisKwayDual with 16 procs
Skipping test WinkelPoissonMetisKwayNodal with 16 procs
Building ElmerGUI
------------------------------------------------
------------------------------------------------
[ElmerGUI] Qt4: TRUE
[ElmerGUI] Qt4_LIBRARIES:
------------------------------------------------
Found Qt4: /usr/bin/qmake (found version "4.8.7")
PYTHON_LIBRARIES /usr/lib/x86_64-linux-gnu/libpython2.7.so
Found Qt4: /usr/bin/qmake (found version "4.8.7")
[ElmerGUI] Qwt: ON
[ElmerGUI] QWT_LIBRARY: /usr/lib/libqwt.so
[ElmerGUI] QWT_INCLUDE_DIR: /usr/include/qwt
------------------------------------------------
[ElmerGUI] OCE: 1
[ElmerGUI] OCE_VERSION: 0.17
[ElmerGUI] OCE_INCLUDE_DIRS: /usr/lib/x86_64-linux-gnu/oce-0.16/../../../include/oce
[ElmerGUI] ELMER_OCC_LIBS: TKernel;TKMath;TKG3d;TKG2d;TKBRep;TKSTEP;TKMesh;TKIGES;TKG2d;TKGeomBase;TKBool;TKBO;TKGeomAlgo;TKPrim;TKShHealing;TKSTEP209;TKSTEPAttr;TKSTEPBase;TKTopAlgo;TKXSBase
------------------------------------------------
[ElmerGUI] VTK version: 5.8.0
[ElmerGUI] VTK_LIBS: vtkCommon;vtkFiltering;vtkImaging;vtkGraphics;vtkGenericFiltering;vtkIO;vtkRendering;vtkVolumeRendering;vtkHybrid;vtkWidgets;vtkParallel;vtkInfovis;vtkGeovis;vtkViews;vtkCharts
[ElmerGUI] VTK_INCLUDE_DIRS: /usr/include/vtk-5.8
------------------------------------------------
CMake Warning at ElmerGUI/Application/CMakeLists.txt:238 (MESSAGE):
PythonQT is not tested.


Found Qt4: /usr/bin/qmake (found version "4.8.7")
------------------------------------------------
Found Qt4: /usr/bin/qmake (found version "4.8.7")
[ElmerGUIlogger] Qt4: TRUE
[ElmerGUIlogger] Qt4_LIBRARIES:
------------------------------------------------
CMake Warning at ElmerGUIlogger/CMakeLists.txt:28 (MESSAGE):
QT_USE_FILE: /usr/share/cmake-3.5/Modules/UseQt4.cmake


------------------------------------------------
BLAS library: /usr/lib/libblas.so
LAPACK library: /usr/lib/liblapack.so;/usr/lib/libblas.so
------------------------------------------------
Fortran compiler: /usr/bin/f95
Fortran flags: -fopenmp -O2 -g -DNDEBUG
------------------------------------------------
C compiler: /usr/bin/cc
C flags: -fopenmp -O2 -g -DNDEBUG
------------------------------------------------
CXX compiler: /usr/bin/c++
CXX flags: -fopenmp -O2 -g -DNDEBUG
------------------------------------------------
MPI Fortran: TRUE
MPI Fortran compiler: /usr/bin/mpif90
MPI Fortran flags:
MPI Fortran include dir: /usr/lib/openmpi/include;/usr/lib/openmpi/lib
MPI Fortran libraries: /usr/lib/libmpi_f90.so;/usr/lib/libmpi_f77.so;/usr/lib/libmpi.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libhwloc.so
MPI Fortran link flags:
------------------------------------------------
MPI C: TRUE
MPI C compiler: /usr/bin/mpicc
MPI C flags:
MPI C include dir: /usr/lib/openmpi/include;/usr/lib/openmpi/include/openmpi
MPI C libraries: /usr/lib/libmpi.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libhwloc.so
MPI C flags:
------------------------------------------------
Building ElmerGUI tester
------------------------------------------------
Building ElmerGUI logger
------------------------------------------------
------------------------------------------------
Package filename: elmerfem-8.2-0a99259-20160404_Linux-x86_64
Patch version: 8.2-0a99259
Configuring done
Generating done
KaiMartin
Posts: 42
Joined: 02 Jun 2013, 00:07
Antispam: Yes
Location: Hannover, Germany
Contact:

Re: Build report Debian testing (stretch)

Post by KaiMartin »

I got around to run the built-in tests. Apparrently, each and every test passed successfully. See the log below:

Code: Select all

kmk@akka:/usr/local/src/elmer_2016/build$ make -j4 test
Running tests...
Test project /usr/local/src/elmer_2016/build
        Start   1: SSA_Coulomb
  1/447 Test   #1: SSA_Coulomb ...........................   Passed    1.82 sec
        Start   2: Teterousse_DeformHeat
  2/447 Test   #2: Teterousse_DeformHeat .................   Passed  514.55 sec
        Start   3: StrainRate
  3/447 Test   #3: StrainRate ............................   Passed    1.88 sec
        Start   4: ExportVertically
  4/447 Test   #4: ExportVertically ......................   Passed    0.92 sec
        Start   5: Friction_Weertman
  5/447 Test   #5: Friction_Weertman .....................   Passed    3.10 sec
...
...
446/447 Test #446: TimeFunc ..............................   Passed    2.19 sec
        Start 447: piezo
447/447 Test #447: piezo .................................   Passed    0.22 sec

100% tests passed, 0 tests failed out of 447

Label Time Summary:
aster            =  11.37 sec (5 tests)
benchmark        = 139.49 sec (14 tests)
contact          = 117.65 sec (15 tests)
eliminate        =   4.15 sec (4 tests)
elmerice         = 4660.70 sec (40 tests)
elmerice-fast    =  65.30 sec (19 tests)
elmerice-long    = 4168.54 sec (12 tests)
heateq           = 221.89 sec (31 tests)
parallel         = 250.30 sec (43 tests)
particle         =  41.14 sec (8 tests)
quick            =  81.91 sec (200 tests)
serial           = 1512.18 sec (366 tests)

Total Test time (real) = 6153.51 sec
---<)kaimartin(>---
Post Reply