Error in CMR(2014) (using macOS Catalina (10.15) )

Dell all,
I can run cmr(2014) in matlab2019 dynare 4.3.2 on windows, but I get an error when running macos 10.15 matlab2019 dynare 4.3.2, how should I solve it.

Blockquote zsh:1:
bad CPU type in executable: /Applications/Dynare/4.3.2/matlab/dynare_m
error use dynare (line 114)
DYNARE: preprocessing failed

Thank you
songyao

1 Like

How did you install that Dynare version? There may be an issue with the version combination of Matlab, Dynare and macos

thanks!
I downloaded it from the designated website and installed it directly on macos. After the installation, I added the path folder dynare4.3.2’s subfolder matlab in Matlab2019.
Do I have to downgrade my matlab version?

@HoutanBastani Do you have an idea?

Many people encountered similar problems. I tried to solve them based on some experience, but failed.
like this: https://unix.stackexchange.com/questions/550616/executing-bad-cpu-type-executables-in-10-15-x

Is there a reason for using Dynare 4.3.2 and not a newer version?

yes, but you know that CMR(2014) just support Dynare 4.3.2 rather than others.
By the way, I can use dynare 4.6.1 running other mod.

I guess on a Mac that will be a problem.

macOS 10.15 no longer supports 32-bit binaries. See: 32-bit app compatibility with macOS High Sierra 10.13.4 and later - Apple Support

Apple’s transition to 64-bit technology is now complete. Starting with macOS Catalina, 32-bit apps are no longer compatible with macOS. If you have a 32-bit app, please check with the app developer for a 64-bit version.

The first 64-bit preprocessor we distributed on macOS was in Dynare 4.5.0. Older preprocessors were distributed as 32-bit in the official Dynare packages. You can either recompile an older preprocessor, choosing a commit after we transitioned the code to 64-bit (you could find this transition in the git history), or you could use an older version of Dynare on macOS by installing macOS < 10.15 on your computer or on a virtual machine. Oh! You could also perhaps try dropping the preprocessor binary from Dynare 4.5.0 into your 4.3.2 distribution. If the output files didn’t change too much between those two versions perhaps it would work with the Dynare 4.3.2 backend…

Thank you for your patient answers
In fact, I have installed a virtual machine, on the virtual machine can run Dynare 4.3.2 through win10.
Many thanks.
songyao

This is really helpful, thanks a lot. I have been trying to run dynare 4.1.1 on macOS 15.10. For compatibility with my own codes I need the 4.1.1 version.

I have copied and replaced the executable dynare_m from the 4.5.0 version of dynare into Dynare/4.1.1/matlab. It works, however there is a series of additional things added/modified in 4.5.0 that won’t work in 4.1.1 such as the dates or dseries utilities etc… Even commenting those lines out in the modfile_name.m produced by the preprocessor gives additional errors.

I guess my best bet is to recompile the preprocessor:

Any guidance on this? The GitLab and GitHub pages give instructions on how to recompile the whole dynare source. Is there a way to recompile the 4.1.1 preprocessor only? Would this give me a 64-bit version of the executable dynare_m that I can then use with the rest of the old 4.1.1 dynare files?

Many thanks,
Luca

Yes, you can recompile the 4.1.1 preprocessor (and any mex files) by downloading the source from here https://www.dynare.org/release/source/

4.1 is rather old, so I don’t remember the state of the build system for that.

I think (just running from memory here) you can just type ./configure in the root dynare directory and the output will tell you what you’ll need to install to compile the preprocessor. When you see the output that the preprocessor will be complied, you can type cd preprocessor then make. The preprocessor executable will be created and named dynare_m. You can drop this in your 4.1.1/matlab directory.

That’s great, thank you. I’ll give it a go!

Hello! I have a similar issue (macOS Version 10.15.6 and I need to install the 4.4.3 version of Dynare). Would it be possible for you to share more details on how to make this work? Or is there another alternative for me to use the codes that were made to run with the 4.4.3 version? Thanks in advance!

Try https://www.dynare.org/release/macos/

I’ve already accessed that link when I downloaded the 4.4.3 version.

When I try to run Dynare on Matlab (macOS Catalina Version 10.15.6 with Dynare 4.4.3 version), I get the following error message:

Error using dynare (line 174)
DYNARE: preprocessing failed

Any advice on how to fix this in more detail?

Thanks in advance!

yes, because macOS 10.15 no longer supports 32-bit binaries.
So CMR(2014) cannot run under 10.15 version anyway.
I think, there are only two ways to solve it, one is to change the code to conform to the latest dynare version, and the other is to run it with windows dynare 4.3.2.
Of course I used the latter, the simplest。
best wishes!