Substitute COO_Mumps_Solver in ExtrapolatedSmoother#206
Substitute COO_Mumps_Solver in ExtrapolatedSmoother#206julianlitz wants to merge 8 commits intomainfrom
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #206 +/- ##
==========================================
- Coverage 90.69% 90.64% -0.06%
==========================================
Files 86 85 -1
Lines 9433 9295 -138
==========================================
- Hits 8555 8425 -130
+ Misses 878 870 -8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
EmilyBourne
left a comment
There was a problem hiding this comment.
Leaving the first part of my review as I see the same patterns repeating so it will be easier to finish the review when I have the reply to the first set of questions
| if (additional_radial_tasks > 0) { | ||
| const int i_theta = 0; | ||
| buildSolverMatrixRadialSection(i_theta, solver_matrix); | ||
| } | ||
|
|
||
| if (additional_radial_tasks > 1) { | ||
| const int i_theta = 1; | ||
| buildSolverMatrixRadialSection(i_theta, solver_matrix); | ||
| } | ||
|
|
||
| #pragma omp parallel num_threads(num_omp_threads) | ||
| { | ||
| #pragma omp for | ||
| for (int radial_task = 0; radial_task < num_radial_tasks; radial_task += 3) { | ||
| if (radial_task > 0) { | ||
| int i_theta = radial_task + additional_radial_tasks; | ||
| buildSolverMatrixRadialSection(i_theta, solver_matrix); | ||
| } | ||
| else { | ||
| if (additional_radial_tasks == 0) { | ||
| buildSolverMatrixRadialSection(0, solver_matrix); | ||
| } | ||
| else if (additional_radial_tasks >= 1) { | ||
| buildSolverMatrixRadialSection(0, solver_matrix); | ||
| buildSolverMatrixRadialSection(1, solver_matrix); | ||
| } | ||
| } | ||
| } | ||
| for (int radial_task = 0; radial_task < num_radial_tasks; radial_task += 3) { | ||
| const int i_theta = radial_task + additional_radial_tasks; | ||
| buildSolverMatrixRadialSection(i_theta, solver_matrix); | ||
| } /* Implicit barrier */ | ||
| #pragma omp for | ||
| for (int radial_task = 1; radial_task < num_radial_tasks; radial_task += 3) { | ||
| if (radial_task > 1) { | ||
| int i_theta = radial_task + additional_radial_tasks; | ||
| buildSolverMatrixRadialSection(i_theta, solver_matrix); | ||
| } | ||
| else { | ||
| if (additional_radial_tasks == 0) { | ||
| buildSolverMatrixRadialSection(1, solver_matrix); | ||
| } | ||
| else if (additional_radial_tasks == 1) { | ||
| buildSolverMatrixRadialSection(2, solver_matrix); | ||
| } | ||
| else if (additional_radial_tasks == 2) { | ||
| buildSolverMatrixRadialSection(2, solver_matrix); | ||
| buildSolverMatrixRadialSection(3, solver_matrix); | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
This doesn't quite line up. Before you had:
if (additional_radial_tasks == 0) {
buildSolverMatrixRadialSection(1, solver_matrix);
}
else if (additional_radial_tasks == 1) {
buildSolverMatrixRadialSection(2, solver_matrix);
}
else if (additional_radial_tasks == 2) {
buildSolverMatrixRadialSection(2, solver_matrix);
buildSolverMatrixRadialSection(3, solver_matrix);
}
for (int radial_task = 4; radial_task < num_radial_tasks; radial_task += 3) {
int i_theta = radial_task + additional_radial_tasks;
buildSolverMatrixRadialSection(i_theta, solver_matrix);
}but now you have:
if (additional_radial_tasks > 0) {
const int i_theta = 0;
buildSolverMatrixRadialSection(i_theta, solver_matrix);
}
if (additional_radial_tasks > 1) {
const int i_theta = 1;
buildSolverMatrixRadialSection(i_theta, solver_matrix);
}
for (int radial_task = 0; radial_task < num_radial_tasks; radial_task += 3) {
const int i_theta = radial_task + additional_radial_tasks;
buildSolverMatrixRadialSection(i_theta, solver_matrix);
} /* Implicit barrier */So for additional_radial_tasks == 0 you have i_theta = {0, 3, ...} whereas before you had i_theta = {1, 4, ...}
There was a problem hiding this comment.
Example: additional tasks = 2
Keep a separation of three lines to avoid race conditions (note periodicity)
Before:
Step 1: {{0,1},{5},{8},...
BARRIER
Step 2: {{2,3},{6},{9},...
BARRIER
Step 3: {{4},{7},{10},...
Now:
additional tasks = 2
Step 1: {0}
BARRIER
Step 2: {1}
BARRIER
Step 1: {{2},{5},{8},...
BARRIER
Step 2: {{3},{6},{9},...
BARRIER
Step 3: {{4},{7},{10},...
I think the new version is much nicer and easier to port to Kokkos.
| if ((i_r > 1 && i_r < grid.nr() - 2) || (i_r == 1 && !DirBC_Interior)) { | ||
| if ((i_r > 0 && i_r < grid.nr() - 1)) { |
There was a problem hiding this comment.
Have you changed the indexing to be 0-based instead of 1-based? This would explain my previous question, except that here you are working on i_r not i_theta.
Why do you no longer need the check for DirBC_Interior?
There was a problem hiding this comment.
Because in the Direct CSR Solver there is no symmetry shift. The stencil of next_to_boundary is the full 9 stencil.
Thus we dont need these. They are only necessary when we construct the matrix symmetric.
Currently DirectSolver Mumps constructs mazrices symmetric while DirectSolver CSR doesnt construct it symmetric.
|
@EmilyBourne We could merge #230 into this branch before merging it into main. |


Merge Request - GuideLine Checklist
Guideline to check code before resolve WIP and approval, respectively.
As many checkboxes as possible should be ticked.
Checks by code author:
Always to be checked:
If functions were changed or functionality was added:
If new functionality was added:
If new third party software is used:
If new mathematical methods or epidemiological terms are used:
Checks by code reviewer(s):