-
Notifications
You must be signed in to change notification settings - Fork 6
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
qrdelcol! and qrdelcol yielding different results! #11
Comments
I also noticed this:
─────────────────────────────────────────────── Section ncalls time %tot avg alloc %tot avg There is something inherently wrong with how R is being saved! |
Hi Tina, thank you very much for looking into this. I modified the
I am running the first code you sent. The critical row size seems to be 1441 (on my PC). From there on, I get errors on the column copy method as you mention. This seems not to be a problem on the column size also. I found a problem on the matrix dimensions in the delcol! function, which I fixed in an upcoming commit (thanks again for checking). If you want to get it working quickly now just to use the code, this is my current coldel! function:
This plus some minor modifications (not related to functionality) are what is coming up. I also noted that the function seems to be slower than the common del. I computed average times and mem usage with @Btime, which seems to be more accurate, with the following simple script:
which yields
I found this a bit surprising (but I'm glad of the 0 allocations). Still, note that the in-place 'delcol!' function also takes care of the 'A' matrix, which
I believe that the function should have the modification also for A, as modifying the R matrix is something you do only because A was modified. This usage aspect |
Ok, added in this PR: #12 |
Thank you very much! |
Hi,
I encountered an unexpected bug in my tests after replacing qrdelcol with qrdelcol!, and I can't figure out why it's happening. It seems like qrdelcol! doesn't return the correct R matrix. I'll share the exact matrices in a JLD2 file and a script that reproduces the issue. I would greatly appreciate a prompt review of this problem.
matrices.jld2.zip
I think this is the problematic part:
Changing it to
solves the issue. I'm not entirely sure but I think the first version kinda overwrites matrix entries during the shifting, but it's more memory/cache efficient obviously.
The text was updated successfully, but these errors were encountered: