Dynare.jl issueshttps://git.dynare.org/DynareJulia/Dynare.jl/-/issues2021-04-26T12:32:44Zhttps://git.dynare.org/DynareJulia/Dynare.jl/-/issues/1Use precompiled models2021-04-26T12:32:44ZMichelJuillardUse precompiled models1. If the dynamic and static model functions are written in a module, these modules will be precompiled by Julia as loaded directly as long as the timestamp of the source file is older than the timestamp of the precompiled code. See http...1. If the dynamic and static model functions are written in a module, these modules will be precompiled by Julia as loaded directly as long as the timestamp of the source file is older than the timestamp of the precompiled code. See https://docs.julialang.org/en/v1/manual/modules/#Module-initialization-and-precompilation
2. These modules can be dynamically called by DynareJulia with
```
eval(Meta.parse("using "*<MODFILENAME>*"Dynamic))
eval(Meta.parse("using "*<MODFILENAME>*"Static))
```
3. To use this feature, the preprocessor must write a new version of ``<MODFILENAME>Dynamic.jl``, ``<MODFILENAME>Static.jl``, only if their content is different from the existing version
4. Functions ``<MODFILENAME>_set_auxiliary_series.jl`` and ``<MODFILENAME>_dynamic_set_auxiliary_series.jl`` that are currently written in a single file and inside ``module <MODFILENAME>SetAuxiliarySeries``.
5. In ``<MODFILENAME>Dynamic.jl`` and ``<MODFILENAME>Static.jl``, the statement ``using Utils`` on the 6th line must be replaced by:
```
using Dynare: get_power_deriv
using StatFuns
```
It isn't necessary to have a full module just for ``get_power_deriv()``. ``Utils.jl`` is now include in ``Dynare.jl`` file. Execution of statistical functions need module ``StatFuns``
6. After these modifications are implemented in the preprocessor, we need to modify ``load_dynare_function`` and ``load_dynare_function_1`` in ``model.jl``Sébastien VillemotSébastien Villemot