ElmerCSC / elmerfem

Official git repository of Elmer FEM software
http://www.elmerfem.org
Other
1.2k stars 319 forks source link

not understanding test failures that don't provide diagnostics #504

Closed jeffhammond closed 3 months ago

jeffhammond commented 3 months ago

This test fails because TEST.PASSED is missing. I see no diagnostics indicating what caused this file to be absent, or what is wrong here. There are 174 instances of this when I test the build with Flang. I would like to fix the compiler if appropriate. Thanks.

jehammond@oppenheimer:~/ELMER/elmerfem/build/fem/tests/CoupledPoisson9$ ctest --rerun-failed --output-on-failure
Test project /home/jehammond/ELMER/elmerfem/build/fem/tests/CoupledPoisson9
    Start 1: CoupledPoisson9
1/1 Test #1: CoupledPoisson9 ..................***Failed    0.39 sec

Starting program Elmergrid, compiled on Jul 24 2024
Elmergrid reading in-line arguments
Output will be saved to file squares.

Elmergrid loading data:
-----------------------
Loading the geometry from file 'squares.grd'.
Loading ElmerGrid file version: 210903
Defining the coordinate system (2-DIM).
Loading 4 subcell limits in X-direction
Loading 4 subcell limits in Y-direction
Loading material structure
LoadElmergrid: materials interval is [1,2]
Loading boundary conditions
Found 2 boundaries
Reached the end of command file
Found 1 divisions for grid

Loading ElmerGrid commands from file 'squares.grd'.
Reached the end of command file
Read commands from a file

Elmergrid creating and manipulating meshes:
-------------------------------------------
8 cells were created.
Numbered 1099 knots in 1016 4-node elements.
Numbering order was <x><y> and max levelwidth 35.
132 element sides between materials 0 and 1 were located to type 1.
34 element sides between materials 2 and 1 were located to type 2.
Coordinates defined in 2 dimensions

Elmergrid saving data with method 2:
-------------------------------------
Saving mesh in ElmerSolver format to directory squares.
Reusing an existing directory
Saving 1099 coordinates to mesh.nodes.
Saving 1016 element topologies to mesh.elements.
Saving boundary elements to mesh.boundary.
Saving header info to mesh.header.

Thank you for using Elmergrid!
Send bug reports and feature wishes to elmeradm@csc.fi
-- BINARY_DIR = /home/jehammond/ELMER/elmerfem/build
-- Extra library directories
CMake Error at /home/jehammond/ELMER/elmerfem/cmake/Modules/test_macros.cmake:157 (FILE):
  FILE failed to open for reading (No such file or directory):

    /home/jehammond/ELMER/elmerfem/build/fem/tests/CoupledPoisson9/TEST.PASSED
Call Stack (most recent call first):
  /home/jehammond/ELMER/elmerfem/fem/tests/CoupledPoisson9/runtest.cmake:3 (RUN_ELMER_TEST)

0% tests passed, 1 tests failed out of 1

Label Time Summary:
quick     =   0.39 sec*proc (1 test)
serial    =   0.39 sec*proc (1 test)

Total Test time (real) =   0.39 sec

The following tests FAILED:
      1 - CoupledPoisson9 (Failed)
Errors while running CTest
jeffhammond commented 3 months ago

This is how I compile and the environment variables at runtime.

git clean -dfx ; MPI_HOME=/opt/ompi/llvm FC=/opt/llvm/latest/bin/flang-new CC=/opt/llvm/latest/bin/clang CXX=/opt/llvm/latest/bin/clang++ CMAKE_INSTALL_PREFIX=$HOME/ELMER/install CFLAGS="-std=gnu89" cmake ..
make -j32
make install

export PATH=$PATH:/home/jehammond/ELMER/install/bin
export LD_LIBRARY_PATH=/opt/ompi/llvm/lib:$LD_LIBRARY_PATH
export ELMER_HOME=/home/jehammond/ELMER/install
raback commented 3 months ago

The std out and err of the run can be found in the test directory: /home/jehammond/ELMER/elmerfem/build/fem/tests/CoupledPoisson9/ Or you can say "CTEST_OUTPUT_ON_FAILURE=1" to have the std out outputted while running tests.

To get more indicators what could go wrong one can add the "Max Output Level" flag in the sif file from typical value 5..10 to 20..30. A test is passed if one or several norms are consistent with the provided ones.

Unfortunately there can be tons of reasons why this would be the case ranging from complete core dump to just missing it by ~1e-4 or so.