Could anyone help me with this dynare mod file

i write a dynare file as follows. the problem is when i use mode_compute=4 to estimate the code, the error is :

??? Error using ==> chol
Matrix must be positive definite.

Error in ==> metropolis_hastings_initialization at 52
d = chol(vv);

Error in ==> random_walk_metropolis_hastings at 43
ix2, ilogpo2, ModelName, MhDirectoryName, fblck, fline, npar, nblck, nruns, NewFile, MAX_nruns, d ] = …

Error in ==> dynare_estimation_1 at 940
feval(options_.posterior_sampling_method,‘DsgeLikelihood’,options_.proposal_distribution,xparam1,invhess,bounds,gend,data);

Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});

Error in ==> Liu_replica at 296
dynare_estimation(var_list_);

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

could anyone figure out the reason? and another thing,when i use mode_compute=6 to estimate the code,the code can be estimated,but the result is not same every time. what is the different betweenmode_compute=6 and mode_compute=4?
data.m (5.2 KB)
code.mod (3.04 KB)

There are dozens of post on this issue. See also http://www.dynare.org/DynareWiki/MonteCarloOptimization