# .mod not running in Julia

**URL:** <https://forum.dynare.org/t/mod-not-running-in-julia/25659>\
**Category:** Dynare Julia\
**Created:** [30 April 2024 23:18 UTC](https://forum.dynare.org/t/mod-not-running-in-julia/25659 "2024-04-30T23:18:19Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Santiago\_D](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/53a042/32.png) [@Santiago\_D](https://forum.dynare.org/u/Santiago_D)\
**Post date:** [30 April 2024 23:18 UTC](https://forum.dynare.org/t/mod-not-running-in-julia/25659/1 "2024-04-30T23:18:19Z")

</div>

Good morning,

Using Dynare in Julia I tried to run a .mod file:

```auto

var C Y K I Z;
varexo e;

parameters alpha delta s rho beta Kss Yss Css Iss; 

alpha = 0.35; % Parameter values
delta = 0.025;
rho = 0.75; 
beta = 0.99;
Kss=(alpha/((1/beta)+delta-1))^(1/(1-alpha));
Yss=Kss^(alpha);
Iss=delta*Kss;
Css=Yss-Iss;

model(linear);
  (1/beta)*(C(+1)-C)=(alpha*(Kss)^(alpha-1))*(Z(+1)+(alpha-1)*K);
  Yss*Y=Css*C+Iss*I;
  Y=Z+K(-1)*alpha;
  K= (1 - delta)*K(-1) + delta*I;
  Z = rho*Z(-1)+e;
end;

shocks;
  var e; stderr 1;
end;

steady;

stoch_simul(order=1);

```

I am getting the following error:

2024-04-30T18:58:04.458: End of preprocessing

2024-04-30T18:58:04.462: Start parse\_statements!

Steady state

───┬─────

C │ 0.0

Y │ 0.0

K │ 0.0

I │ 0.0

Z │ 0.0

───┴─────

ErrorException(“cfunction: closures are not supported on this platform”)

2024-04-30T18:58:04.479: End parser

Does anyone know what may be happening? May be this is due to the last version of Julia that was just released,I would really appreciate any indication.

Thank you very much.

---

<div class="post-metadata">

**Author:** ![MichelJuillard](https://forum.dynare.org/user_avatar/forum.dynare.org/micheljuillard/32/5318_2.png) [@MichelJuillard](https://forum.dynare.org/u/MichelJuillard)\
**Post date:** [1 May 2024 09:18 UTC](https://forum.dynare.org/t/mod-not-running-in-julia/25659/2 "2024-05-01T09:18:32Z")

</div>

Hello Santiago,

thanks for reporting the issue. I can’t reproduce the problem on my x86\_64 Linux computer, but the error message mentions that the problem is platform specific.

- Which version of Dynare.jl are you running?
- What is the output of versioninfo()
- please run `context = @dynare <MODFILE> "stoponerror";` and send me the entire output

Best

Michel

---

<div class="post-metadata">

**Author:** ![Santiago\_D](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/53a042/32.png) [@Santiago\_D](https://forum.dynare.org/u/Santiago_D)\
**Post date:** [1 May 2024 16:08 UTC](https://forum.dynare.org/t/mod-not-running-in-julia/25659/3 "2024-05-01T16:08:16Z")

</div>

Thank you for your timely reply:

- I am using a Mac with M1 chip, with macOS Sonoma 14.4.1, the version of Julia is 1.10.3 and of Dynare is 0.9.11.

- **julia\>** versioninfo()

Julia Version 1.10.3

Commit 0b4590a5507 (2024-04-30 10:59 UTC)

Build Info:

Official [https://julialang.org/](https://julialang.org/) release

Platform Info:

OS: macOS (arm64-apple-darwin22.4.0)

CPU: 8 × Apple M1

WORD\_SIZE: 64

LIBM: libopenlibm

LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)

Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)

- 

**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/twXNG/src/schur.jl:334

[2] **gges!**

@ ~/.julia/packages/FastLapackInterface/twXNG/src/schur.jl:309 [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[4]:1

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

* * *

The error seems to be related with the stoch\_simul function as the steady state is computed.

---

<div class="post-metadata">

**Author:** ![MichelJuillard](https://forum.dynare.org/user_avatar/forum.dynare.org/micheljuillard/32/5318_2.png) [@MichelJuillard](https://forum.dynare.org/u/MichelJuillard)\
**Post date:** [1 May 2024 17:18 UTC](https://forum.dynare.org/t/mod-not-running-in-julia/25659/4 "2024-05-01T17:18:37Z")

</div>

Thanks Santiago. Very useful. I will see how to fix gees!

Best

Michel

---

<div class="post-metadata">

**Author:** ![MichelJuillard](https://forum.dynare.org/user_avatar/forum.dynare.org/micheljuillard/32/5318_2.png) [@MichelJuillard](https://forum.dynare.org/u/MichelJuillard)\
**Post date:** [1 May 2024 20:49 UTC](https://forum.dynare.org/t/mod-not-running-in-julia/25659/5 "2024-05-01T20:49:38Z")

</div>

I have updated FastLapackInterface. Santiago, could you please test it?

```auto
using Pkg
Pkg.activate(; temp=true)
Pkg.add(name="FastLapackInterface", rev="noclosure")
Pkg.test("FastLapackInterface")

```

If it works on your M1 machine I will publish the new version and it will work with Dynare.jl

---

<div class="post-metadata">

**Author:** ![Santiago\_D](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/53a042/32.png) [@Santiago\_D](https://forum.dynare.org/u/Santiago_D)\
**Post date:** [1 May 2024 22:31 UTC](https://forum.dynare.org/t/mod-not-running-in-julia/25659/6 "2024-05-01T22:31:23Z")

</div>

Professor Juillard, I ran the code:

```auto
using Pkg
Pkg.activate(; temp=true)
Pkg.add(name="FastLapackInterface", rev="noclosure")
Pkg.test("FastLapackInterface")

```

The FastLapackInterface tests were passed, but I am getting the same error after running the .mod file:

**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/twXNG/src/schur.jl:334

[2] **gges!**

@ ~/.julia/packages/FastLapackInterface/twXNG/src/schur.jl:309 [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[12]:1

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

* * *

The model is running adequately in another computer but in the M1 Mac it is producing the error.

---

<div class="post-metadata">

**Author:** ![MichelJuillard](https://forum.dynare.org/user_avatar/forum.dynare.org/micheljuillard/32/5318_2.png) [@MichelJuillard](https://forum.dynare.org/u/MichelJuillard)\
**Post date:** [2 May 2024 01:00 UTC](https://forum.dynare.org/t/mod-not-running-in-julia/25659/7 "2024-05-02T01:00:54Z")

</div>

Thanks a million. Now that I know that FastLapackInterface correction is working, I will fix Dynare tomorrow

---

<div class="post-metadata">

**Author:** ![MichelJuillard](https://forum.dynare.org/user_avatar/forum.dynare.org/micheljuillard/32/5318_2.png) [@MichelJuillard](https://forum.dynare.org/u/MichelJuillard)\
**Post date:** [2 May 2024 12:53 UTC](https://forum.dynare.org/t/mod-not-running-in-julia/25659/8 "2024-05-02T12:53:45Z")

</div>

Now, you can update your installation with

```auto
Pkg.update()

```

You can use

```auto
Pkg.status("FastLapackInterface", mode=PKGMODE_MANIFEST)

```

to check that `FastLapackInterface` is now at version v2.0.3

You may have to restart Julia to make sure that the change is taken into effect.

Best

Michel

---

<div class="post-metadata">

**Author:** ![Santiago\_D](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/53a042/32.png) [@Santiago\_D](https://forum.dynare.org/u/Santiago_D)\
**Post date:** [2 May 2024 17:38 UTC](https://forum.dynare.org/t/mod-not-running-in-julia/25659/9 "2024-05-02T17:38:53Z")

</div>

Professor Juillard, I ran the code

```auto
Pkg.update()
Pkg.status("FastLapackInterface", mode=PKGMODE_MANIFEST)

```

And everything seems to be working fine:  
**julia\>** Pkg.status(“FastLapackInterface”, mode=PKGMODE\_MANIFEST)

**Status** `~/.julia/environments/v1.10/Manifest.toml`

[29a986be] FastLapackInterface v2.0.3

Nevertheless I get an error when running the .mod file:

**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[5]:1

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

---

<div class="post-metadata">

**Author:** ![MichelJuillard](https://forum.dynare.org/user_avatar/forum.dynare.org/micheljuillard/32/5318_2.png) [@MichelJuillard](https://forum.dynare.org/u/MichelJuillard)\
**Post date:** [3 May 2024 11:13 UTC](https://forum.dynare.org/t/mod-not-running-in-julia/25659/10 "2024-05-03T11:13:55Z")

</div>

I realize now that the problem is more complex than I thought initially. I let you know when I come up with a solution that doesn’t break the current interface for other paltforms

---

<div class="post-metadata">

**Author:** ![MichelJuillard](https://forum.dynare.org/user_avatar/forum.dynare.org/micheljuillard/32/5318_2.png) [@MichelJuillard](https://forum.dynare.org/u/MichelJuillard)\
**Post date:** [6 May 2024 15:41 UTC](https://forum.dynare.org/t/mod-not-running-in-julia/25659/11 "2024-05-06T15:41:49Z")

</div>

Dear Santiago,

I have found an other solution. Could you please run the following in a new Julia session?

```auto
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")
Pkg.test("Dynare")

```

Please report any error.  
If there is no error, you can try to run your own program just after the last test.  
Best  
Michel

---

<div class="post-metadata">

**Author:** ![Santiago\_D](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/53a042/32.png) [@Santiago\_D](https://forum.dynare.org/u/Santiago_D)\
**Post date:** [6 May 2024 16:22 UTC](https://forum.dynare.org/t/mod-not-running-in-julia/25659/12 "2024-05-06T16:22:08Z")

</div>

Thank you very much for your reply. When running

```auto
using Pkg
Pkg.test("Dynare")

```

I get the following error:

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

2024-05-06T11:18:42.654: 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[11]:1

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

---

<div class="post-metadata">

**Author:** ![MichelJuillard](https://forum.dynare.org/user_avatar/forum.dynare.org/micheljuillard/32/5318_2.png) [@MichelJuillard](https://forum.dynare.org/u/MichelJuillard)\
**Post date:** [6 May 2024 16:44 UTC](https://forum.dynare.org/t/mod-not-running-in-julia/25659/13 "2024-05-06T16:44:04Z")

</div>

Thanks Santiago,  
it is a different problem occuring during a test of perfect foresight with occasionally binding constraints.  
Please ignore that error for now and try to run your own program in the same Julia session.

Concerning the perfect foresight simulation problem, could you please run

```auto
Pkg.add("PATHSolver")
context = @dynare "/Users/santiago/.julia/packages/Dynare/ZWnXf/test/models/irreversible/irbc2a" "stoponerror";

```

---

<div class="post-metadata">

**Author:** ![Santiago\_D](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/53a042/32.png) [@Santiago\_D](https://forum.dynare.org/u/Santiago_D)\
**Post date:** [6 May 2024 16:53 UTC](https://forum.dynare.org/t/mod-not-running-in-julia/25659/14 "2024-05-06T16:53:08Z")

</div>

Professor Juillard, running the previous code I get:

julia\> context = @dynare “/Users/santiago/.julia/packages/Dynare/ZWnXf/test/models/irreversible/irbc2a” “stoponerror”;  
Dynare version: 0.9.11  
2024-05-06T11:51:54.913: Starting @dynare /Users/santiagodiazespitia/.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-06T11:51:54.957: End of preprocessing  
2024-05-06T11:51:54.961: Start parse\_statements!  
Steady state

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

ERROR: LoadError: MethodError: no method matching reshape(::Nothing, ::Int64, ::Int64)

Closest candidates are:  
reshape(::ChainRulesCore.AbstractThunk, ::Any…)  
@ ChainRulesCore ~/.julia/packages/ChainRulesCore/zgT0R/src/tangent\_types/thunks.jl:58  
reshape(::OffsetArrays.OffsetArray, ::Union{Colon, Int64}…)  
@ OffsetArrays ~/.julia/packages/OffsetArrays/E3eDu/src/OffsetArrays.jl:383  
reshape(::FillArrays.AbstractFill, ::Union{Colon, Integer}…)  
@ FillArrays ~/.julia/packages/FillArrays/95uRF/src/FillArrays.jl:261  
…

Stacktrace:  
[1] make\_simulation\_results!(context::Context, y::Nothing, x::Vector{…}, terminalvalues::Vector{…}, periods::Int64)  
@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/perfectforesight/perfectforesight.jl:945  
[2] mcp\_perfectforesight\_core!(::Dynare.PathNLS, perfect\_foresight\_ws::Dynare.PerfectForesightWs, context::Context, periods::Int64, guess\_values::Vector{…}, initialvalues::Vector{…}, terminalvalues::Vector{…}, dynamic\_ws::Dynare.DynamicWs; maxit::Int64, tolf::Float64, tolx::Float64)  
@ PathSolver ~/.julia/packages/Dynare/ZWnXf/ext/PathSolver.jl:114  
[3] mcp\_perfectforesight\_core!  
@ ~/.julia/packages/Dynare/ZWnXf/ext/PathSolver.jl:8 [inlined]  
[4] \_perfect\_foresight!(context::Context, options::Dynare.PerfectForesightOptions)  
@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/perfectforesight/perfectforesight.jl:362  
[5] perfect\_foresight\_solver!(context::Context, field::Dict{String, Any})  
@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/perfectforesight/perfectforesight.jl:240  
[6] parse\_statements!(context::Context, statements::Vector{Any})  
@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/DynareParser.jl:300  
[7] parser(modfilename::String, commandlineoptions::Dynare.CommandLineOptions)  
@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/DynareParser.jl:224  
[8] dynare(modfile\_arg::String, args::String)  
@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/Dynare.jl:104  
[9] 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.

---

<div class="post-metadata">

**Author:** ![MichelJuillard](https://forum.dynare.org/user_avatar/forum.dynare.org/micheljuillard/32/5318_2.png) [@MichelJuillard](https://forum.dynare.org/u/MichelJuillard)\
**Post date:** [6 May 2024 16:59 UTC](https://forum.dynare.org/t/mod-not-running-in-julia/25659/15 "2024-05-06T16:59:55Z")

</div>

Thanks, Santiago,

could please tell me the result of

```auto
show(err)

```

---

<div class="post-metadata">

**Author:** ![MichelJuillard](https://forum.dynare.org/user_avatar/forum.dynare.org/micheljuillard/32/5318_2.png) [@MichelJuillard](https://forum.dynare.org/u/MichelJuillard)\
**Post date:** [6 May 2024 17:01 UTC](https://forum.dynare.org/t/mod-not-running-in-julia/25659/16 "2024-05-06T17:01:04Z")

</div>

Concerning the original problem with cfunction close, could you please, run your own program that was failing still in the same Julia session

---

<div class="post-metadata">

**Author:** ![Santiago\_D](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/53a042/32.png) [@Santiago\_D](https://forum.dynare.org/u/Santiago_D)\
**Post date:** [6 May 2024 17:03 UTC](https://forum.dynare.org/t/mod-not-running-in-julia/25659/17 "2024-05-06T17:03:25Z")

</div>

**julia\>** show(err)

1-element ExceptionStack:

LoadError: MethodError: no method matching reshape(::Nothing, ::Int64, ::Int64)

Closest candidates are:

reshape(::Distributions.Distribution{\<:Distributions.ArrayLikeVariate}, ::Int64, ::Int64…)

@ Distributions ~/.julia/packages/Distributions/fgrZq/src/reshaped.jl:121

reshape(::FillArrays.AbstractFill, ::Union{Colon, Integer}…)

@ FillArrays ~/.julia/packages/FillArrays/eOEVm/src/FillArrays.jl:265

reshape(::FillArrays.AbstractFill, ::Union{Colon, Int64}…)

@ FillArrays ~/.julia/packages/FillArrays/eOEVm/src/FillArrays.jl:264

…

Stacktrace:

[1] **make\_simulation\_results!(context::Context, y::Nothing, x::Vector{Float64}, terminalvalues::Vector{Float64}, periods::Int64)**

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/perfectforesight/perfectforesight.jl:945

[2] **mcp\_perfectforesight\_core!(**::Dynare.PathNLS, perfect\_foresight\_ws::Dynare.PerfectForesightWs, context::Context, periods::Int64, guess\_values::Vector{Float64}, initialvalues::Vector{Float64}, terminalvalues::Vector{Float64}, dynamic\_ws::Dynare.DynamicWs; maxit::Int64, tolf::Float64, tolx::Float64\*\*)\*\*

@ PathSolver ~/.julia/packages/Dynare/ZWnXf/ext/PathSolver.jl:114

[3] **mcp\_perfectforesight\_core!**

@ ~/.julia/packages/Dynare/ZWnXf/ext/PathSolver.jl:8 [inlined]

[4] **\_perfect\_foresight!(context::Context, options::Dynare.PerfectForesightOptions)**

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/perfectforesight/perfectforesight.jl:362

[5] **perfect\_foresight\_solver!(context::Context, field::Dict{String, Any})**

@ Dynare ~/.julia/packages/Dynare/ZWnXf/src/perfectforesight/perfectforesight.jl:240

[6] **parse\_statements!(context::Context, statements::Vector{Any})**

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

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

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

[8] **dynare(modfile\_arg::String, args::String)**

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

[9] **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[19]:1

---

<div class="post-metadata">

**Author:** ![Santiago\_D](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/53a042/32.png) [@Santiago\_D](https://forum.dynare.org/u/Santiago_D)\
**Post date:** [6 May 2024 17:04 UTC](https://forum.dynare.org/t/mod-not-running-in-julia/25659/18 "2024-05-06T17:04:48Z")

</div>

Regarding the original problem with the cfunction close, I get the following error when I run the .mod file:

**ERROR:** LoadError: MethodError: no method matching gges\_select!(::FastLapackInterface.GeneralizedSchurWs{…}, ::Char, ::Char, ::Matrix{…}, ::Matrix{…}; select::Float64)

Stacktrace:

[1] **gs\_solver!(ws::PolynomialMatrixEquations.GsSolverWs, d::Matrix{…}, e::Matrix{…}, n1::Int64, qz\_criterium::Float64)**

@ PolynomialMatrixEquations ~/.julia/packages/PolynomialMatrixEquations/WcgeN/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[21]:1

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

---

<div class="post-metadata">

**Author:** ![MichelJuillard](https://forum.dynare.org/user_avatar/forum.dynare.org/micheljuillard/32/5318_2.png) [@MichelJuillard](https://forum.dynare.org/u/MichelJuillard)\
**Post date:** [6 May 2024 17:35 UTC](https://forum.dynare.org/t/mod-not-running-in-julia/25659/19 "2024-05-06T17:35:42Z")

</div>

Thanks Santiago,

I made a correction. Could you please run in a new Julia session

```auto
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 that is still failing.

---

<div class="post-metadata">

**Author:** ![MichelJuillard](https://forum.dynare.org/user_avatar/forum.dynare.org/micheljuillard/32/5318_2.png) [@MichelJuillard](https://forum.dynare.org/u/MichelJuillard)\
**Post date:** [6 May 2024 19:05 UTC](https://forum.dynare.org/t/mod-not-running-in-julia/25659/20 "2024-05-06T19:05:59Z")

</div>

Concerning the perfect foresight problem. Could you please do

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

```

[Next page](https://forum.dynare.org/t/mod-not-running-in-julia/25659.md?page=2)
