Estimating using parallel gets stuck

I try to estimate a standard model using parallel computing on a single computer with many cores.

It happens frequently that Dynare gets caught in an infinite loop within the masterParallel function, i.e. I get no error message but Matlab keeps running without any progress (in terms of the displayed progress figures), not leaving this function anymore.

Whether this occurs depends on estimation parameters, i.e. the number of chains, chain length or mh_init_scale. It seems to happen more often when estimating the model non-linearly but it also happens for the linear approximation.

I think there is nothing fundamentally wrong with the model (which is standard) or the code since I also find estimation parameters for which it works.

I use Windows 10, Matlab 21a and the config file reads:

Name = Local
Members = n1

Name = n1
ComputerName = localhost
CPUnbr = 64
NumberOfThreadsPerJob = 1
DynarePath = C:\dynare\5.4\matlab

Any advice or pointers are highly appreciated!

Unfortunately, that is almost impossible to debug.

Thanks for the reply! Difficult to debug, given the information I provided or in general?

Or is there maybe a more detailed description of the masterParallel function so that I can go through it in debug mode to trace the bug down?

Both. You are reporting a seemingly randomly occurring issue on a system we don’t have access to. At the same time, debugging parallel execution is generally hard, because it requires checking in with newly spawned Matlab instances.

I see, thanks for the clarification. I will look into this to see whether I can find out more.