-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Fixed "fall through" for PR "New PR: Eigen system supports shell matrices" #15324
Conversation
/opt/civet/build_0/moose/framework/src/utils/SlepcSupport.C:385:40: error: this statement may fall through [-Werror=implicit-fallthrough=] 385 | solver_params._eigen_matrix_free = true; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ /opt/civet/build_0/moose/framework/src/utils/SlepcSupport.C:387:5: note: here 387 | case Moose::EST_NEWTON: | ^~~~ cc1plus: all warnings being treated as errors We changed APIs in idaholab#15315, and we need to reserve the old APIs for Griffin for a second. I will go to update Griffin to use new APIs. Once that is done, we could remove the old APIs. Refs idaholab#15315
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What target did this fail on? Make sure that it's running on this PR
case Moose::EST_MF_MONOLITH_NEWTON: // This should be removed once RattleSnake is updated | ||
/* Falls through. */ | ||
// This should be removed once Griffin is updated | ||
case Moose::EST_MF_MONOLITH_NEWTON: | ||
Moose::PetscSupport::setSinglePetscOption("-init_eps_monitor_conv"); | ||
Moose::PetscSupport::setSinglePetscOption("-init_eps_monitor"); | ||
Moose::PetscSupport::setSinglePetscOption("-eps_power_snes_monitor"); | ||
Moose::PetscSupport::setSinglePetscOption("-eps_power_ksp_monitor"); | ||
Moose::PetscSupport::setSinglePetscOption("-init_eps_power_snes_monitor"); | ||
Moose::PetscSupport::setSinglePetscOption("-init_eps_power_ksp_monitor"); | ||
break; | ||
case Moose::EST_NEWTON: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an empty case statement; this is fine to "fallthrough" on. The compiler is not warning/erroring about this, is it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, case Moose::EST_MF_MONOLITH_NEWTON
should be empty in theory since it will take the same thing as case Moose::EST_NEWTON:
But complier is angry at me if I leave case Moose::EST_MF_MONOLITH_NEWTON
empty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not need to worry about this code. It will be removed once I get Griffin updated. But we need to get the moose changes in first
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the compiler is only warning about the below case; not this one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But since it's temporary, I won't make you update the PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we do not need to worry about this temporary code. I will remove it soon
case Moose::EST_MF_MONOLITH_NEWTON: // This block should be removed once RattleSnake is updated | ||
// This block (EST_MF_MONOLITH_NEWTON) should be removed once Griffin is updated | ||
// This is used to for API update | ||
case Moose::EST_MF_MONOLITH_NEWTON: | ||
solver_params._eigen_matrix_free = true; | ||
/* Falls through. */ | ||
#if !SLEPC_VERSION_LESS_THAN(3, 8, 0) || !PETSC_VERSION_RELEASE | ||
Moose::PetscSupport::setSinglePetscOption("-eps_type", "power"); | ||
Moose::PetscSupport::setSinglePetscOption("-eps_power_nonlinear", "1"); | ||
Moose::PetscSupport::setSinglePetscOption("-eps_power_update", "1"); | ||
Moose::PetscSupport::setSinglePetscOption("-init_eps_power_snes_max_it", "1"); | ||
Moose::PetscSupport::setSinglePetscOption("-init_eps_power_ksp_rtol", "1e-2"); | ||
Moose::PetscSupport::setSinglePetscOption( | ||
"-init_eps_max_it", stringify(params.get<unsigned int>("free_power_iterations"))); | ||
Moose::PetscSupport::setSinglePetscOption("-eps_target_magnitude", ""); | ||
if (solver_params._eigen_matrix_free) | ||
{ | ||
Moose::PetscSupport::setSinglePetscOption("-eps_power_snes_mf_operator", "1"); | ||
Moose::PetscSupport::setSinglePetscOption("-init_eps_power_snes_mf_operator", "1"); | ||
} | ||
|
||
if (solver_params._customized_pc_for_eigen) | ||
{ | ||
Moose::PetscSupport::setSinglePetscOption("-eps_power_pc_type", "moosepc"); | ||
Moose::PetscSupport::setSinglePetscOption("-init_eps_power_pc_type", "moosepc"); | ||
} | ||
#else | ||
mooseError("Newton-based eigenvalue solver requires SLEPc 3.7.3 or higher"); | ||
#endif | ||
break; | ||
case Moose::EST_NEWTON: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, this guy is not empty, so the fallthrough warning/error is valid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see
I need to fix this as well. Why PETSc-3.11.4 hates me so much?! |
Job Documentation on 372faa6 wanted to post the following: View the site here This comment will be updated on new commits. |
I can not reproduce the issue. I keep working on |
951e97a
to
d4e343e
Compare
… there is no off diag coupling.
d4e343e
to
372faa6
Compare
Just FYI, the fix for the doco target is already in |
Good to know! Otherwise I can not believe I just broke docs :-) |
Job Modules debug PETSc alt on 372faa6 : invalidated by @fdkong Why it takes forever? |
Job Modules debug PETSc submodule on 372faa6 : invalidated by @fdkong Why it takes forever? |
Job Pthreads+OpenMP Test on 372faa6 : invalidated by @fdkong Why it takes forever? |
@lindsayad It is ready for review or merge |
We changed APIs in #15315, and we need to reserve the old APIs for Griffin for a second.
I will go to update Griffin to use new APIs. Once that is done, we could remove the old APIs.
Refs #15315