diff --git a/src/core/read_params.c b/src/core/read_params.c index 80eec54b..75182d3d 100644 --- a/src/core/read_params.c +++ b/src/core/read_params.c @@ -151,8 +151,9 @@ void read_parameter_file(char* fname, int mode) strncpy(params_tag[n_param], "SimParamsFile", tag_length); params_addr[n_param] = run_params->SimParamsFile; - required_tag[n_param] = 1; + required_tag[n_param] = 0; params_type[n_param++] = PARAM_TYPE_STRING; + *(run_params->SimParamsFile) = '\0'; strncpy(params_tag[n_param], "OutputDir", tag_length); params_addr[n_param] = run_params->OutputDir; @@ -1233,17 +1234,16 @@ void read_parameter_file(char* fname, int mode) // Parse the user parameter file first n_entries = parse_paramfile(fname, entry); store_params(entry, n_entries, params_tag, n_param, used_tag, params_type, params_addr); - mlog("Read input.par", MLOG_MESG); // Now parse the default parameter file n_entries = parse_paramfile(run_params->DefaultsFile, entry); store_params(entry, n_entries, params_tag, n_param, used_tag, params_type, params_addr); - mlog("Read defaults.par", MLOG_MESG); // Finally, parse the simulation parameter file - n_entries = parse_paramfile(run_params->SimParamsFile, entry); - store_params(entry, n_entries, params_tag, n_param, used_tag, params_type, params_addr); - mlog("Read sims file", MLOG_MESG); + if (strlen(run_params->SimParamsFile) > 0) { + n_entries = parse_paramfile(run_params->SimParamsFile, entry); + store_params(entry, n_entries, params_tag, n_param, used_tag, params_type, params_addr); + } // Check to see if we are missing any required parameters for (ii = 0; ii < n_param; ii++)