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
Crash with adaptivity + high order scalar variables #12309
Comments
Backtrace`OldSolutionValue::eval_at_node` is being called with an invalid variable number (13)
|
Ok, I have a small vanilla MOOSE input (see below). The bug looks related to libmesh's If a higher order scalar variable comes before a field variable then the variable scalar component numbering is not the same as the variable numbering and the error above is triggered. If the high order scalar variable is last in the list (try moving it to the bottom of the
|
This has noting to do with stateful properties after all. It is just the indexing of variables and their scalar component numbers. |
I'll see if I can reproduce this. |
Shoot, but not tonight apparently. AFK and getting some weird build errors after pulling the latest MOOSE. |
Pulling the latest MOOSE and trying to build with an outdated libMesh, it turns out. Better luck this morning. |
Can you reproduce this? |
"Better luck this morning" turned out to be awful foreshadowing, as my day got eaten by a cascade of "why does the same gfortran module work fine on one computer and illegal-instruction on another" rooted nonsense. Sorry. Assuming that's all straight now I'll take a crack tonight. |
I can reproduce this fine, thanks; still working at understanding it. |
Ok, this looks like my fault for using (and documenting) variable_scalar_number inappropriately. Often it never makes a difference because users have been in the habit of declaring scalars last, but here it gives us the wrong offset. I think we'll want a new number lookup (variable_scalar_number is appropriate for its uses outside the projection code) that skips SCALARs the way our dof numbering does on elements and nodes. And we'll also need to better document the true behavior of n_comp and dof_number (if you put SCALAR variables in the middle of your list then DofObject variables are no longer indexed by variable number) and check the other zillion uses of those methods for the same bug. This could take a while. |
We could enforce higher (than 1) order scalar variables to be at the end of the variable list (at least in MOOSE if adaptivity is active) |
This is to handle the case (as triggered all-too-easily in idaholab/moose#12309) where we have multi-component variables which *precede* other single-component variables in the system being projected.
See if libMesh/libmesh#1904 works for you? That turned out to be much simpler than I'd feared; most methods really were behaving correctly, I was just constructing that one hierarchy of functors that wasn't. On the other hand, just because that works for me on the simple case you've distilled here doesn't mean it'll work for your application code, so maybe I'll hold off on the hubris for a little bit. |
Has this libmesh change (libMesh/libmesh#1904) made its way into MOOSE? I still have input files crashing with the following error msg,
The error can be reproduced by running the following input file with
@roystgnr would you mind taking another look? |
Your MOOSE is updated to the latest, so your libmesh submodule is updated to libMesh/libmesh@ab2cf97 ? That does include libMesh/libmesh#1904. Can you try running in dbg mode and see if you get any more informative error info? |
I am having trouble with lldb. I don't know why it's giving me the following error,
|
I don't know either, but you don't need a debugger to run in dbg mode. If you just build and use combined-dbg instead of combined-opt then it'll turn on our assertions and you'll probably get some more informative output than that error from malloc. |
Here is what I got
|
Aha! It looks like libMesh/libmesh#1904 missed a slightly different but related bug. Let me see if I can set up a PR for you to try. |
In the meantime, is there a chance you could boil that test down to something small enough to add to the core MOOSE test suite? I'm getting more and more embarrassed that we don't have anything covering high order scalar projections in CI. |
Hopefully this fixes the newer bug found in idaholab/moose#12309
Give libMesh/libmesh#1948 a try? Sorry I don't have time to see if I can replicate the problem myself; I'm going to be AFK for holiday/family stuff starting in about 20 minutes. |
Thanks, @roystgnr. I will give it a try. The smaller problem @dschwen created seem to work after libMesh/libmesh#1904. I only faced the issue again for the multiphysics problem. I will see if I can create a test problem for this. |
Okay, here is a framework only input file for reproducing the error. I can add this to framework tests once the libmesh changes are available in MOOSE.
|
This resolves idaholab#12309 and idaholab#12538 The libMesh bug here got fixed years ago, but apparently the MOOSE test coverage for the fix got lost in the couch cushions until I stumbled across it while searching old issues.
Rationale
Moose crashes (or bails out with an assertion) if the mesh gets refined in a simulation that has
stateful material properties andhigh order scalar variables (I'm assuming it's the scalar vars but I'll be continuing to check this).I might me in uncharted territory here (or assuming I can use a capability that simply doesn't exist yet). But I'd expect a verbose error message rather than a crash nonetheless.
Description
Still working on a minimal input that works with vanilla MOOSE, but with my Marmot branch I get:
(this error is triggered in serial and parallel runs)
Impact
The text was updated successfully, but these errors were encountered: