CliMA / Land

Everything within the Land model (Soil Plant Atmosphere Module, Land Hydrology, etc)
https://clima.github.io/Land/
Apache License 2.0
98 stars 20 forks source link

error when following the instructions #54

Closed MitraAMitra closed 2 years ago

MitraAMitra commented 2 years ago

I followed the steps to run CliMA land model as instructed on mac M2, but when I used the command " include("clima-land.jl");" to run the simulation. I encountered the following error. I spend the entire yesterday trying to resolve the issue so your help is very much appreciated " julia> include("clima-land.jl"); [ Info: Precompiling GriddingMachine [f20cf718-bf4d-4727-bc8f-485b1f283ac6] ERROR: LoadError: cfunction: closures are not supported on this platform Stacktrace: [1] var"@cplprogress"(source::LineNumberNode, module::Module, progressfunc::Any) @ ArchGDAL ~/.julia/packages/ArchGDAL/CUiBS/src/utils.jl:36 [2] #macroexpand#61 @ ./expr.jl:115 [inlined] [3] macroexpand @ ./expr.jl:113 [inlined] [4] docm(source::LineNumberNode, mod::Module, meta::Any, ex::Any, define::Bool) (repeats 2 times) @ Base.Docs ./docs/Docs.jl:537 [5] var"@doc"(::LineNumberNode, ::Module, ::String, ::Vararg{Any}) @ Core ./boot.jl:519 [6] include(mod::Module, _path::String) @ Base ./Base.jl:419 [7] include(x::String) @ ArchGDAL ~/.julia/packages/ArchGDAL/CUiBS/src/ArchGDAL.jl:1 [8] top-level scope @ ~/.julia/packages/ArchGDAL/CUiBS/src/ArchGDAL.jl:16 [9] include @ ./Base.jl:419 [inlined] [10] 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, UInt64}}, source::String) @ Base ./loading.jl:1554 [11] top-level scope @ stdin:1 in expression starting at /Users/myname/.julia/packages/ArchGDAL/CUiBS/src/dataset.jl:1 in expression starting at /Users/myname/.julia/packages/ArchGDAL/CUiBS/src/dataset.jl:1 in expression starting at /Users/myname/.julia/packages/ArchGDAL/CUiBS/src/ArchGDAL.jl:1 in expression starting at stdin:1 ERROR: LoadError: Failed to precompile ArchGDAL [c9ce4bd3-c3d5-55b8-8973-c0e20141b8c3] to /Users/myname/.julia/compiled/v1.8/ArchGDAL/jl_jZwuAH. 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:1707 [3] compilecache @ ./loading.jl:1651 [inlined] [4] _require(pkg::Base.PkgId) @ Base ./loading.jl:1337 [5] _require_prelocked(uuidkey::Base.PkgId) @ Base ./loading.jl:1200 [6] macro expansion @ ./loading.jl:1180 [inlined] [7] macro expansion @ ./lock.jl:223 [inlined] [8] require(into::Module, mod::Symbol) @ Base ./loading.jl:1144 [9] include @ ./Base.jl:419 [inlined] [10] 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, UInt64}}, source::String) @ Base ./loading.jl:1554 [11] top-level scope @ stdin:1 in expression starting at /Users/myname/.julia/packages/GriddingMachine/kIQA9/src/GriddingMachine.jl:1 in expression starting at stdin:1 ERROR: LoadError: Failed to precompile GriddingMachine [f20cf718-bf4d-4727-bc8f-485b1f283ac6] to /Users/myname/.julia/compiled/v1.8/GriddingMachine/jl_chDAjh. 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:1707 [3] compilecache @ ./loading.jl:1651 [inlined] [4] _require(pkg::Base.PkgId) @ Base ./loading.jl:1337 [5] _require_prelocked(uuidkey::Base.PkgId) @ Base ./loading.jl:1200 [6] macro expansion @ ./loading.jl:1180 [inlined] [7] macro expansion @ ./lock.jl:223 [inlined] [8] require(into::Module, mod::Symbol) @ Base ./loading.jl:1144 [9] include(fname::String) @ Base.MainInclude ./client.jl:476 [10] top-level scope @ REPL[1]:1 in expression starting at /Users/myname/Test-CliMA-Land/clima-land.jl:5 "

Yujie-W commented 2 years ago

The problem is due to Julia version. The provided code works for Julia 1.7. The GriddingMachine package used old versions of ArchGDAL and NCDatasets so that it does not work on Julia 1.8. I will update the tutorial file later today, and have you informed when it is done.

Yujie-W commented 2 years ago

Another note: if you are using apple silicon, there could be more unexpected issues as the code has not been tested on that platform.

Yujie-W commented 2 years ago

Here is an updated tutorial, and you can find the zip file at here. I tested it on Apple M1 chips, it works.