Issue running 4.6.1

I’ve just installed dynare 4.6.1. I saved it in the typical setting (C:\dynare\4.6.1\matlab), and have added that as a path to matlab via `set path’.

I’m testing out a very basic mod file used for teaching purposes that I know is completely bug proof/correct.

When I type: dynare basic

I get the following error message:

dynare basic
Using 64-bit preprocessor
Starting Dynare (version 4.6.1).
Calling Dynare with arguments: none
ERROR: Could not open file: basic.mod

Error using fprintf
Invalid file identifier. Use fopen to generate a valid file identifier.

Error in dynare (line 276)
fprintf(fid, ‘%s’, result);

fprintf
Error using fprintf

Does anyone know what’s going on?

1 Like

Can you exclude that your antivirus program blocks the exe file?

Thanks for your prompt response. I can’t be totally sure, although I’ve let my MacAfee antivirus subscription lapse for a few days (stupid I know), so my guess is no?

I read another post telling the user to try running matlab as administrator. I’ve done this, and now I get a different error. When I type: dynare basic, I get the following:

dynare basic
Using 64-bit preprocessor
Starting Dynare (version 4.6.1).
Calling Dynare with arguments: none
ERROR: Could not open file: basic.mod

Error using dynare (line 282)
Dynare: preprocessing failed

I’ve attached the mod file for reference. Uploading: basic.mod…basic.mod (591 Bytes)

Your upload did not work

I tried again, how about now?basic.mod (591 Bytes)

Apart from some encoding in your mod-file I can run the file.

Any idea what the “preprocessing failed” error means?

The central issue is always

That is an access problem that regularly happens if there are insufficient read/write permissions. That is often related to antivirus or admin restrictions.

Do you know why the error changed to “preprocessing failed” instead of the “error using fprintf” when I ran MATLAB as administrator?

I’ve excluded the dynare folder from antivirus scans, so I don’t think that’s it.

That suggests a problem with write permissions in the folder when not running the program as an admin.

So if I’m already running it as an administrator, do you have any advice on how to grant sufficient write permissions? I’m running it on Windows.

As I said, I think it’s the antivirus program.

I’ve deleted dynare, turned off all antivirus software, and redownloaded dynare. I’ve given full read/write permission to every user on my machine to every folder I can think of including the dynare folder, and all MATLAB folders. I am still getting the following error:

dynare basic
Using 64-bit preprocessor
Starting Dynare (version 4.6.1).
Calling Dynare with arguments: none
ERROR: Could not open file: basic.mod

Error using dynare (line 282)
Dynare: preprocessing failed

Do you have any idea what else might be going on?

1 Like

Turns out the problem was simply that the basic.mod file was not saved in MATLAB’s current folder which is evidently a crucial step.

1 Like

Hey . I’m facing the same problem. Please help. How did you resolve it .

As @wam2133 wrote:

So putting the mod-file into the Matlab current folder is the solution.