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

Issue warning in --mesh-only mode if unused parameters exist in input file #29824

Open
wants to merge 4 commits into
base: next
Choose a base branch
from

Conversation

shikhar413
Copy link
Contributor

@shikhar413 shikhar413 commented Feb 6, 2025

Reason

Design

Impact

refs #14550, this should be merged in after #29803 is merged

@moosebuild
Copy link
Contributor

Job Precheck, step Clang format on ed6f597 wanted to post the following:

Your code requires style changes.

A patch was auto generated and copied here
You can directly apply the patch by running, in the top level of your repository:

curl -s https://mooseframework.inl.gov/docs/PRs/29824/clang_format/style.patch | git apply -v

Alternatively, with your repository up to date and in the top level of your repository:

git clang-format e5db198fdde4c8655f483c28e129107b678f240b

@GiudGiud GiudGiud self-assigned this Feb 6, 2025
@shikhar413 shikhar413 force-pushed the mesh_only_warning_unused branch 3 times, most recently from 2e26738 to 91a1e12 Compare February 6, 2025 20:50
@moosebuild
Copy link
Contributor

moosebuild commented Feb 6, 2025

Job Documentation, step Docs: sync website on db92386 wanted to post the following:

View the site here

This comment will be updated on new commits.

@moosebuild
Copy link
Contributor

moosebuild commented Feb 7, 2025

Job Coverage, step Generate coverage on be99186 wanted to post the following:

Framework coverage

5fce0a #29824 be9918
Total Total +/- New
Rate 85.28% 85.28% -0.00% 100.00%
Hits 108362 108367 +5 12
Misses 18698 18700 +2 0

Diff coverage report

Full coverage report

Modules coverage

Coverage did not change

Full coverage reports

Reports

This comment will be updated on new commits.

@shikhar413 shikhar413 force-pushed the mesh_only_warning_unused branch 2 times, most recently from 5f0604d to be99186 Compare February 10, 2025 14:42
Copy link
Contributor

@GiudGiud GiudGiud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for sure an improvement. my only concern is that the "check input" is done after mesh generation still, so meshing parameters that would be critical and would make mesh generation fail when misspelled are not caught

@shikhar413
Copy link
Contributor Author

shikhar413 commented Feb 11, 2025

the "check input" is done after mesh generation still, so meshing parameters that would be critical and would make mesh generation fail when misspelled are not caught

@GiudGiud one possible workaround here could be to call errorCheck() within MeshOnlyAction, so that it happens before exodus mesh outputting, what do you think?

@GiudGiud
Copy link
Contributor

I think that would be a good thing to try. A bad parameter is usually a critical failure in meshing in my experience

@shikhar413 shikhar413 force-pushed the mesh_only_warning_unused branch from be99186 to 3701321 Compare February 11, 2025 12:51
@shikhar413
Copy link
Contributor Author

@GiudGiud just pushed some changes that call errorCheck before mesh generation now, this should now be the desired behavior that you requested

@shikhar413
Copy link
Contributor Author

Nice, it looks like these changes are already picking up instances in existing unit tests where unused parameters are being used

@GiudGiud
Copy link
Contributor

yup a whopping 26 tests affected. this is a great fix

@shikhar413
Copy link
Contributor Author

shikhar413 commented Feb 11, 2025

I'll be working towards updating the failing tests. A few things I'm noticing:

  • For some reason, I am getting the following error message message tests/meshgenerators/fill_between_point_vectors_generator/bow.i:3.1: unused parameter 'pi' even though pi is being used in the input file like
pi = 3.1415926535
[Mesh]
  [fbpvg]
    type = FillBetweenPointVectorsGenerator
    positions_vector_1 = '${fparse r1*cos(th1_1/180.0*pi)} ${fparse r1*sin(th1_1/180.0*pi)} ${fparse z}
                          ${fparse r1*cos(th1_2/180.0*pi)} ${fparse r1*sin(th1_2/180.0*pi)} 0.0
                          ${fparse r1*cos(th1_3/180.0*pi)} ${fparse r1*sin(th1_3/180.0*pi)} 0.0
                          ${fparse r1*cos(th1_4/180.0*pi)} ${fparse r1*sin(th1_4/180.0*pi)} 0.0
                          ${fparse r1*cos(th1_5/180.0*pi)} ${fparse r1*sin(th1_5/180.0*pi)} 0.0'
  []
