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

Defined Base.copy as per-required, e.g., by NLSolve.jl OneDifferentiable #12

Merged
merged 1 commit into from
Oct 5, 2021

Conversation

amartinhuertas
Copy link
Member

@amartinhuertas amartinhuertas commented Oct 5, 2021

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Oct 5, 2021

Codecov Report

Merging #12 (d231a40) into master (65b7a26) will increase coverage by 0.26%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #12      +/-   ##
==========================================
+ Coverage   72.54%   72.81%   +0.26%     
==========================================
  Files           3        3              
  Lines         204      206       +2     
==========================================
+ Hits          148      150       +2     
  Misses         56       56              
Impacted Files Coverage Δ
src/SparseMatricesCSR.jl 100.00% <ø> (ø)
src/SparseMatrixCSR.jl 67.62% <100.00%> (+0.47%) ⬆️

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 65b7a26...d231a40. Read the comment docs.

@fverdugo
Copy link
Member

fverdugo commented Oct 5, 2021

Thanks for this @amartinhuertas !

@fverdugo fverdugo merged commit 0303170 into master Oct 5, 2021
@fverdugo fverdugo deleted the adding_base_copy branch October 5, 2021 12:49
@fverdugo
Copy link
Member

fverdugo commented Oct 5, 2021

Feel free to register a new patch version.

@fverdugo
Copy link
Member

fverdugo commented Oct 6, 2021

Hi @amartinhuertas!

this PR is making Gridap to crash. See e.g., https://github.com/gridap/Gridap.jl/pull/669/checks?check_run_id=3811313579#step:6:229

in any case this PR is correct!

The problem is that now we end up working with SparseMatricesSCR (as it should be) and it seems
that lu! is not yet implemented for this type.

We have 2 options.

  1. Implement it now and see if Gridap works again
  2. Pin SparseMatricesCSR to the previous version in Gridap and implement the missing method later.

Can you help with either 1. or 2. ?

@amartinhuertas
Copy link
Member Author

Yes. I would pursue 1. better. How lu! should be implemented for this type? By transforming to CSC? (just guessing ... I did not give it a profound though).

@amartinhuertas
Copy link
Member Author

amartinhuertas commented Oct 6, 2021

in any case this PR is correct!

Of course it is. hehehe. We were transforming sparse matrices into dense matrices. This is veeeery dangerous.

@fverdugo
Copy link
Member

fverdugo commented Oct 6, 2021

How lu! should be implemented for this type?

as a first approach I would convert to native julia csc format. It should be a method convert for this somewhere.

Of course, when we have a 0-based csr the most efficient way would be to provide the raw data to UMFPACK but I don't know if we have time to do this now...

@amartinhuertas
Copy link
Member Author

See e.g., https://github.com/gridap/Gridap.jl/pull/669/checks?check_run_id=3811313579#step:6:229

Is there only one test that fails or there are others as well? I am wondering if we need something else than lu ...

@amartinhuertas
Copy link
Member Author

It should be a method convert for this somewhere.

Yes, indeed, there is.

Of course, when we have a 0-based csr the most efficient way would be to provide the raw data to UMFPACK but I don't know if we have time to do this now...

Agreed. Let us leave this for another moment. I will open an issue.

@fverdugo
Copy link
Member

fverdugo commented Oct 6, 2021

When we have a 1-based csr, perhaps we can build a csc with the raw data (which will be the transpose) and then call lu! with Tanspose(csc). Perhaps there is an efficient implementation of lu! for Transpose{<:SparseMatrix}. In any case, this is just an optimization that can be done later.

@fverdugo
Copy link
Member

fverdugo commented Oct 6, 2021

Is there only one test that fails or there are others as well? I am wondering if we need something else than lu ...

I don't know. grep -r SparseMatrixCSR test/ will give you the potentially problematic tests.

@amartinhuertas
Copy link
Member Author

I don't know. grep -r SparseMatrixSCR test/ will give you the potentially problematic tests.

Ok. I will run the tests locally.

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.

3 participants