Mixed-precision parallel linear solver#7048
Conversation
SoilRos
left a comment
There was a problem hiding this comment.
Overall, it looks good, I just left some minor concerns. I still need to make the performance tests though.
|
The changes look good. To merge, please resolve the merge conflicts, if possible, by rebasing the branch onto the current master. |
When you do, however, please replace the binary literals ( |
|
I just rebased the PR branch, addressed the merge conflicts, and replaced binary literals with their hex counterparts. |
|
jenkins build this please |
| } | ||
|
|
||
| // downcast to single precision | ||
| bsr_downcast(M_); |
There was a problem hiding this comment.
The update of the matrix transposes the blocks of the original matrix into the new buffer, in double precision. Later it downcasts the entire matrix to its single precision buffer. Now, I don't understand why to have the double precision in the first place? After all, the operations in this wrapper only operate on the single precision matrix. Maybe I am missing something here?
There was a problem hiding this comment.
Your observation is correct, @SoilRos! This is an artifact from the original mixed-precision implementation where the interface was at the solver level. In that case, the double-precision matrix was required for incomplete factorization purposes. Now that the interfaces are at the preconditioner and linear operator levels, the original design has introduced some redundancies. The situation is actually slightly worse for the preconditioner. Addressing the issue is not that difficult, and will be taken care of. Of course, using column-major blocks throughout OPM would eliminate almost all redundancies ;-)
|
I have spent some more time with this code and I have gathered other observations. These are mostly about making this code more generic to make it fit a bit more with the modularity of the solvers.
I already have partially implemented 1, 2, and 5. |
|
@SoilRos: Can you clarify which of the above items are required to approve this PR for merging. I think 1,4, and 5, are relatively straight forward, but 2 and 3 introduces scope creep and I suggest holding off on those for now. Any objections? |
|
Yes, I think 1, 4, and 5 are fine for the scope of this PR. |
|
@SoilRos, I just pushed three more commits to address the items discussed. If you are happy, I'll rebase on the current master so that we can get this merged and move on to the next one. |
This PR leverages OPM's ISTL framework to provide a parallel implementation of the mixed-precision linear solver. For more information refer to
opm/simulators/linalg/mixed/README.md