Dynare failing to read file suddenly

I don’t know what has happened to suddenly cause this error code:

dynare dw_AF13
Starting Dynare (version 6.1).
Calling Dynare with arguments: none
ERROR: Could not open file: dw_AF13.mod
Preprocessing time: 0h00m00s.
Error using dynare
Dynare: preprocessing failed

I have been working with MatLab and Dynare for ages on this file. I’ve set the working directory for the entire path. I’ve also uninstalled and reinstalled both MatLab and Dynare.

Any idea why this could be happening… I just shut MatLab in the afternoon, and when I re-opened, it is not able to read the files it’s been reading for months.

Thank you in advance.

attached is the zip file
ScienceDirect_files_06Jun2024_08-59-06.459 copy.zip (1.4 MB)

Maybe some more info is helpful: I have opened other .mod files in different locations, and they work fine.

I tried to open older versions of this file, and it won’t open. The first time I try to process the mod file (from whatever older version), i get this message:

dynare dw_AF13
Warning: File ‘dw_AF13.log’ not found.
In dynare (line 194)
Starting Dynare (version 6.1).
Calling Dynare with arguments: none
ERROR: Could not open file: dw_AF13.mod
Preprocessing time: 0h00m00s.
Error using dynare
Dynare: preprocessing failed

then the .log file appears in the current folder (the path), and then after I call the .mod file again i then get this error:

dynare dw_AF13
Starting Dynare (version 6.1).
Calling Dynare with arguments: none
ERROR: Could not open file: dw_AF13.mod
Preprocessing time: 0h00m00s.
Error using dynare
Dynare: preprocessing failed

I really don’t know what could be happening…

Are you running Dynare from a cloud-synced drive?

I am not. Both MatLab and Dynare are in my Applications, and I set the Dynare path as follows:

addpath /Applications/Dynare/6.1-x86_64/matlab

Why is the log-file dw_AF13.log with error message in the main folder while the actual mod-file is located in the prog subfolder?

That’s an excellent point. I’m not sure… I have been specifying the entire path, and MatLab/Dynare seems to know the .mod file exists, and also identifies its path correctly.

Something seems off for me now in all these folders. I downloaded the folder from scratch from the authors’ publication (they provide it in their Appendix), and I tried running .mod file (i saved the folder from scratch in a new location), and it wouldn’t open. I got the same error messages…

I also tried to copy to contents to a empty script files, and again same error.

But you’re right; the last .log file that ran is saved at from today around 12:45 in the subfolder prog, but then now all of them are going directly to the main folder.

a little more information form my troubleshooting: I added a simple .mod file that was running fine in a different location to the subfolder prog. In that subfolder, I got the same issue. So I am trying to see why suddenly the below commands are not working to ensure that it runs files in subfolders…
Maybe something seems off in it?

mainDir = '/Users/…
p=genpath(mainDir);
addpath(p)
pwd

very bizarre! I just added the main path to the prog folder, and if needed will consolidate in one folder. It’s working now.
Thank you for your help troubleshooting!