Cannot install CUDAnative with Pkg3 (Pkg can)

I tried Pkg3 with a local built master branch. But I cannot install CUDAnative with it. It seems that the version does not match? But I can install it with Pkg.

Here is the error:

julia> Pkg3.add("CuArrays")
  Updating registry at `~/.julia/registries/Uncurated`
  Updating git-repo `https://github.com/JuliaRegistries/Uncurated.git`
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package CuArrays [3a865a2d]:
 CuArrays [3a865a2d] log:
 ├─possible versions are: [0.1.0-0.1.1, 0.2.0-0.2.1, 0.3.0, 0.4.0, 0.5.0] or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions [0.1.0-0.1.1, 0.2.0-0.2.1, 0.3.0, 0.4.0, 0.5.0]
 ├─restricted by compatibility requirements with CUDAapi [3895d2a7] to versions: [0.1.0-0.1.1, 0.4.0, 0.5.0] or uninstalled, leaving only versions: [0.1.0-0.1.1, 0.4.0, 0.5.0]
 │ └─CUDAapi [3895d2a7] log:
 │   ├─possible versions are: [0.1.0-0.1.3, 0.2.0-0.2.1, 0.3.0-0.3.1, 0.4.0-0.4.2] or uninstalled
 │   ├─restricted by compatibility requirements with CUDAnative [be33ccc6] to versions: 0.4.0-0.4.2
 │   │ └─CUDAnative [be33ccc6] log:
 │   │   ├─possible versions are: [0.1.0-0.1.3, 0.2.0, 0.3.0-0.3.1, 0.4.0-0.4.2, 0.5.0-0.5.5, 0.6.0-0.6.3, 0.7.0, 0.8.0-0.8.1] or uninstalled
 │   │   └─restricted to versions 0.8.1 by an explicit requirement, leaving only versions 0.8.1
 │   └─restricted by compatibility requirements with CUDAdrv [c5f51814] to versions: 0.4.2
 │     └─CUDAdrv [c5f51814] log:
 │       ├─possible versions are: [0.1.0-0.1.1, 0.2.0-0.2.4, 0.3.0-0.3.1, 0.4.0-0.4.2, 0.5.0-0.5.4, 0.6.0-0.6.1, 0.7.0-0.7.8, 0.8.0-0.8.3] or uninstalled
 │       ├─restricted by compatibility requirements with CuArrays [3a865a2d] to versions: [0.5.0-0.5.4, 0.6.0-0.6.1, 0.7.0-0.7.8, 0.8.0-0.8.3]
 │       │ └─CuArrays [3a865a2d] log: see above
 │       └─restricted by compatibility requirements with CUDAnative [be33ccc6] to versions: 0.8.3
 │         └─CUDAnative [be33ccc6] log: see above
 ├─restricted by compatibility requirements with CUDAdrv [c5f51814] to versions: [0.4.0, 0.5.0] or uninstalled, leaving only versions: [0.4.0, 0.5.0]
 │ └─CUDAdrv [c5f51814] log: see above
 └─restricted by compatibility requirements with CUDAapi [3895d2a7] to versions: 0.1.0-0.1.1 or uninstalled — no versions left
   └─CUDAapi [3895d2a7] log: see above

