From d04ab0add744ee125036cea2923bff15f836cf4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org> Date: Thu, 16 Dec 2021 12:34:30 +0100 Subject: [PATCH] Testsuite: add tolerance in neo_growth_ramsey_k_order.mod My guess is that the slight variations across runs are probably due to multithreading (depending on the order in which threads terminate, the aggregation of results is done in a different order, which can lead to small floating point differences). --- tests/optimal_policy/neo_growth_ramsey_k_order.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/optimal_policy/neo_growth_ramsey_k_order.mod b/tests/optimal_policy/neo_growth_ramsey_k_order.mod index 8e62a43992..61718f8590 100644 --- a/tests/optimal_policy/neo_growth_ramsey_k_order.mod +++ b/tests/optimal_policy/neo_growth_ramsey_k_order.mod @@ -35,7 +35,7 @@ evaluate_planner_objective; [condWelfare, U_dynpp, W_dynpp, U_dyn, W_dyn] = k_order_welfare(oo_.dr, M_, options_); -if condWelfare~=oo_.planner_objective_value.conditional.steady_initial_multiplier +if abs(condWelfare - oo_.planner_objective_value.conditional.steady_initial_multiplier) > 1e-13 error('Inaccurate conditional welfare with Lagrange multiplier set to its steady-state value'); end if ~exist(['neo_growth_k_order' filesep 'Output' filesep 'neo_growth_k_order_results.mat'],'file'); -- GitLab