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

FPE in abl_w2a_terrain #1469

Closed
marchdf opened this issue Jan 29, 2025 · 2 comments · Fixed by #1470
Closed

FPE in abl_w2a_terrain #1469

marchdf opened this issue Jan 29, 2025 · 2 comments · Fixed by #1470
Assignees
Labels
bug:amr-wind Something isn't working

Comments

@marchdf
Copy link
Contributor

marchdf commented Jan 29, 2025

Bug description

https://my.cdash.org/tests/249847834 is showing an FPE in abl_w2a_terrain. Can be seen here too: https://my.cdash.org/tests/249674702

@marchdf marchdf added the bug:amr-wind Something isn't working label Jan 29, 2025
@marchdf
Copy link
Contributor Author

marchdf commented Jan 29, 2025

More info that might help debug @mbkuhn :

* thread #1, name = 'amr_wind', stop reason = signal SIGFPE: floating point invalid operation
    frame #0: 0x000055555647d923 amr_wind`amr_wind::ocean_waves::relaxation_zones::update_target_vof(amr_wind::CFDSim&)::$_0::operator()(int, int, int, int) const [inlined] amr_wind::multiphase::levelset_to_vof(i=96, j=96, k=-1, eps=20.833333333333336, phi=0x0000555567e29040) at volume_fractions.H:534:13
   531      my = std::abs(my / 32.);
   532      mz = std::abs(mz / 32.);
   533      amrex::Real normL1 = (mx + my + mz);
-> 534      mx = mx / normL1;
   535      my = my / normL1;
   536      mz = mz / normL1;
   537      // Make sure that alpha is negative far away from the
(lldb) bt
* thread #1, name = 'amr_wind', stop reason = signal SIGFPE: floating point invalid operation
  * frame #0: 0x000055555647d923 amr_wind`amr_wind::ocean_waves::relaxation_zones::update_target_vof(amr_wind::CFDSim&)::$_0::operator()(int, int, int, int) const [inlined] amr_wind::multiphase::levelset_to_vof(i=96, j=96, k=-1, eps=20.833333333333336, phi=0x0000555567e29040) at volume_fractions.H:534:13
    frame #1: 0x000055555647abb0 amr_wind`amr_wind::ocean_waves::relaxation_zones::update_target_vof(amr_wind::CFDSim&)::$_0::operator()(this=0x00007fffffff1380, nbx=8, i=96, j=96, k=-1) const at relaxation_zones_ops.cpp:67:21
    frame #2: 0x000055555647aaa9 amr_wind`std::enable_if<IsFabArray<amrex::MultiFab>::value, void>::type amrex::experimental::detail::ParallelFor<amrex::MultiFab, amr_wind::ocean_waves::relaxation_zones::update_target_vof(amr_wind::CFDSim&)::$_0>(mf=0x000055555c9e7018, nghost=0x00007fffffff139c, ts=0x00007ffff117c3dc, dynamic=false, f=0x00007fffffff1380) at AMReX_MFParallelForC.H:27:21
    frame #3: 0x0000555556479dce amr_wind`std::enable_if<IsFabArray<amrex::MultiFab>::value, void>::type amrex::experimental::ParallelFor<amrex::MultiFab, amr_wind::ocean_waves::relaxation_zones::update_target_vof(amr_wind::CFDSim&)::$_0>(mf=0x000055555c9e7018, ng=0x00007fffffff139c, f=0x00007fffffff1380) at AMReX_MFParallelFor.H:97:5
    frame #4: 0x0000555556479d04 amr_wind`amr_wind::ocean_waves::relaxation_zones::update_target_vof(sim=0x00007fffffff1e98) at relaxation_zones_ops.cpp:63:9
    frame #5: 0x0000555556496b25 amr_wind`amr_wind::ocean_waves::ops::UpdateTargetVolumeFractionOp<amr_wind::ocean_waves::W2AWaves, void>::operator()(this=0x00007fffffff1547, data=0x0000555556df7168) at relaxation_zones_ops.H:96:9
    frame #6: 0x0000555556496acd amr_wind`amr_wind::ocean_waves::OWModel<amr_wind::ocean_waves::W2AWaves>::update_target_volume_fraction(this=0x0000555556df7160) at OceanWavesModel.H:108:9
    frame #7: 0x0000555556476716 amr_wind`amr_wind::ocean_waves::OceanWaves::post_init_actions(this=0x0000555556df4300) at OceanWaves.cpp:74:12
    frame #8: 0x00005555556693ac amr_wind`incflo::init_amr_wind_modules(this=0x00007fffffff1da8) at incflo.cpp:114:13
    frame #9: 0x00005555556697c3 amr_wind`incflo::InitData(this=0x00007fffffff1da8) at incflo.cpp:175:5
    frame #10: 0x000055555565de9d amr_wind`main(argc=11, argv=0x00007fffffff25d8) at main.cpp:66:19
    frame #11: 0x00007fffedeca7e5 libc.so.6`__libc_start_main + 229
    frame #12: 0x000055555565d84e amr_wind`_start + 46
(lldb) print normL1
(amrex::Real) 0

somehow normL1 is 0...

@mbkuhn
Copy link
Contributor

mbkuhn commented Jan 29, 2025

Thank you, I'm looking into it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:amr-wind Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants