Oceananigans.jl: Failed to precompile GPUArrays, CUDA, Oceananigans on macOS

Created on 13 Aug 2020  路  6Comments  路  Source: CliMA/Oceananigans.jl

I was just trying to precompile Oceananigans 0.34.1 on my macOS 10.15.6 machine and got the following error:

julia> using Oceananigans
[ Info: Precompiling Oceananigans [9e8cae18-63c1-5223-a75c-80ca9d6e9a09]
ERROR: LoadError: LoadError: too many parameters for type
Stacktrace:
 [1] top-level scope at /Users/truedichotomy/.julia/packages/GPUArrays/PkHCM/src/host/abstractarray.jl:24
 [2] include(::Function, ::Module, ::String) at ./Base.jl:380
 [3] include at ./Base.jl:368 [inlined]
 [4] include(::String) at /Users/truedichotomy/.julia/packages/GPUArrays/PkHCM/src/GPUArrays.jl:1
 [5] top-level scope at /Users/truedichotomy/.julia/packages/GPUArrays/PkHCM/src/GPUArrays.jl:25
 [6] include(::Function, ::Module, ::String) at ./Base.jl:380
 [7] include(::Module, ::String) at ./Base.jl:368
 [8] top-level scope at none:2
 [9] eval at ./boot.jl:331 [inlined]
 [10] eval(::Expr) at ./client.jl:467
 [11] top-level scope at ./none:3
in expression starting at /Users/truedichotomy/.julia/packages/GPUArrays/PkHCM/src/host/abstractarray.jl:24
in expression starting at /Users/truedichotomy/.julia/packages/GPUArrays/PkHCM/src/GPUArrays.jl:25
ERROR: LoadError: Failed to precompile GPUArrays [0c68f7d7-f131-5f86-a1c3-88cf8149b2d7] to /Users/truedichotomy/.julia/compiled/v1.5/GPUArrays/v5u0T_IyCmP.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1290
 [3] _require(::Base.PkgId) at ./loading.jl:1030
 [4] require(::Base.PkgId) at ./loading.jl:928
 [5] require(::Module, ::Symbol) at ./loading.jl:923
 [6] include(::Function, ::Module, ::String) at ./Base.jl:380
 [7] include(::Module, ::String) at ./Base.jl:368
 [8] top-level scope at none:2
 [9] eval at ./boot.jl:331 [inlined]
 [10] eval(::Expr) at ./client.jl:467
 [11] top-level scope at ./none:3
in expression starting at /Users/truedichotomy/.julia/packages/CUDA/7vLVC/src/CUDA.jl:5
ERROR: LoadError: Failed to precompile CUDA [052768ef-5323-5732-b1bb-66c8b64840ba] to /Users/truedichotomy/.julia/compiled/v1.5/CUDA/oWw5k_IyCmP.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1290
 [3] _require(::Base.PkgId) at ./loading.jl:1030
 [4] require(::Base.PkgId) at ./loading.jl:928
 [5] require(::Module, ::Symbol) at ./loading.jl:923
 [6] include(::Function, ::Module, ::String) at ./Base.jl:380
 [7] include(::Module, ::String) at ./Base.jl:368
 [8] top-level scope at none:2
 [9] eval at ./boot.jl:331 [inlined]
 [10] eval(::Expr) at ./client.jl:467
 [11] top-level scope at ./none:3
in expression starting at /Users/truedichotomy/.julia/packages/Oceananigans/LW3v4/src/Oceananigans.jl:70
ERROR: Failed to precompile Oceananigans [9e8cae18-63c1-5223-a75c-80ca9d6e9a09] to /Users/truedichotomy/.julia/compiled/v1.5/Oceananigans/hU93i_IyCmP.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1290
 [3] _require(::Base.PkgId) at ./loading.jl:1030
 [4] require(::Base.PkgId) at ./loading.jl:928
 [5] require(::Module, ::Symbol) at ./loading.jl:923
bug 馃悶 package 馃摝

All 6 comments

Thanks for reporting this @truedichotomy! Looks like it's GPUArrays that is failing to precompile but we do run CI tests on Mac OS that have seemed fine so hopefully it's just an environment/version issue...

Which Julia version are you using? For Oceananigans v0.34.1 you need Julia 1.4+. Can you also post your Julia environment, the output of typing ] status at the Julia REPL?

I don't have access to a Mac to test unfortunately (@glwagner does I think).

@ali-ramadhan it looks like julia 1.5.

Possibly Pkg.instantiate() could help --- it might be that packages are out of sync with one another.

There may be issues with running GPU models with Julia 1.5 (see https://github.com/CliMA/Oceananigans.jl/issues/828), but all packages should precompile fine.

Instantiate seems to have done the job! Does that mean I'll need to intantiate every time Oceananigans is updated? Thank you all for the rapid response!

Awesome! I tend to ] instantiate every time I update packages just in case Julia needs to resolve version mismatches or whatever it does (and apparently it's a good habit haha).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

glwagner picture glwagner  路  7Comments

ali-ramadhan picture ali-ramadhan  路  8Comments

ali-ramadhan picture ali-ramadhan  路  4Comments

truedichotomy picture truedichotomy  路  8Comments

freemin7 picture freemin7  路  5Comments