-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Fix issues with A_mul_Bc and Ac_mul_B for CholmodSparse (#9160). #9189
Conversation
Thanks. Could you add some tests for the cases you described in #9160? |
https://github.com/JuliaLang/julia/blob/master/test/sparse.jl is as good a place to put them as any, a little easier than making a new file under |
I'd prefer if they would be places in a |
That could work as long as it's added to the linalg list in |
Sure. I will add some tests in |
I put them in |
Great. Preferably, we should test all four data types supported by CHOLMOD. |
I will have a look at the trailing whitespace. I got a similar error on my Mac if I try to use |
Ok the docs for
So complex matrices shouldn't be allowed for |
It appears that the new tests are very useful. |
Seems that the |
Evidently suitesparse is a mess. Looks like there was already a https://github.com/JuliaLang/julia/blob/master/test/suitesparse.jl file that these would be better for IMO. Or we move and/or split up the contents that are in that file into smaller files in linalg. |
Yes. If any of the tests in |
Looking into the future and since the linalg tests are already so heavy, what about having a directory @tkelman : Do you have a good guess what the errors on windows are about? |
As mentioned, I think that we should work towards a structure where the test files corresponds to the files in base. Some of the confusion with the sparse stuff is that we both have the base/sparse directory and the base/linalg/sparse.jl, -unfpack.jl and -cholmod.jl files. I'd be okay with collecting all sparse definitions to the sparse directory. We should also hear what @ViralBShah has to say here. |
@acroy no idea. I get the same |
What the |
I am OK with having all sparse stuff in one directory, including linear algebra. |
For some reason Cholmod on my Mac doesn't support Float32s. @ViralBShah : This should concern |
I am a bit confused, but maybe this is as simple as that: in the documentation (section 8, first paragraph) it says
Although there is a constant (
So I guess that means that we have to remove |
Interesting. I did not know that. We should remove |
The tests on windows are still failing. The Travis linux build fails for |
The |
I think the Not sure exactly where the failure is happening, but maybe we can try to create a standalone C reproduction case to see if it's an upstream bug? I don't know if SuiteSparse has a mailing list or issue tracker of any kind though. |
@tkelman Yes, Iagree. The tolerance should be adjusted a bit, but it shouldn't be a concern for this PR. |
@tkelman Maybe the demos in |
I meant a reproduction of how we're triggering this error. Here's a better backtrace on release-0.3 https://gist.github.com/tkelman/18b8226652251afc7bee showing that it seems this was already broken and untested, your changes don't appear to have made anything worse at least. |
else | ||
const CholmodIndexTypes = (:Int32, :Int64) | ||
end | ||
typealias CHMITypes Union([eval(Ti) for Ti in CholmodIndexTypes]...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to do this without eval
? Put it inside the if
perhaps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I can put the typealias
inside the if
. symbol(::Type{T})
would be really handy.
This worked for me on win32 and win64 without the changes to @andreasnoack and @dmbates could you look over the changes to |
…ndex types based on size of SuitSparse_long. Test adjusted.
# check the size of SuiteSparse_long | ||
if int(ccall((:jl_cholmod_sizeof_long,:libsuitesparse_wrapper),Csize_t,())) == 4 | ||
const CholmodIndexTypes = (:Int32, ) | ||
typealias CHMITypes Union(Int32) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks odd. Why the Union
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for symmetry reasons :-) I can remove the Unions if you want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it look odd, but I don't think it matters.
As far as I can see, the changes are good. |
Is this ready for merging? |
I think so. It will break AppVeyor for as long as it takes to rebuild a new nightly with updated suitesparse wrapper. We might need to manually clear out the buildbot's copy. |
@tkelman Is there a way to avoid that? If not then let's go ahead and merge. |
We can ask @staticfloat to manually build a nightly from this branch and make sure it gets pushed to status.julialang.org first? I do have a login to the buildbot but I'm not sure how I would go about doing that yet. |
It should take about 45 minutes to an hour for your merge here to result in a new build available on status.julialang.org, so I say go ahead and just merge it. If you need to clean the deps, you can do so by logging in to the buildbot and using the new "clean arpack/openblas/suitesparse" force builds available from this page. So just run that right before you merge this, and you should be good to go. |
Awesome, thanks for adding the cleaners. Based on some local testing, I think the usual |
Fix issues with A_mul_Bc and Ac_mul_B for CholmodSparse (#9160).
Thanks everyone! Do you think that this is worth to be back ported to 0.3? |
I think so, since it was pretty buggy before. @JuliaBackports @ivarne what's your opinion? I suspect since the linalg tests have been rearranged on master it won't be a clean cherry-pick, could you prepare it as a new PR against release-0.3? And since the buildbots don't make new binaries off of the release branch all that often, I'll probably want to tweak appveyor to recompile just the suitesparse wrapper. |
@staticfloat the ubuntu and centos builders look stuck in a "Retry exception slave lost" death loop? Funny how I previously wanted to make sure release-0.3 manual builds wouldn't get uploaded as nightly, now I do want a manually-triggered nightly... |
|
Sometimes you can do |
with a hack so the rest of suitesparse doesn't rebuild
backported in c5158b8, pretty sure I resolved the conflicts right (passed tests on linux32 and win64, checking appveyor and travis now for the rest) |
As described in the title. Is there any test for Cholmod related functions?