Skip to content

Bug fixes and small improvements#211

Merged
masterleinad merged 6 commits into
ORNL-CEES:masterfrom
Rombur:misc
Jul 9, 2019
Merged

Bug fixes and small improvements#211
masterleinad merged 6 commits into
ORNL-CEES:masterfrom
Rombur:misc

Conversation

@Rombur
Copy link
Copy Markdown
Collaborator

@Rombur Rombur commented Jul 2, 2019

These are multiple bug fixes and small changes made in #204

@codecov-io
Copy link
Copy Markdown

codecov-io commented Jul 2, 2019

Codecov Report

Merging #211 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #211   +/-   ##
=======================================
  Coverage   89.66%   89.66%           
=======================================
  Files          57       57           
  Lines        3250     3250           
=======================================
  Hits         2914     2914           
  Misses        336      336

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 93c5cec...d50d8b4. Read the comment docs.


A_host.mmult(C_host, B_host);

// Convert matrix does not create a fill up all the members of a
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Convert matrix does not create a fill up all the members of a
// convert_matrix() does not initialize all the members of a

and the copy/move assignment operator copies cusparse_handle and descr (or reinitializes them).

Comment thread source/cuda/cuda_smoother.cu Outdated

// Downcast the operator
auto cuda_operator =
// Downcast the operator. We need to extract the diagonal and inverse it.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Downcast the operator. We need to extract the diagonal and inverse it.
// Downcast the operator. We need to extract the diagonal and invert it.

Comment thread source/cuda/cuda_smoother.cu Outdated

// Change to COO format. The only thing that needs to be change to go from CSR
// to COO is to change row_ptr_dev with row_index_coo_dev.
// Change to COO format. The only thing that needs to be change to go from
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Change to COO format. The only thing that needs to be change to go from
// Change to COO format. The only thing that needs to be changed to go from

Comment thread source/cuda/cuda_solver.cu Outdated
// of _matrix to the format supported by amgx
auto &amgx_matrix = const_cast<SparseMatrixDevice<value_type> &>(
*(cuda_operator->get_matrix()));
auto &amgx_matrix = *(cuda_operator->get_matrix());
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really confusing. In the end, matrix is changed heavily here. For me, it would make more sense if the constructor copies the object.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand what's the problem here.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing op as std::shared_ptr to a const object feels conceptually weird if we change the wrapped object.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see but

  1. I will not copy the object. This is the most expensive part memory-wise of the algorithm.
  2. We do have a few variables (include the data in SparseMatrixDevice) that are mutable and while we shouldn't use mutable this is out of the scope of this PR.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's document these problems and move on.

Comment thread include/mfmg/cuda/dealii_operator_device_helpers.cuh Outdated
@Rombur
Copy link
Copy Markdown
Collaborator Author

Rombur commented Jul 8, 2019

I have updated the PR

@masterleinad masterleinad merged commit fe24b67 into ORNL-CEES:master Jul 9, 2019
@Rombur Rombur deleted the misc branch July 10, 2019 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants