Page 1 of 1

??? MJDGGES requires two square real matrices of the same...

PostPosted: Tue May 26, 2009 2:10 pm
by lombard
Hi,

While trying to solve a model I got this (new to me) error message with Dynare 4.0.3.

??? MJDGGES requires two square real matrices of the same dimension.

Error in ==> dr1 at 354
[ss,tt,w,sdim,dr.eigval,info1] = mjdgges(e,d,options_.qz_criterium);

Error in ==> resol at 101
[dr,info,M_,options_,oo_] = dr1(dr,check_flag,M_,options_,oo_);

Error in ==> stoch_simul at 40
[oo_.dr, info] = resol(oo_.steady_state,0);

Error in ==> FF_portfolio at 566
info = stoch_simul(var_list_);

Error in ==> dynare at 102
evalin('base',fname) ;


Solving the same model with a different code I got that the solution is unstable.
Is this a bug?

Best

Gianni

Re: ??? MJDGGES requires two square real matrices of the same...

PostPosted: Tue May 26, 2009 2:45 pm
by StephaneAdjemian
Hi Gianni, Did you try to solve your model with the snapshot version? We recently added
a trap when the jacobian matrix is complex...

Best,
Stéphane.

Re: ??? MJDGGES requires two square real matrices of the same...

PostPosted: Tue May 26, 2009 3:16 pm
by lombard
Hi Stephane,

I just did a fresh download of Dynare using svn but the trap does not seem to be there.

Gianni

Re: ??? MJDGGES requires two square real matrices of the same...

PostPosted: Tue May 26, 2009 10:13 pm
by StephaneAdjemian
In dr1.m you should have (lines 209 to 217):

Code: Select all
    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


If the jacobian matrix is complex dr1 returns info(1)=6. Can you post (or send) your mod file if you do not fall in the trap ?

Stéphane.

Re: ??? MJDGGES requires two square real matrices of the same...

PostPosted: Wed May 27, 2009 8:50 am
by lombard
Hi,

I guess that the command
Code: Select all
svn co https://www.dynare.org/svn/dynare


did not get me the recent snapshot.

Where do I get it using svn (if at all)?

Thanks

Gianni

Re: ??? MJDGGES requires two square real matrices of the same...

PostPosted: Wed May 27, 2009 9:02 am
by StephaneAdjemian
Hi, The snapshot version is in the trunk subdirectory. You may follow these steps :

Code: Select all
svn co https://www.dynare.org/svn/dynare/trunk
cd ./dynare/trunk
./configure
make


The third step is new. The configuration script checks that your PC has all the needed libraries and writes the MakeFiles used to build the preprocessor and the documentation (you will find more information here).

Best,
Stéphane.