Problem with Dynare Version

Hello,
I have just installed Matlab_R2024b, The configuration of my Mac is Apple M3 Pro with macOS Sonoma 15.1. And when I try to run my .mod file with the version 6.2-arm64(or 6.1-arm64) of Dynare, it takes more than 3 hours to get solution. But when I use other’s computer(whose Matlab version is Matlab_R2022b and Dynare version is 5.1), it only takes less than 2 minutes. I want to know why it happens and how to solve it.

Can someone help? Thanks in advance,
Best regards,
Zowie

@wmutschl That is very unusual. Which file are you running? Is there any indication which step of the computation takes unusually long?

Thanks a lot for your reply. I am working with a .mod file in Dynare, where I aim to solve a perfect foresight simulation transitioning from one steady state to another. While I am able to obtain a solution, I have encountered significant runtime differences across Dynare versions. Specifically, the simulation completes within two minutes on Dynare 5.1, but takes considerably longer (more than a reasonable time) on Dynare 6.1 and 6.2.

I would greatly appreciate any guidance or optimization suggestions that might help reduce the computation time for versions 5.1 and 6.2.
eqm_both_tax.mat (650 Bytes)
tax_ss.mod (10.8 KB)

Thank you very much for your assistance.

Best regards,
Zowie

@sebastien Could you please have a look. I can confirm that Dynare 6 takes significantly longer.

The slowness is due to the options_.debug = 1; line. Remove that and it will go much faster.

Still need to understand why.

@jpfeifer The problem comes from the function check_Jacobian_for_singularity in sim1.m. The computation of the rank and null spaces are quite expensive (keeping in mind that the Jacobian has been turned into a dense matrix).

It remains to be seen whether we really want to fix this. After all, debugging mode is not meant to be fast.

We probably should filter out that case. This part of the debugging code is supposed to be run with at most periods=3 to check for fundamental issues, not in each iteration of the solution.

Sounds good. Then please open an issue or a merge request.

I did at Decide how to treat Jacobian singularity check in debug mode. (#1944) · Issues · Dynare / dynare · GitLab