Build report Debian/testing (bullseye)

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

Build report Debian/testing (bullseye)

Post by KaiMartin »

Somewhere in the drawer of projects that I'd really like to do but never quite got to, is an idea that involves charged particles in a combination of electrostatic forces, magnetic fields and resonant light. If I want to stay in Open Source territory, elmer still seems to be the tool of choice for this kind of problem.
I may have to tweak the solvers a bit. So I should learn how to build from source rather than use a virtual machine.

First I did a minimal build without elmerGUI and MPI along the lines of https://www.csc.fi/web/elmer/sources-and-compilation
Everything went smoothly, very few warnings, no errors. The tests of ctest went fine.

Then I fired off cmake-gui in the build directory and tried to work through the additional options,. These are the ones that worked. Some of them needed a little help:
  • WITH_ELMERGUI → Debian has dropped QT4 in fovour of QT5. Cmake configuration needs the switch "WITH_QT5=true" to look for the correct libraries. I was able to add the switch with the "add entry" button.
  • WITH_QWT → required to set a path "QWT_LIBRARY=/usr/lib/libqwt-qt5.so.6" in the "advanced" section of the options (there is an "advanced optins" button in the top row of cmake-gui)
  • WITH_HYPRE → required "Hypre_INCLUDE_DIR=/usr/include/hypre" in the "advanced section of the options
  • WITH_MKL → required "MKL_INCLUDE_DIR=/usr/include/mkl/" in the "advanced section of the options. I also checked several MKL options that appeared in the advanced section.
  • WITH_VTK
  • WITH_OCC
  • WITH_CONTRIB
  • WITH_CONTIGUOUS
  • WITH_METIS
  • WITH_METIS_SHARED
  • WITH_MUMPS
  • WITH_OpenMP
  • WITH_PARAVIEW
  • WITH_LUA
