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

SegFault (and potential for better error message) when using DebugResidualAux #27633

Open
lewisgross1296 opened this issue May 15, 2024 · 0 comments
Labels
C: Framework P: normal A defect affecting operation with a low possibility of significantly affects. T: defect An anomaly, which is anything that deviates from expectations.

Comments

@lewisgross1296
Copy link

Bug Description

I attempted to use DebugResidualAux (albeit incorrectly) and it led to a Seg Fault, but there was no useful error message to indicate why. Here's what I got:

/var/spool/pbs/mom_priv/jobs/1222491.sawtoothpbs.SC: line 24: 50363 Segmentation fault      (core dumped) ${CARDINAL_DIR}/cardinal-opt -i ${JOB_DIR}/solid.i --n-threads=6 > small_inf.txt

I think there's a chance here to print something to help future users.

The cause of the Seg Fault is that the Variable I attempted to use DebugResidualAux on was a FIRST LAGRANGE, but the AuxVariable I made to store the debug residual was CONSTANT MONOMIAL. When I changed my AuxVariable to match the same type as my variable, the simulation ran.

Maybe related to #7800 but this is still open and has different syntax that caused it? Could also add more info the the docs to prevent users from doing this.

Steps to Reproduce

[Variables]
  [T]
  []
[]

[AuxVariables]
  [temp_residuals]
    family = MONOMIAL
    order = CONSTANT
  []
[]

[AuxKernels]
  [debug_aux]
    type = DebugResidualAux
    debug_variable = T
    variable = temp_residuals
  []
[]
...
add kernels, executioner, etc. here
...

Impact

I was able to get it fixed quickly thanks to @joshuahansel, but I fear others would have to recompile in debug mode and do some digging to get to the bottom on their own.

[Optional] Diagnostics

No response

@lewisgross1296 lewisgross1296 added P: normal A defect affecting operation with a low possibility of significantly affects. T: defect An anomaly, which is anything that deviates from expectations. labels May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Framework P: normal A defect affecting operation with a low possibility of significantly affects. T: defect An anomaly, which is anything that deviates from expectations.
Projects
Status: Todo
Development

No branches or pull requests

2 participants