Matlab has encountered an internal problem

Dear Johanness,
I’m running an estimation code for a medium scale DSGE model in dynare. My system is corei7 6700 intel (8 cores) with 32 G RAM so I don’t have hardware problem but when using mode_compute=6 with mh_replic=2000000, MATLAB can’t continue and in the middle of estimation it says:
matlab has encountered an internal problem and needs to close
I looked at Mathworks and I found out that there used to be problem in Version 2016a, 2015b, 2015a and not in 2017a which I’m using currently. However, there was a post telling that it’s because of the source code you’re using which has problems with mex files and I should contact the source code writers. Could you please help me in this problem.

Hi, Can you please post the error message?

Best,
Stéphane

If you are using Windows 10, please make sure to have the most recent Windows updates. There used to be an issue with Matlab coming from Microsoft’s side. Also, at which stage does the crash happen? During mode-finding or estimation?

Can you reproduce this error? If yes, does it only occur in parallel execution?

As I said before if I change the windows options it does not occur while using parallel. I didn’t try without parallel option but I’ll do that.

I tried it without parallel option and I didn’t get that error!

So there must be a problem with parallel execution. How many nodes are you running with which configuration?

here is the configuration I use:
#cluster needs to always be defined first
[cluster]
#Provide a name for the cluster
Name=Local
#declare the nodes being member of the cluster
Members=n1
#declare nodes (they need not all be part of a cluster)
[node]
#name of the node
Name=n1
#name of the computer (localhost for the current machine)
ComputerName=localhost
#cores to be included from this node
CPUnbr=[1:8]
#path to matlab.exe; on Windows, Matlab’s bin folder is in the system path
#so we only need to provide the name of the exe file
MatlabOctavePath=matlab
#Dynare path you are using
DynarePath=C:\dynare\4.5.1\matlab

Did you try with a smaller number of nodes?

No, but I can do it. I should note that while my computer is estimating it has at least 25 percent idle CPU and more than 50 percent idle RAM, so I think it should work! Am I right?

How many chains are you using?

I tried 2, 3 and 4 and got error with all of them

That is hard to debug from our side. Have you tried contacting Mathworks as the error message suggests?

Unfortunately no but I’ll do.

But as I told you before I found a post there saying that it is problem in mex files reading and I should contact source codes writers. Beside this, when I change windows options in using more RAM, I don’t get error. Anyway, thanks a lot for your time.

The please try running the estimation without the mex-files. For example, rename the mex-folder temporarily so Dynare cannot find it. During estimation, Dynare should only use the mjdgges.mex. If Dynare does not find it, it will resort to an m-file instead.

And wont it reduce the process speed?

It will, but we are currently still trying to find out what the problem is.