[]
  • There is no parameter CartesianMeshGenerator/elem_type in meshgenerators/mesh_diagnostics_generator.amr_detection/quad_second_order, do you know what this parameter should be instead? Otherwise this test is equivalent to meshgenerators/mesh_diagnostics_generator.amr_detection/quad
  • This will probably cause tests to fail in internal apps, how should we handle those?

@shikhar413
Copy link
Contributor Author

Submitted a PR in Griffin to address controlled app test failures for Griffin:
https://github.inl.gov/ncrc/griffin/pull/2337

@shikhar413 shikhar413 force-pushed the mesh_only_warning_unused branch 2 times, most recently from 6dae246 to 3eb4d0b Compare February 12, 2025 01:01
@shikhar413
Copy link
Contributor Author

  • For some reason, I am getting the following error message message tests/meshgenerators/fill_between_point_vectors_generator/bow.i:3.1: unused parameter 'pi' even though pi is being used in the input file like

Turns out pi is an understood constant in the MOOSE input so explicitly defining it is not needed, hence the error message

@GiudGiud GiudGiud force-pushed the mesh_only_warning_unused branch from d2df16a to 417a640 Compare February 12, 2025 05:05
@GiudGiud
Copy link
Contributor

GiudGiud commented Feb 12, 2025

There is no parameter CartesianMeshGenerator/elem_type in meshgenerators/mesh_diagnostics_generator.amr_detection/quad_second_order, do you know what this parameter should be instead? Otherwise this test is equivalent to

ok that's my bad unfortunately.
The only fixes that makes sense is to use this mesh generator to convert
https://mooseframework.inl.gov/source/meshgenerators/ElementOrderConversionGenerator.html
or use a GMG instead of a CMG

I ll do this now since I am looking at your PR

@GiudGiud
Copy link
Contributor

it should be good now. Looks like the amr detection diagnostics were broken for high order hexes

@roystgnr can you please approve my two commits on Shikhar's PR?

@shikhar413 shikhar413 force-pushed the mesh_only_warning_unused branch from b5b7456 to 5495357 Compare February 12, 2025 12:40
@shikhar413 shikhar413 force-pushed the mesh_only_warning_unused branch from 5495357 to db92386 Compare February 12, 2025 12:44
@shikhar413
Copy link
Contributor Author

shikhar413 commented Feb 12, 2025

Thanks, all MOOSE tests pass now, (modules parallel is unrelated). The Griffin changes were also merged (https://github.inl.gov/ncrc/griffin/pull/2337), will take some time for Griffin master to be updated. Only thing that's left is updating subchannel tests (don't have access) and addressing internal app tests (can't access).

@GiudGiud
Copy link
Contributor

ok we just need to wait for the master merge there then

@GiudGiud
Copy link
Contributor

nevermind there's a subchannel and some BISON failures. I can take care of BISON, subchannel should be removed

@shikhar413
Copy link
Contributor Author

nevermind there's a subchannel and some BISON failures. I can take care of BISON, subchannel should be removed

I don't have access to subchannel, you can take care of that too right?

@GiudGiud
Copy link
Contributor

yup. Subchannel is just done
On BISON now

@GiudGiud
Copy link
Contributor

Bison PR https://github.inl.gov/ncrc/bison/pull/6284
Pronghorn-Subchannel PR https://github.inl.gov/ncrc/pronghorn/pull/1290

@moosebuild
Copy link
Contributor

Job Controlled app tests on db92386 : invalidated by @shikhar413

@shikhar413
Copy link
Contributor Author

Griffin controlled app tests now pass - feel free to invalidate the remaining tests when the other app PR's are through

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants