idaholab / moose

Multiphysics Object Oriented Simulation Environment
https://www.mooseframework.org
GNU Lesser General Public License v2.1
1.65k stars 1.02k forks source link

New add_subdomain_names capability does not work with exodus output if subdomains are not added before output #28005

Open GiudGiud opened 1 week ago

GiudGiud commented 1 week ago

Bug Description

if the subdomain is not created by the time the mesh is output

libMesh terminating:
ExodusII_IO_Helper: block id 72 not found in block_ids.
Stack frames: 17
0: 0   libmesh_devel.0.dylib               0x000000010e3e2e60 libMesh::print_trace(std::__1::basic_ostream<char, std::__1::char_traits<char>>&) + 1044
1: 1   libmesh_devel.0.dylib               0x000000010e3dfc30 libMesh::MacroFunctions::report_error(char const*, int, char const*, char const*, std::__1::basic_ostream<char, std::__1::char_traits<char>>&) + 272
2: 2   libmesh_devel.0.dylib               0x000000010e9d5670 libMesh::ExodusII_IO_Helper::initialize_element_variables(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>, std::__1::vector<std::__1::set<unsigned short, std::__1::less<unsigned short>, std::__1::allocator<unsigned short>>, std::__1::allocator<std::__1::set<unsigned short, std::__1::less<unsigned short>, std::__1::allocator<unsigned short>>>> const&) + 1156
3: 3   libmesh_devel.0.dylib               0x000000010e9b880c libMesh::ExodusII_IO::write_element_data(libMesh::EquationSystems const&) + 668
4: 4   libmoose-devel.0.dylib              0x0000000108cf10c8 Exodus::outputElementalVariables() + 304
5: 5   libmoose-devel.0.dylib              0x0000000108ce8d34 AdvancedOutput::output() + 440
6: 6   libmoose-devel.0.dylib              0x0000000108cf075c Exodus::output() + 184
7: 7   libmoose-devel.0.dylib              0x0000000108cefc3c OversampleOutput::outputStep(MooseEnumItem const&) + 760
8: 8   libmoose-devel.0.dylib              0x0000000108d137c0 OutputWarehouse::outputStep(MooseEnumItem) + 216
9: 9   libmoose-devel.0.dylib              0x00000001083ee144 FEProblemBase::outputStep(MooseEnumItem) + 712
10: 10  libmoose-devel.0.dylib              0x0000000107cf2254 Transient::preExecute() + 156
11: 11  libmoose-devel.0.dylib              0x0000000107cf1100 Transient::execute() + 64
12: 12  libmoose-devel.0.dylib              0x0000000108ddc97c MooseApp::executeExecutioner() + 700
13: 13  libmoose-devel.0.dylib              0x0000000108dd4e34 MooseApp::run() + 4584
14: 14  pronghorn-devel                     0x000000010447bbf8 void Moose::main<PronghornTestApp>(int, char**) + 152
15: 15  pronghorn-devel                     0x000000010447bb54 main + 12
16: 16  dyld                                0x0000000181c160e0 start + 2360
[0] ../src/mesh/exodusII_io_helper.C, line 3262, compiled May 15 2024 at 10:58:09

application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0
[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1
:
system msg for write_line failure : Bad file descriptor

Steps to Reproduce

Run with

Impact

Slowing down debugging add_subdomain_names is great for changing the mesh and setting all the missing subdomains there to avoid re-writing the input

[Optional] Diagnostics

No response

GiudGiud commented 1 week ago

@grunerjmeier fyi