We now provide native pkg installers for the unstable version of Dynare and for Dynare 5.5.
Thanks to all!
[UPDATED!]
Dear users,
MATLAB has finally released an Apple Silicon version (R2023b), so we are preparing native Apple Silicon packages of Dynare.
Currently, I am the only member of the team with an Apple Silicon machine and therefore I would like other uses with M1 or M2 machines to test the compiled pkg. For this you have to:
Install MATLAB R2023b for Apple Silicon following the the official instructions.
We recommend, but donât require, the following: Optimization, Global Optimization, Statistics and Machine Learning, Econometrics, and Control System.
You can check the architecture of your MATLAB by running the following MATLAB command:
mexext
If you get mexmaca64 you are running Apple Silicon (arm64), if you get mexmaci64 you are running Intel on Rosetta2 (x86_64).
Download and install one of the following packages (THESE ARE BETA!!!):
I have a Mac with Apple silicon and would like to serve as a tester for ARM64 native Dynare version. I have some questions about how best to proceed:
I have installed MATLAB R2023a, which I understand still runs using Rosetta 2. Does that matter, or should I get the R2022a beta version specifically since it is the open beta for Apple silicon?
Is there a later beta package available that I should use to test? It appears that the links here correspond to Dynare v5.1 and v5.2. If there is a later beta version available, I am happy to test that too.
My .mod files use the Statistics and Machine Learning toolbox. Will that be a problem?
Let me know, and Iâll report back with my experience. Thank you to you and the Dynare team for all your work on this!
Hey, @wmutschl, Matlab released the ââR2023b prereleaseââ on June 14, which directly supports Apple chips (m-series) and does not require Rosetta 2, and has many more Toolboxes than the 2022 beta version, including âoptimizationâ and âGlobal Optimizationâ. I tested âdynare-5.2-beta-arm54.pkgâ running ââexample3.modââ and found that it successfully solved the optimization problem. Although the toolbox is still being tested, we can now use the ââfsolveââ commandâŚAwesome!
Seconded! Just ran my mod files (which call fsolve) with 5.2-beta pkg and the 2023b prerelease version. Worked like a charm! Looking forward to the official release!
The final version of R2023b for Apple Silicon is available. I have updated the first post, please test the new packages and report weird behavior. The progress of official packages can be followed in this merge request.
So happy to hear that you are developing a native apple silicon dynare!
I installed the official apple silicon MATLAB R2023b and dynare 6.0 pkg for MacOS arm64, which you linked to above.
However, I experienced an error on the first attempt to run my mod file:
âUnrecognized function or variable ânum_procsâ.â
Hope this helps your development!
Thank you for this feedback. Do you have numprocs anywhere in your mod file? Feel free to share it here or with me. It is indeed a command not supported on
Thank you! I appreciate your feedback very much! We plan to release Dynare 5.5 with native Apple Silicon support very soon, you can follow the progress here
Also one more question: were you asked for an admin password in the installer? I am just asking, because the new installer does not require this, but for some reason in my testing it sometimes did ask for one and I had to specifically click âOnly for Meâ to overcome this. So I am just curious about your experience.
Gosh, I canât remember exactly, even though itâs only been a day. But I think I right-clicked on the file, opened it, entered the password, and installed it.
Some notes on the new macOS installer (this information is also given in the welcome and conclusion screens of the pkg installer):
Instructions
This installation does not require administrative privileges. If for some reason admin rights are requested, use âChange Install Locationâ and select âInstall for me onlyâ.
By default Dynare will be installed into /Applications/Dynare. To modify the installation path, click Customize after accepting the license. Then, under Location, select your desired folder.
Troubleshooting with older versions of Dynare
Installing into /Applications/Dynare might fail if you have older versions of Dynare installed in /Applications/Dynare. To fix this, modify the ownership by executing the following command in Terminal.app:
sudo chown -R "$USER":staff /Applications/Dynare
Postinstallation Recommendations
Xcode Command Line Tools
Dynare highly benefits from installing Xcode Command Line Tools (an Apple product). To install the Xcode Command Line Tools type the following into Terminal.app:
xcode-select --install
Compilation Environment for use_dll option
Dynare ships a compilation environment that can be used with the use_dll option. To install this environment correctly, the Xcode Command Line Tools are sufficient. Check this by running the following command in the MATLAB command window:
mex -setup
If you get a warning in MATLAB, that Xcode is installed, but its license has not been accepted, run the following command in the terminal:
Moreover, we recommend making use of optimized compilation flags and for this you need to install GCC via Homebrew. Follow https://brew.sh to install Homebrew and then type the following into Terminal.app:
brew install gcc@13
If you already have installed GCC, Dynare will automatically prefer it for use_dll if the binaries are either in /opt/homebrew/bin/gcc-13 (arm64) or in /usr/local/bin/gcc-13 (x86_64). Otherwise, it will fall back to Clang in /usr/bin/clang (for both arm64 and x86_64).