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

Cannot Install CuClarabel in Julia #13

Open
jiachangliu opened this issue Jan 26, 2025 · 3 comments
Open

Cannot Install CuClarabel in Julia #13

jiachangliu opened this issue Jan 26, 2025 · 3 comments

Comments

@jiachangliu
Copy link

Hello,

Thanks for developing this package! I tried installing CuClarabel by using the command suggested in the README:

pkg> dev https://github.com/cvxgrp/CuClarabel.git

However, I met with the following error message:

ERROR: Unsatisfiable requirements detected for package HSL [34c5aeac]:
 HSL [34c5aeac] log:
 ├─possible versions are: 0.1.0-0.3.6 or uninstalled
 └─restricted to versions 0.4 by Clarabel [61c947e1] — no versions left
   └─Clarabel [61c947e1] log:
     ├─possible versions are: 0.9.0 or uninstalled
     └─Clarabel [61c947e1] is fixed to version 0.9.0

What should I do to resolve this message? My Julia version is 1.10.4.

Thanks!

@goulart-paul
Copy link
Collaborator

It's claiming that HSL is only available in version 0.1.0-0.3.6, but Clarabel wants 0.4. I don't really understand why that's happening, but the current version of HSL is v0.5 on juliahub.

HSL isn't actually necessary for Clarabel to work since it is a package that provides an optional solver interface. It might work if you just delete that dependency from the Clarabel.jl Project.toml file, but you shouldn't really need to do that.

What happens if you just add the HSL package directly via the package manager?

@jiachangliu
Copy link
Author

jiachangliu commented Feb 6, 2025

Thank you for the reply.

Here are the exact steps to reproduce the error:

conda create --name Clarabel_gpu -c conda-forge python=3.10 numpy cupy julia
conda activate Clarabel_gpu
julia
(@Clarabel_gpu) pkg> dev https://github.com/cvxgrp/CuClarabel.git

If I do the above steps, I encountered the error I mentioned last time:

Cloning git-repo `https://github.com/cvxgrp/CuClarabel.git`
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package HSL [34c5aeac]:
 HSL [34c5aeac] log:
 ├─possible versions are: 0.1.0-0.3.6 or uninstalled
 └─restricted to versions 0.4 by Clarabel [61c947e1] — no versions left
   └─Clarabel [61c947e1] log:
     ├─possible versions are: 0.9.0 or uninstalled
     └─Clarabel [61c947e1] is fixed to version 0.9.0

If I add HSL inside Julia using the following command:

using Pkg
Pkg.build("HSL")

I encounter the following error message:

    Building HSL → `/usr/xtmp/jl888/miniconda3/envs/Clarabel_gpu/share/julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/3f148e03378934a63a7f327755627ea3c6df4cd9/build.log`
Precompiling project...
  1 dependency successfully precompiled in 2 seconds. 8 already precompiled.
  1 dependency had output during precompilation:
┌ HSL
│  ┌ Warning: CHOLMOD version incompatibility
│  │
│  │ Julia was compiled with CHOLMOD version 4.0.4. It is
│  │ currently linked with version 5.3.0.
│  │ This might cause Julia to terminate when working with
│  │ sparse matrix factorizations, e.g. solving systems of
│  │ equations with \.
│  │
│  │ It is recommended that you use Julia with the same major
│  │ version of CHOLMOD as the one used during the build, or
│  │ download the generic binaries from www.julialang.org,
│  │ which ship with the correct versions of all dependencies.
│  └ @ SparseArrays.CHOLMOD /usr/project/xtmp/jl888/miniconda3/envs/Clarabel_gpu/share/julia/stdlib/v1.10/SparseArrays/src/solvers/cholmod.jl:206
│  ┌ Error: HSL library not properly installed. Please run Pkg.build("HSL")
│  └ @ HSL /usr/xtmp/jl888/miniconda3/envs/Clarabel_gpu/share/julia/packages/HSL/QUaxT/src/HSL.jl:14
└

Okay, based on this feedback, my last attempt is to install Julia not through conda but through Julia's official website:

curl -fsSL https://install.julialang.org | sh

Now, inside Julia, if I try to install the gpu-versioned clarabel, I encounter the following error:

(@v1.11) pkg> dev https://github.com/cvxgrp/CuClarabel.git
     Cloning git-repo `https://github.com/cvxgrp/CuClarabel.git`
   Resolving package versions...
ERROR: cannot find name corresponding to UUID 10745b16-79ce-11e8-11f9-7d13ad32a3b2 in a registry

@goulart-paul
Copy link
Collaborator

I am now even more confused about the source of the problem. I still don't understand why the package manager only knows about HSL up to v0.3.6, since there are versions up to least v0.5. The stuff about CHOLMOD doesn't seem to have anything to do with CuClarabel but is perhaps some more general Julia issue -- what happens if you just do this?:

using SparseArrays
ldlt(sprandn(1,1,1.))

The UUID 10745b16-79ce-11e8-11f9-7d13ad32a3b2 appears to be for the Statistics.jl package, which we don't have as a direct dependency.

In any case, I made a branch here that just disables HSL entirely : https://github.com/cvxgrp/CuClarabel/tree/pg/no_hsl. HSL is only meant to give an additional linear solver option, and is not otherwise required. Since you are trying to use the GPU version of the solver, presumably you would not want to configure to solve with HSL anyway.

As an aside, this issue would maybe go away if we could resolve oxfordcontrol/Clarabel.jl#178 satisfactorily using weakdeps, but that seems like it might not be possible.

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

No branches or pull requests

2 participants