From cb1cc4049b9707900a0161e36fdabc70574b966b Mon Sep 17 00:00:00 2001 From: Ferhat MIHOUBI Date: Fri, 29 Jan 2010 17:51:39 +0100 Subject: [PATCH] convergence error message changed in bytecode --- mex/sources/bytecode/Interpreter.cc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/mex/sources/bytecode/Interpreter.cc b/mex/sources/bytecode/Interpreter.cc index 9b4236092..df982f9a5 100644 --- a/mex/sources/bytecode/Interpreter.cc +++ b/mex/sources/bytecode/Interpreter.cc @@ -1189,7 +1189,7 @@ Interpreter::simulate_a_block(const int size, const int type, string file_name, result = simulate_NG(Block_Count, symbol_table_endo_nbr, 0, 0, 0, size, false, cvg, iter, true); iter++; } - if (!cvg) + if (!cvg or !result) { mexPrintf("Convergence not achieved in block %d, after %d iterations\n", Block_Count, iter); return false; @@ -1205,6 +1205,11 @@ Interpreter::simulate_a_block(const int size, const int type, string file_name, compute_block_time(0, false, block_num); cvg = false; result = simulate_NG(Block_Count, symbol_table_endo_nbr, 0, 0, 0, size, false, cvg, iter, true); + if (!result) + { + mexPrintf("Convergence not achieved in block %d\n", Block_Count); + return false; + } } } else @@ -1324,7 +1329,7 @@ Interpreter::simulate_a_block(const int size, const int type, string file_name, result = simulate_NG(Block_Count, symbol_table_endo_nbr, 0, 0, 0, size, false, cvg, iter, true); iter++; } - if (!cvg) + if (!cvg or !result) { mexPrintf("Convergence not achieved in block %d, after %d iterations\n", Block_Count, iter); return false; @@ -1340,6 +1345,11 @@ Interpreter::simulate_a_block(const int size, const int type, string file_name, compute_block_time(0, false, block_num); cvg = false; result = simulate_NG(Block_Count, symbol_table_endo_nbr, 0, 0, 0, size, false, cvg, iter, true); + if (!result) + { + mexPrintf("Convergence not achieved in block %d\n", Block_Count); + return false; + } } } else