Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple failures in the testsuite #1829

Open
yurivict opened this issue Dec 20, 2024 · 1 comment
Open

Multiple failures in the testsuite #1829

yurivict opened this issue Dec 20, 2024 · 1 comment
Labels
tests Issues about tests, running the tests, or test results

Comments

@yurivict
Copy link

Problem description

The testsute has a variety of failures, see the log here.

Some of the errors:

Value of: err.what()
Expected: has substring "AnyMap::fromYamlFile"
  Actual: 0x112871997400 pointing to "\n*******************************************************************************\nCanteraError thrown by Application::findInputFile:\n\nInput file xyz
>       self.run_read_legacy_hdf_str_column()
E       TypeError: TestLegacyHDF.run_read_legacy_hdf_str_column() missing 1 required positional argument: 'test_data_path'
>   self.thermo.equilibrate(stringify(XY.upper()), stringify(solver), rtol,
E   cantera._utils.CanteraError:
E   *******************************************************************************
E   CanteraError thrown by MultiPhaseEquil::equilibrate:
E   no convergence in 1000 iterations. Error = 272.649895729762
E   -------------------------------------------------------------------------------
E    0# signed char complex in /usr/ports/science/cantera/work/cantera-3.1.0/build/lib/libcantera_shared.so.3
E    1# _ZN7Cantera12CanteraErrorC2IJidEEERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEESA_DpRKT_ in /usr/ports/science/cantera/work/cantera-3.1.0/build/lib/libcantera_shared.so.3
E    2# signed char complex in /usr/ports/science/cantera/work/cantera-3.1.0/build/lib/libcantera_shared.so.3
E    3# signed char complex in /usr/ports/science/cantera/work/cantera-3.1.0/build/lib/libcantera_shared.so.3
E    4# signed char complex in /usr/ports/science/cantera/work/cantera-3.1.0/build/lib/libcantera_shared.so.3
E    5# signed char complex in /usr/ports/science/cantera/work/cantera-3.1.0/build/lib/libcantera_shared.so.3
E    6# unsigned long long* in /usr/ports/science/cantera/work/cantera-3.1.0/test/python/../../build/python/cantera/_cantera.cpython-311.so
E    7# unsigned long long* in /usr/local/lib/python3.11/site-packages/numpy/random/bit_generator.cpython-311.so
E    8# _PyObject_MakeTpCall in /usr/local/lib/libpython3.11.so.1.0
E    9# _PyEval_EvalFrameDefault in /usr/local/lib/libpython3.11.so.1.0
E   10# _PyEval_EvalFrameDefault in /usr/local/lib/libpython3.11.so.1.0
E   11# unsigned long long* in /usr/local/lib/libpython3.11.so.1.0
E   12# _PyEval_EvalFrameDefault in /usr/local/lib/libpython3.11.so.1.0
E   13# _PyEval_EvalFrameDefault in /usr/local/lib/libpython3.11.so.1.0
E   14# _PyEval_EvalFrameDefault in /usr/local/lib/libpython3.11.so.1.0
E   15# _PyEval_EvalFrameDefault in /usr/local/lib/libpython3.11.so.1.0
E   16# _PyObject_FastCallDictTstate in /usr/local/lib/libpython3.11.so.1.0
E   17# _PyObject_Call_Prepend in /usr/local/lib/libpython3.11.so.1.0
E   18# unsigned long long* in /usr/local/lib/libpython3.11.so.1.0
E   19# _PyObject_MakeTpCall in /usr/local/lib/libpython3.11.so.1.0
E   *******************************************************************************

build/python/cantera/thermo.pyx:449: CanteraError
>       assert drop[rxn_idx] == approx(drop_num, rel=self.rtol)
E       assert 0.0019332445105938868 == 0.00192605907...3548 ± 1.9e-08
E         
E         comparison failed
E         Obtained: 0.0019332445105938868 
E         Expected: 0.0019260590713443548 ± 1.9e-08

System information

  • Cantera version: 3.1.0
  • OS: FreeBSD 14.2
  • Python/MATLAB/other software versions: Python-3.11
@speth speth added the tests Issues about tests, running the tests, or test results label Dec 20, 2024
@speth
Copy link
Member

speth commented Dec 20, 2024

Hi @yurivict, thanks for checking on this, and the timely work to update the FreeBSD package.

Except for the first one, these are all "expected failures" and failing these is not treated as failing the test suite, as indicated in the testing summary:

Tests passed: 6329
Up-to-date tests skipped: 0
Tests failed: 1

Failed tests:
    - general: CanteraError.stacktrace

For this test, the expectation is that the stacktrace generated by boost::stacktrace should include the demangled method names from the Cantera library. For example, comparing to trace from the (correctly handled) exception thrown in the TestMixture::test_equilibrate2 test to what I get locally running on macOS:

*******************************************************************************
CanteraError thrown by MultiPhaseEquil::equilibrate:
no convergence in 1000 iterations. Error = 0.009628823028884667
-------------------------------------------------------------------------------
 0# Cantera::CanteraError::CanteraError(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) in /Users/speth/src/cantera/build/lib/libcantera_shared.3.1.0.dylib
 1# Cantera::CanteraError::CanteraError<int, double>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, int const&, double const&) in /Users/speth/src/cantera/build/lib/libcantera_shared.3.1.0.dylib
 2# Cantera::MultiPhaseEquil::equilibrate(int, double, int, int) in /Users/speth/src/cantera/build/lib/libcantera_shared.3.1.0.dylib
 3# Cantera::MultiPhase::equilibrate_MultiPhaseEquil(int, double, int, int, int) in /Users/speth/src/cantera/build/lib/libcantera_shared.3.1.0.dylib
 4# Cantera::MultiPhase::equilibrate(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, double, int, int, int, int) in /Users/speth/src/cantera/build/lib/libcantera_shared.3.1.0.dylib
 5# __pyx_pw_7cantera_7mixture_7Mixture_29equilibrate(_object*, _object* const*, long, _object*) in /Users/speth/src/cantera/build/python/cantera/_cantera.cpython-311-darwin.so
 6# PyObject_Vectorcall in /Users/speth/mambaforge/envs/ctdev311b/bin/python3.11
 7# _PyEval_EvalFrameDefault in /Users/speth/mambaforge/envs/ctdev311b/bin/python3.11
 8# _PyEval_Vector in /Users/speth/mambaforge/envs/ctdev311b/bin/python3.11
 9# method_vectorcall in /Users/speth/mambaforge/envs/ctdev311b/bin/python3.11
10# _PyVectorcall_Call in /Users/speth/mambaforge/envs/ctdev311b/bin/python3.11
11# _PyEval_EvalFrameDefault in /Users/speth/mambaforge/envs/ctdev311b/bin/python3.11
12# _PyEval_Vector in /Users/speth/mambaforge/envs/ctdev311b/bin/python3.11
13# _PyEval_EvalFrameDefault in /Users/speth/mambaforge/envs/ctdev311b/bin/python3.11
14# _PyEval_Vector in /Users/speth/mambaforge/envs/ctdev311b/bin/python3.11
15# _PyObject_FastCallDictTstate in /Users/speth/mambaforge/envs/ctdev311b/bin/python3.11
16# _PyObject_Call_Prepend in /Users/speth/mambaforge/envs/ctdev311b/bin/python3.11
17# slot_tp_call in /Users/speth/mambaforge/envs/ctdev311b/bin/python3.11
18# _PyObject_MakeTpCall in /Users/speth/mambaforge/envs/ctdev311b/bin/python3.11
19# _PyEval_EvalFrameDefault in /Users/speth/mambaforge/envs/ctdev311b/bin/python3.11
*******************************************************************************

You can see that this trace contains the function names for every stack frame, while you're only getting them for functions in libpython3.11.so.1.0 and one frame in libcantera_shared.so.3. I'm not sure what compiler flags might help with getting this information to be include correctly.

If there isn't an option that works, you could apply a patch to test_misc.cpp to skip this test as we do for MinGW builds which also have trouble including the desired information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Issues about tests, running the tests, or test results
Projects
None yet
Development

No branches or pull requests

2 participants