From 5fcd502f3c9bf4d9c1b0cbe50bc674abb28e8343 Mon Sep 17 00:00:00 2001 From: Houtan Bastani Date: Fri, 20 May 2016 17:22:26 +0200 Subject: [PATCH] preprocessor: allow comments in parallel config file. closes #1194 --- preprocessor/ConfigFile.cc | 4 ++-- tests/parallel/dynare.ini | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/preprocessor/ConfigFile.cc b/preprocessor/ConfigFile.cc index 7186adc0d..a35c3d9b9 100644 --- a/preprocessor/ConfigFile.cc +++ b/preprocessor/ConfigFile.cc @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2015 Dynare Team + * Copyright (C) 2010-2016 Dynare Team * * This file is part of Dynare. * @@ -175,7 +175,7 @@ ConfigFile::getConfigFileInfo(const string &config_file) string line; getline(*configFile, line); trim(line); - if (line.empty()) + if (line.empty() || !line.compare(0, 1, "#")) continue; if (!line.compare("[node]") diff --git a/tests/parallel/dynare.ini b/tests/parallel/dynare.ini index 0d400f636..adf3a67d4 100644 --- a/tests/parallel/dynare.ini +++ b/tests/parallel/dynare.ini @@ -1,14 +1,20 @@ +#comment [cluster] Name = Local + # comment +# Members = n1 [hooks] GlobalInitFile = ./init.m +# comment [node] Name = n1 ComputerName = localhost -CPUnbr = [1:8] +CPUnbr = [1:2] [paths] -Include = folder \ No newline at end of file +# comment +Include = folder +#comment \ No newline at end of file