Dear Michel,

 

Is there a reason we only check for imaginary elements of the Jacobian in stochastic_solvers, i.e.

 

if ~isreal(jacobia_)

    if max(max(abs(imag(jacobia_)))) < 1e-15

        jacobia_ = real(jacobia_);

    else

        info(1) = 6;

        info(2) = sum(sum(imag(jacobia_).^2));

        return

    end

end

 

 

I would prefer to also check for NaNs, because in the forum people frequently have problems with messages like

 

“The generalized Schur (QZ) decomposition failed. For more information, see the
documentation for Lapack function dgges: info=17, n=17” see e.g. http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=3949&p=9515#p9515

 

The issue always is that some parameters are not correctly initialized, but the error message is too cryptic to associate the error with the warnings of the preprocessor before. Couldn’t we also test for NaN in the Jacobian and if there are some, check the parameters and print in the error message which of them were not initialized?

 

If you think this might be worthwhile, I would be willing to implement it.

 

Best,

Johannes

 

 

 

 

--

Johannes Pfeifer

Haußerstr. 29

72076 Tübingen

Tel.: +49-(0)7071-6396184

Mobil.: +49-(0)170-6936820

Germany