Exawind / amr-wind

AMReX-based structured wind solver
https://exawind.github.io/amr-wind
Other
114 stars 83 forks source link

Assertion `info.root_proc > -1' failed #1385

Open marchdf opened 9 hours ago

marchdf commented 9 hours ago

Bug description

terminate called after throwing an instance of 'std::runtime_error'
  what():  Assertion `info.root_proc > -1' failed, file "/autofs/nccs-svm1_home1/marchdf/exawind/exawind-manager/environments/amr-wind-of/amr-wind/amr-wind/wind_energy/actuator/turbine/fast/turbine_fast_ops.H", line 186

This is due to something I did in #1360: specifically, calling post_regrid_actions on L81 of incflo.cpp. Actuator::post_regrid_actions() is doing something different than the others and doesn't have the information it would like...

marchdf commented 8 hours ago

I think what's going on is:

Actuator::post_regrid_actions() calls act->determine_influenced_procs()

and that is in turbine_fast_ops.H which has a check for AMREX_ALWAYS_ASSERT(info.root_proc > -1) but act->determine_root_proc(act_proc_count) hasn't been called yet because post_init_actions hasn't been called yet.

So is the fix to have a determine_root_proc call in post_regrid_actions?

mbkuhn commented 8 hours ago

Is it possible to determine the root proc in pre_init_actions?