diff --git a/benchmarks/basic_tests.py b/benchmarks/basic_tests.py index b11f34591..eb9c9d7eb 100644 --- a/benchmarks/basic_tests.py +++ b/benchmarks/basic_tests.py @@ -1198,7 +1198,7 @@ def fr_timeout_test(): with open(os.path.join(new_d,"run.py"),'w') as f: f.write("import os\nimport time\nimport pyemu\npyemu.os_utils.run('mfnwt 10par_xsec.nam')\n") f.write("if not os.path.exists('run.info'):\n exit()\n") - f.write("lines = open('run.info','r').readlines()\nrnum = int(lines[-1].split()[-1].split('=')[-1])\n") + f.write("lines = open('run.info','r').readlines()\nrnum = int(lines[-1].split()[-1].split(':')[-1])\n") f.write("if rnum % 2 == 0:\n time.sleep(10000000)\n") pst.model_command = "python run.py" oe_file = os.path.join(new_d, "pest.0.obs.csv") @@ -1285,7 +1285,7 @@ def ins_missing_e_test(): #da_prep_4_mf6_freyberg_seq_tbl() #da_mf6_freyberg_test_2() - shutil.copy2(os.path.join("..","exe","windows","x64","Debug","pestpp-ies.exe"),os.path.join("..","bin","win","pestpp-ies.exe")) + #shutil.copy2(os.path.join("..","exe","windows","x64","Debug","pestpp-ies.exe"),os.path.join("..","bin","win","pestpp-ies.exe")) #tplins1_test() #mf6_v5_ies_test() #mf6_v5_sen_test() diff --git a/documentation/pestpp_users_guide_v5.1.20.docx b/documentation/pestpp_users_guide_v5.1.21.docx similarity index 70% rename from documentation/pestpp_users_guide_v5.1.20.docx rename to documentation/pestpp_users_guide_v5.1.21.docx index 91ca95ca4..e2a268e59 100644 Binary files a/documentation/pestpp_users_guide_v5.1.20.docx and b/documentation/pestpp_users_guide_v5.1.21.docx differ diff --git a/documentation/pestpp_users_manual.md b/documentation/pestpp_users_manual.md index 2821063fb..e3c306112 100644 --- a/documentation/pestpp_users_manual.md +++ b/documentation/pestpp_users_manual.md @@ -1,7 +1,7 @@ A close up of a purple sign Description automatically generated -# Version 5.1.20 +# Version 5.1.21 @@ -70,7 +70,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI # Table of Contents -- [Version 5.1.20](#s1) +- [Version 5.1.21](#s1) - [Acknowledgements](#s2) - [Preface](#s3) - [License](#s4) @@ -2998,11 +2998,11 @@ Note the following. PESTPP-SWP can fill in values for fixed and tied parameters if these are missing from its input file. Actually, it can provide values for other missing parameters as well if the *sweep_forgive()* control variable is set to *true*. These missing values are taken from the PEST control file which is read by PESTPP-SWP. -PESTPP-SWP writes a model output file whose name is provided through the *sweep_output_csv_file()* control variable. If this variable is not provided, PESTPP-SWP employs the name *sweep_out.csv* for its output file. +PESTPP-SWP writes a model output file whose name is provided through the *sweep_output_csv_file()* control variable. If this variable is not provided, PESTPP-SWP employs the name *sweep_out.csv* for its output file. This fiile contains input and output run identifiers, objective function information, and the simulated value for each control file “observation” for each run. Note that, by default, PESTPP-SWP will not calculate the contribution of prior information equations to the total objective function reported in the sweep output file. This can be overridden with the *sweep_include_regul_phi* option. The control variable *sweep_chunk()* pertains to parallelization of model runs. Runs are done in bundles of size *N*, where *N* is the value supplied for this variable. (A chunk of 500 is the default). This number should be chosen wisely. It should be a multiple of the number of agents that PESTPP-SWP can use for carrying out model runs. -Also note that PESTPP-SWP can be particularly useful if users need complete model output files for a given set of runs. In this case, the file transfer capabilities of the parallel run manager can be used with PESTPP-SWP to run a sweep of parameter values and model output files can be transferred back to the master directory. +PESTPP-SWP can be particularly useful if users need complete model output files for a given set of runs. In this case, the file transfer capabilities of the parallel run manager can be used with PESTPP-SWP to run a sweep of parameter values and model output files can be transferred back to the master directory. ## 10.3 Summary of Control Variables @@ -3020,6 +3020,7 @@ The number of control variables may change with time. Refer to the PEST++ web si | *enforce_tied_bounds(false)* | Boolean | Flag to enforce parameter bounds on any tied parameters | | *tie_by_group(false)* | Boolean | Flag to tie all adjustable parameters together within each parameter group. Initial parameter ratios are maintained as parameters are adjusted. Parameters that are designated as already tied, or that have parameters tied to them, are not affected. | | *ensemble_output_precision* | int | Number of significant digits to use in ASCII format ensemble files. Default is 6 | +| *Sweep_include_regul_phi* | Boolean | Flag to include the contribution of prior information equations in the total objective function information reported in the sweep output file, Default is false. | Table 10.1 PESTPP-SWP control variables. Parallel run management variables can be supplied in addition to these; see section 5.3.6 diff --git a/etc/environment.yml b/etc/environment.yml index c9caec664..2191656c3 100644 --- a/etc/environment.yml +++ b/etc/environment.yml @@ -10,4 +10,4 @@ dependencies: - matplotlib - coverage - scipy - - shapely + - shapely>=1.8 diff --git a/src/libs/common/config_os.h b/src/libs/common/config_os.h index a5f742d7e..551c7f1f3 100644 --- a/src/libs/common/config_os.h +++ b/src/libs/common/config_os.h @@ -2,7 +2,7 @@ #define CONFIG_OS_H_ -#define PESTPP_VERSION "5.1.20"; +#define PESTPP_VERSION "5.1.21"; #if defined(_WIN32) || defined(_WIN64) #define OS_WIN diff --git a/src/libs/common/network_package.cpp b/src/libs/common/network_package.cpp index 1342d5c70..acd5734e8 100644 --- a/src/libs/common/network_package.cpp +++ b/src/libs/common/network_package.cpp @@ -45,6 +45,7 @@ string NetPackage::get_info_txt() { string info_txt = extract_string(desc, DESC_LEN); info_txt.erase(std::find(info_txt.begin(), info_txt.end(), '\0'), info_txt.end()); + std::transform(info_txt.begin(), info_txt.end(), info_txt.begin(), ::tolower); return info_txt; } diff --git a/src/libs/pestpp_common/Ensemble.cpp b/src/libs/pestpp_common/Ensemble.cpp index 7e971b7cf..d2e7d743f 100644 --- a/src/libs/pestpp_common/Ensemble.cpp +++ b/src/libs/pestpp_common/Ensemble.cpp @@ -2195,7 +2195,7 @@ map ParameterEnsemble::add_runs(RunManagerAbstract *run_mgr_ptr,const v //if (da_cycle != NetPackage::NULL_DA_CYCLE) { stringstream ss; - ss << " da_cycle=" << da_cycle << " "; + ss << " da_cycle:" << da_cycle << " "; info_txt = ss.str(); } for (auto &rname : run_real_names) @@ -2220,7 +2220,7 @@ map ParameterEnsemble::add_runs(RunManagerAbstract *run_mgr_ptr,const v ss << n << ","; throw_ensemble_error(ss.str()); } - run_id = run_mgr_ptr->add_run(pars_real,info_txt+" realization="+rname); + run_id = run_mgr_ptr->add_run(pars_real,info_txt+" realization:"+rname); real_run_ids[idx] = run_id; } return real_run_ids; diff --git a/src/libs/pestpp_common/Ensemble.h b/src/libs/pestpp_common/Ensemble.h index 81ee03c73..914856255 100644 --- a/src/libs/pestpp_common/Ensemble.h +++ b/src/libs/pestpp_common/Ensemble.h @@ -147,6 +147,7 @@ class FixedParInfo void update_par_values(const map& pval_map); void clear() { fixed_info.clear(); fixed_names.clear(); } void fill_fixed(map& fixed_map, vector& rnames); + int get_map_size() {return fixed_info.size();} private: bool initialized; vector fixed_names; diff --git a/src/libs/pestpp_common/EnsembleMethodUtils.cpp b/src/libs/pestpp_common/EnsembleMethodUtils.cpp index 3c2291d01..6984104e7 100644 --- a/src/libs/pestpp_common/EnsembleMethodUtils.cpp +++ b/src/libs/pestpp_common/EnsembleMethodUtils.cpp @@ -3675,7 +3675,8 @@ void EnsembleMethod::initialize(int cycle, bool run, bool use_existing) else { message(1, "initializing localizer"); - use_localizer = localizer.initialize(performance_log); + bool forgive_missing = pest_scenario.get_pestpp_options().get_ies_localizer_forgive_missing(); + use_localizer = localizer.initialize(performance_log, forgive_missing); } num_threads = pest_scenario.get_pestpp_options().get_ies_num_threads(); if (!use_localizer) @@ -3922,20 +3923,23 @@ void EnsembleMethod::initialize(int cycle, bool run, bool use_existing) frec << ma << endl; } + int num_par_elements = pest_scenario.get_ctl_parameters().size(); if ((pp_args.find("IES_ORDERED_BINARY") == pp_args.end()) && (pp_args.find("DA_ORDERED_BINARY") == pp_args.end())) { - if ((pe.shape().second > 100000) && (pest_scenario.get_pestpp_options().get_save_binary())) + + //if ((pe.shape().second > 100000) && (pest_scenario.get_pestpp_options().get_save_binary())) + if ((num_par_elements > 100000) && (pest_scenario.get_pestpp_options().get_save_binary())) { - message(1, "'ies_ordered_binary' was not passed, but 'ies_save_binary' is true and num adj pars > 100,000, switching to unordered binary..."); + message(1, "'ies_ordered_binary' was not passed, but 'ies_save_binary' is true and npar > 100,000, switching to unordered binary..."); pest_scenario.get_pestpp_options_ptr()->set_ies_ordered_binary(false); } } if ((pp_args.find("IES_UPGRADES_IN_MEMORY") == pp_args.end()) && (pp_args.find("DA_UPGRADES_IN_MEMORY") == pp_args.end())) { - if (pe.shape().second > 100000) + if (num_par_elements > 100000) { - message(1, "'ies_upgrades_in_memory' was not passed, but num adj pars > 100,000, switching ies_upgrades_in_memory to false..."); + message(1, "'ies_upgrades_in_memory' was not passed, but npar > 100,000, switching ies_upgrades_in_memory to false..."); pest_scenario.get_pestpp_options_ptr()->set_ies_upgrades_in_memory(false); } } @@ -4243,6 +4247,8 @@ void EnsembleMethod::initialize(int cycle, bool run, bool use_existing) if (ppo->get_ies_localizer().size() > 0) { message(1, "updating localizer"); + if (localizer.get_use()) + localizer.get_orgmat_ptr()->clear_names(); use_localizer = localizer.initialize(performance_log, true); } diff --git a/src/libs/pestpp_common/Jacobian.cpp b/src/libs/pestpp_common/Jacobian.cpp index 6c4e5a269..7ff4bd31a 100644 --- a/src/libs/pestpp_common/Jacobian.cpp +++ b/src/libs/pestpp_common/Jacobian.cpp @@ -280,7 +280,7 @@ bool Jacobian::build_runs(Parameters &ctl_pars, Observations &ctl_obs, vector prior_info_name = prior_info.get_keys(); base_sim_obs_names.insert(base_sim_obs_names.end(), prior_info_name.begin(), prior_info_name.end()); std::vector > triplet_list; @@ -388,7 +388,9 @@ bool Jacobian::process_runs(ParamTransformSeq &par_transform, { run_list.push_back(JacobianRun()); run_manager. get_info(i_run, r_status, cur_par_name, cur_numeric_par_value); - run_manager.get_model_parameters(i_run, run_list.back().ctl_pars); + //this is to strip off the "par_name:" tag + cur_par_name = cur_par_name.substr(9,cur_par_name.size()); + run_manager.get_model_parameters(i_run, run_list.back().ctl_pars); bool success = run_manager.get_observations_vec(i_run, run_list.back().obs_vec); if ((debug_fail) && (i_run == 1)) { @@ -410,6 +412,8 @@ bool Jacobian::process_runs(ParamTransformSeq &par_transform, if (i_run+1= nruns || (cur_par_name != par_name_next)) diff --git a/src/libs/pestpp_common/Jacobian_1to1.cpp b/src/libs/pestpp_common/Jacobian_1to1.cpp index 9df0c32f2..f0094d062 100644 --- a/src/libs/pestpp_common/Jacobian_1to1.cpp +++ b/src/libs/pestpp_common/Jacobian_1to1.cpp @@ -63,7 +63,7 @@ bool Jacobian_1to1::build_runs(Parameters &ctl_pars, Observations &ctl_obs, vect failed_ctl_parameters.clear(); par_run_map.clear(); // add base run - int run_id = run_manager.add_run(model_parameters, "__base__", 0); + int run_id = run_manager.add_run(model_parameters, "par_name:__base__", 0); par_run_map["__base__"] = vector{ run_id }; //if base run is has already been complete, update it and mark it as complete // compute runs for to jacobain calculation as it is influenced by derivative type( forward or central) @@ -97,7 +97,7 @@ bool Jacobian_1to1::build_runs(Parameters &ctl_pars, Observations &ctl_obs, vect { model_parameters[ipar.first] = ipar.second; } - int id = run_manager.add_run(model_parameters, i_name, par); + int id = run_manager.add_run(model_parameters, "par_name:"+i_name, par); if (par_run_map.count(i_name) == 0) par_run_map[i_name] = vector{ id }; else @@ -143,7 +143,7 @@ bool Jacobian_1to1::build_runs(ModelRun &init_model_run, vector numeric_ failed_ctl_parameters.clear(); par_run_map.clear(); // add base run - int run_id = run_manager.add_run(model_parameters, "", 0); + int run_id = run_manager.add_run(model_parameters, "par_name:__base__", 0); par_run_map["__base__"] = vector{ run_id }; //if base run is has already been complete, update it and mark it as complete // compute runs for to jacobain calculation as it is influenced by derivative type( forward or central) @@ -177,7 +177,7 @@ bool Jacobian_1to1::build_runs(ModelRun &init_model_run, vector numeric_ { model_parameters[ipar.first] = ipar.second; } - int id = run_manager.add_run(model_parameters, i_name, par); + int id = run_manager.add_run(model_parameters, "par_name:"+i_name, par); if (par_run_map.count(i_name) == 0) par_run_map[i_name] = vector{ id }; @@ -284,15 +284,15 @@ bool Jacobian_1to1::process_runs(ParamTransformSeq &par_transform, double par_value_next; double cur_numeric_par_value; list run_list; - + for (auto par_run : par_run_map) - { - + { for (auto rid : par_run.second) { run_list.push_back(JacobianRun()); run_manager.get_info(par_run.second[0], r_status, cur_par_name, cur_numeric_par_value); + cur_par_name = cur_par_name.substr(9,cur_par_name.size()); run_manager.get_model_parameters(par_run.second[0], run_list.back().ctl_pars); bool success = run_manager.get_observations_vec(par_run.second[0], run_list.back().obs_vec); run_list.back().numeric_derivative_par = cur_numeric_par_value; diff --git a/src/libs/pestpp_common/Localizer.cpp b/src/libs/pestpp_common/Localizer.cpp index d32325926..ef3f2f9d4 100644 --- a/src/libs/pestpp_common/Localizer.cpp +++ b/src/libs/pestpp_common/Localizer.cpp @@ -19,7 +19,7 @@ bool Localizer::initialize(PerformanceLog *performance_log, bool forgive_missing how = How::OBSERVATIONS; //set this for the case with no localization string loc_typ; string how_str; - + par2col_map.clear(); obs2row_map.clear(); colname2col_map.clear(); @@ -74,6 +74,7 @@ bool Localizer::initialize(PerformanceLog *performance_log, bool forgive_missing return use; } performance_log->log_event("loading localizer matrix from file " + filename); + org_mat.from_file(filename); performance_log->log_event("processing localizer matrix"); diff --git a/src/libs/pestpp_common/Localizer.h b/src/libs/pestpp_common/Localizer.h index bf9279bf1..683c47d52 100644 --- a/src/libs/pestpp_common/Localizer.h +++ b/src/libs/pestpp_common/Localizer.h @@ -75,6 +75,7 @@ class Localizer LocTyp get_loctyp() { return loctyp; } void report(ofstream &f_rec); bool is_initialized() { return initialized; } + Mat* get_orgmat_ptr() {return &org_mat;} private: bool use; bool autoadaloc; diff --git a/src/libs/pestpp_common/MOEA.cpp b/src/libs/pestpp_common/MOEA.cpp index b8a1ec276..fcc4cb11f 100644 --- a/src/libs/pestpp_common/MOEA.cpp +++ b/src/libs/pestpp_common/MOEA.cpp @@ -1036,7 +1036,10 @@ map> MOEA::decvar_change_report(map> triplet_list; @@ -479,6 +481,7 @@ void Mat::from_csv(const string &filename) irow++; } matrix.resize(row_names.size(), col_names.size()); + matrix.setZero(); matrix.setFromTriplets(triplet_list.begin(), triplet_list.end()); } diff --git a/src/libs/pestpp_common/covariance.h b/src/libs/pestpp_common/covariance.h index f140b2d88..cf392f78d 100644 --- a/src/libs/pestpp_common/covariance.h +++ b/src/libs/pestpp_common/covariance.h @@ -30,6 +30,7 @@ class Mat vector get_row_names(){ return row_names; } vector get_col_names(){ return col_names; } + void clear_names(){row_names.clear();col_names.clear();} const vector* rn_ptr(); const vector* cn_ptr(); Eigen::SparseMatrix get_matrix(){ return matrix; } diff --git a/src/libs/pestpp_common/pest_data_structs.cpp b/src/libs/pestpp_common/pest_data_structs.cpp index dec0cb5d8..c29965151 100644 --- a/src/libs/pestpp_common/pest_data_structs.cpp +++ b/src/libs/pestpp_common/pest_data_structs.cpp @@ -546,8 +546,13 @@ PestppOptions::ARG_STATUS PestppOptions::assign_value_by_key(string key, const s { sweep_base_run = pest_utils::parse_string_arg_to_bool(value); } + else if (key == "SWEEP_INCLUDE_REGUL_PHI") + { + sweep_include_regul_phi = pest_utils::parse_string_arg_to_bool(value); + } + - else if (key == "TIE_BY_GROUP") + else if (key == "TIE_BY_GROUP") { tie_by_group = pest_utils::parse_string_arg_to_bool(value); } @@ -1121,9 +1126,13 @@ bool PestppOptions::assign_ies_value_by_key(const string& key, const string& val convert_ip(value,ies_multimodal_alpha); return true; } - - - + else if ((key == "IES_LOCALIZER_FORGIVE_MISSING") || (key == "IES_LOCALIZER_FORGIVE_EXTRA")) + { + passed_args.insert("IES_LOCALIZER_FORGIVE_MISSING"); + passed_args.insert("IES_LOCALIZER_FORGIVE_EXTRA"); + ies_localizer_forgive_missing = pest_utils::parse_string_arg_to_bool(value); + return true; + } return false; } @@ -1607,6 +1616,7 @@ void PestppOptions::summary(ostream& os) const os << "sweep_chunk: " << sweep_chunk << endl; os << "sweep_forgive: " << sweep_forgive << endl; os << "sweep_base_run: " << sweep_base_run << endl; + os << "sweep_include_regul_phi: " << sweep_include_regul_phi << endl; os << endl << "...pestpp-opt options:" << endl; os << "opt_objective_function: " << opt_obj_func << endl; @@ -1730,6 +1740,7 @@ void PestppOptions::summary(ostream& os) const os << "ies_upgrades_in_memory: " << ies_upgrades_in_memory << endl; os << "ies_ordered_binary: " << ies_ordered_binary << endl; os << "ies_multimodal_alpha: " << ies_multimodal_alpha << endl; + os << "ies_localizer_forgive_extra: " << ies_localizer_forgive_missing << endl; os << endl << "pestpp-sen options: " << endl; @@ -1804,6 +1815,7 @@ void PestppOptions::set_defaults() set_sweep_chunk(500); set_tie_by_group(false); set_enforce_tied_bounds(false); + set_sweep_include_regul_phi(false); set_opt_obj_func(""); @@ -1907,6 +1919,7 @@ void PestppOptions::set_defaults() set_ies_ordered_binary(true); set_ies_multimodal_alpha(1.0); set_ensemble_output_precision(6); + set_ies_localizer_forgive_missing(false); // DA parameters //set_da_use_ies(false); diff --git a/src/libs/pestpp_common/pest_data_structs.h b/src/libs/pestpp_common/pest_data_structs.h index 79d5e8f06..12db4c782 100644 --- a/src/libs/pestpp_common/pest_data_structs.h +++ b/src/libs/pestpp_common/pest_data_structs.h @@ -313,6 +313,8 @@ class PestppOptions { void set_sweep_forgive(bool _forgive) { sweep_forgive = _forgive; } bool get_sweep_base_run()const { return sweep_base_run; } void set_sweep_base_run(bool _base) { sweep_base_run = _base; } + bool get_sweep_include_regul_phi() const {return sweep_include_regul_phi;} + void set_sweep_include_regul_phi(bool _flag) {sweep_include_regul_phi = _flag;} bool get_jac_scale()const { return jac_scale; } void set_jac_scale(bool _jac_scale) { jac_scale = _jac_scale; } @@ -474,6 +476,10 @@ class PestppOptions { void set_ies_subset_how(string _ies_subset_how) { ies_subset_how = _ies_subset_how; } void set_ies_localize_how(string _how) { ies_localize_how = _how; } string get_ies_localize_how() const { return ies_localize_how; } + bool get_ies_localizer_forgive_missing() const {return ies_localizer_forgive_missing;} + void set_ies_localizer_forgive_missing(bool _flag) {ies_localizer_forgive_missing = _flag;} + + int get_ies_num_threads() const { return ies_num_threads; } @@ -682,6 +688,7 @@ class PestppOptions { bool sweep_forgive; int sweep_chunk; bool sweep_base_run; + bool sweep_include_regul_phi; GLOBAL_OPT global_opt; string moea_name; @@ -792,6 +799,7 @@ class PestppOptions { bool ies_upgrades_in_memory; bool ies_ordered_binary; double ies_multimodal_alpha; + bool ies_localizer_forgive_missing; // Data Assimilation parameters diff --git a/src/libs/run_managers/yamr/PantherAgent.cpp b/src/libs/run_managers/yamr/PantherAgent.cpp index 7260f5dd8..536ca92e1 100644 --- a/src/libs/run_managers/yamr/PantherAgent.cpp +++ b/src/libs/run_managers/yamr/PantherAgent.cpp @@ -468,12 +468,12 @@ std::pair PANTHERAgent::run_model(Parameters & { ss.str(""); ss << "Received unsupported message from master, only PING REQ_KILL or TERMINATE can be sent during model run, not: "; - ss << net_pack.pack_strings[static_cast(net_pack.get_type())] << ", run_id: " << net_pack.get_run_id(); + ss << net_pack.pack_strings[static_cast(net_pack.get_type())] << " run_id:" << net_pack.get_run_id(); report(ss.str(), true); f_terminate.set(true); final_run_status = NetPackage::PackType::CORRUPT_MESG; smessage << "Received unsupported message from master, only PING REQ_KILL or TERMINATE can be sent during model run, not:"; - smessage << net_pack.pack_strings[static_cast(net_pack.get_type())] << ", run_id: " << net_pack.get_run_id(); + smessage << net_pack.pack_strings[static_cast(net_pack.get_type())] << " run_id:" << net_pack.get_run_id(); //terminate_or_restart(-1); break; } @@ -499,7 +499,7 @@ std::pair PANTHERAgent::run_model(Parameters & { ss.str(""); - ss << "error(s) thrown during async run: " << ex.what() << ", "; + ss << "error(s) thrown during async run: " << ex.what() << " "; ss << "Aborting model run"; report(ss.str(), true); smessage << ex.what(); @@ -621,7 +621,7 @@ void PANTHERAgent::start_impl(const string &host, const string &port) if (err.first < 0) { ss.str(""); - ss << "error receiving message from master: " << err.second << ", terminating, header follows: "; + ss << "error receiving message from master: " << err.second << " terminating, header follows: "; net_pack.print_header(ss); report(ss.str(), true); //terminate = true; @@ -833,7 +833,7 @@ void PANTHERAgent::start_impl(const string &host, const string &port) //will uncommented later when merging in pestpp-da pest_utils::upper_ip(info_txt); int da_cycle = NetPackage::NULL_DA_CYCLE; - if (info_txt.find("DA_CYCLE=") != string::npos) + if (info_txt.find("DA_CYCLE:") != string::npos) { frec << "Note: 'DA_CYCLE' information passed in START_RUN command" << endl; frec << " info txt for group_id:run_id " << group_id << ":" << run_id << endl; @@ -844,9 +844,9 @@ void PANTHERAgent::start_impl(const string &host, const string &port) for (auto token : tokens) { - if (token.find("=") != string::npos) + if (token.find(":") != string::npos) { - pest_utils::tokenize(token, ttokens, "="); + pest_utils::tokenize(token, ttokens, ":"); if (ttokens[0] == "DA_CYCLE") { if (ttokens[1].size() > 0) @@ -1064,10 +1064,10 @@ void PANTHERAgent::start_impl(const string &host, const string &port) std::chrono::system_clock::time_point start_time = chrono::system_clock::now(); pair final_run_status = run_model(pars, obs, net_pack); - + double run_time = pest_utils::get_duration_sec(start_time); if (final_run_status.first == NetPackage::PackType::RUN_FINISHED) { - double run_time = pest_utils::get_duration_sec(start_time); + //send model results back ss.str(""); ss << "run complete, "; @@ -1075,15 +1075,15 @@ void PANTHERAgent::start_impl(const string &host, const string &port) ss << "run took: " << run_time << " seconds"; report(ss.str(), true); ss.str(""); - ss << ", run took " << run_time << " seconds"; - string message = final_run_status.second + ss.str(); + ss << " worker_time:" << run_time/60.0; + string message = info_txt + " " + final_run_status.second + ss.str(); serialized_data = Serialization::serialize(pars, par_name_vec, obs, obs_name_vec, run_time); net_pack.reset(NetPackage::PackType::RUN_FINISHED, group_id, run_id, message); err = send_message(net_pack, serialized_data.data(), serialized_data.size()); if (err.first != 1) { ss.str(""); - ss << "error sending RUN_FINISHED message to master: " << err.second << ", terminating"; + ss << "error sending RUN_FINISHED message to master: " << err.second << " , terminating"; report(ss.str(), true); terminate_or_restart(-1); } @@ -1097,17 +1097,17 @@ void PANTHERAgent::start_impl(const string &host, const string &port) else if (final_run_status.first == NetPackage::PackType::RUN_FAILED) { ss.str(""); - ss << "run failed for run_id" << run_id << ", info_txt=" << info_txt << " , : " << final_run_status.second; + ss << "run failed for run_id: " << run_id << " " << info_txt << " " << final_run_status.second; report(ss.str(), true); ss.str(""); - ss << "group_id=" << group_id << ", run_id=" << run_id << " , info_txt=" << info_txt << " , " << final_run_status.second; + ss << "group_id:" << group_id << " run_id:" << run_id << " " << info_txt << " " << final_run_status.second; net_pack.reset(NetPackage::PackType::RUN_FAILED, group_id, run_id,ss.str()); char data; err = send_message(net_pack, &data, 0); if (err.first != 1) { ss.str(""); - ss << "error sending RUN_FAILED message to master: " << err.second << ", terminating"; + ss << "error sending RUN_FAILED message to master: " << err.second << " terminating"; report(ss.str(), true); terminate_or_restart(-1); } @@ -1145,7 +1145,7 @@ void PANTHERAgent::start_impl(const string &host, const string &port) else if (final_run_status.first == NetPackage::PackType::RUN_KILLED) { ss.str(""); - ss << "run_id " << run_id << " , info_txt=" << info_txt << " , killed"; + ss << "run_id:" << run_id << " " << info_txt << " killed"; report(ss.str(), true); net_pack.reset(NetPackage::PackType::RUN_KILLED, group_id, run_id, final_run_status.second); char data; @@ -1153,7 +1153,7 @@ void PANTHERAgent::start_impl(const string &host, const string &port) if (err.first != 1) { ss.str(""); - ss << "error sending RUN_KILLED message to master: " << err.second << ", terminating"; + ss << "error sending RUN_KILLED message to master: " << err.second << " terminating"; report(ss.str(), true); terminate_or_restart(-1); } @@ -1163,14 +1163,14 @@ void PANTHERAgent::start_impl(const string &host, const string &port) else if (final_run_status.first == NetPackage::PackType::CORRUPT_MESG) { - ss << "corrupt/incorrect message recieved from master: " << final_run_status.second << ", quitting for safety"; + ss << "corrupt/incorrect message recieved from master:" << final_run_status.second << " " << info_txt << " quitting for safety"; net_pack.reset(NetPackage::PackType::RUN_KILLED, group_id, run_id, ss.str()); char data; err = send_message(net_pack, &data, 0); if (err.first != 1) { ss.str(""); - ss << "error sending CORRUPT_MESG message to master: " << err.second << ", terminating"; + ss << "error sending CORRUPT_MESG message to master:" << err.second << " terminating"; report(ss.str(), true); terminate_or_restart(-1); } @@ -1198,7 +1198,7 @@ void PANTHERAgent::start_impl(const string &host, const string &port) if (err.first != 1) { ss.str(""); - ss << "error sending READY message to master: " << err.second << ", terminating"; + ss << "error sending READY message to master:" << err.second << " terminating"; report(ss.str(), true); terminate_or_restart(-1); } @@ -1229,7 +1229,7 @@ void PANTHERAgent::start_impl(const string &host, const string &port) if (err.first != 1) { ss.str(""); - ss << "error sending PING message to master: " << err.second << ", terminating"; + ss << "error sending PING message to master:" << err.second << " terminating"; report(ss.str(), true); terminate_or_restart(-1); } diff --git a/src/libs/run_managers/yamr/RunManagerPanther.cpp b/src/libs/run_managers/yamr/RunManagerPanther.cpp index b82126db3..72febb239 100644 --- a/src/libs/run_managers/yamr/RunManagerPanther.cpp +++ b/src/libs/run_managers/yamr/RunManagerPanther.cpp @@ -1025,7 +1025,7 @@ void RunManagerPanther::close_agent(list::iterator agent_info_iter open_file_trans_streams.erase(ret.first); stringstream ss; ss.str(""); - ss << "lost comms with agent, closed file '" << fname << ", " << file_size << " bytes transferred"; + ss << "lost comms with agent, closed file:" << fname << " bytes:" << file_size << " transferred"; report(ss.str(),false); files_transferred += 1; @@ -1143,7 +1143,7 @@ void RunManagerPanther::schedule_runs() if (success >= 0) { stringstream ss; - ss << n_concur << " concurrent runs for run id:" << run_id; + ss << " run_id:" << run_id << " concurrent:" << n_concur; report(ss.str(), false); } else @@ -1240,8 +1240,8 @@ int RunManagerPanther::schedule_run(int run_id, std::list::it (*it_agent)->reset_last_ping_time(); active_runid_to_iterset_map.insert(make_pair(run_id, *it_agent)); stringstream ss; - ss << "Sending run " << run_id << " to: " << host_name << "$" << (*it_agent)->get_work_dir() << - " (group id:" << cur_group_id << ", run id:" << run_id << ", concurrent runs:" << get_n_concurrent(run_id) << ")"; + ss << "Sending run_id:" << run_id << " to:" << host_name << "$" << (*it_agent)->get_work_dir() << + " group_id:" << cur_group_id << " " << info_txt << " concurrent:" << get_n_concurrent(run_id) << ")"; report(ss.str(), false); free_agent_list.erase(it_agent); scheduled = 1; @@ -1249,7 +1249,7 @@ int RunManagerPanther::schedule_run(int run_id, std::list::it else { stringstream ss; - ss << "error sending run " << run_id << "to: " << host_name << "$" << (*it_agent)->get_work_dir() + ": " + err.second; + ss << "error sending run_id:" << run_id << " to:" << host_name << "$" << (*it_agent)->get_work_dir() + " error:" + err.second; report(ss.str(), false); } } @@ -1291,24 +1291,24 @@ void RunManagerPanther::process_message(int i_sock) if( err.first <=0) // error or lost connection { if (err.first == -2) { - report("received corrupt message from agent: " + host_name + "$" + agent_info_iter->get_work_dir() + ": " + err.second, false); + report("received corrupt message from agent:" + host_name + "$" + agent_info_iter->get_work_dir() + " error:" + err.second, false); } else if (err.first < 0) { - report("receive failed from agent: " + host_name + "$" + agent_info_iter->get_work_dir() + ": " + err.second, false); + report("receive failed from agent:" + host_name + "$" + agent_info_iter->get_work_dir() + " error:" + err.second, false); } else { - report("lost connection to agent: " + host_name + "$" + agent_info_iter->get_work_dir() + ": " + err.second, false); + report("lost connection to agent:" + host_name + "$" + agent_info_iter->get_work_dir() + " error:" + err.second, false); } close_agent(i_sock); } else if (net_pack.get_type() == NetPackage::PackType::TERMINATE) { - report("agent exiting: " + host_name + "$" + agent_info_iter->get_work_dir() + ": " + net_pack.get_info_txt(), false); + report("agent exiting:" + host_name + "$" + agent_info_iter->get_work_dir() + " " + net_pack.get_info_txt(), false); close_agent(i_sock); } else if (net_pack.get_type() == NetPackage::PackType::CORRUPT_MESG) { - report("agent reporting corrupt message: " + host_name + "$" + agent_info_iter->get_work_dir() + ": " + net_pack.get_info_txt(), false); + report("agent reporting corrupt message:" + host_name + "$" + agent_info_iter->get_work_dir() + " " + net_pack.get_info_txt(), false); close_agent(i_sock); } else if (net_pack.get_type() == NetPackage::PackType::RUNDIR) @@ -1318,14 +1318,14 @@ void RunManagerPanther::process_message(int i_sock) { string work_dir = NetPackage::extract_string(net_pack.get_data(), 0, net_pack.get_data().size()); stringstream ss; - ss << "initializing new agent connection from: " << agent_info_iter->get_hostname() << "$" << work_dir << ":" << socket_name << ", number of agents: " << socket_to_iter_map.size(); + ss << "initializing new agent connection from:" << agent_info_iter->get_hostname() << "$" << work_dir << " socket:" << socket_name << " number of agents:" << socket_to_iter_map.size(); report(ss.str(), false); agent_info_iter->set_work_dir(work_dir); agent_info_iter->set_state(AgentInfoRec::State::CWD_RCV); } else { - report("received corrupt run directory from agent: " + host_name + " - terminating agent", false); + report("received corrupt run directory from agent:" + host_name + " - terminating agent", false); close_agent(i_sock); } } @@ -1334,7 +1334,7 @@ void RunManagerPanther::process_message(int i_sock) agent_info_iter->end_linpack(); agent_info_iter->set_state(AgentInfoRec::State::LINPACK_RCV); stringstream ss; - ss << "new agent ready: " << agent_info_iter->get_hostname() << "$" << agent_info_iter->get_work_dir() << ":" << agent_info_iter->get_socket_name() ; + ss << "new agent ready:" << agent_info_iter->get_hostname() << "$" << agent_info_iter->get_work_dir() << " socket:" << agent_info_iter->get_socket_name() ; report(ss.str(), false); } else if (net_pack.get_type() == NetPackage::PackType::READY) @@ -1353,8 +1353,8 @@ void RunManagerPanther::process_message(int i_sock) int run_id = net_pack.get_run_id(); int group_id = net_pack.get_group_id(); stringstream ss; - ss << "run " << run_id << " received from unexpected group id: " << group_id << ", should be group: " << cur_group_id; - ss << "from " << agent_info_iter->get_hostname() << "$" << agent_info_iter->get_work_dir() << "...ignoring"; + ss << " run_id:" << run_id << " received from unexpected group_id:" << group_id << " should be group: " << cur_group_id; + ss << " from:" << agent_info_iter->get_hostname() << "$" << agent_info_iter->get_work_dir() << "...ignoring"; report(ss.str(), false); //throw PestError(ss.str()); } @@ -1367,9 +1367,9 @@ void RunManagerPanther::process_message(int i_sock) if (run_finished(run_id)) { stringstream ss; - ss << "Prevoiusly completed run:" << run_id << ", finished on:" << host_name << "$" << agent_info_iter->get_work_dir() << - " (run time:" << agent_info_iter->get_runtime_minute() << " min, group id:" << group_id << - ", run id:" << run_id << " concurrent:" << get_n_concurrent(run_id) << ")"; + ss << "Prevoiusly completed run_id:" << run_id << " finished on:" << host_name << "$" << agent_info_iter->get_work_dir() << + " run time:" << agent_info_iter->get_runtime_minute() << " min group_id:" << group_id << + " " << net_pack.get_info_txt() << " concurrent:" << get_n_concurrent(run_id); report(ss.str(), false); } else @@ -1377,9 +1377,9 @@ void RunManagerPanther::process_message(int i_sock) // keep track of model run time agent_info_iter->end_run(); stringstream ss; - ss << "run " << run_id << " received from: " << host_name << "$" << agent_info_iter->get_work_dir() << - " (run time:" << agent_info_iter->get_runtime_minute() << " min, avg run time:" << get_global_runtime_minute() << " min, group id:" << group_id << - ", run id: " << run_id << " concurrent:" << get_n_concurrent(run_id) << ")"; + ss << " run_id:" << run_id << " received from:" << host_name << "$" << agent_info_iter->get_work_dir() << + " run_time:" << agent_info_iter->get_runtime_minute() << " avg_run_time:" << get_global_runtime_minute() << " group_id:" << group_id << + " " << net_pack.get_info_txt() << " concurrent:" << get_n_concurrent(run_id); report(ss.str(), false); process_model_run(i_sock, net_pack); ss.str(""); @@ -1399,11 +1399,12 @@ void RunManagerPanther::process_message(int i_sock) if (!run_finished(run_id)) { - ss << "Run " << run_id << " failed on agent:" << host_name << "$" << agent_info_iter->get_work_dir() << " (group id: " << group_id << ", run id: " << run_id << ", concurrent: " << n_concur << ") "; + ss << " run_id:" << run_id << " failed on agent:" << host_name << "$" << agent_info_iter->get_work_dir() << " group_id:" << + group_id << " " << net_pack.get_info_txt() << " concurrent:" << n_concur; string netpack_message = net_pack.get_info_txt(); if (netpack_message.size() > 0) { - ss << ", worker message: " << netpack_message; + ss << " worker_message:" << netpack_message; } report(ss.str(), false); model_runs_failed++; @@ -1421,7 +1422,7 @@ void RunManagerPanther::process_message(int i_sock) else if (net_pack.get_type() == NetPackage::PackType::DEBUG_FAIL_FREEZE) { stringstream ss; - ss << "Frozen agent: " << host_name << "$" << agent_info_iter->get_work_dir() << " is frozen because of panther_debug_freeze_on_fail = true..."; + ss << "Frozen agent:" << host_name << "$" << agent_info_iter->get_work_dir() << " is frozen because of panther_debug_freeze_on_fail = true..."; report(ss.str(), true); } @@ -1433,7 +1434,8 @@ void RunManagerPanther::process_message(int i_sock) auto it = get_active_run_iter(i_sock); unschedule_run(it); stringstream ss; - ss << "Run " << run_id << " killed on agent: " << host_name << "$" << agent_info_iter->get_work_dir() << ", run id:" << run_id << " concurrent: " << n_concur; + ss << " run_id:" << run_id << " killed on agent:" << host_name << "$" << agent_info_iter->get_work_dir() + << " " << net_pack.get_info_txt() << " concurrent:" << n_concur; report(ss.str(), false); } else if (net_pack.get_type() == NetPackage::PackType::PING) @@ -1445,7 +1447,7 @@ void RunManagerPanther::process_message(int i_sock) else if (net_pack.get_type() == NetPackage::PackType::IO_ERROR) { //string err(net_pack.get_data().begin(),net_pack.get_data().end()); - report("error in model IO files on agent: " + host_name + "$" + agent_info_iter->get_work_dir() + ": " + net_pack.get_info_txt() + "-terminating agent. ", true); + report("error in model IO files on agent:" + host_name + "$" + agent_info_iter->get_work_dir() + " socket:" + net_pack.get_info_txt() + " - terminating agent. ", true); close_agent(i_sock); } else if (net_pack.get_type() == NetPackage::PackType::START_FILE_WRKR2MSTR) { @@ -1457,8 +1459,8 @@ void RunManagerPanther::process_message(int i_sock) } else { if (open_file_trans_streams.find(fnames.second) != open_file_trans_streams.end()) { ss.str(""); - ss << "file transfer error: agent " << host_name << "$" << agent_info_iter->get_work_dir() << " requesting file '" << fnames.first << "', master file '" << fnames.second - << "' already open, can't reopen, something is wrong"; + ss << "file transfer error from agent:" << host_name << "$" << agent_info_iter->get_work_dir() << " requesting_file:" << fnames.first << " master_file:" << fnames.second + << " - already open, can't reopen, something is wrong"; report(ss.str(), true); } else { pair::iterator, bool> ret = open_file_trans_streams.insert( @@ -1468,12 +1470,12 @@ void RunManagerPanther::process_message(int i_sock) if (out.bad()) { ss.str(""); - ss << " error opening file '" << fnames.second << "for writing" << endl; + ss << " error opening file:" << fnames.second << " for writing" << endl; report(ss.str(),true); } ss.str(""); - ss << "agent " << host_name << "$" << agent_info_iter->get_work_dir() << " request opened file '" << fnames.second << "' for file transfer of file '" << fnames.first << "'"; - ss << "from " << host_name << "$" << agent_info_iter->get_work_dir(); + ss << " agent:" << host_name << "$" << agent_info_iter->get_work_dir() << " request opened file:" << fnames.second << " for file transfer of file:" << fnames.first; + report(ss.str(),false); open_file_socket_map.insert(make_pair(i_sock,fnames.second)); } @@ -1493,7 +1495,7 @@ void RunManagerPanther::process_message(int i_sock) { if (open_file_trans_streams.find(fnames.second) == open_file_trans_streams.end()) { - ss << "file transfer error: agent " << host_name << "$" << agent_info_iter->get_work_dir() << " requesting file '" << fnames.first << "', master file '" << fnames.second << "' not open yet, can't continue transfer, something is wrong"; + ss << "file transfer error from agent:" << host_name << "$" << agent_info_iter->get_work_dir() << " requesting file:" << fnames.first << " to master file:" << fnames.second << " - not open yet, can't continue transfer, something is wrong"; report(ss.str(),true); } else @@ -1506,7 +1508,7 @@ void RunManagerPanther::process_message(int i_sock) out.flush(); bytes_transferred += ibuf.size(); ss.str(""); - ss << "agent " << host_name << "$" << agent_info_iter->get_work_dir() << " transferred " << ibuf.size() << " to file '" << fnames.second << "'"; + ss << " agent:" << host_name << "$" << agent_info_iter->get_work_dir() << " transferred bytes:" << ibuf.size() << " to file:" << fnames.second; report(ss.str(),false); } } @@ -1525,7 +1527,7 @@ void RunManagerPanther::process_message(int i_sock) { if (open_file_trans_streams.find(fnames.second) == open_file_trans_streams.end()) { - ss << "file transfer error: agent " << host_name << "$" << agent_info_iter->get_work_dir() << " requesting file '" << fnames.first << "', master file '" << fnames.second << "' not open yet, can't close, something is wrong"; + ss << "file transfer error from agent:" << host_name << "$" << agent_info_iter->get_work_dir() << " requesting_file:" << fnames.first << "', master_file:" << fnames.second << " - not open yet, can't close, something is wrong"; report(ss.str(),true); } else @@ -1537,8 +1539,8 @@ void RunManagerPanther::process_message(int i_sock) out.close(); open_file_trans_streams.erase(ret.first); ss.str(""); - ss << "closed file '" << fnames.second << "' for file transfer of file '" << fnames.first; - ss << "' from " << host_name << "$" << agent_info_iter->get_work_dir() << ", transferred " << file_size << " bytes"; + ss << "closed file:" << fnames.second << " for file transfer of file:" << fnames.first; + ss << " from " << host_name << "$" << agent_info_iter->get_work_dir() << " transferred bytes:" << file_size; report(ss.str(),false); files_transferred += 1; open_file_socket_map.erase(i_sock); @@ -1549,7 +1551,7 @@ void RunManagerPanther::process_message(int i_sock) else { - report("received unsupported message from agent: ", false); + report("received unsupported message from agent:" , false); net_pack.print_header(f_rmr); //save results from model run } @@ -1593,7 +1595,7 @@ pair RunManagerPanther::get_recv_filenames(NetPackage& net_pack, { ss.str(""); ss << "WARNING: could not find 'agent_filename' tag in net_pack info txt: '" << info_txt; - ss << " from agent " << hostname << "$" << working_dir << ", unable form file transfer names"; + ss << " from agent:" << hostname << "$" << working_dir << " - unable form file transfer names"; report (ss.str(), true); } else { @@ -1610,7 +1612,7 @@ pair RunManagerPanther::get_recv_filenames(NetPackage& net_pack, if (master_filename.size() > 255) { ss.str(""); - ss << "WARNING: master_filename '" << master_filename << "' size > 255" << endl; + ss << "WARNING: master_filename:" << master_filename << " size > 255" << endl; report(ss.str(),true); } return make_pair(agent_filename,master_filename); @@ -1640,7 +1642,7 @@ bool RunManagerPanther::process_model_run(int sock_id, NetPackage &net_pack) else { stringstream ss; - ss << "run_id " << run_id << "already finished"; + ss << " run_id:" << run_id << " already finished"; report(ss.str(), false); } // remove currently completed run from the active list @@ -1662,8 +1664,8 @@ void RunManagerPanther::kill_run(list::iterator agent_info_iter, c //schedule run to be killed string host_name = agent_info_iter->get_hostname(); stringstream ss; - ss << "sending kill request. reason: " << reason << ", run id:" << run_id; - ss<< ", num previous fails:" << failure_map.count(run_id) << ", agent: " << host_name << "$" << agent_info_iter->get_work_dir(); + ss << "sending kill request. reason:" << reason << " run_id:" << run_id; + ss<< ", num_previous_fails:" << failure_map.count(run_id) << " agent:" << host_name << "$" << agent_info_iter->get_work_dir(); report(ss.str(), false); NetPackage net_pack(NetPackage::PackType::REQ_KILL, 0, 0, ""); char data = '\0'; @@ -1675,7 +1677,7 @@ void RunManagerPanther::kill_run(list::iterator agent_info_iter, c else { report("error sending kill request to agent:" + host_name + "$" + - agent_info_iter->get_work_dir() + ": " + err.second, true); + agent_info_iter->get_work_dir() + " error:" + err.second, true); agent_info_iter->set_state(AgentInfoRec::State::KILLED_FAILED); } } @@ -1777,11 +1779,11 @@ void RunManagerPanther::kill_all_active_runs() } else if (err_par.first <= 0) { - report("Error sending par names to " + i_agent.get_hostname() + "$" + i_agent.get_work_dir() + ": " + err_par.second,false); + report("Error sending par names to agent:" + i_agent.get_hostname() + "$" + i_agent.get_work_dir() + " error:" + err_par.second,false); } else if (err_obs.first <= 0) { - report("Error sending obs names to " + i_agent.get_hostname() + "$" + i_agent.get_work_dir() + ": " + err_obs.second, false); + report("Error sending obs names to agent:" + i_agent.get_hostname() + "$" + i_agent.get_work_dir() + " error:" + err_obs.second, false); } } else if (cur_state == AgentInfoRec::State::NAMES_SENT) @@ -1796,7 +1798,7 @@ void RunManagerPanther::kill_all_active_runs() } else { - report("error sending linpack request to " + i_agent.get_hostname() + "$" + i_agent.get_work_dir() + ": " + err.second,false); + report("error sending linpack request to agent:" + i_agent.get_hostname() + "$" + i_agent.get_work_dir() + " error:" + err.second,false); } } else if (cur_state == AgentInfoRec::State::LINPACK_RCV) @@ -1874,7 +1876,7 @@ void RunManagerPanther::kill_all_active_runs() list::iterator RunManagerPanther::add_agent(int sock_id) { stringstream ss; - ss << "new connection from: " << w_getnameinfo_string(sock_id); + ss << "new connection from:" << w_getnameinfo_string(sock_id); report(ss.str(), false); FD_SET(sock_id, &master); // add to master set if (sock_id > fdmax) { // keep track of the max diff --git a/src/programs/pestpp-da/pestpp-da.cpp b/src/programs/pestpp-da/pestpp-da.cpp index 9a0efffbd..78bffc292 100644 --- a/src/programs/pestpp-da/pestpp-da.cpp +++ b/src/programs/pestpp-da/pestpp-da.cpp @@ -537,7 +537,8 @@ int main(int argc, char* argv[]) cout << "initializing 'global' localizer" << endl; fout_rec << "initializing 'global' localizer" << endl; Localizer global_loc(&pest_scenario); - global_loc.initialize(&performance_log); + bool forgive_missing = pest_scenario.get_pestpp_options().get_ies_localizer_forgive_missing(); + global_loc.initialize(&performance_log,forgive_missing); //ParameterEnsemble *_base_pe_ptr, FileManager *_file_manager_ptr, OutputFileWriter* _output_file_writer_ptr ParChangeSummarizer pcs(&curr_pe, &file_manager, &output_file_writer); diff --git a/src/programs/sweep/sweep.cpp b/src/programs/sweep/sweep.cpp index de25e3318..756479c47 100644 --- a/src/programs/sweep/sweep.cpp +++ b/src/programs/sweep/sweep.cpp @@ -430,7 +430,13 @@ int main(int argc, char* argv[]) throw(e); } pest_scenario.check_inputs(fout_rec, true); - + + if (!pest_scenario.get_pestpp_options().get_sweep_include_regul_phi()) + { + pest_scenario.get_regul_scheme_ptr()->set_zero(); + pest_scenario.get_prior_info_ptr()->clear(); + } + OutputFileWriter ofw(file_manager, pest_scenario, false, false, 0); ofw.scenario_report(fout_rec, false); PestppOptions ppopt = pest_scenario.get_pestpp_options(); @@ -441,6 +447,7 @@ int main(int argc, char* argv[]) //fout_rec << " sweep base run = " << left << setw(10) << ppopt.get_sweep_base_run() << endl; fout_rec << " sweep forgive failed runs = " << left << setw(10) << ppopt.get_sweep_forgive() << endl; + if (pest_scenario.get_pestpp_options().get_debug_parse_only()) { cout << endl << endl << "DEBUG_PARSE_ONLY is true, exiting..." << endl << endl;