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

Avoid the local copy of Jacobian matrix when doing LuDecompose #644

Closed
sjsprecious opened this issue Sep 4, 2024 · 0 comments · Fixed by #646
Closed

Avoid the local copy of Jacobian matrix when doing LuDecompose #644

sjsprecious opened this issue Sep 4, 2024 · 0 comments · Fixed by #646
Assignees
Labels
enhancement New feature or request

Comments

@sjsprecious
Copy link
Collaborator

According to the Nsight Systems profiling results, there is a huge gap between the SubtractJacobianTerms and AlphaMinusJacobian kernels. The root cause is that the line auto jacobian = state.jacobian_ calls the default copy assignment operator, and it will copy all the data member on the host (https://github.com/NCAR/micm/blob/main/include/micm/util/sparse_matrix.hpp#L52-L56). This is unnecessary if we just want to copy the data from device to device

Acceptance Criteria

  • Use state.jacobian_ directly as the function argument.
  • Call the SubtractJacobianTerms function to re-construct the Jacobian matrix if the matrix is singular and substepping is needed. The computational time is much shorter than making a copy of the Jacobian matrix based on the profiling result.
@sjsprecious sjsprecious self-assigned this Sep 4, 2024
@sjsprecious sjsprecious added the enhancement New feature or request label Sep 4, 2024
@sjsprecious sjsprecious added this to the CUDA Rosenbrock Solver milestone Sep 4, 2024
@sjsprecious sjsprecious changed the title Implement the Copy function for the sparse and CUDA sparse matrix Avoid the local copy of Jacobian matrix when doing LuDecompose Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant