.mod not running in Julia

Running the program I get:

 context = @dynare "/Users/santiago/Documents/Solow_Julia.mod" "stoponerror";

ERROR: LoadError: MethodError: no method matching gges_select!(::FastLapackInterface.GeneralizedSchurWs{Float64}, ::Float64)

Closest candidates are:

gges_select!(::PolynomialMatrixEquations.GsSolverWs, ::Number)

@ PolynomialMatrixEquations ~/.julia/packages/PolynomialMatrixEquations/1paPN/src/GeneralizedSchurDecompositionSolver.jl:62

Stacktrace:

[1] gs_solver!(ws::PolynomialMatrixEquations.GsSolverWs, d::Matrix{…}, e::Matrix{…}, n1::Int64, qz_criterium::Float64)

@ PolynomialMatrixEquations ~/.julia/packages/PolynomialMatrixEquations/1paPN/src/GeneralizedSchurDecompositionSolver.jl:38

[2] solve!(ws::LinearRationalExpectations.LinearGsSolverWs, crit::Float64)

@ LinearRationalExpectations ~/.julia/packages/LinearRationalExpectations/qz8MB/src/linear_rational_expectations.jl:148

[3]

@ LinearRationalExpectations ~/.julia/packages/LinearRationalExpectations/qz8MB/src/linear_rational_expectations.jl:160

[4] first_order_solver!(results::LinearRationalExpectations.LinearRationalExpectationsResults, jacobian::Matrix{…}, options::LinearRationalExpectations.LinearRationalExpectationsOptions, ws::LinearRationalExpectations.LinearRationalExpectationsWs)

@ LinearRationalExpectations ~/.julia/packages/LinearRationalExpectations/qz8MB/src/linear_rational_expectations.jl:482

[5] compute_first_order_solution!(context::Context, endogenous::Vector{…}, exogenous::Vector{…}, steadystate::Vector{…}, params::Vector{…}, model::Model, ws::Dynare.DynamicWs, css_ws::Dynare.ComputeStochSimulWs, options::Dynare.StochSimulOptions; variance_decomposition::Bool)

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/perturbations.jl:652

[6] compute_first_order_solution!

@ ~/.julia/packages/Dynare/ZWnXf/src/perturbations.jl:626 [inlined]

[7] compute_stoch_simul!(context::Context, ws::Dynare.DynamicWs, css_ws::Dynare.ComputeStochSimulWs, params::Vector{…}, options::Dynare.StochSimulOptions; kwargs::@Kwargs{…})

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/perturbations.jl:540

[8] compute_stoch_simul!

@ ~/.julia/packages/Dynare/ZWnXf/src/perturbations.jl:522 [inlined]

[9] stoch_simul_core!(context::Context, ws::Dynare.DynamicWs, options::Dynare.StochSimulOptions)

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/perturbations.jl:454

[10] stoch_simul!(context::Context, field::Dict{String, Any})

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/perturbations.jl:390

[11] parse_statements!(context::Context, statements::Vector{Any})

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/DynareParser.jl:328

[12] parser(modfilename::String, commandlineoptions::Dynare.CommandLineOptions)

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/DynareParser.jl:224

[13] dynare(modfile_arg::String, args::String)

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/Dynare.jl:104

[14] var"@dynare"(source::LineNumberNode, module::Module, modfile_arg::String, args::Vararg{Any})

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/Dynare.jl:67

in expression starting at REPL[11]:1

Some type information was truncated. Use show(err) to see complete types.

Running:

using Pkg
Pkg.activate(; temp=true)
Pkg.add(name="Dynare")
Pkg.test("Dynare")
show(stdout, "text/plain", err)

The output is

MethodError(reshape, (nothing, 6, 400), 0x0000000000007c1c)

2024-05-06T16:05:03.214: End parser

Error During Test at /Users/santiago/.julia/packages/Dynare/ZWnXf/test/runtests.jl:59

Test threw exception

Expression: all((Matrix(simulation(“i”)))[10:52] .≈ 0)

