Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Trouble Installing Oceananigans #4133

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

Closed
kenflat2 opened this issue Feb 25, 2025 · 7 comments
Closed

Trouble Installing Oceananigans #4133

kenflat2 opened this issue Feb 25, 2025 · 7 comments

Comments

@kenflat2
Copy link

kenflat2 commented Feb 25, 2025

If I start with an empty Julia environment and run

add Oceananigans

I get the following error:

Resolving package versions...
    Updating `/net/flood/home/kengee/.julia/environments/v1.10/Project.toml`
ERROR: KeyError: key "KernelAbstractions" not found
Stacktrace:
  [1] getindex
    @ ./dict.jl:498 [inlined]
  [2] status_ext_info(pkg::Pkg.Types.PackageSpec, env::Pkg.Types.EnvCache)
    @ Pkg.Operations /net/halo/local/14.04/apps/julia/julia-1.10.4/share/julia/stdlib/v1.10/Pkg/src/Operations.jl:2214
  [3] print_status(env::Pkg.Types.EnvCache, old_env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, header::Symbol, uuids::Vector{Base.UUID}, names::Vector{String}; manifest::Bool, diff::Bool, ignore_indent::Bool, outdated::Bool, extensions::Bool, io::Base.TTY, mode::Pkg.Types.PackageMode, hidden_upgrades_info::Bool, show_usagetips::Bool)
    @ Pkg.Operations /net/halo/local/14.04/apps/julia/julia-1.10.4/share/julia/stdlib/v1.10/Pkg/src/Operations.jl:2299
  [4] print_status
    @ /net/halo/local/14.04/apps/julia/julia-1.10.4/share/julia/stdlib/v1.10/Pkg/src/Operations.jl:2241 [inlined]
  [5] status(env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}; header::Symbol, mode::Pkg.Types.PackageMode, git_diff::Bool, env_diff::Pkg.Types.EnvCache, ignore_indent::Bool, io::Base.TTY, outdated::Bool, extensions::Bool, hidden_upgrades_info::Bool, show_usagetips::Bool)
    @ Pkg.Operations /net/halo/local/14.04/apps/julia/julia-1.10.4/share/julia/stdlib/v1.10/Pkg/src/Operations.jl:2472
  [6] status (repeats 2 times)
    @ /net/halo/local/14.04/apps/julia/julia-1.10.4/share/julia/stdlib/v1.10/Pkg/src/Operations.jl:2443 [inlined]
  [7] #show_update#167
    @ /net/halo/local/14.04/apps/julia/julia-1.10.4/share/julia/stdlib/v1.10/Pkg/src/Operations.jl:2439 [inlined]
  [8] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, new_git::Set{Base.UUID}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform)
    @ Pkg.Operations /net/halo/local/14.04/apps/julia/julia-1.10.4/share/julia/stdlib/v1.10/Pkg/src/Operations.jl:1398
  [9] add
    @ /net/halo/local/14.04/apps/julia/julia-1.10.4/share/julia/stdlib/v1.10/Pkg/src/Operations.jl:1377 [inlined]
 [10] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::@Kwargs{io::Base.TTY})
    @ Pkg.API /net/halo/local/14.04/apps/julia/julia-1.10.4/share/julia/stdlib/v1.10/Pkg/src/API.jl:278
 [11] add(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::@Kwargs{})
    @ Pkg.API /net/halo/local/14.04/apps/julia/julia-1.10.4/share/julia/stdlib/v1.10/Pkg/src/API.jl:159
 [12] add(pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.API /net/halo/local/14.04/apps/julia/julia-1.10.4/share/julia/stdlib/v1.10/Pkg/src/API.jl:148
 [13] do_cmd!(command::Pkg.REPLMode.Command, repl::REPL.LineEditREPL)
    @ Pkg.REPLMode /net/halo/local/14.04/apps/julia/julia-1.10.4/share/julia/stdlib/v1.10/Pkg/src/REPLMode/REPLMode.jl:412
 [14] do_cmd(repl::REPL.LineEditREPL, input::String; do_rethrow::Bool)
    @ Pkg.REPLMode /net/halo/local/14.04/apps/julia/julia-1.10.4/share/julia/stdlib/v1.10/Pkg/src/REPLMode/REPLMode.jl:390
 [15] do_cmd
    @ /net/halo/local/14.04/apps/julia/julia-1.10.4/share/julia/stdlib/v1.10/Pkg/src/REPLMode/REPLMode.jl:380 [inlined]
 [16] (::Pkg.REPLMode.var"#24#27"{REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::IOBuffer, ok::Bool)
    @ Pkg.REPLMode /net/halo/local/14.04/apps/julia/julia-1.10.4/share/julia/stdlib/v1.10/Pkg/src/REPLMode/REPLMode.jl:557
 [17] #invokelatest#2
    @ ./essentials.jl:892 [inlined]
 [18] invokelatest
    @ ./essentials.jl:889 [inlined]
 [19] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
    @ REPL.LineEdit /net/halo/local/14.04/apps/julia/julia-1.10.4/share/julia/stdlib/v1.10/REPL/src/LineEdit.jl:2656
 [20] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
    @ REPL /net/halo/local/14.04/apps/julia/julia-1.10.4/share/julia/stdlib/v1.10/REPL/src/REPL.jl:1312
 [21] (::REPL.var"#62#68"{REPL.LineEditREPL, REPL.REPLBackendRef})()
    @ REPL /net/halo/local/14.04/apps/julia/julia-1.10.4/share/julia/stdlib/v1.10/REPL/src/REPL.jl:386

If I start again from an empty project and run

add KernelAbstractions

it installs fine. Adding Oceananigans leads to the same error as above.

@kenflat2
Copy link
Author

kenflat2 commented Feb 25, 2025

Using any version earlier than the present one fixes the issue (such as v0.95.11). But, a warning of a circular dependence which includes KernelAbstractions is thrown.

┌ Warning: Circular dependency detected. Precompilation will be skipped for:
│   SparseArraysExt [85068d23-b5fb-53f1-8204-05c2aba6942f]
│   StructArraysGPUArraysCoreExt [cbbf52aa-d660-55d4-8a5a-33845bbaa85d]
│   AtomixCUDAExt [13011619-4c7c-5ef0-948f-5fc81565cd05]
│   CUDAExt [11b7e2e0-d079-575b-885e-0ab22ef3252c]
│   LinearAlgebraExt [66d79d19-2cc4-5b0b-ac7a-b340256d1ecd]
│   GPUArrays [0c68f7d7-f131-5f86-a1c3-88cf8149b2d7]
│   KernelAbstractions [63c18a36-062a-441e-b654-da1e3ab1ce7c]
│   Oceananigans [9e8cae18-63c1-5223-a75c-80ca9d6e9a09]
│   StructArraysSparseArraysExt [d5b9410b-929f-5d61-aab8-0598522fd334]
│   StructArraysAdaptExt [f04e5bcb-ab32-5a64-8b64-c2cc4abec66e]
│   StructArraysLinearAlgebraExt [084ded39-0575-5459-ba0f-7a4568fdaad8]
│   CUDA [052768ef-5323-5732-b1bb-66c8b64840ba]
│   StructArraysStaticArraysExt [d1e1e8be-46cf-5459-abb8-be6c7518b661]
└ @ Pkg.API /net/halo/local/14.04/apps/julia/julia-1.10.4/share/julia/stdlib/v1.10/Pkg/src/API.jl:1239

@glwagner
Copy link
Member

Can you format your code with triple backticks? (```)

@glwagner
Copy link
Member

I suggest moving this to a discussion because it is unlikely to be an issue with source code... however, solving this may have important lessons for others so it would be nice to have a more persistent discussion open.

I think the first question is what version of Julia? Try using 1.10.8.

@kenflat2
Copy link
Author

I am running 1.10.4 right now.

@glwagner
Copy link
Member

I don't think that will work. You will likely need to upgrade to 1.10.8.

@kenflat2
Copy link
Author

Upgrading to 1.10.8 fixed the problem.

@glwagner
Copy link
Member

Excellent! I'll convert this to a discussion so others can find it

@CliMA CliMA locked and limited conversation to collaborators Feb 27, 2025
@glwagner glwagner converted this issue into a discussion Feb 27, 2025
@glwagner glwagner reopened this Feb 27, 2025
@navidcy navidcy converted this issue into discussion #4234 Mar 17, 2025

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants