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

inplace QR #20

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

tinatorabi
Copy link
Collaborator

I have incorporated the in-place QR add/del operations in bpdual. However, I suspect the CI tests will most likely fail because the updates to QRupdate.jl have not yet been released as a new version. @mpf would it be possible for you to create a new release of QRupdate? Thanks.

@cortner
Copy link
Collaborator

cortner commented Oct 22, 2024

I like the idea very much. Can you run benchmarks that compare the old and the new version?

@tinatorabi
Copy link
Collaborator Author

I just encountered a bug in QRupdate.jl and filed an issue there. I have a somewhat quick fix for it but it makes it a bit less memory efficient(still better than the original dynamic qrupdate). I can open up a PR there and fix it but I just emailed Nicolás Barnafi(the person who wrote the in-place qrupdate code) and he told me he's working on an updated implementation of this and it might fix the issue + keep it memory efficient. So I'm waiting on that.

@mpf
Copy link
Member

mpf commented Nov 3, 2024

@tinatorabi — I see that the unit tests are still failing with the latest commit. Please let me know if I can help.

@tinatorabi
Copy link
Collaborator Author

Hi!
With this PR I wanted to incorporate the in-place qr operations into ASP but apparently there are some on-going issues in QRupdate that Nicolás is hoping to fix soon. Let's Ignore this PR for now until that's fixed. I reverted BPdual to the way it was before but added tests for OMP.

@tinatorabi
Copy link
Collaborator Author

Hi! Now that the new QRupdate version is merged, everything is working just as we wanted and all the CIs just passed! I’ve updated both BPdual and omp to use in-place QR operations. :) @mpf, I think you can go ahead and merge this!

Comment on lines +104 to +108
work = rand(n)
work2 = rand(n)
work3 = rand(n)
work4 = rand(n)
work5 = rand(m)
Copy link
Member

Choose a reason for hiding this comment

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

Presumably rand is being used to initialize these work arrays, and random numbers aren't really required? If so, replace with undefined allocations of the correct type.

@@ -171,6 +178,8 @@ function bpdual(
numtrim = 0
nprodA = 0
nprodAt = 0
cur_r_size = 0
Copy link
Member

@mpf mpf Nov 13, 2024

Choose a reason for hiding this comment

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

Is there a situation in which the variables cur_r_size and nact different? My understanding is that the size of R always corresponds to the number of active variables, indicated by nact. If so, would it be possible to instead use nact everywhere?

Also, it seems that on a warm-start entry, cur_r_size=0, which may be incorrect.

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