Stacktrace:
 [1] #propagate_constraints!#61(::Bool, ::Function, ::Pkg3.GraphType.Graph, ::Set{Int64}) at /home/roger/Repo/julia-git/usr/share/julia/stdlib/v0.7/Pkg3/src/GraphType.jl:1005
 [2] propagate_constraints! at /home/roger/Repo/julia-git/usr/share/julia/stdlib/v0.7/Pkg3/src/GraphType.jl:946 [inlined]
 [3] #simplify_graph!#123(::Bool, ::Function, ::Pkg3.GraphType.Graph, ::Set{Int64}) at /home/roger/Repo/julia-git/usr/share/julia/stdlib/v0.7/Pkg3/src/GraphType.jl:1460
 [4] simplify_graph! at /home/roger/Repo/julia-git/usr/share/julia/stdlib/v0.7/Pkg3/src/GraphType.jl:1460 [inlined] (repeats 2 times)
 [5] resolve_versions!(::Pkg3.Types.Context, ::Array{Pkg3.Types.PackageSpec,1}) at /home/roger/Repo/julia-git/usr/share/julia/stdlib/v0.7/Pkg3/src/Operations.jl:287
 [6] #add_or_develop#54(::Array{Base.UUID,1}, ::Function, ::Pkg3.Types.Context, ::Array{Pkg3.Types.PackageSpec,1}) at /home/roger/Repo/julia-git/usr/share/julia/stdlib/v0.7/Pkg3/src/Operations.jl:963
 [7] #add_or_develop at ./<missing>:0 [inlined]
 [8] #add_or_develop#8(::Symbol, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg3.Types.Context, ::Array{Pkg3.Types.PackageSpec,1}) at /home/roger/Repo/julia-git/usr/share/julia/stdlib/v0.7/Pkg3/src/API.jl:38
 [9] #add_or_develop at ./<missing>:0 [inlined]
 [10] #add_or_develop#7 at /home/roger/Repo/julia-git/usr/share/julia/stdlib/v0.7/Pkg3/src/API.jl:22 [inlined]
 [11] #add_or_develop at ./<missing>:0 [inlined]
 [12] #add_or_develop#6 at /home/roger/Repo/julia-git/usr/share/julia/stdlib/v0.7/Pkg3/src/API.jl:21 [inlined]
 [13] #add_or_develop at ./<missing>:0 [inlined]
 [14] #add_or_develop#5 at /home/roger/Repo/julia-git/usr/share/julia/stdlib/v0.7/Pkg3/src/API.jl:20 [inlined]
 [15] (::getfield(Pkg3.API, Symbol("#kw##add_or_develop")))(::NamedTuple{(:mode,),Tuple{Symbol}}, ::typeof(Pkg3.API.add_or_develop), ::String) at ./<missing>:0
 [16] #add#9(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::String, ::Vararg{String,N} where N) at /home/roger/Repo/julia-git/usr/share/julia/stdlib/v0.7/Pkg3/src/API.jl:43
 [17] add(::String, ::Vararg{String,N} where N) at /home/roger/Repo/julia-git/usr/share/julia/stdlib/v0.7/Pkg3/src/API.jl:43
 [18] top-level scope

I might be misinterpreting this output, but it seems like CUDAnative is forced at 0.8.1 (“by an explicit requirement”, whatever that means), which forces a CUDAapi version that is incompatible with current CuArrays.

Also, you seem to be working with Julia 0.7, which CuArrays/GPUArrays in general isn’t compatible with. CUDAnative itself is.

There’s been a small bugfix to how the dependencies are collected in Pkg3 on a recent master. I have no problems adding the package on latest master:

julia> Pkg3.add("CuArrays")
  Updating registry at `~/.julia/registries/Uncurated`
  Updating git-repo `https://github.com/JuliaRegistries/Uncurated.git`
 Resolving package versions...
Downloaded AbstractFFTs ─ v0.2.1
Downloaded Adapt ──────── v0.2.0
Downloaded CUDAapi ────── v0.4.1
Downloaded GPUArrays ──── v0.2.4
Downloaded NNlib ──────── v0.3.0
Downloaded CUDAdrv ────── v0.8.1
Downloaded CuArrays ───── v0.5.0
Downloaded CUDAnative ─── v0.7.0
Downloaded MacroTools ─── v0.4.0
Downloaded LLVM ───────── v0.9.8
...
1 Like

Yeah, I was testing if it works on v0.7, because I want to use it in my package. It seems that I cannot build CuArrays on v0.7 indeed.

What’s your versioninfo?

CuArrays should work on the most recent 0.6.

For 0.7, you’ll have to wait on https://github.com/JuliaGPU/GPUArrays.jl/pull/108 before CuArrays works. But as I said, CUDAnative should work just fine on a recent checkout.

I see, thanks for the reply!