# Error messages when solving the DSGE model

**URL:** <https://forum.dynare.org/t/error-messages-when-solving-the-dsge-model/21737>\
**Category:** Installation and Setup\
**Created:** [6 January 2023 21:28 UTC](https://forum.dynare.org/t/error-messages-when-solving-the-dsge-model/21737 "2023-01-06T21:28:33Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![swang3](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/3be4f8/32.png) [@swang3](https://forum.dynare.org/u/swang3)\
**Post date:** [6 January 2023 21:28 UTC](https://forum.dynare.org/t/error-messages-when-solving-the-dsge-model/21737/1 "2023-01-06T21:28:33Z")

</div>

Hello,

I am currently using Dynare 4.4.5 & Matlab 2017a to solve a DSGE model. However, the error message below keeps popping out:  
“File: baseline\_V1\_HHlender.m Line: 826 Column: 1  
Unexpected MATLAB operator.”

I looked into the HHlender.m Line 826 and found “&&&&&&&&&&&&&&” right below M\_.Sigma\_e(11,11). Thus ,I manually removed “&&&&&&&&&&&&&&” and saved the m.file. However, “&&&&&&&&&&&&&&” appeared again when I run the program on Dynare.

Would there be any suggestions for this issue? Thanks in advance!

Best,  
Suzie

---

<div class="post-metadata">

**Author:** ![VS19](https://forum.dynare.org/letter_avatar_proxy/v4/letter/v/77aa72/32.png) [@VS19](https://forum.dynare.org/u/VS19)\
**Post date:** [6 January 2023 22:06 UTC](https://forum.dynare.org/t/error-messages-when-solving-the-dsge-model/21737/2 "2023-01-06T22:06:05Z")

</div>

Can you post the file?

---

<div class="post-metadata">

**Author:** ![swang3](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/3be4f8/32.png) [@swang3](https://forum.dynare.org/u/swang3)\
**Post date:** [6 January 2023 22:16 UTC](https://forum.dynare.org/t/error-messages-when-solving-the-dsge-model/21737/3 "2023-01-06T22:16:36Z")

</div>

Please see attached files. Thanks.

---

<div class="post-metadata">

**Author:** ![VS19](https://forum.dynare.org/letter_avatar_proxy/v4/letter/v/77aa72/32.png) [@VS19](https://forum.dynare.org/u/VS19)\
**Post date:** [7 January 2023 00:25 UTC](https://forum.dynare.org/t/error-messages-when-solving-the-dsge-model/21737/4 "2023-01-07T00:25:42Z")

</div>

Try commenting out `&&&` part on line 317 and fixing syntax errors in line 415 (use of comma instead of semi-colon; redundant `'` marks). See if that helps.

---

<div class="post-metadata">

**Author:** ![swang3](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/3be4f8/32.png) [@swang3](https://forum.dynare.org/u/swang3)\
**Post date:** [7 January 2023 01:01 UTC](https://forum.dynare.org/t/error-messages-when-solving-the-dsge-model/21737/5 "2023-01-07T01:01:24Z")

</div>

Thank you very much for your time and suggestion! Problem solved!

Best,  
Suzie

---

<div class="post-metadata">

**Author:** ![swang3](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/3be4f8/32.png) [@swang3](https://forum.dynare.org/u/swang3)\
**Post date:** [7 January 2023 04:16 UTC](https://forum.dynare.org/t/error-messages-when-solving-the-dsge-model/21737/6 "2023-01-07T04:16:46Z")

</div>

Hello,

I have encountered another issue. Would you mind helping me out again? Thanks again!

After running Dynare, I kept seeing the warning message:  
“Warning: The file ‘/Users/sw41/Dropbox/research/9-debt financing\_CU/code/dynare/baseline\_V1\_HHlender.m’ could not be  
cleared because it contains MATLAB code that is currently executing.”

This issue was discussed before on the forum, however, I still cannot proceed with simulation by having “noclearall” option. My Matlab is a 2017a version. Attached are the mod and m files, again! Thanks for the advice!  
[baseline\_V1\_HHlender.m](https://forum.dynare.org/uploads/short-url/jIUW06231DLEXwiIQwFAzt5Ymog.m) (39.1 KB)  
[baseline\_V1\_HHlender.mod](https://forum.dynare.org/uploads/short-url/vwof3YHg5uEnRfEJGKgok32OejT.mod) (18.2 KB)

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [8 January 2023 21:11 UTC](https://forum.dynare.org/t/error-messages-when-solving-the-dsge-model/21737/7 "2023-01-08T21:11:01Z")

</div>

Did you try the recent stable version of Dynare?

---

<div class="post-metadata">

**Author:** ![swang3](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/3be4f8/32.png) [@swang3](https://forum.dynare.org/u/swang3)\
**Post date:** [8 January 2023 21:36 UTC](https://forum.dynare.org/t/error-messages-when-solving-the-dsge-model/21737/8 "2023-01-08T21:36:02Z")

</div>

Yes, I switched the original version 4.5.5 to version 5.3. However, the same issue still exists so that I cannot run the program.

I also made sure that there is no conflict between two dynare versions in the path, and no other Matlab code is running. This is why I am confused why the warning message keeps saying there is another Matlab code is executing.

Thanks for the suggestion if you have any!

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [9 January 2023 07:27 UTC](https://forum.dynare.org/t/error-messages-when-solving-the-dsge-model/21737/9 "2023-01-09T07:27:08Z")

</div>

Can you please post the full log file/message.

---

<div class="post-metadata">

**Author:** ![swang3](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/3be4f8/32.png) [@swang3](https://forum.dynare.org/u/swang3)\
**Post date:** [9 January 2023 12:56 UTC](https://forum.dynare.org/t/error-messages-when-solving-the-dsge-model/21737/10 "2023-01-09T12:56:10Z")

</div>

Sure. The message below keeps showing repeatedly.

Starting Dynare (version 5.3).  
Calling Dynare with arguments: none  
Starting preprocessing of the model file …  
Found 50 equation(s).  
Evaluating expressions…done  
Computing static model derivatives (order 1).  
Computing dynamic model derivatives (order 1).  
Processing outputs …  
done  
Preprocessing completed.

Starting Dynare (version 5.3).  
Calling Dynare with arguments: none  
Warning: The file ‘/Applications/Dynare/5.3/matlab/+baseline\_V1\_HHlender/driver.m’ could not be cleared because it  
contains MATLAB code that is currently executing.

> In dynare (line 243)  
> In baseline\_V1\_HHlender.driver (line 731)  
> In dynare (line 281)

and so on …

Best,  
Suzie

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [9 January 2023 13:29 UTC](https://forum.dynare.org/t/error-messages-when-solving-the-dsge-model/21737/11 "2023-01-09T13:29:57Z")

</div>

And which OS are you using?

---

<div class="post-metadata">

**Author:** ![swang3](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/3be4f8/32.png) [@swang3](https://forum.dynare.org/u/swang3)\
**Post date:** [9 January 2023 13:46 UTC](https://forum.dynare.org/t/error-messages-when-solving-the-dsge-model/21737/12 "2023-01-09T13:46:21Z")

</div>

I use macOS Catalina  
Version 10.15.7

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [9 January 2023 15:50 UTC](https://forum.dynare.org/t/error-messages-when-solving-the-dsge-model/21737/13 "2023-01-09T15:50:10Z")

</div>

That means I have neither access to the OS nor the Matlab version. Did you try with a newer Matlab version or Octave?

---

<div class="post-metadata">

**Author:** ![swang3](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/3be4f8/32.png) [@swang3](https://forum.dynare.org/u/swang3)\
**Post date:** [9 January 2023 15:55 UTC](https://forum.dynare.org/t/error-messages-when-solving-the-dsge-model/21737/14 "2023-01-09T15:55:16Z")

</div>

Hello Prof Pfeifer,

I haven’t tried a newer Matlab version (as it may cost more than the funds I have right now). Could the problem possibly be solved by using a different OS version? Or, was there anything wrong with my code?

Thanks again.

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [9 January 2023 16:34 UTC](https://forum.dynare.org/t/error-messages-when-solving-the-dsge-model/21737/15 "2023-01-09T16:34:53Z")

</div>

First of all, it’s just a warning and not an error. I am pretty sure it’s harmless and can be ignored, but there is no way to properly diagnose that right now.  
Note that Octave is free.

---

<div class="post-metadata">

**Author:** ![swang3](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/3be4f8/32.png) [@swang3](https://forum.dynare.org/u/swang3)\
**Post date:** [9 January 2023 23:27 UTC](https://forum.dynare.org/t/error-messages-when-solving-the-dsge-model/21737/16 "2023-01-09T23:27:23Z")

</div>

Prof. Pfeifer,

Although it’s just a warning, the entire set of warning shows up repeatedly and never comes to an end. I had to press command plus period to stop the program from running. When I checked the workplace, I couldn’t find the output. Would be possible for me to obtain the results in this situation?

Thanks for further info!

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [10 January 2023 07:28 UTC](https://forum.dynare.org/t/error-messages-when-solving-the-dsge-model/21737/17 "2023-01-10T07:28:36Z")

</div>

Looking at your path

> [@swang3](#):
>
> ‘/Applications/Dynare/5.3/matlab/+baseline\_V1\_HHlender/driver.m

suggests you are running your mod-file within your Dynare installation folder. That may be the problem.

---

<div class="post-metadata">

**Author:** ![swang3](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/3be4f8/32.png) [@swang3](https://forum.dynare.org/u/swang3)\
**Post date:** [10 January 2023 09:17 UTC](https://forum.dynare.org/t/error-messages-when-solving-the-dsge-model/21737/18 "2023-01-10T09:17:07Z")

</div>

Prof. Pfeifer,

I just realized that having dynare filename on the mod file rather than typing it on the command window caused all the troubles I encountered. Thank you again for your constant help. I greatly appreciate your time.

Best,  
Shu-Ling
