ITensorTDVP installing error

Hi, I am trying to install ITensorTDVP package to run some calculations of ITensorAGP.
However, I am not able to install the package. I am getting the following error :
ERROR: LoadError: UndefVarError: check_hascommoninds not defined
Stacktrace:
[1] include
@ ./Base.jl:495 [inlined]
[2] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::String)
@ Base ./loading.jl:2222
[3] top-level scope
@ stdin:3
in expression starting at /Users/bhargava.balaganchi/.julia/packages/ITensorTDVP/V1Kco/src/ITensorTDVP.jl:1
in expression starting at stdin:3
ERROR: LoadError: Failed to precompile ITensorTDVP [25707e16-a4db-4a07-99d9-4d67b7af0342] to “/Users/bhargava.balaganchi/.julia/compiled/v1.10/ITensorTDVP/jl_uSDeca”.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
@ Base ./loading.jl:2468
[3] compilecache
@ ./loading.jl:2340 [inlined]
[4] (::Base.var"#968#969"{Base.PkgId})()
@ Base ./loading.jl:1974
[5] mkpidlock(f::Base.var"#968#969"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
@ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.2+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:93
[6] #mkpidlock#6
@ ~/.julia/juliaup/julia-1.10.2+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:88 [inlined]
[7] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
@ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.2+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:111
[8] #invokelatest#2
@ ./essentials.jl:894 [inlined]
[9] invokelatest
@ ./essentials.jl:889 [inlined]
[10] maybe_cachefile_lock(f::Base.var"#968#969"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
@ Base ./loading.jl:2983
[11] maybe_cachefile_lock
@ ./loading.jl:2980 [inlined]
[12] _require(pkg::Base.PkgId, env::String)
@ Base ./loading.jl:1970
[13] __require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:1812
[14] #invoke_in_world#3
@ ./essentials.jl:926 [inlined]
[15] invoke_in_world
@ ./essentials.jl:923 [inlined]
[16] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:1803
[17] macro expansion
@ ./loading.jl:1790 [inlined]
[18] macro expansion
@ ./lock.jl:267 [inlined]
[19] __require(into::Module, mod::Symbol)
@ Base ./loading.jl:1753
[20] #invoke_in_world#3
@ ./essentials.jl:926 [inlined]
[21] invoke_in_world
@ ./essentials.jl:923 [inlined]
[22] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1746
in expression starting at /Users/bhargava.balaganchi/Documents/Project1_transverse_Ising/code/learn_Itensor.jl:2

It looks like there is something missing in the package. Presumably due to package compatibility.
Since I am to new to Julia in general, is it possible to help me figure out what is happening here? And install the package?

Could you try updating all of your packages with using Pkg; Pkg.update()?

Updating also seems to have an error. But the error is from ITensorAGP package.
Precompiling project…
âś— ITensorAGP
7 dependencies successfully precompiled in 17 seconds. 131 already precompiled. 1 skipped during auto due to previous errors.
1 dependency errored.
For a report of the errors see julia> err. To retry use pkg> precompile
Info We haven’t cleaned this depot up for a bit, running Pkg.gc()…
Active manifest files: 2 found
Active artifact files: 12 found
Active scratchspaces: 2 found
Deleted no artifacts, repos, packages or scratchspaces.

I later tried to update the ITensorTDVP. However, there is the same error again.

I see, ITensorAGP.jl was configured to hold back the version of ITensorTDVP. Please try pulling the latest version of ITensorAGP.jl, updating all of your package, and see if that helps.

Hi, thanks a lot for the help. I updated all the packages. It looks like everything was updated successfully. I also ran the example code from the Git repository. Everything seems fine except for this warning :
WARNING: Method definition update!(ITensors.ITensorMPS.AbstractObserver) in module ITensorMPS at /Users/bhargava.balaganchi/.julia/packages/ITensors/jmIjr/src/ITensorMPS/update_observer.jl:3 overwritten in module ITensorTDVP at /Users/bhargava.balaganchi/.julia/packages/ITensorTDVP/OmMNj/src/update_observer.jl:4.

ERROR: Method overwriting is not permitted during Module precompilation. Use __precompile__(false) to opt-out of precompilation.

However, the code produced an output which looks fine. But again this also looks like a small hiccup with package compatibilities.

Glad that worked. We are aware of that warning, it won’t cause any problems for your code and will be fixed in the next ITensors.jl release by [ITensorMPS] Make ITensorTDVP functions into compatibility layer by emstoudenmire · Pull Request #1371 · ITensor/ITensors.jl · GitHub.

Thanks a lot for the help and letting me know about the warning. :slight_smile:

1 Like