Hi,

When trying to solve a model using a second-order approximation (I’m using matlab 2011a and either dynare 4.3.1 or 4.1.0) the simulation breaks down because I get problems with “std::bad_alloc” - full error message see below. The model runs when using a first-order approximation, although in dynare 4.3.1 it complains about that the “Matrix is close to singular or badly scaled” (RCOND = 3.139880e-017) but the program eventually runs through (dynare 4.1.0 runs without problems). My guess is that the problems are either due to the singularity problems or to memory problems - the model is quite large.

Does anyone has an idea about what might be the cause of the “std::bad_alloc” problem?

Thanks

Andreas Westermark

Error message:

Configuring Dynare …

[mex] Generalized QZ.

[mex] Sylvester equation solution.

[mex] Kronecker products.

[mex] Sparse kronecker products.

[mex] Bytecode evaluation.

[mex] k-order perturbation solver.

[mex] k-order solution simulation.

Starting Dynare (version 4.1.0).

Starting preprocessing of the model file …

Found 7673 equation(s).

Evaluating expressions…done

Computing static model derivatives:

- order 1

Computing dynamic model derivatives: - order 1
- order 2

terminate called after throwing an instance of 'std::bad_alloc’

what(): std::bad_alloc

This application has requested the Runtime to terminate it in an unusual way.

Please contact the application’s support team for more information.