@@ -733,6 +733,10 @@ def tplins1_test():
733733 jco = pyemu .Jco .from_binary (os .path .join (t_d ,"pest.jcb" )).to_dataframe ().apply (np .abs )
734734 assert jco .sum ().sum () == 0 , jco .sum ()
735735
736+ pst .control_data .noptmax = 0
737+ pst .write (os .path .join (t_d ,"pest.pst" ))
738+ pyemu .os_utils .run ("{0} pest.pst" .format (exe_path .replace ("-ies" ,"-glm" )),cwd = t_d )
739+
736740 # check the input file - the last two number should be the same
737741 arr = np .loadtxt (os .path .join (t_d ,"hk_Layer_1.ref" ))
738742 assert arr [- 2 ] == arr [- 1 ],arr [- 2 ] - arr [- 1 ]
@@ -742,6 +746,7 @@ def tplins1_test():
742746 assert len (lines_tpl ) - 1 == len (lines_in )
743747
744748 pst = pyemu .Pst (os .path .join (t_d ,"pest.pst" ))
749+ pst .control_data .noptmax = - 1
745750 pst .pestpp_options ["fill_tpl_zeros" ] = True
746751 pst .write (os .path .join (t_d ,"pest_fill.pst" ))
747752 pyemu .os_utils .run ("{0} pest_fill.pst" .format (exe_path .replace ("-ies" ,"-glm" )),cwd = t_d )
@@ -758,6 +763,10 @@ def tplins1_test():
758763 jco = pyemu .Jco .from_binary (os .path .join (t_d ,"pest_fill.jcb" )).to_dataframe ().apply (np .abs )
759764 assert jco .sum ().sum () == 0 , jco .sum ()
760765
766+ pst .control_data .noptmax = 0
767+ pst .write (os .path .join (t_d ,"pest.pst" ))
768+ pyemu .os_utils .run ("{0} pest.pst" .format (exe_path .replace ("-ies" ,"-glm" )),cwd = t_d )
769+
761770 # check the input file - the last two number should be the same
762771 arr = np .loadtxt (os .path .join (t_d ,"hk_Layer_1.ref" ))
763772 assert arr [- 2 ] == arr [- 1 ]
@@ -773,6 +782,7 @@ def tplins1_test():
773782 pst .model_output_data = pd .DataFrame ({"pest_file" :"out1dum.dat.ins" ,
774783 "model_file" :'out1.dat' },index = ["out1dum.dat.ins" ])
775784 #pst.instruction_files = ['out1dum.dat.ins']
785+ pst .control_data .noptmax = - 1
776786 pst .write (os .path .join (t_d , "pest_dum.pst" ))
777787 pyemu .os_utils .run ("{0} pest_dum.pst" .format (exe_path .replace ("-ies" , "-glm" )), cwd = t_d )
778788 obf_df = pd .read_csv (os .path .join (t_d , "out1.dat.obf" ), delim_whitespace = True , header = None ,
@@ -872,6 +882,20 @@ def mf6_v5_ies_test():
872882 pyemu .os_utils .run ("{0} freyberg6_run_ies.pst" .format (exe_path ),cwd = t_d )
873883
874884 pst .control_data .noptmax = 3
885+
886+ m_d = os .path .join (model_d , "master_ies_glm_noloc_standard" )
887+ if os .path .exists (m_d ):
888+ shutil .rmtree (m_d )
889+ pst = pyemu .Pst (os .path .join (t_d , "freyberg6_run_ies.pst" ))
890+ pst .pestpp_options .pop ("ies_localizer" ,None )
891+ pst .pestpp_options .pop ("ies_autoadaloc" ,None )
892+ pst .pestpp_options ["ies_bad_phi_sigma" ] = 2.5
893+ pst .control_data .noptmax = 3
894+ pst .write (os .path .join (t_d , "freyberg6_run_ies_glm_noloc_standard.pst" ))
895+ pyemu .os_utils .start_workers (t_d , exe_path , "freyberg6_run_ies_glm_noloc_standard.pst" , num_workers = 15 ,
896+ master_dir = m_d , worker_root = model_d , port = port )
897+
898+ return
875899 pst .write (os .path .join (t_d ,"freyberg6_run_ies_glm_loc.pst" ))
876900
877901 m_d = os .path .join (model_d , "master_ies_glm_covloc" )
@@ -1106,7 +1130,7 @@ def fr_fail_test():
11061130 assert not os .path .exists (oe_file )
11071131 m_d = os .path .join (model_d ,"fr_fail_master" )
11081132 try :
1109- pyemu .os_utils .start_workers (new_d ,exe_path ,"pest.pst" ,num_workers = 1 ,worker_root = model_d ,master_dir = m_d )
1133+ pyemu .os_utils .start_workers (new_d ,exe_path ,"pest.pst" ,num_workers = 5 ,worker_root = model_d ,master_dir = m_d )
11101134 except :
11111135 pass
11121136 else :
@@ -1175,29 +1199,29 @@ def fr_timeout_test():
11751199 f .write ("import os\n import time\n import pyemu\n pyemu.os_utils.run('mfnwt 10par_xsec.nam')\n " )
11761200 f .write ("if not os.path.exists('run.info'):\n exit()\n " )
11771201 f .write ("lines = open('run.info','r').readlines()\n rnum = int(lines[-1].split()[-1].split('=')[-1])\n " )
1178- f .write ("if rnum % 2 == 0:\n time.sleep(100000 )\n " )
1202+ f .write ("if rnum % 2 == 0:\n time.sleep(10000000 )\n " )
11791203 pst .model_command = "python run.py"
11801204 oe_file = os .path .join (new_d , "pest.0.obs.csv" )
11811205 if os .path .exists (oe_file ):
11821206 os .remove (oe_file )
11831207 pst .control_data .noptmax = - 1
11841208 pst .pestpp_options ["overdue_giveup_fac" ] = 1.0e+10
1185- pst .pestpp_options ["overdue_giveup_minutes" ] = 0.1
1209+ pst .pestpp_options ["overdue_giveup_minutes" ] = 0.25
11861210 pst .pestpp_options ["ies_num_reals" ] = 10
1211+ pst .pestpp_options ["ies_include_base" ] = False
1212+ pst .pestpp_options ["max_run_fail" ] = 1
11871213
11881214 #pst.pestpp_options["panther_transfer_on_fail"] = "10par_xsec.list"
1189- pst .pestpp_options ["panther_agent_freeze_on_fail" ] = True
1215+ pst .pestpp_options ["panther_agent_freeze_on_fail" ] = False
11901216 pst .write (os .path .join (new_d , "pest.pst" ))
1191- pyemu .os_utils .run ("{0} pest.pst" .format (exe_path ),cwd = new_d )
11921217
1193- assert os .path .exists (oe_file )
11941218 m_d = os .path .join (model_d ,"fr_timeout_master" )
1195- pyemu .os_utils .start_workers (new_d ,exe_path ,"pest.pst" ,num_workers = 1 ,worker_root = model_d ,master_dir = m_d )
1219+ pyemu .os_utils .start_workers (new_d ,exe_path ,"pest.pst" ,num_workers = 5 ,worker_root = model_d ,master_dir = m_d )
11961220 oe_file = os .path .join (m_d , "pest.0.obs.csv" )
11971221 assert os .path .exists (oe_file )
11981222 oe = pd .read_csv (oe_file ,index_col = 0 )
11991223 print (oe .shape )
1200- assert oe .shape [0 ] == 4
1224+ assert oe .shape [0 ] == 5 , oe . shape
12011225
12021226def ins_missing_e_test ():
12031227 import os
@@ -1248,7 +1272,7 @@ def ins_missing_e_test():
12481272 #salib_verf()
12491273 #tplins1_test()
12501274 #secondary_marker_test()
1251- ext_stdcol_test ()
1275+ # ext_stdcol_test()
12521276
12531277 # parallel_consist_test()
12541278 # ext_stdcol_test()
@@ -1261,17 +1285,20 @@ def ins_missing_e_test():
12611285
12621286 #da_prep_4_mf6_freyberg_seq_tbl()
12631287 #da_mf6_freyberg_test_2()
1264- # shutil.copy2(os.path.join("..","exe","windows","x64","Debug","pestpp-ies.exe"),os.path.join("..","bin","win","pestpp-ies.exe"))
1288+ shutil .copy2 (os .path .join (".." ,"exe" ,"windows" ,"x64" ,"Debug" ,"pestpp-ies.exe" ),os .path .join (".." ,"bin" ,"win" ,"pestpp-ies.exe" ))
12651289 #tplins1_test()
12661290 #mf6_v5_ies_test()
12671291 #mf6_v5_sen_test()
12681292
1293+
1294+
12691295 #shutil.copy2(os.path.join("..","exe","windows","x64","Debug","pestpp-opt.exe"),os.path.join("..","bin","win","pestpp-opt.exe"))
12701296 #mf6_v5_opt_stack_test()
12711297 #mf6_v5_glm_test()
12721298 #mf6_v5_ies_test()
12731299 #cmdline_test()
12741300 #basic_sqp_test()
12751301 #mf6_v5_ies_test()
1276- # fr_timeout_test()
1302+ fr_timeout_test ()
12771303 #fr_fail_test()
1304+ #tplins1_test()
0 commit comments