Skip to content
Snippets Groups Projects
Commit e76232f7 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Be verbose when the YAML parameters are overwritten by a -P command-line argument.

parent 78d2bc09
No related branches found
No related tags found
1 merge request!420Gravity speedup
......@@ -396,8 +396,12 @@ int main(int argc, char *argv[]) {
parser_read_file(paramFileName, params);
/* Handle any command-line overrides. */
if (nparams > 0)
if (nparams > 0) {
message(
"Overwriting values read from the YAML file with command-line "
"values.");
for (int k = 0; k < nparams; k++) parser_set_param(params, cmdparams[k]);
}
/* And dump the parameters as used. */
// parser_print_params(&params);
......
......@@ -133,6 +133,8 @@ void parser_set_param(struct swift_params *params, const char *namevalue) {
int updated = 0;
for (int i = 0; i < params->paramCount; i++) {
if (strcmp(name, params->data[i].name) == 0) {
message("Using the value '%s' instead of '%s' for the parameter '%s'",
value, params->data[i].value, params->data[i].name);
strcpy(params->data[i].value, value);
updated = 1;
}
......
  • Owner

    @pdraper I pushed this to my branch instead of a separate branch for you to inspect. Is that useful to cherry-pick to master ?

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment