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

Wrong determination of version number in CHOLMOD #10348

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

Wrong determination of version number in CHOLMOD #10348

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

Comments

@andreasnoack
Copy link
Member

The version number is determined at compile time, which is not correct when Julia is from a repository where SuiteSparse/CHOLMOD could be different from the machine where the package is build.

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

dmbates commented Feb 27, 2015

If the shared library provides a C function cholmod_version then that is used. The compiled-in values are there only for old versions of the shared library. It is quite likely that things will blow up if you need to use such a version.

@andreasnoack
Copy link
Member Author

I was not precise here. When talking about compile, I was referring to the time when the system image is build. The relevant lines in cholmod.jl are

const chm_ver    = Array(Cint, 3)
if dlsym(dlopen("libcholmod"), :cholmod_version) != C_NULL
    ccall((:cholmod_version, :libcholmod), Cint, (Ptr{Cint},), chm_ver)
else
    ccall((:jl_cholmod_version, :libsuitesparse_wrapper), Cint, (Ptr{Cint},), chm_ver)
end

and I think this means that chm_ver is encoded when the system image is build, not when Julia is launched. Hence the version in chm_ver need not match the actual version of CHOLMOD that is actually loaded when Julia runs.

@andreasnoack
Copy link
Member Author

Fixed by #10362

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

2 participants