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

Offset calculation in suitesparse_wrapper #10347

Closed
andreasnoack opened this issue Feb 27, 2015 · 6 comments
Closed

Offset calculation in suitesparse_wrapper #10347

andreasnoack opened this issue Feb 27, 2015 · 6 comments
Labels
bug Indicates an unexpected problem or unintended behavior sparse Sparse arrays

Comments

@andreasnoack
Copy link
Member

I think that the way we are calculating the offsets in suitesparse_wrapper.c is broken because the offsets are calculated for the machine where suitesparse_wrapper.c is compiled. These offsets need not be the same when Julia is from a repository because the version of SuiteSparse can be different from the machine where the package was build.

This can be seen on Julia release on Ubuntu where CHOLMOD objects are printed wrongly because the print level is set in specific location in a vector and this location has changed over time because the cholmod_common_struct has changed over time.

@andreasnoack andreasnoack added bug Indicates an unexpected problem or unintended behavior sparse Sparse arrays labels Feb 27, 2015
@andreasnoack
Copy link
Member Author

@staticfloat I tend to think that this is mainly a packaging issue. The suitesparse_wrapper shim is correct when build together with the linked SuiteSparse, but not when the library is substituted. Do you know how we can handle this?

@dmbates
Copy link
Member

dmbates commented Feb 27, 2015

If the libcholmod is sufficiently recent to have a cholmod_version function then you can pass the three integers in the Julia array version_array to calls to functions defined in SuiteSparse_wrapper.c and compare the three integers to CHOLMOD_MAIN_VERSION, CHOLMOD_SUB_VERSION and CHOLMOD_SUBSUB_VERSION. If they don't match then all bets are off. Also, if the version of cholmod in the shared library is too old to have a cholmod_version function then all bets are off.

@andreasnoack
Copy link
Member Author

We should check this when Julia is launched, and, as mentioned in the other issue, not (only) when the system image is build, but I don't how to do that.

@ivarne
Copy link
Member

ivarne commented Feb 27, 2015

See

function __init__()
, for a partially working solution. The only problem is that the error is misleading, as it won't terminate the program, but just print a warning.

@andreasnoack
Copy link
Member Author

@ivarne Thanks. That was exactly what I was looking for.

@andreasnoack
Copy link
Member Author

I think the best we can do here is #10362, so I'll close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior sparse Sparse arrays
Projects
None yet
Development

No branches or pull requests

3 participants