Skip to content

test_euler_integ fails in release mode but not debug mode #66

@tuckerbabcock

Description

@tuckerbabcock

I've noticed that the "Jacobian of Isentropic Vortex BC flux w.r.t dir is correct" and "Jacobian of Isentropic Vortex BC flux w.r.t dir is correct (DSBP)" sections of the "Isentropic vortex BC flux" test_euler_integ test case fail when I compile in release mode, but not with debug mode.

Release output:

$ ./test/unit/test_euler_integ.bin
jac_v_ad(i): 0.0262317 jac_v_fd(i): -0.0096512

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test_euler_integ.bin is a Catch v2.13.9 host application.
Run with -? for options

-------------------------------------------------------------------------------
Isentropic vortex BC flux - false
  Jacobian of Isentropic Vortex BC flux w.r.t dir is correct
-------------------------------------------------------------------------------
/Users/tuckerbabcock/Developer/motor/mach/test/unit/test_euler_integ.cpp:737
...............................................................................

/Users/tuckerbabcock/Developer/motor/mach/test/unit/test_euler_integ.cpp:774: FAILED:
  REQUIRE( jac_v_ad(i) == Approx(jac_v_fd(i)).margin(1e-10) )
with expansion:
  0.0262316896 == Approx( -0.0096512002 )

jac_v_ad(i): 0.0262317 jac_v_fd(i): -0.0096512
-------------------------------------------------------------------------------
Isentropic vortex BC flux - false
  Jacobian of Isentropic Vortex BC flux w.r.t dir is correct (DSBP)
-------------------------------------------------------------------------------
/Users/tuckerbabcock/Developer/motor/mach/test/unit/test_euler_integ.cpp:778
...............................................................................

/Users/tuckerbabcock/Developer/motor/mach/test/unit/test_euler_integ.cpp:815: FAILED:
  REQUIRE( jac_v_ad(i) == Approx(jac_v_fd(i)).margin(1e-10) )
with expansion:
  0.0262316896 == Approx( -0.0096512002 )

jac_v_ad(i): 0.0262317 jac_v_fd(i): -0.0096512
-------------------------------------------------------------------------------
Isentropic vortex BC flux - true
  Jacobian of Isentropic Vortex BC flux w.r.t dir is correct
-------------------------------------------------------------------------------
/Users/tuckerbabcock/Developer/motor/mach/test/unit/test_euler_integ.cpp:737
...............................................................................

/Users/tuckerbabcock/Developer/motor/mach/test/unit/test_euler_integ.cpp:774: FAILED:
  REQUIRE( jac_v_ad(i) == Approx(jac_v_fd(i)).margin(1e-10) )
with expansion:
  0.0262316896 == Approx( -0.0096512003 )

jac_v_ad(i): 0.0262317 jac_v_fd(i): -0.0096512
-------------------------------------------------------------------------------
Isentropic vortex BC flux - true
  Jacobian of Isentropic Vortex BC flux w.r.t dir is correct (DSBP)
-------------------------------------------------------------------------------
/Users/tuckerbabcock/Developer/motor/mach/test/unit/test_euler_integ.cpp:778
...............................................................................

/Users/tuckerbabcock/Developer/motor/mach/test/unit/test_euler_integ.cpp:815: FAILED:
  REQUIRE( jac_v_ad(i) == Approx(jac_v_fd(i)).margin(1e-10) )
with expansion:
  0.0262316896 == Approx( -0.0096512003 )

===============================================================================
test cases:  27 |  25 passed | 2 failed
assertions: 366 | 362 passed | 4 failed

Debug output:

$ ./test/unit/test_euler_integ.bin
jac_v_ad(i): -0.0096512 jac_v_fd(i): -0.0096512
jac_v_ad(i): 0.0950498 jac_v_fd(i): 0.0950498
jac_v_ad(i): -0.0096512 jac_v_fd(i): -0.0096512
jac_v_ad(i): 0.0950498 jac_v_fd(i): 0.0950498
jac_v_ad(i): -0.0096512 jac_v_fd(i): -0.0096512
jac_v_ad(i): 0.0950498 jac_v_fd(i): 0.0950498
jac_v_ad(i): -0.0096512 jac_v_fd(i): -0.0096512
jac_v_ad(i): 0.0950498 jac_v_fd(i): 0.0950498
===============================================================================
All tests passed (370 assertions in 27 test cases)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions