I can’t get Dynare to work from Docker. I’ve also tried two Ubuntu 20.04 machines (one physical, one VPS), and neither work.

It did work on some VPS (20.04) I started for this purpose.

I’m getting a segmentation fault on many models.

Is there a Docker config that would be good?

Working w\o GUI, if that’s an issue.

I want to run the models on the MMB, and don’t want to maintain another full fledged VPS for this.

Have you tried whether the problem is Dynare itself or the MMB?

Hello Professor. Thank you for the comment.

I’m using the replication packge for the MMB (https://github.com/IMFS-MMB/mmb-rep/archive/master.zip). Have tried several of the models. Primarily “EAUS_NAWM08 Coenen et al. (2008), New Area Wide model of Euro Area and USA”

They do tun under a dedicated VPS I’ve tried, like I said. And they also run fairly well under a windows machine. Just not directly under my Linux servers \ docker image.

I’ve tried with the default Dynares for 20.04 and 18.04 via apt, through their respective docker containers.

i.e., I’ve tried with Dynare 4.6.0 (as it ships with Ubuntu 20.04) and wit 4.5.4-1 (as it ships with 18.04).

It’s easy for me to try with all the images here:

I mainly want to try and do U.S. GDP forecasts for practical purposes with this. So if you can please recommend a model from the replication package or some other source, I can try and run that and give the output.

My question was whether the files in the `examples`

-subfolder of any Dynare version run without issues.

Thank you for the reply Professor,

Using apt inside the docker to install dynare-doc doesn’t put ‘examples’ where they should be, for some reason (/usr/share/doc/dynare/examples).

Anyway, I’ve downloaded the .deb and extracted it manually. Am still getting segmentation faults. It comes after some results. This is for ‘ramst.m’:

```
warning: This version of Octave is not supported. Consider installing version 4.2.1 of Octave,
otherwise m files will be used instead of precompiled mex files and some features, like solution
of models approximated at third order, will not be available.
warning: called from
dynare_config at line 97 column 5
dynare at line 71 column 12
warning: function /usr/lib/dynare/matlab/missing/isfile/isfile.m shadows a core library function
warning: called from
dynare_config at line 140 column 1
dynare at line 71 column 12
warning: function /usr/lib/dynare/matlab/missing/corrcoef/corrcoef.m shadows a core library function
warning: called from
dynare_config at line 140 column 1
dynare at line 71 column 12
warning: function /usr/lib/dynare/matlab/missing/ordeig/ordeig.m shadows a core library function
warning: called from
dynare_config at line 140 column 1
dynare at line 71 column 12
Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Local state space iteration (second order).
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
[mex] Quasi Monte-Carlo sequence (Sobol).
[mex] Markov Switching SBVAR.
Using 64-bit preprocessor
Starting Dynare (version 4.5.4).
Starting preprocessing of the model file ...
Found 2 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
Processing outputs ...
done
Preprocessing completed.
STEADY-STATE RESULTS:
c 1.53061
k 12.7551
free(): invalid pointer
fatal: caught signal Aborted -- stopping myself...
Aborted (core dumped)
```

This is for ‘example1.mod’:

```
warning: This version of Octave is not supported. Consider installing version 4.2.1 of Octave,
otherwise m files will be used instead of precompiled mex files and some features, like solution
of models approximated at third order, will not be available.
warning: called from
dynare_config at line 97 column 5
dynare at line 71 column 12
warning: function /usr/lib/dynare/matlab/missing/isfile/isfile.m shadows a core library function
warning: called from
dynare_config at line 140 column 1
dynare at line 71 column 12
warning: function /usr/lib/dynare/matlab/missing/corrcoef/corrcoef.m shadows a core library function
warning: called from
dynare_config at line 140 column 1
dynare at line 71 column 12
warning: function /usr/lib/dynare/matlab/missing/ordeig/ordeig.m shadows a core library function
warning: called from
dynare_config at line 140 column 1
dynare at line 71 column 12
Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Local state space iteration (second order).
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
[mex] Quasi Monte-Carlo sequence (Sobol).
[mex] Markov Switching SBVAR.
Using 64-bit preprocessor
Starting Dynare (version 4.5.4).
Starting preprocessing of the model file ...
Found 6 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
- order 2
Processing outputs ...
done
Preprocessing completed.
warning: strmatch is obsolete; use strncmp or strcmp instead
free(): invalid pointer
fatal: caught signal Aborted -- stopping myself...
Aborted (core dumped)
```

Example2:

```
warning: This version of Octave is not supported. Consider installing version 4.2.1 of Octave,
otherwise m files will be used instead of precompiled mex files and some features, like solution
of models approximated at third order, will not be available.
warning: called from
dynare_config at line 97 column 5
dynare at line 71 column 12
warning: function /usr/lib/dynare/matlab/missing/isfile/isfile.m shadows a core library function
warning: called from
dynare_config at line 140 column 1
dynare at line 71 column 12
warning: function /usr/lib/dynare/matlab/missing/corrcoef/corrcoef.m shadows a core library function
warning: called from
dynare_config at line 140 column 1
dynare at line 71 column 12
warning: function /usr/lib/dynare/matlab/missing/ordeig/ordeig.m shadows a core library function
warning: called from
dynare_config at line 140 column 1
dynare at line 71 column 12
Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Local state space iteration (second order).
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
[mex] Quasi Monte-Carlo sequence (Sobol).
[mex] Markov Switching SBVAR.
Using 64-bit preprocessor
Starting Dynare (version 4.5.4).
Starting preprocessing of the model file ...
Found 6 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
- order 2
Processing outputs ...
done
Preprocessing completed.
STEADY-STATE RESULTS:
y 0.0775944
c -0.218662
k 2.40547
a 0
h -1.23183
b 0
warning: strmatch is obsolete; use strncmp or strcmp instead
free(): invalid pointer
fatal: caught signal Aborted -- stopping myself...
Aborted (core dumped)
```

Example3:

```
warning: This version of Octave is not supported. Consider installing version 4.2.1 of Octave,
otherwise m files will be used instead of precompiled mex files and some features, like solution
of models approximated at third order, will not be available.
warning: called from
dynare_config at line 97 column 5
dynare at line 71 column 12
warning: function /usr/lib/dynare/matlab/missing/isfile/isfile.m shadows a core library function
warning: called from
dynare_config at line 140 column 1
dynare at line 71 column 12
warning: function /usr/lib/dynare/matlab/missing/corrcoef/corrcoef.m shadows a core library function
warning: called from
dynare_config at line 140 column 1
dynare at line 71 column 12
warning: function /usr/lib/dynare/matlab/missing/ordeig/ordeig.m shadows a core library function
warning: called from
dynare_config at line 140 column 1
dynare at line 71 column 12
Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Local state space iteration (second order).
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
[mex] Quasi Monte-Carlo sequence (Sobol).
[mex] Markov Switching SBVAR.
Using 64-bit preprocessor
Starting Dynare (version 4.5.4).
Starting preprocessing of the model file ...
Found 6 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
- order 2
Processing outputs ...
done
Preprocessing completed.
warning: strmatch is obsolete; use strncmp or strcmp instead
free(): invalid pointer
fatal: caught signal Aborted -- stopping myself...
Aborted (core dumped)
```

The image is using Ubuntu bionic (18.04) with Octave 5.2.0 and Dynare 4.5.4-1.

Thank you

I’ve tried with the 4.2.0. Gives another line before exiting for ‘example1.mod’.

The error further seems to be some runtime isssue:

```
Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Local state space iteration (second order).
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
[mex] Quasi Monte-Carlo sequence (Sobol).
[mex] Markov Switching SBVAR.
Starting Dynare (version 4.4.3).
Starting preprocessing of the model file ...
Found 6 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
- order 2
Processing outputs ...done
Preprocessing completed.
Starting MATLAB/Octave computing.
error: dyn_first_order_solver: Invalid resizing operation or ambiguous assignment to an out-of-bounds array element
terminate called after throwing an instance of 'octave::execution_exception'
panic: Aborted -- stopping myself...
attempting to save variables to 'octave-workspace'...
save to 'octave-workspace' complete
Aborted (core dumped)
```

artchitecture thing?

I’ve compiled dynare from source. And it seems to work now. Maybe a compilation issue, which doesn’t like Docker.

Dynare’s mex-files are for a particular combination of Octave and Dynare. Building from source should circumvent that issue.

Dynare’s mex-files are for a particular combination of Octave and Dynare. Building from source should circumvent that issue.

Thank you very much Professor