BoundsError: attempt to access 0-element Vector{Simulation} at index [0]

Stacktrace:

[1] getindex(A::Vector{Simulation}, i1::Int64)

@ Base ./essentials.jl:13

[2] simulation(varname::String)

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/accessors.jl:70

[3] macro expansion

@ ~/.julia/packages/Dynare/ZWnXf/test/runtests.jl:59 [inlined]

[4] macro expansion

@ ~/.julia/juliaup/julia-1.10.3+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Test/src/Test.jl:669 [inlined]

[5] top-level scope

@ ~/.julia/packages/Dynare/ZWnXf/test/runtests.jl:508

ERROR: LoadError: There was an error during testing

in expression starting at /Users/santiago/.julia/packages/Dynare/ZWnXf/test/runtests.jl:59

ERROR: Package Dynare errored during testing

Stacktrace:

[1] pkgerror(msg::String)

@ Pkg.Types ~/.julia/juliaup/julia-1.10.3+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/Types.jl:70

[2] test(ctx::Pkg.Types.Context, pkgs::Vector{…}; 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 ~/.julia/juliaup/julia-1.10.3+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/Operations.jl:2019

[3] test

@ ~/.julia/juliaup/julia-1.10.3+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/Operations.jl:1900 [inlined]

[4] test(ctx::Pkg.Types.Context, pkgs::Vector{…}; 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::@Kwargs{…})

@ Pkg.API ~/.julia/juliaup/julia-1.10.3+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/API.jl:444

[5] test(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::@Kwargs{})

@ Pkg.API ~/.julia/juliaup/julia-1.10.3+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/API.jl:159

[6] test(pkgs::Vector{Pkg.Types.PackageSpec})

@ Pkg.API ~/.julia/juliaup/julia-1.10.3+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/API.jl:148

[7] test

@ ~/.julia/juliaup/julia-1.10.3+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/API.jl:147 [inlined]

[8] test(pkg::String)

@ Pkg.API ~/.julia/juliaup/julia-1.10.3+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/API.jl:146

[9] top-level scope

@ REPL[15]:1

Some type information was truncated. Use show(err) to see complete types.

julia> show(stdout, “text/plain”, err)

1-element ExceptionStack:

Package Dynare errored during testing

Stacktrace:

[1] pkgerror(msg::String)

@ Pkg.Types ~/.julia/juliaup/julia-1.10.3+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/Types.jl:70

[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 ~/.julia/juliaup/julia-1.10.3+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/Operations.jl:2019

[3] test

@ ~/.julia/juliaup/julia-1.10.3+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/Operations.jl:1900 [inlined]

[4] 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::@Kwargs{io::Base.TTY})

@ Pkg.API ~/.julia/juliaup/julia-1.10.3+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/API.jl:444

[5] test(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::@Kwargs{})

@ Pkg.API ~/.julia/juliaup/julia-1.10.3+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/API.jl:159

[6] test(pkgs::Vector{Pkg.Types.PackageSpec})

@ Pkg.API ~/.julia/juliaup/julia-1.10.3+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/API.jl:148

[7] test

@ ~/.julia/juliaup/julia-1.10.3+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/API.jl:147 [inlined]

[8] test(pkg::String)

@ Pkg.API ~/.julia/juliaup/julia-1.10.3+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/API.jl:146

[9] top-level scope

@ REPL[15]:1

Thank you,

I made some more correction. Could you please run again

using Pkg
Pkg.activate(; temp=true)
Pkg.add(name="Dynare")
Pkg.add(name="FastLapackInterface", rev="schurorder")
Pkg.add(name="PolynomialMatrixEquations", rev="SCHURORDER")
Pkg.add(name="LinearRationalExpectations", rev="schurorder")
Pkg.test("FastLapackInterface")

and then run your own program ?
Thanks for your help debugging the issue

Concerning the perfect foresight problem. Could you please run the following

using Pkg
Pkg.activate(; temp=true)
Pkg.add(name="Dynare")
Pkg.add(name="FastLapackInterface", rev="schurorder")
Pkg.add(name="PolynomialMatrixEquations", rev="SCHURORDER")
Pkg.add(name="LinearRationalExpectations", rev="schurorder")
Pkg.add(name="PATHSolver")
using Dynare
context = @dynare "/Users/santiago/.julia/packages/Dynare/ZWnXf/test/models/irreversible/irbc2a";

and send me the full output of the Dynare run?
Thanks in advance

Thank you Professor Juilliard, running:

using Pkg
Pkg.activate(; temp=true)
Pkg.add(name="Dynare")
Pkg.add(name="FastLapackInterface", rev="schurorder")
Pkg.add(name="PolynomialMatrixEquations", rev="SCHURORDER")
Pkg.add(name="LinearRationalExpectations", rev="schurorder")
Pkg.test("FastLapackInterface")

using Dynare
context = @dynare "/Users/santiago/Documents/Solow_Julia.mod" "stoponerror";

The output is:

Dynare version: 0.9.11

2024-05-07T09:09:28.126: Starting @dynare /Users/santiago/Documents/Solow_Julia.mod

[“Solow_Julia.mod”, “language=julia”, “json=compute”]

Dynare preprocessor version: 6.4.0+0

Starting preprocessing of the model file …

Found 5 equation(s).

Evaluating expressions…

Computing static model derivatives (order 1).

Normalizing the static model…

Finding the optimal block decomposition of the static model…

5 block(s) found:

5 recursive block(s) and 0 simultaneous block(s).

the largest simultaneous block has 0 equation(s)

and 0 feedback variable(s).

Computing dynamic model derivatives (order 2).

Normalizing the dynamic model…

Finding the optimal block decomposition of the dynamic model…

2 block(s) found:

1 recursive block(s) and 1 simultaneous block(s).

the largest simultaneous block has 4 equation(s)

and 4 feedback variable(s).

JSON written after Computing step.

Preprocessing completed.

2024-05-07T09:09:28.154: End of preprocessing

2024-05-07T09:09:28.166: Start parse_statements!

Steady state

───┬─────

C │ 0.0

Y │ 0.0

K │ 0.0

I │ 0.0

Z │ 0.0

───┴─────

ERROR: LoadError: cfunction: closures are not supported on this platform

Stacktrace:

[1] gges!(ws::FastLapackInterface.GeneralizedSchurWs{…}, jobvsl::Char, jobvsr::Char, A::Matrix{…}, B::Matrix{…}; select::PolynomialMatrixEquations.var"#1#2"{…}, resize::Bool)

@ FastLapackInterface ~/.julia/packages/FastLapackInterface/iwXJ9/src/schur.jl:540

[2] gges!

@ ~/.julia/packages/FastLapackInterface/iwXJ9/src/schur.jl:515 [inlined]

[3] gges_select!

@ ~/.julia/packages/PolynomialMatrixEquations/Sj9kq/src/GeneralizedSchurDecompositionSolver.jl:64 [inlined]

[4] gs_solver!(ws::PolynomialMatrixEquations.GsSolverWs, d::Matrix{…}, e::Matrix{…}, n1::Int64, qz_criterium::Float64)

@ PolynomialMatrixEquations ~/.julia/packages/PolynomialMatrixEquations/Sj9kq/src/GeneralizedSchurDecompositionSolver.jl:38

[5] solve!

@ ~/.julia/packages/LinearRationalExpectations/qz8MB/src/linear_rational_expectations.jl:148 [inlined]

[6]

@ LinearRationalExpectations ~/.julia/packages/LinearRationalExpectations/qz8MB/src/linear_rational_expectations.jl:160

[7] first_order_solver!(results::LinearRationalExpectations.LinearRationalExpectationsResults, jacobian::Matrix{…}, options::LinearRationalExpectations.LinearRationalExpectationsOptions, ws::LinearRationalExpectations.LinearRationalExpectationsWs)

@ LinearRationalExpectations ~/.julia/packages/LinearRationalExpectations/qz8MB/src/linear_rational_expectations.jl:482

[8] compute_first_order_solution!(context::Context, endogenous::Vector{…}, exogenous::Vector{…}, steadystate::Vector{…}, params::Vector{…}, model::Model, ws::Dynare.DynamicWs, css_ws::Dynare.ComputeStochSimulWs, options::Dynare.StochSimulOptions; variance_decomposition::Bool)

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/perturbations.jl:652

[9] compute_first_order_solution!

@ ~/.julia/packages/Dynare/ZWnXf/src/perturbations.jl:626 [inlined]

[10] compute_stoch_simul!(context::Context, ws::Dynare.DynamicWs, css_ws::Dynare.ComputeStochSimulWs, params::Vector{…}, options::Dynare.StochSimulOptions; kwargs::@Kwargs{…})

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/perturbations.jl:540

[11] compute_stoch_simul!

@ ~/.julia/packages/Dynare/ZWnXf/src/perturbations.jl:522 [inlined]

[12] stoch_simul_core!(context::Context, ws::Dynare.DynamicWs, options::Dynare.StochSimulOptions)

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/perturbations.jl:454

[13] stoch_simul!(context::Context, field::Dict{String, Any})

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/perturbations.jl:390

[14] parse_statements!(context::Context, statements::Vector{Any})

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/DynareParser.jl:328

[15] parser(modfilename::String, commandlineoptions::Dynare.CommandLineOptions)

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/DynareParser.jl:224

[16] dynare(modfile_arg::String, args::String)

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/Dynare.jl:104

[17] var"@dynare"(source::LineNumberNode, module::Module, modfile_arg::String, args::Vararg{Any})

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/Dynare.jl:67

in expression starting at REPL[10]:1

Some type information was truncated. Use show(err) to see complete types.

Running:

using Pkg
Pkg.activate(; temp=true)
Pkg.add(name="Dynare")
Pkg.add(name="FastLapackInterface", rev="schurorder")
Pkg.add(name="PolynomialMatrixEquations", rev="SCHURORDER")
Pkg.add(name="LinearRationalExpectations", rev="schurorder")
Pkg.add(name="PATHSolver")
using Dynare
context = @dynare "/Users/santiago/.julia/packages/Dynare/ZWnXf/test/models/irreversible/irbc2a";

The output of Dynare is:

context = @dynare “/Users/santiago/.julia/packages/Dynare/ZWnXf/test/models/irreversible/irbc2a”;
Dynare version: 0.9.11
2024-05-07T09:15:23.687: Starting @dynare /Users/santiago/.julia/packages/Dynare/ZWnXf/test/models/irreversible/irbc2a
[“irbc2a.mod”, “language=julia”, “json=compute”]
Dynare preprocessor version: 6.4.0+0
Starting preprocessing of the model file …
Found 6 equation(s).
Evaluating expressions…
Computing static model derivatives (order 1).
Normalizing the static model…
Finding the optimal block decomposition of the static model…
4 block(s) found:
3 recursive block(s) and 1 simultaneous block(s).
the largest simultaneous block has 2 equation(s)
and 2 feedback variable(s).
Computing dynamic model derivatives (order 1).
Normalizing the dynamic model…
Finding the optimal block decomposition of the dynamic model…
3 block(s) found:
2 recursive block(s) and 1 simultaneous block(s).
the largest simultaneous block has 2 equation(s)
and 2 feedback variable(s).
JSON written after Computing step.
Preprocessing completed.

2024-05-07T09:15:23.718: End of preprocessing
2024-05-07T09:15:23.723: Start parse_statements!
Steady state

────┬─────────
lk │ 4.91762
lc │ 1.8577
i │ 2.7335
A │ 1.0
a │ 0.0
mu │ 0.0
────┴─────────

MethodError(reshape, (nothing, 6, 400), 0x0000000000007c15)
2024-05-07T09:15:25.358: End parser

Thanks. The last test of your model showed yet another error in my code. It is fixed.

Could you try it again please?

Best

Michel

I ran

using Dynare
context = @dynare "/Users/santiago/Documents/Solow_Julia.mod" "stoponerror";

The output is:

Dynare version: 0.9.11

2024-05-07T09:42:40.180: Starting @dynare /Users/santiago/Documents/Solow_Julia.mod

[“Solow_Julia.mod”, “language=julia”, “json=compute”]

Dynare preprocessor version: 6.4.0+0

Starting preprocessing of the model file …

Found 5 equation(s).

Evaluating expressions…

Computing static model derivatives (order 1).

Normalizing the static model…

Finding the optimal block decomposition of the static model…

5 block(s) found:

5 recursive block(s) and 0 simultaneous block(s).

the largest simultaneous block has 0 equation(s)

and 0 feedback variable(s).

Computing dynamic model derivatives (order 2).

Normalizing the dynamic model…

Finding the optimal block decomposition of the dynamic model…

2 block(s) found:

1 recursive block(s) and 1 simultaneous block(s).

the largest simultaneous block has 4 equation(s)

and 4 feedback variable(s).

JSON written after Computing step.

Preprocessing completed.

2024-05-07T09:42:40.293: End of preprocessing

2024-05-07T09:42:40.312: Start parse_statements!

Steady state

───┬─────

C │ 0.0

Y │ 0.0

K │ 0.0

I │ 0.0

Z │ 0.0

───┴─────

ERROR: LoadError: cfunction: closures are not supported on this platform

Stacktrace:

[1] gges!(ws::FastLapackInterface.GeneralizedSchurWs{…}, jobvsl::Char, jobvsr::Char, A::Matrix{…}, B::Matrix{…}; select::PolynomialMatrixEquations.var"#1#2"{…}, resize::Bool)

@ FastLapackInterface ~/.julia/packages/FastLapackInterface/bStCU/src/schur.jl:348

[2] gges!

@ ~/.julia/packages/FastLapackInterface/bStCU/src/schur.jl:323 [inlined]

[3] gs_solver!(ws::PolynomialMatrixEquations.GsSolverWs, d::Matrix{…}, e::Matrix{…}, n1::Int64, qz_criterium::Float64)

@ PolynomialMatrixEquations ~/.julia/packages/PolynomialMatrixEquations/5luE3/src/GeneralizedSchurDecompositionSolver.jl:38

[4] solve!

@ ~/.julia/packages/LinearRationalExpectations/08GHW/src/linear_rational_expectations.jl:148 [inlined]

[5]

@ LinearRationalExpectations ~/.julia/packages/LinearRationalExpectations/08GHW/src/linear_rational_expectations.jl:157

[6] first_order_solver!(results::LinearRationalExpectations.LinearRationalExpectationsResults, jacobian::Matrix{…}, options::LinearRationalExpectations.LinearRationalExpectationsOptions, ws::LinearRationalExpectations.LinearRationalExpectationsWs)

@ LinearRationalExpectations ~/.julia/packages/LinearRationalExpectations/08GHW/src/linear_rational_expectations.jl:478

[7] compute_first_order_solution!(context::Context, endogenous::Vector{…}, exogenous::Vector{…}, steadystate::Vector{…}, params::Vector{…}, model::Model, ws::Dynare.DynamicWs, css_ws::Dynare.ComputeStochSimulWs, options::Dynare.StochSimulOptions; variance_decomposition::Bool)

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/perturbations.jl:652

[8] compute_first_order_solution!

@ ~/.julia/packages/Dynare/ZWnXf/src/perturbations.jl:626 [inlined]

[9] compute_stoch_simul!(context::Context, ws::Dynare.DynamicWs, css_ws::Dynare.ComputeStochSimulWs, params::Vector{…}, options::Dynare.StochSimulOptions; kwargs::@Kwargs{…})

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/perturbations.jl:540

[10] compute_stoch_simul!

@ ~/.julia/packages/Dynare/ZWnXf/src/perturbations.jl:522 [inlined]

[11] stoch_simul_core!(context::Context, ws::Dynare.DynamicWs, options::Dynare.StochSimulOptions)

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/perturbations.jl:454

[12] stoch_simul!(context::Context, field::Dict{String, Any})

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/perturbations.jl:390

[13] parse_statements!(context::Context, statements::Vector{Any})

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/DynareParser.jl:328

[14] parser(modfilename::String, commandlineoptions::Dynare.CommandLineOptions)

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/DynareParser.jl:224

[15] dynare(modfile_arg::String, args::String)

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/Dynare.jl:104

[16] var"@dynare"(source::LineNumberNode, module::Module, modfile_arg::String, args::Vararg{Any})

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/Dynare.jl:67

in expression starting at REPL[2]:1

Some type information was truncated. Use show(err) to see complete types.

As I corrected the code, you need to run the entire procedure in a new Julia session:

using Pkg
Pkg.activate(; temp=true)
Pkg.add(name="Dynare")
Pkg.add(name="FastLapackInterface", rev="schurorder")
Pkg.add(name="PolynomialMatrixEquations", rev="SCHURORDER")
Pkg.add(name="LinearRationalExpectations", rev="schurorder")
using Dynare
context = @dynare "/Users/santiago/Documents/Solow_Julia.mod" "stoponerror";

Best

Professor Juillard, after running the entire procedure in a new Julia session the output of Dynare is:

Dynare version: 0.9.11

2024-05-07T10:20:26.242: Starting @dynare /Users/santiago/Documents/Solow_Julia.mod

[“Solow_Julia.mod”, “language=julia”, “json=compute”]

Dynare preprocessor version: 6.4.0+0

Starting preprocessing of the model file …

Found 5 equation(s).

Evaluating expressions…

Computing static model derivatives (order 1).

Normalizing the static model…

Finding the optimal block decomposition of the static model…

5 block(s) found:

5 recursive block(s) and 0 simultaneous block(s).

the largest simultaneous block has 0 equation(s)

and 0 feedback variable(s).

Computing dynamic model derivatives (order 2).

Normalizing the dynamic model…

Finding the optimal block decomposition of the dynamic model…

2 block(s) found:

1 recursive block(s) and 1 simultaneous block(s).

the largest simultaneous block has 4 equation(s)

and 4 feedback variable(s).

JSON written after Computing step.

Preprocessing completed.

2024-05-07T10:20:26.263: End of preprocessing

2024-05-07T10:20:26.275: Start parse_statements!

Steady state

───┬─────

C │ 0.0

Y │ 0.0

K │ 0.0

I │ 0.0

Z │ 0.0

───┴─────

ERROR: LoadError: cfunction: closures are not supported on this platform

Stacktrace:

[1] gges!(ws::FastLapackInterface.GeneralizedSchurWs{…}, jobvsl::Char, jobvsr::Char, A::Matrix{…}, B::Matrix{…}; select::PolynomialMatrixEquations.var"#1#2"{…}, resize::Bool)

@ FastLapackInterface ~/.julia/packages/FastLapackInterface/iwXJ9/src/schur.jl:540

[2] gges!

@ ~/.julia/packages/FastLapackInterface/iwXJ9/src/schur.jl:515 [inlined]

[3] gges_select!

@ ~/.julia/packages/PolynomialMatrixEquations/Sj9kq/src/GeneralizedSchurDecompositionSolver.jl:64 [inlined]

[4] gs_solver!(ws::PolynomialMatrixEquations.GsSolverWs, d::Matrix{…}, e::Matrix{…}, n1::Int64, qz_criterium::Float64)

@ PolynomialMatrixEquations ~/.julia/packages/PolynomialMatrixEquations/Sj9kq/src/GeneralizedSchurDecompositionSolver.jl:38

[5] solve!

@ ~/.julia/packages/LinearRationalExpectations/DNsam/src/linear_rational_expectations.jl:148 [inlined]

[6]

@ LinearRationalExpectations ~/.julia/packages/LinearRationalExpectations/DNsam/src/linear_rational_expectations.jl:160

[7] first_order_solver!(results::LinearRationalExpectations.LinearRationalExpectationsResults, jacobian::Matrix{…}, options::LinearRationalExpectations.LinearRationalExpectationsOptions, ws::LinearRationalExpectations.LinearRationalExpectationsWs)

@ LinearRationalExpectations ~/.julia/packages/LinearRationalExpectations/DNsam/src/linear_rational_expectations.jl:482

[8] compute_first_order_solution!(context::Context, endogenous::Vector{…}, exogenous::Vector{…}, steadystate::Vector{…}, params::Vector{…}, model::Model, ws::Dynare.DynamicWs, css_ws::Dynare.ComputeStochSimulWs, options::Dynare.StochSimulOptions; variance_decomposition::Bool)

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/perturbations.jl:652

[9] compute_first_order_solution!

@ ~/.julia/packages/Dynare/ZWnXf/src/perturbations.jl:626 [inlined]

[10] compute_stoch_simul!(context::Context, ws::Dynare.DynamicWs, css_ws::Dynare.ComputeStochSimulWs, params::Vector{…}, options::Dynare.StochSimulOptions; kwargs::@Kwargs{…})

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/perturbations.jl:540

[11] compute_stoch_simul!

@ ~/.julia/packages/Dynare/ZWnXf/src/perturbations.jl:522 [inlined]

[12] stoch_simul_core!(context::Context, ws::Dynare.DynamicWs, options::Dynare.StochSimulOptions)

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/perturbations.jl:454

[13] stoch_simul!(context::Context, field::Dict{String, Any})

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/perturbations.jl:390

[14] parse_statements!(context::Context, statements::Vector{Any})

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/DynareParser.jl:328

[15] parser(modfilename::String, commandlineoptions::Dynare.CommandLineOptions)

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/DynareParser.jl:224

[16] dynare(modfile_arg::String, args::String)

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/Dynare.jl:104

[17] var"@dynare"(source::LineNumberNode, module::Module, modfile_arg::String, args::Vararg{Any})

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/Dynare.jl:67

in expression starting at REPL[8]:1

Some type information was truncated. Use show(err) to see complete types.

OK, thanks. Not what I expected.

Can you tell me what is the output in Julia for Sys.MACHINE, for Sys.ARCH and for isapple() ?

Of course, the function isapple() is generating an error:

julia> Sys.MACHINE

“arm64-apple-darwin22.4.0”

julia> Sys.ARCH

:aarch64

julia> isapple()

ERROR: UndefVarError: isapple not defined

Stacktrace:

[1] top-level scope

@ REPL[11]:1

Sorry, it should have been Sys.isapple()

Thanks.
julia> Sys.isapple()
true

OK, given your results, I changed the way I’m testing for a Mac with M1 chip. Please, try the testing procedure one more time

using Pkg
Pkg.activate(; temp=true)
Pkg.add(name="Dynare")
Pkg.add(name="FastLapackInterface", rev="schurorder")
Pkg.add(name="PolynomialMatrixEquations", rev="SCHURORDER")
Pkg.add(name="LinearRationalExpectations", rev="schurorder")
using Dynare
context = @dynare "/Users/santiago/Documents/Solow_Julia.mod" "stoponerror";

It worked perfectly professor Juillard, thank you very much for your help.

Thanks to you for your help and patience. It is difficult to debug code on a machine one doesn’t have one’s disposal.
I will now update the packages and will tell you when you can use Dynare normally on you M1 machine. I will also come back to you concerning the perfect foresight simulation with occasionally bonding constraints

Of course professor. Thank you very much.

Dear Santiago,

I have found a simpler and cleaner manner to solve the cfunction problem on M1 where I don’t need to modify LinearRationalExpectations package. Could you please run the following test on your M1 machine?

using Pkg
Pkg.activate(; temp=true)
Pkg.add(name="Dynare")
Pkg.add(name="FastLapackInterface", rev="schurorder")
Pkg.add(name="PolynomialMatrixEquations", rev="SCHURORDER")
using Dynare
context = @dynare "/Users/santiago/Documents/Solow_Julia.mod" "stoponerror";

[/quote]

All the best,

Hello Professor Juillard, it worked perfectly.

Thank you.