These are the options I was not able to build correctly:
  • WITH_MATC got me this compile error:

    Code: Select all

    /usr/local/src/elmer2020/elmerfem/ElmerGUI/Application/vtkpost/matc.cpp: In constructor ‘Matc::Matc(QWidget*)’:
    /usr/local/src/elmer2020/elmerfem/ElmerGUI/Application/vtkpost/matc.cpp:73:29: error: ‘FALSE’ was not declared in this scope
       73 |   com_init( (char *)"grad", FALSE, FALSE, com_grad, 1, 1,
          |                             ^~~~~
    
  • WITH_PYTHONQT → told me that it does not like QT5
  • WITH_ELMERGUITESTER produced build errors:

    Code: Select all

    [ 22%] Generating ui_mainform.h
    /bin/sh: 1: -o: not found
    [ 23%] Built target ElmerGrid
    make[2]: *** [ElmerGUItester/CMakeFiles/ElmerGUItester.dir/build.make:62: ElmerGUItester/ui_mainform.h] Error 127
    make[1]: *** [CMakeFiles/Makefile2:23090: ElmerGUItester/CMakeFiles/ElmerGUItester.dir/all] Error 2
    make[1]: *** Waiting for unfinished jobs....
    [ 60%] Built target umfpack
    [ 65%] Built target ng
    make: *** [Makefile:163: all] Error 2
    
  • WITH_FETI4I → "Cannot find source file: //feti4i_mod.F90" This source file does not seem to be part of any package in any distro the internet search machines are aware of. I'd advocate to remove the option from the cmake config if it cannot be satisfied anyway.
  • WITH_ELMERICE → cmake-configure misses several path (NetCDF_INCLUDE_DIR, NetCDF_LIBRARY, NetCDFF_LIBRARY
    HDF5_INCLUDE_DIR, HDF5_LIBRARY, HDF5F_LIBRARY) The debian packages libnetcdf* and libhdf5* are installed on my system, though. This includes the *-dev packages, too.
  • WITH_ZOLTAN → errors on build (I have every Debian package that contains "zoltan" in its name installed):

    Code: Select all

    Building Zoltan mesh repartitioner
    CMake Error at CMakeLists.txt:295 (ADD_SUBDIRECTORY):
    The source directory
    /usr/local/src/elmer2020/elmerfem/contrib/Zoltan_v3.83
    does not contain a CMakeLists.txt file.
    (...)
    CMake Error at fem/src/CMakeLists.txt:162 (ADD_DEPENDENCIES):
    ADD_DEPENDENCIES called with incorrect number of arguments
    
    Somewhat irritatingly the last two lines did not go away after I deatrivated the zoltan option in cmake-gui. I had to clear the cmake cache and restart.
This seems mostly fine. The one failed option I am worried about the most is WITH_MATC. The ability to parse formulas seems to be fairly common. Any idea to debug the compile error?

I tried ctest again. Unfortunately, with all the shiny new features compiled in 113 tests out of 713 failed. (Will list the failed tests in the next post)

--<)kaimartin(>---
Last edited by KaiMartin on 12 Apr 2020, 23:19, edited 1 time in total.
---<)kaimartin(>---
KaiMartin
Posts: 42
Joined: 02 Jun 2013, 00:07
Antispam: Yes
Location: Hannover, Germany
Contact:

Re: Build report Debian/testing (bullseye)

Post by KaiMartin »

As promised, here is a summary of ctest after I compiled with as many options as I could:

Code: Select all

$ ctest -j4

84% tests passed, 113 tests failed out of 713

Label Time Summary:
2D                =  30.84 sec*proc (16 tests)
3D                =  28.58 sec*proc (7 tests)
aster             =   8.58 sec*proc (5 tests)
beam              =   1.41 sec*proc (2 tests)
benchmark         = 102.44 sec*proc (16 tests)
block             =  32.66 sec*proc (21 tests)
circuit_utils     =   0.67 sec*proc (1 test)
circuits          =  47.79 sec*proc (18 tests)
contact           = 149.14 sec*proc (24 tests)
dg                =   4.84 sec*proc (3 tests)
elasticity        =   9.52 sec*proc (4 tests)
elasticsolve      = 221.57 sec*proc (43 tests)
eliminate         =   6.62 sec*proc (4 tests)
elmerice          = 152.04 sec*proc (1 test)
em-wave           =   7.90 sec*proc (4 tests)
extrude           =   3.70 sec*proc (3 tests)
fsi               =  28.51 sec*proc (13 tests)
gauge             =  17.32 sec*proc (3 tests)
harmonic          =  37.59 sec*proc (20 tests)
heateq            = 290.99 sec*proc (43 tests)
helmholtz         =   6.90 sec*proc (7 tests)
homogenization    =   5.37 sec*proc (2 tests)
hutiter           =   7.83 sec*proc (4 tests)
hypre             =  29.00 sec*proc (17 tests)
lua               =   2.28 sec*proc (2 tests)
matc              =  66.77 sec*proc (31 tests)
mgdyn             = 150.37 sec*proc (28 tests)
mortar            =  38.70 sec*proc (2 tests)
mumps             =  11.40 sec*proc (7 tests)
namespace         =   6.46 sec*proc (7 tests)
parallel          = 573.49 sec*proc (112 tests)
param             =   0.66 sec*proc (1 test)
particle          =  29.83 sec*proc (14 tests)
plate             =   0.69 sec*proc (1 test)
quick             = 254.84 sec*proc (294 tests)
scanning          =   9.00 sec*proc (2 tests)
serial            = 1625.85 sec*proc (601 tests)
shell             =  58.68 sec*proc (19 tests)
slow              = 172.97 sec*proc (3 tests)
stranded          =   4.67 sec*proc (1 test)
threaded          =  34.29 sec*proc (6 tests)
transient         = 130.70 sec*proc (48 tests)
umat              =   2.26 sec*proc (3 tests)
useextrude        =  18.43 sec*proc (16 tests)
vector_element    =  15.53 sec*proc (13 tests)
viscoelastic      =   7.25 sec*proc (1 test)
whitney           = 421.43 sec*proc (57 tests)

Total Test time (real) = 549.97 sec

The following tests FAILED:
	  7 - AdvReactDB_np6 (Failed)
	  9 - AdvReactDBmap_np6 (Failed)
	 12 - AdvReactDG_np6 (Failed)
	 16 - AngleMetisLayer_np2 (Failed)
	 17 - AngleMetisLayer_np3 (Failed)
	 18 - AngleMetisLayer_np4 (Failed)
	 19 - AnglePartitionLayer_np4 (Failed)
	 48 - CoilSolver1_np2 (Failed)
	 49 - CoilSolver1_np4 (Failed)
	 56 - CoilSolverLoop_np2 (Failed)
	 57 - CoilSolverLoop_np4 (Failed)
	 60 - CoilSolverTwoLoops_np2 (Failed)
	 61 - CoilSolverTwoLoops_np4 (Failed)
	 63 - ComponentResistance_np4 (Failed)
	 86 - ContactPatch3D_np4 (Failed)
	 88 - ContactPatch3DNames_np4 (Failed)
	 90 - ContactPatch3DNamesAndAutonum_np4 (Failed)
	 95 - ContactPatch3Delim_np4 (Failed)
	130 - DisContBoundaryDoubleMortar_np4 (Failed)
	131 - DisContBoundaryDoubleMortar_np8 (Failed)
	134 - DisContBoundaryMortarCont_np2 (Failed)
	135 - DisContBoundaryMortarCont_np4 (Failed)
	136 - DisContBoundaryMortarCont_np8 (Failed)
	138 - DisContBoundaryMortarContElim_np2 (Failed)
	139 - DisContBoundaryMortarContElim_np4 (Failed)
	140 - DisContBoundaryMortarContElim_np8 (Failed)
	142 - DisContBoundaryMortarJump_np2 (Failed)
	143 - DisContBoundaryMortarJump_np4 (Failed)
	144 - DisContBoundaryMortarJump_np8 (Failed)
	146 - DisContBoundaryMortarJumpB_np2 (Failed)
	147 - DisContBoundaryMortarJumpB_np4 (Failed)
	148 - DisContBoundaryMortarJumpB_np8 (Failed)
	150 - DisContBoundaryMortarJumpC_np2 (Failed)
	151 - DisContBoundaryMortarJumpC_np4 (Failed)
	152 - DisContBoundaryMortarJumpC_np8 (Failed)
	173 - ElmerGridCloneZ_np3 (Failed)
	218 - Hybrid2dMeshPartitionCyl_np8 (Failed)
	219 - Hybrid2dMeshPartitionMetis_np8 (Failed)
	220 - Hybrid2dMeshPartitionMetisConnect_np8 (Failed)
	226 - InternalPartitioning_np8 (Failed)
	228 - InternalPartitioning2_np6 (Failed)
	230 - InternalPartitioning3_np6 (Failed)
	259 - MazeMeshPartitionMetisContig_np6 (Failed)
	279 - MortarPoissonPartz3D_np6 (Failed)
	280 - MortarPoissonPartz3D_np8 (Failed)
	288 - NonconformingRestart2par_np3 (Failed)
	292 - NonconformingRestartStructmap_np4 (Failed)
	306 - OtherMeshResults_np4 (Failed)
	324 - PartitioningDirectionalQuads_np4 (Failed)
	325 - PartitioningUniformQuads_np3 (Failed)
	337 - PoissonDB_np4 (Failed)
	338 - PoissonDB_np8 (Failed)
	340 - PoissonDG_np3 (Failed)
	341 - PoissonDG_np8 (Failed)
	369 - RotatingBCPoisson3Daxial_np6 (Failed)
	396 - Shell_With_NormalSolver_np2 (Failed)
	461 - WinkelBmNavierInternalFETI_np4 (Failed)
	463 - WinkelBmNavierMumps_np4 (Failed)
	464 - WinkelBmPoissonCgIlu0_np2 (Failed)
	465 - WinkelBmPoissonCgIlu0_np8 (Failed)
	466 - WinkelBmPoissonHypreBiCGStabBoomer_np2 (Failed)
	467 - WinkelBmPoissonHypreBiCGStabBoomer_np8 (Failed)
	468 - WinkelBmPoissonHypreBiCGStabIlu0_np2 (Failed)
	469 - WinkelBmPoissonHypreBiCGStabIlu0_np8 (Failed)
	470 - WinkelBmPoissonHypreBiCGStabIlu1_np2 (Failed)
	471 - WinkelBmPoissonHypreBiCGStabIlu1_np8 (Failed)
	472 - WinkelBmPoissonHypreBoomer_np2 (Failed)
	473 - WinkelBmPoissonHypreBoomer_np8 (Failed)
	474 - WinkelBmPoissonHypreCgIlu0_np2 (Failed)
	475 - WinkelBmPoissonHypreCgIlu0_np8 (Failed)
	476 - WinkelBmPoissonHypreFlexGMResILU0_np2 (Failed)
	477 - WinkelBmPoissonHypreFlexGMResILU0_np8 (Failed)
	478 - WinkelBmPoissonHypreGMResBoomer_np2 (Failed)
	479 - WinkelBmPoissonHypreGMResBoomer_np8 (Failed)
	480 - WinkelBmPoissonHypreGMResILU0_np2 (Failed)
	481 - WinkelBmPoissonHypreGMResILU0_np8 (Failed)
	482 - WinkelBmPoissonIdrsIlu0_np2 (Failed)
	483 - WinkelBmPoissonIdrsIlu0_np8 (Failed)
	484 - WinkelBmPoissonInternalFETI_np8 (Failed)
	485 - WinkelBmPoissonMumps_np2 (Failed)
	486 - WinkelBmPoissonMumps_np8 (Failed)
	487 - WinkelPartitionMetis_np8 (Failed)
	488 - WinkelPartitionMetisConnect_np8 (Failed)
	489 - WinkelPartitionMetisRec_np8 (Failed)
	490 - WinkelPartitionRecursive_np8 (Failed)
	491 - WinkelPartitionRecursiveHaloBC_np8 (Failed)
	492 - WinkelPartitionRecursiveLevel2_np8 (Failed)
	493 - WinkelPartitionUniform_np4 (Failed)
	494 - WinkelPartitionUniformHaloBC_np4 (Failed)
	495 - WinkelPartitionUniformLevel2_np4 (Failed)
	497 - WinkelPoissonMetisKwayDual_np2 (Failed)
	498 - WinkelPoissonMetisKwayDual_np4 (Failed)
	499 - WinkelPoissonMetisKwayDual_np8 (Failed)
	500 - WinkelPoissonMetisKwayNodal_np2 (Failed)
	501 - WinkelPoissonMetisKwayNodal_np4 (Failed)
	502 - WinkelPoissonMetisKwayNodal_np8 (Failed)
	503 - WinkelPoissonPartitionRecursive_np8 (Failed)
	504 - WinkelPoissonPartitionUniform_np4 (Failed)
	564 - freesurf_maxd_np2 (Failed)
	565 - freesurf_maxd_np4 (Failed)
	567 - freesurf_maxd_local_np2 (Failed)
	568 - freesurf_maxd_local_np4 (Failed)
	581 - heateq_infty_np2 (Failed)
	582 - heateq_infty_np4 (Failed)
	608 - mgdyn_airgap_force_np2 (Failed)
	611 - mgdyn_angular_steady_np2 (Failed)
	616 - mgdyn_bh_gauge_np2 (Failed)
	624 - mgdyn_hypre_ams_np2 (Failed)
	626 - mgdyn_lamstack_lowfreq_transient (Failed)
	641 - mgdyn_torus_np2 (Failed)
	642 - mgdyn_torus_np4 (Failed)
	670 - poisson_transient_conforming_anti_np4 (Failed)
	671 - poisson_transient_conforming_anti_np8 (Failed)
I suspect that missing MATC is the culprit. Is there a way to get more information? E.g. a more verbose log?
---<)kaimartin(>---
raback
Site Admin
Posts: 4803
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Build report Debian/testing (bullseye)

Post by raback »

Hi Kai,

Great work! Indeed this see to be pretty close.

Zoltan could be usefull. We use subrepo, no existing packages. So perhaps you could try the "git submodule" commands and not the existing packages.
viewtopic.php?f=3&t=6331

For ice modelers the ElmerIce modules are of course vital, for others not so much. Maybe you get them compiled if it does not even find NETCDF.

If you must choose either VTKPost or MATC then I would currently to compile with MATC since it is used a lot. VTKPost is a light weight alternative for Paraview and thereby more easily replacable.

Perhaps gradually or the problems will be resolved. Many people are taking steps on different platforms.

In ctest say, for example "ctest -L quick -VV" for more verbosity.

-Peter
KaiMartin
Posts: 42
Joined: 02 Jun 2013, 00:07
Antispam: Yes
Location: Hannover, Germany
Contact:

Re: Build report Debian/testing (bullseye)

Post by KaiMartin »

Hi Peter,
your tips helped me to make my build more complete:
  • MATC is compiled in. Like you suggested, I switched off support of VTK to make the compiler happy
  • Zoltan is compiled in. The lib was built from source in the git sub module rather than from the regular Debian package.
  • Elmerice built without errors. I needed to install the Debian package for the fortran version of netcdf (libnetcdff7 and libnetcdff-dev).
These are the commands to make git load the zoltan sub module:

Code: Select all

git submodule sync
git submodule update --init
The build looks fairly complete now. From the major options of cmake only VTK, ElmerGUILogger and ElmerGUITester are missing. Like you said, VTK is replaceable by paraview. Apparently, ElmerGUILogger and ElmerGUITester both still rely on QT4 components which have been removed from Debian. Everything else compiled fine and did not crash on the first tutorial tasks.

I attached a copy of my current CmakeCache.txt

Thank you again for the hints!
Attachments
CMakeCache.txt
CmakeCache.txt for a fairly complete build of elmer on Debian/testing in March 2020
(111.21 KiB) Downloaded 398 times
---<)kaimartin(>---
KaiMartin
Posts: 42
Joined: 02 Jun 2013, 00:07
Antispam: Yes
Location: Hannover, Germany
Contact:

Re: Build report Debian/testing (bullseye)

Post by KaiMartin »

Hi Peter.
Unfortunately, the tests still come back with almost the same results. I looked a a little closer and noticed that the list of successfull tests does not contain any test with postfix n2, n4 or n6. If I understand correctly, these are the tests for parallel computing with MKI. All of these were noted as "failed".
There are also a couple of failed tests which are not related to MKI. I will look into these separately.

The log written to test-stdout_6.log in the directory of the MKI tests claim the test succeeded. ("CompareToReferenceSolution: PASSED all 1 tests!")

However ctest -VV yields:

Code: Select all

(...)
2: CMake Error at /usr/local/src/elmer2020/elmerfem/cmake/Modules/test_macros.cmake:154 (FILE):
2:   FILE failed to open for reading (No such file or directory):
2: 
2:     /usr/local/src/elmer2020/build/fem/tests/AdvReactDB/TEST.PASSED_6
(...)
50% tests passed, 1 tests failed out of 2
Poking a bit more, I found that for the MKI tests there is indeed no file "TEST.PASSED_6" or similar in the tests directory. There were "test-stderr_6.log" and "test-stdout_6.log" but no "TEST.PASSED_4". Looking at the code of ElmerSolver.F90 I reckon, that this should never happen. There should always be such a file. It should contain a "1" if the test passed and "0" if the test failed.

It seems there is something is off with the way the tests are handled. Unfortunately, I am not fluent enough in fortran to spot the source of the problem.

All the best.
---<)kaimartin(>---
tzwinger
Site Admin
Posts: 99
Joined: 24 Aug 2009, 12:20
Antispam: Yes

Re: Build report Debian/testing (bullseye)

Post by tzwinger »

Kai,
could you share "test-stderr_6.log" and "test-stdout_6.log" by their contents? This might give a clue on what went wrong.

Regards
Thomas
KaiMartin
Posts: 42
Joined: 02 Jun 2013, 00:07
Antispam: Yes
Location: Hannover, Germany
Contact:

Re: Build report Debian/testing (bullseye)

Post by KaiMartin »

tzwinger wrote: 14 Apr 2020, 10:09 could you share "test-stderr_6.log" and "test-stdout_6.log" by their contents? This might give a clue on what went wrong.
"test-stderr_6.log" exists but is empty (zero bytes)
I put ".../build/fem/tests/AdvReactDB/test-stdout_6.log" in the attachment.

All the best.
Attachments
test-stdout_6.log
(95.47 KiB) Downloaded 364 times
---<)kaimartin(>---
ceanwang
Posts: 14
Joined: 20 Mar 2021, 02:09
Antispam: Yes

Re: Build report Debian/testing (bullseye)

Post by ceanwang »

KaiMartin wrote: 13 Apr 2020, 10:58 The build looks fairly complete now. From the major options of cmake only VTK, ElmerGUILogger and ElmerGUITester are missing. Like you said, VTK is
Is ElmerGUITester any real use?
raback
Site Admin
Posts: 4803
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Build report Debian/testing (bullseye)

Post by raback »

Hi

I think the tester was mainly to check correctness of settings for ElmerGUI. I don't think it is too much used...

-Peter
ceanwang
Posts: 14
Joined: 20 Mar 2021, 02:09
Antispam: Yes

Re: Build report Debian/testing (bullseye)

Post by ceanwang »

Haven't found an ElmerTester.exe under bin folder.

I compiled one under Windows 10.
tester.jpg
tester.jpg (95.87 KiB) Viewed 5480 times
Post Reply