About ITensorGPU installation

Hi,
I am trying to install ITensorGPU. I followed steps

julia> using CUDA.CUTENSOR

julia> CUTENSOR.has_cutensor()
true

julia> CUTENSOR.version()
v"1.4.0"

julia> ]

pkg> add ITensorGPU

julia> ]
pkg> test ITensorGPU

ERROR: LoadError: Some tests did not pass: 7 passed, 0 failed, 118 errored, 0 broken.
in expression starting at /home/user/.julia/packages/ITensorGPU/x2HNJ/test/runtests.jl:4
ERROR: Package ITensorGPU errored during testing

But I get this error.

Thanks for letting us know. Of course, that result only means that some of the tests are not passing, but this does not in principle mean that you cannot use the code or that it is not installed. Please go ahead and try to use it for the use case you planned, and let us know if you run into any issues then.

Hello @vrushali.k, I would like to help understand why these tests failed. Can you please report some information about your versions for me. You can find this information by executing the commands versioninfo() and using CUDA; CUDA.versioninfo() .
I don’t really know how you are using

I used code dmrg.jl given in the Examples directory . I get an error
at step “H = gpu(MPO(ampo, sites))”

“ERROR: MethodError: no method matching to_shape(::NTuple{4, Index{Int64}})”

Julia Version 1.8.3

CUDA.versioninfo() .
CUDA toolkit 11.6, artifact installation
NVIDIA driver 530.30.2, for CUDA 12.1
CUDA driver 12.1

I am not able to replicate this error using the same versions of Julia and CUDA running the dmrg.jl examples code. Are you using the main branch of ITensors.jl? I am also confused how you successfully executed the line using CUDA.CUTENSOR.
Can you load ITensors (using ITensors)? When was the last time you updated your branch with Master. We are finding some issues with CUDA v4.1 and they can be easily avoided, for now, by limiting the version of CUDA.jl to 4.0.1

Sorry, but I don’t understand. Can you guide me step by step?

First question: Are you using the main branch of ITensors, i.e. how did you download ITensors?
If you haven’t, can you please type in your julia REPL ]up . Doing this will update your version of ITensors.
Next question: Can you please show me the output of this command ]status CUDA
Final question: Is there any output if you type the commands using ITensors and using ITensorGPU

Ans.1:ITensors Downloaded using

~ julia

julia> ] pkg> add ITensors

Ans2:

pkg> status CUDA
Status `~/.julia/environments/v1.8/Project.toml` ⌅ [052768ef] CUDA v3.8.5 Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated`

Ans.3: there no output for commands using ITensors and using ITensorGPU

What happens when you type the command ]up in your REPL?
It looks like your CUDA.jl version is out of date, ITensorGPU requires a version of at least v"4.0" and you are using v"3.8.5"

]up:

Updating registry at ~/.julia/registries/General.toml
Updating git-repo https://github.com/JuliaGPU/GPUArrays.jl.git
Updating git-repo https://github.com/ITensor/ITensorsGPU.jl.git
No Changes to ~/.julia/environments/v1.8/Project.toml
No Changes to ~/.julia/environments/v1.8/Manifest.toml
[ Info: We haven’t cleaned this depot up for a bit, running Pkg.gc()…
Active manifest files: 3 found
Active artifact files: 22 found
Active scratchspaces: 4 found
Deleted 23 package installations (16.385 MiB)
Deleted 2 repos (5.826 MiB)

Does this fix any problems? Can you try running the commands
using ITensorGPU; using Pkg; Pkg.test("ITensorGPU")

ERROR: LoadError: Some tests did not pass: 7 passed, 0 failed, 118 errored, 0 broken.
in expression starting at /home/user/.julia/packages/ITensorGPU/x2HNJ/test/runtests.jl:4
ERROR: Package ITensorGPU errored during testing
Stacktrace:
[1] pkgerror(msg::String)
@ Pkg.Types /opt/julia-1.8.3/share/julia/stdlib/v1.8/Pkg/src/Types.jl:67
[2] test(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; coverage::Bool, julia_args::Cmd, test_args::Cmd, test_fn::Nothing, force_latest_compatible_version::Bool, allow_earlier_backwards_compatible_versions::Bool, allow_reresolve::Bool)
@ Pkg.Operations /opt/julia-1.8.3/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:1813
[3] test(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; coverage::Bool, test_fn::Nothing, julia_args::Cmd, test_args::Cmd, force_latest_compatible_version::Bool, allow_earlier_backwards_compatible_versions::Bool, allow_reresolve::Bool, kwargs::Base.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})
@ Pkg.API /opt/julia-1.8.3/share/julia/stdlib/v1.8/Pkg/src/API.jl:434
[4] test(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API /opt/julia-1.8.3/share/julia/stdlib/v1.8/Pkg/src/API.jl:156
[5] test(pkgs::Vector{Pkg.Types.PackageSpec})
@ Pkg.API /opt/julia-1.8.3/share/julia/stdlib/v1.8/Pkg/src/API.jl:145
[6] #test#87
@ /opt/julia-1.8.3/share/julia/stdlib/v1.8/Pkg/src/API.jl:144 [inlined]
[7] test
@ /opt/julia-1.8.3/share/julia/stdlib/v1.8/Pkg/src/API.jl:144 [inlined]
[8] #test#86
@ /opt/julia-1.8.3/share/julia/stdlib/v1.8/Pkg/src/API.jl:143 [inlined]
[9] test(pkg::String)
@ Pkg.API /opt/julia-1.8.3/share/julia/stdlib/v1.8/Pkg/src/API.jl:143
[10] top-level scope
@ REPL[3]:1
[11] top-level scope
@ ~/.julia/packages/CUDA/5jdFl/src/initialization.jl:52

@vrushali.k Can you please send the full stack of output from Pkg.test("ITensorGPU") This is not enough information to diagnose the problem