-
Notifications
You must be signed in to change notification settings - Fork 6
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
514 create a builder class that can make a backward euler solver #527
514 create a builder class that can make a backward euler solver #527
Conversation
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.
Thanks @K20shores for working on this giant PR. Really nice work and I just have a few clarification questions besides the three failing tests.
return micm::LinearSolver<double, Group10000SparseVectorMatrix>{ matrix, initial_value }; | ||
}, | ||
10000); | ||
micm::LinearSolver<Group10000SparseVectorMatrix>>(10000); |
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.
why don't we need the lambda function here any more?
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.
It's not clear to me that we ever needed it here. we can call the construction directly in the linear solver function. I can put these back if we like having the lamdas with explicit creation
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.
Thanks. @mattldawson do you recall why we use the lambda function argument before?
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.
It was for the JITed version of things. We needed to pass the jit compiler around, but, I made the jit compiler into a singleton and now the interface to all solvers and their components are the same
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.
Looks good! Just have minor change requests. I like the removal of template template parameter.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #527 +/- ##
==========================================
- Coverage 92.90% 92.25% -0.65%
==========================================
Files 42 45 +3
Lines 3268 3408 +140
==========================================
+ Hits 3036 3144 +108
- Misses 232 264 +32 ☔ View full report in Codecov by Sentry. |
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.
That makes sense that the Jit class is singleton. Looks cleaner!
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.
looks great! this was a lot of work! Just a couple minor questions, but nothing important
template<class DenseMatrixPolicy, class SparseMatrixPolicy> | ||
inline auto SolverBuilder<DenseMatrixPolicy, SparseMatrixPolicy>::Build() | ||
{ | ||
if (std::holds_alternative<RosenbrockSolverParameters>(options_)) | ||
{ | ||
throw std::runtime_error("Not implemented yet"); | ||
} | ||
if (std::holds_alternative<BackwardEulerSolverParameters>(options_)) | ||
{ | ||
return BuildBackwardEulerSolver(); | ||
} | ||
|
||
throw std::runtime_error("No solver type set"); | ||
} |
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.
For the ProcessBuilder
we have a Process(ProcessBuilder&)
constructor instead of a ProcessBuilder::Build()
function. Would it make sense to use the same approach here?
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 don't have a preference on if we do that or not. Maybe you could do that in the next PR? This one already has so much
Intel failure seems to be in other repositories as well |
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.
Thanks @K20shores for working on this giant PR.
All the 44 tests pass on Derecho's A100 GPU, using nvhpc/23.7
.
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.
Great job @K20shores!
Just had a few comments/questions but nothing that should hold this up.
// if constexpr (std::is_same_v<decltype(solver.process_set_), micm::ProcessSet>) | ||
// { | ||
// auto linear_solver = solver.linear_solver_; | ||
// auto process_set = solver.process_set_; | ||
// be.Solve( | ||
// time_step, be_state, micm::BackwardEulerSolverParameters(), linear_solver, process_set, processes, solver.state_parameters_.jacobian_diagonal_elements_); | ||
// } |
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.
Can we delete this now or is this going to be re-used in the future?
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.
Oh, I do think we can delete this. I'm hoping that all of these tests can be passed any type of solver and check the results. I can dream and hope to make it come true by deleting those
Closes #514