Skip to content

Warnings clutter output of test_reactions.py #1937

@ischoegl

Description

@ischoegl

Problem description

In some recent CI runs, there are numerous warnings originating in test_reactions.py (specifically: test_reaction.py::TestImplicitThirdBody::test_duplicates) of this nature:

Warning: Kinetics::checkDuplicates: 
*******************************************************************************
InputFileError thrown by Kinetics::checkDuplicates:
Error on lines 10 and 12 of input string:
Undeclared duplicate third body reactions with a common third body detected.
Add the field 'explicit-third-body-duplicates: mark-duplicate' or
'explicit-third-body-duplicates: modify-efficiency' to the YAML phase entry
to choose how these reactions should be handled and suppress this warning.
Reaction 1: H + O2 + M <=> HO2 + M
Reaction 2: H + O2 + H2O <=> HO2 + H2O

|  Line |
|     5 |           kinetics: bulk
|     6 |           
|     7 |           species: [{gri30.yaml/species: all}]
|     8 | 
|     9 |         reactions:
>    10 >         - equation: H + O2 + H2O <=> HO2 + H2O
                    ^
|    11 |           rate-constant: {A: 1.126e+19, b: -0.76, Ea: 0.0}
>    12 >         - equation: H + O2 + M <=> HO2 + M
                    ^
|    13 |           rate-constant: {A: 1.126e+19, b: -0.76, Ea: 0.0}
|    14 |           default-efficiency: 0
|    15 |           efficiencies: {H2O: 1}
-------------------------------------------------------------------------------
 0# Cantera::CanteraError::CanteraError(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in build/lib/libcantera_shared.so.3
 1# Cantera::InputFileError::InputFileError<unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Cantera::AnyBase const&, Cantera::AnyBase const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in build/lib/libcantera_shared.so.3
 2# Cantera::Kinetics::checkDuplicates(bool, bool) in build/lib/libcantera_shared.so.3
 3# Cantera::YamlWriter::toYamlString[abi:cxx11]() const in build/lib/libcantera_shared.so.3
 4# 0x00007F5D53B44F76 in /home/runner/work/cantera/cantera/test/python/../../build/python/cantera/_cantera.cpython-310-x86_64-linux-gnu.so
 5# PyObject_VectorcallMethod in /opt/hostedtoolcache/Python/3.10.18/x64/lib/libpython3.10.so.1.0
 6# 0x00007F5D53AA2AD2 in /home/runner/work/cantera/cantera/test/python/../../build/python/cantera/_cantera.cpython-310-x86_64-linux-gnu.so
 7# 0x00007F5D5A94D5E4 in /opt/hostedtoolcache/Python/3.10.18/x64/lib/libpython3.10.so.1.0
 8# _PyEval_EvalFrameDefault in /opt/hostedtoolcache/Python/3.10.18/x64/lib/libpython3.10.so.1.0
 9# 0x00007F5D5A9A75E4 in /opt/hostedtoolcache/Python/3.10.18/x64/lib/libpython3.10.so.1.0
10# 0x00007F5D5A94D70C in /opt/hostedtoolcache/Python/3.10.18/x64/lib/libpython3.10.so.1.0
11# _PyEval_EvalFrameDefault in /opt/hostedtoolcache/Python/3.10.18/x64/lib/libpython3.10.so.1.0
12# 0x00007F5D5A9A75E4 in /opt/hostedtoolcache/Python/3.10.18/x64/lib/libpython3.10.so.1.0
13# _PyEval_EvalFrameDefault in /opt/hostedtoolcache/Python/3.10.18/x64/lib/libpython3.10.so.1.0
14# 0x00007F5D5A9A75E4 in /opt/hostedtoolcache/Python/3.10.18/x64/lib/libpython3.10.so.1.0
15# _PyEval_EvalFrameDefault in /opt/hostedtoolcache/Python/3.10.18/x64/lib/libpython3.10.so.1.0
16# 0x00007F5D5A9A75E4 in /opt/hostedtoolcache/Python/3.10.18/x64/lib/libpython3.10.so.1.0
17# 0x00007F5D5A94D5E4 in /opt/hostedtoolcache/Python/3.10.18/x64/lib/libpython3.10.so.1.0
18# _PyEval_EvalFrameDefault in /opt/hostedtoolcache/Python/3.10.18/x64/lib/libpython3.10.so.1.0
19# 0x00007F5D5A9A75E4 in /opt/hostedtoolcache/Python/3.10.18/x64/lib/libpython3.10.so.1.0
*******************************************************************************

It would be good if the warning could be suppressed.

System information

See output of recent CI runs, e.g., https://github.com/Cantera/cantera/actions/runs/16709062238/job/47291293054

Metadata

Metadata

Assignees

No one assigned

    Labels

    KineticsPythontestsIssues about tests, running the tests, or test results

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions