From 5e07f11b2718f45a3db802eedc89de005819df12 Mon Sep 17 00:00:00 2001 From: pontus_pih Date: Wed, 3 Jan 2007 16:22:41 +0000 Subject: [PATCH] Removed Parallel::Forkmanager in modelfit --- Makefile | 3 +- README.txt | 27 + devel/pheno.mod | 2 +- diagrams/debug.dia | 24 +- diagrams/model.dia | 15199 +++++++++++++++++--------------- diagrams/modelfit.dia | 217 +- diagrams/tool.dia | 127 +- lib/debug_subs.pm | 13 +- lib/model/cwres_module_subs.pm | 2 +- lib/nonmem_subs.pm | 51 +- lib/output/problem/subproblem_subs.pm | 6 +- lib/output_subs.pm | 4 +- lib/psn.conf | 6 +- lib/tool/modelfit_subs.pm | 1041 ++- lib/tool_subs.pm | 2 +- 15 files changed, 8774 insertions(+), 7950 deletions(-) diff --git a/Makefile b/Makefile index 7018049..28574f6 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ HTML_STUBS=_synopsis.php _description.php _options.php _examples.php DOCUMENTS=$(foreach pre,$(BIN),$(foreach suff,$(HTML_STUBS),$(addprefix html/$(pre),$(suff)))) -DIA2CODE=dia2code +DIA2CODE=/home/pontus/code/dia2code/dia2code/dia2code FILLSCRIPT=perl ./bin/fill_diacode.pl DIRPM=libgen/ DIRSUBS=lib/ @@ -60,6 +60,7 @@ LIBFILES=debug.pm \ model/problem/table.pm \ model/problem/theta.pm \ model/problem/tol.pm \ + model/cwres_module.pm \ model/problem.pm \ model/shrinkage_module.pm \ model/nonparametric_module.pm \ diff --git a/README.txt b/README.txt index 04d3060..0a1c370 100644 --- a/README.txt +++ b/README.txt @@ -10,6 +10,33 @@ All available from CPAN ( www.cpan.org ) Changelog ---------------------------------------------- +Changes from 2.2.0 to 2.3.0 + +Features + - Dropped use of parallell forkmanager. + + - Failed runs are now ignored, they are indicated as "failed + run" in "raw_results". (And a warning will be printed). + + - The default debug level has been raised from 0(only fatal messages + will be printed) to 1 (fatal and warning messages). The biggest + benefit is that a lot of messages can be turned of by setting debug + to 0. Also it will force us, the developers, to rethink the warning + messages a bit, making them more informative. + + - The config for diffrent nonmem versions now requires the actual + nonmem version to be specified. Like this: + + [nm_version] + name=/path/to/nonmem,5 + name_six=/path/to/nonmem6,6 + + - PsN will occupy slightly less disc space when running. + +Bugs + - If someone specified a maxeval bigger than 9999 PsN would try and + fix that, and failed. Fixed. + Changes from 2.1.10 to 2.2.0 ( released for PsN course ) Features diff --git a/devel/pheno.mod b/devel/pheno.mod index 637856b..cd62ac0 100644 --- a/devel/pheno.mod +++ b/devel/pheno.mod @@ -27,5 +27,5 @@ $OMEGA .4 ; IVCL $SIGMA .04 -$ESTIMATION MAXEVAL=9999 SIGDIGITS=4 POSTHOC +$ESTIMATION MAXEVALS=10000 SIGDIGITS=4 POSTHOC $COVARIANCE PRINT=E diff --git a/diagrams/debug.dia b/diagrams/debug.dia index 4ce648b..79d0031 100644 --- a/diagrams/debug.dia +++ b/diagrams/debug.dia @@ -68,13 +68,13 @@ - + - + @@ -112,6 +112,12 @@ + + + + + + @@ -125,21 +131,21 @@ - + - + - + - + - + - + @@ -166,7 +172,7 @@ #scalar integer# - #0# + #1# ## diff --git a/diagrams/model.dia b/diagrams/model.dia index a007f75..bfdca3b 100644 --- a/diagrams/model.dia +++ b/diagrams/model.dia @@ -10,7 +10,7 @@ - #A4# + #A3# @@ -25,7 +25,7 @@ - + @@ -65,19 +65,19 @@ - + - + - + - + - + @@ -85,6 +85,9 @@ + + + ## @@ -94,16 +97,16 @@ - + - + - + - + @@ -114,6 +117,9 @@ + + + ## @@ -123,13 +129,13 @@ - + - + - + @@ -143,6 +149,9 @@ + + + ## @@ -152,22 +161,22 @@ - + - + - + - + - + - #problem# + #option# ## @@ -199,6 +208,12 @@ + + + + + + @@ -215,7 +230,7 @@ - + @@ -224,9 +239,9 @@ - + - + @@ -247,7 +262,7 @@ - #directory# + #option_string# #scalar string# @@ -259,7 +274,7 @@ ## - + @@ -270,7 +285,7 @@ - #extra_data_file_name# + #name# #scalar string# @@ -293,10 +308,10 @@ - #extra_data_header# + #value# - #array of strings# + #scalar string# ## @@ -314,481 +329,558 @@ - + + + - #ignore_missing_files# + #_read_option# + + + #initiator# - #scalar boolean# + ## - - #1# + + ## - - - - - - - - - - #ignore_missing_output_files# - - - #scalar boolean# - - - #1# - - - ## - - - + + - + + - + - #prob_arr# - - - #array of strings# + #_format_option# - - ## + + #helper# - + ## - - - - - - - - - - #sde# - - - #scalar boolean# - - - #0# - ## - - - - - - - - - - #primary_columns# - - - #array of arrays# - - - ## - - - ## - - - + + - + + + + + #formatted# + + + #scalar string# + + + ## + + + ## + + + + + + - + - #secondary_columns# - - - #array of arrays# + #option_count# - + ## - + ## + + ## + - + + + + - - - - #shrinkage_module# + + - - #object model::shrinkage_module# + + + + #return_value# + + + #scalar integer# + + + #0# + + + ## + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + ## - + ## - - - - + - - + + + + + - - - #eigen_value_code# + + + ## - - #scalar boolean# + + ## - - #1# + + - - ## + + - - - - - - - - - #nonparametric_code# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + ## - - #scalar boolean# + + ## - - #1# + + - - ## + + - - - - - - - - - #wres_shrinkage_table# - - - #scalar string# - - + + ## - + ## - - - - - - - + - - - - #eta_shrinkage_table# - - - #scalar string# - - - ## - - - ## + + - - - - - - - - - - #add_records# - - - ## - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + ## - - - - + ## - - - - - - - - - - + - - - - #record_strings# - - - #mandatory array of strings# - - - ## - - - ## - - - - - - - - #type# - - - #mandatory scalar string# - - - ## - - - ## - - - - - - - - - - #contify_tables# - - - ## - - - ## + + - - ## - - - - - - - - - - - - - - - - - #set_records# - - - ## - - + + ## - - - - + ## - + - + - - - - - - - - - - #record_strings# - - - #mandatory array of strings# - - - ## - - - ## - - - - - - - - #type# - - - #mandatory scalar string# - - - ## - - - ## - - - - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + #pk# + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - #_read_records# - - - #initiator# + #secondary_columns# - ## + #array of arrays# - - + + ## ## - - - - - + + - + - - - - #type# - - - #scalar string# - - - ## - - - ## - - - - - - + + - #_format_problem# + #_format_record# - #helper# + ## ## - + ## @@ -808,40 +900,6 @@ - #filename# - - - #scalar string# - - - ## - - - ## - - - - - - - - #problem_number# - - - #scalar integer# - - - ## - - - ## - - - - - - - #formatted# @@ -861,40 +919,10 @@ - #store_inits# + #_read_options# - #helper# - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - - #restore_inits# - - - #helper# + ## ## @@ -919,18 +947,233 @@ + + + + + + + + + + + + + + + + + + + + + + + + #aes# + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #theta# + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - #set_random_inits# + #_read_options# - #helper# + #initiator# ## - + ## @@ -947,2189 +1190,7 @@ - - - - #degree# - - - #scalar number# - - - #0.1# - - - ## - - - - - - - - - - #record_count# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - #record_name# - - - #scalar string# - - - ## - - - ## - - - - - - - - #return_value# - - - #scalar integer# - - - #0# - - - ## - - - - - - - - - - #_init_attr# - - - #helper# - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - #parameter_type# - - - #scalar string# - - - ## - - - ## - - - - - - - - #parameter_numbers# - - - #array of integers# - - - ## - - - ## - - - - - - - - #attribute# - - - #scalar string# - - - ## - - - ## - - - - - - - - #new_values# - - - #array of strings# - - - ## - - - ## - - - - - - - - #add_if_absent# - - - #scalar boolean# - - - #0# - - - ## - - - - - - - - #parameter_values# - - - #array of strings# - - - ## - - - ## - - - - - - - - - - #indexes# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - #parameter_type# - - - #scalar string# - - - ## - - - ## - - - - - - - - #parameter_numbers# - - - #array of numbers# - - - ## - - - ## - - - - - - - - #indexes# - - - #array of strings# - - - ## - - - ## - - - - - - - - - - #covariance# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - #enabled# - - - #scalar boolean# - - - ## - - - ## - - - - - - - - #indicator# - - - #scalar boolean# - - - #0# - - - ## - - - - - - - - - - #eigen# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - #enabled# - - - #scalar string# - - - ## - - - ## - - - - - - - - #indicator# - - - #scalar boolean# - - - #0# - - - ## - - - - - - - - - - #_option_val_pos# - - - #helper# - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - #record_name# - - - #scalar string# - - - ## - - - ## - - - - - - - - #instance_numbers# - - - #array of integers# - - - ## - - - ## - - - - - - - - #name# - - - #scalar string# - - - ## - - - ## - - - - - - - - #new_values# - - - #array of strings# - - - ## - - - ## - - - - - - - - #exact_match# - - - #scalar boolean# - - - #1# - - - ## - - - - - - - - #values# - - - #array of strings# - - - ## - - - ## - - - - - - - - #positions# - - - #array of integers# - - - ## - - - ## - - - - - - - - - - #name_val# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - #parameter_type# - - - #scalar string# - - - ## - - - ## - - - - - - - - #parameter_numbers# - - - #array of integers# - - - ## - - - ## - - - - - - - - #names_values# - - - #array of# - - - ## - - - ## - - - - - - - - - - #remove_records# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - #type# - - - #mandatory scalar string# - - - ## - - - ## - - - - - - - - - - #_read_table_files# - - - ## - - - #initiator# - - - - - - ## - - - - - - - - - - - - - - - - - #ignore_missing_files# - - - #scalar boolean# - - - #0# - - - ## - - - - - - - - - - #_normalize_record_name# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - #record_name# - - - #mandatory scalar string# - - - ## - - - ## - - - - - - - - #normalized_name# - - - #scalar string# - - - ## - - - ## - - - - - - - - - - #header# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - #header# - - - #array of strings# - - - ## - - - ## - - - - - - - - - - #dropped_columns# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - #dropped_columns# - - - #array of booleans# - - - ## - - - ## - - - - - - - - - - #cont_wrap_columns# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - #cont_column# - - - #scalar integer# - - - ## - - - ## - - - - - - - - #wrap_column# - - - #scalar integer# - - - ## - - - ## - - - - - - - - - - #drop_dropped# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - - #remove_option# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - #record_name# - - - #scalar string# - - - ## - - - ## - - - - - - - - #option_name# - - - #scalar string# - - - ## - - - ## - - - - - - - - - - #add_option# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - #record_name# - - - #scalar string# - - - ## - - - ## - - - - - - - - #option_name# - - - #scalar string# - - - ## - - - ## - - - - - - - - #option_value# - - - #scalar# - - - ## - - - ## - - - - - - - - #add_record# - - - #scalar boolean# - - - #0# - - - ## - - - - - - - - - - #add_marginals_code# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - #nomegas# - - - #scalar integer# - - - ## - - - ## - - - - - - - - - - #nomegas# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - #nomegas# - - - #scalar integer# - - - ## - - - ## - - - - - - - - - - #nsigmas# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - #nsigmas# - - - #scalar integer# - - - ## - - - ## - - - - - - - - - - #eta_shrinkage# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - #eta_shrinkage# - - - #array of# - - - ## - - - ## - - - - - - - - - - #wres_shrinkage# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - #wres_shrinkage# - - - #array of# - - - ## - - - ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #option# - - - ## - - - ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #option_string# - - - #scalar string# - - - ## - - - ## - - - - - - - - - - - - - - #name# - - - #scalar string# - - - ## - - - ## - - - - - - - - - - - - - - #value# - - - #scalar string# - - - ## - - - ## - - - - - - - - - - - - - - - - #_read_option# - - - #initiator# - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - - #_format_option# - - - #helper# - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - #formatted# - - - #scalar string# - - - ## - - - ## - - - - - - - - - - #option_count# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - #return_value# - - - #scalar integer# - - - #0# - - - ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## - - - - - - - - ## - - - ## - - - - - - - - - - - ## - - - ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## - - - - - - - - ## - - - ## - - - - - - - - - - - ## - - - ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## - - - - - - - - ## - - - ## - - - - - - - - - - - ## - - - ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## - - - ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## - - - ## - - - - - - - - - - - - - - - - - - - - - - - - #pk# - - - ## - - - ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #secondary_columns# - - - #array of arrays# - - - ## - - - ## - - - - - - - - - - - - - - - - #_format_record# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - #formatted# - - - #array of strings# - - - ## - - - ## - - - - - - - - - - #_read_options# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - + @@ -3137,24 +1198,24 @@ - + - + - + - + - + - #aes# + #omega# ## @@ -3186,239 +1247,12 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #theta# - - - ## - - - ## - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #_read_options# - - - #initiator# - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - #omega# - - - ## - - - ## - - - - - - - - - - - - - - - - - - - - - - - - - @@ -3435,7 +1269,7 @@ - + @@ -3444,9 +1278,9 @@ - + - + @@ -3471,18 +1305,18 @@ - + - + - + - - - - + + + + @@ -3492,6 +1326,9 @@ + + + @@ -3502,22 +1339,22 @@ ## - - + + - + - + - + - - - - + + + + @@ -3527,6 +1364,9 @@ + + + @@ -3537,22 +1377,22 @@ ## - - + + - + - + - + - - - - + + + + @@ -3562,6 +1402,9 @@ + + + @@ -3572,22 +1415,22 @@ ## - - + + - + - + - + - - - - + + + + @@ -3597,6 +1440,9 @@ + + + @@ -3607,22 +1453,22 @@ ## - - + + - + - + - + - + - + @@ -3660,6 +1506,12 @@ + + + + + + @@ -3676,7 +1528,7 @@ - + @@ -3685,9 +1537,9 @@ - + - + @@ -4183,18 +2035,18 @@ - + - + - + - - - - + + + + @@ -4204,6 +2056,9 @@ + + + @@ -4214,22 +2069,22 @@ ## - - + + - + - + - + - + - + @@ -4267,6 +2122,12 @@ + + + + + + @@ -4283,7 +2144,7 @@ - + @@ -4292,9 +2153,9 @@ - + - + @@ -4470,18 +2331,18 @@ - + - + - + - - - - + + + + @@ -4491,6 +2352,9 @@ + + + @@ -4501,25 +2365,25 @@ ## - - + + - + - + - + - + - + - + #model# @@ -4549,11 +2413,17 @@ - + + + + + + + @@ -4570,7 +2440,7 @@ - + @@ -4579,9 +2449,9 @@ - + - + @@ -4625,6 +2495,29 @@ + #compute_cwres# + + + #scalar boolean# + + + #0# + + + ## + + + + + + + + + + + + + #directory# @@ -4786,6 +2679,29 @@ + #nm_version# + + + #scalar# + + + ## + + + ## + + + + + + + + + + + + + #ignore_missing_data# @@ -9340,7 +7256,205 @@ #problem_number# - #scalar integer# + #scalar integer# + + + ## + + + ## + + + + + + + + #column# + + + #scalar integer# + + + ## + + + ## + + + + + + + + #column_head# + + + #scalar string# + + + ## + + + ## + + + + + + + + #max# + + + #scalar number# + + + ## + + + ## + + + + + + + + + + #min# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + #problem_number# + + + #scalar integer# + + + ## + + + ## + + + + + + + + #column# + + + #scalar integer# + + + ## + + + ## + + + + + + + + #column_head# + + + #scalar string# + + + ## + + + ## + + + + + + + + #min# + + + #scalar number# + + + ## + + + ## + + + + + + + + + + #remove_inits# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + #type# + + + #scalar string# ## @@ -9354,10 +7468,10 @@ - #column# + #labels# - #scalar integer# + #array of strings# ## @@ -9371,10 +7485,10 @@ - #column_head# + #indexes# - #scalar string# + #array of integers# ## @@ -9388,26 +7502,26 @@ - #max# + #problem_number# - #scalar number# + #scalar integer# - ## + #1# ## - + - #min# + #fractions# ## @@ -9436,7 +7550,7 @@ - #problem_number# + #column# #scalar integer# @@ -9453,10 +7567,10 @@ - #column# + #column_head# - #scalar integer# + #scalar string# ## @@ -9470,10 +7584,10 @@ - #column_head# + #problem_number# - #scalar string# + #scalar integer# ## @@ -9487,10 +7601,27 @@ - #min# + #unique_in_individual# - #scalar number# + #scalar boolean# + + + #1# + + + ## + + + + + + + + #fractions# + + + #hash of numbers# ## @@ -9502,11 +7633,28 @@ + + + #ignore_missing# + + + #scalar boolean# + + + ## + + + ## + + + + + - #remove_inits# + #remove_records# ## @@ -9524,7 +7672,7 @@ - + @@ -9538,7 +7686,7 @@ #type# - #scalar string# + #mandatory scalar string# ## @@ -9552,10 +7700,10 @@ - #labels# + #problem_numbers# - #array of strings# + #array of integers# ## @@ -9567,9 +7715,40 @@ + + + + + #table_files# + + + ## + + + #accessor# + + + + + + ## + + + + + + + + + + + + + + - #indexes# + #problem_numbers# #array of integers# @@ -9586,26 +7765,164 @@ - #problem_number# + #table_files# - #scalar integer# + #array of arrays# - #1# + ## ## - + + + + + + + + #full_name# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + #full_name# + + + #scalar string# + + + ## + + + ## + + + - #fractions# + #add_extra_data_code# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + + #write_readers# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + + #write_get_subs# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + + #is_simulation# ## @@ -9623,7 +7940,7 @@ - + @@ -9634,47 +7951,13 @@ - #column# - - - #scalar integer# - - - ## - - - ## - - - - - - - - #column_head# - - - #scalar string# - - - ## - - - ## - - - - - - - #problem_number# #scalar integer# - ## + #0# ## @@ -9685,30 +7968,13 @@ - #unique_in_individual# + #is_sim# #scalar boolean# - #1# - - - ## - - - - - - - - #fractions# - - - #hash of numbers# - - - ## + #0# ## @@ -9717,28 +7983,11 @@ - - - #ignore_missing# - - - #scalar boolean# - - - ## - - - ## - - - - - - #remove_records# + #subroutine_files# ## @@ -9767,27 +8016,10 @@ - #type# - - - #mandatory scalar string# - - - ## - - - ## - - - - - - - - #problem_numbers# + #fsubs# - #array of integers# + #array of strings# ## @@ -9796,20 +8028,20 @@ ## - + - #table_files# + #randomize_inits# ## - #accessor# + ## @@ -9832,10 +8064,10 @@ - #problem_numbers# + #degree# - #array of integers# + #scalar number# ## @@ -9847,28 +8079,11 @@ - - - #table_files# - - - #array of arrays# - - - ## - - - ## - - - - - - #full_name# + #wrap_data# ## @@ -9897,10 +8112,10 @@ - #full_name# + #cont_column# - #scalar string# + #scalar integer# ## @@ -9909,44 +8124,31 @@ ## - + + + + + + #wrap_column# + + + #scalar integer# + + + ## + + + ## + + + - #add_extra_data_code# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - - #write_readers# + #unwrap_data# ## @@ -9976,7 +8178,7 @@ - #write_get_subs# + #flush_data# ## @@ -10006,7 +8208,7 @@ - #is_simulation# + #register_in_database# ## @@ -10035,10 +8237,10 @@ - #problem_number# + #force# - #scalar integer# + #scalar boolean# #0# @@ -10052,13 +8254,13 @@ - #is_sim# + #model_id# - #scalar boolean# + #scalar integer# - #0# + ## ## @@ -10071,7 +8273,7 @@ - #subroutine_files# + #remove_option# ## @@ -10100,10 +8302,10 @@ - #fsubs# + #problem_numbers# - #array of strings# + #array of integers# ## @@ -10112,46 +8314,32 @@ ## - + + + + + + #record_name# + + + #scalar string# + + + ## + + + ## + + + - - - - - #randomize_inits# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - - #degree# + #option_name# - #scalar number# + #scalar string# ## @@ -10167,7 +8355,7 @@ - #wrap_data# + #add_option# ## @@ -10196,10 +8384,10 @@ - #cont_column# + #problem_numbers# - #scalar integer# + #array of integers# ## @@ -10213,10 +8401,10 @@ - #wrap_column# + #record_name# - #scalar integer# + #scalar string# ## @@ -10228,106 +8416,15 @@ - - - - - #unwrap_data# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - - #flush_data# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - - #register_in_database# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - - #force# + #option_name# - #scalar boolean# + #scalar string# - #0# + ## ## @@ -10338,10 +8435,10 @@ - #model_id# + #option_value# - #scalar integer# + #scalar# ## @@ -10350,14 +8447,31 @@ ## - + + + + + + #add_record# + + + #scalar boolean# + + + #0# + + + ## + + + - #remove_option# + #set_option# ## @@ -10435,11 +8549,28 @@ + + + #option_value# + + + #scalar# + + + ## + + + ## + + + + + - #add_option# + #add_marginals_code# ## @@ -10485,10 +8616,10 @@ - #record_name# + #nomegas# - #scalar string# + #array of integers# ## @@ -10500,12 +8631,121 @@ + + + + + #problem_structure# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + #subproblems# + + + #array of integers# + + + ## + + + ## + + + + + + + + + + #add_nonparametric_code# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + + #nonparametric_code# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + - #option_name# + #enabled# - #scalar string# + #array of booleans# ## @@ -10519,10 +8759,10 @@ - #option_value# + #problem_numbers# - #scalar# + #array of integers# ## @@ -10536,26 +8776,26 @@ - #add_record# + #indicators# - #scalar boolean# + #array of booleans# - #0# + ## ## - + - #set_option# + #shrinkage_stats# ## @@ -10584,10 +8824,10 @@ - #problem_numbers# + #enabled# - #array of integers# + #scalar# ## @@ -10601,10 +8841,10 @@ - #record_name# + #problem_numbers# - #scalar string# + #array of integers# ## @@ -10618,10 +8858,10 @@ - #option_name# + #indicators# - #scalar string# + #array of booleans# ## @@ -10630,15 +8870,46 @@ ## - + + + + + + #eta_shrinkage# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + - #option_value# + #eta_shrinkage# - #scalar# + #array of # ## @@ -10647,14 +8918,14 @@ ## - + - #add_marginals_code# + #wres_shrinkage# ## @@ -10683,10 +8954,10 @@ - #problem_numbers# + #wres_shrinkage# - #array of integers# + #array of# ## @@ -10695,18 +8966,49 @@ ## - + + + + + + #flush# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + - #nomegas# + #force# - #array of integers# + #scalar boolean# - ## + #0# ## @@ -10717,416 +9019,953 @@ - - - #problem_structure# - - - ## - - + + + + + + + + + + + + + + + + + + + + + + + + #data# + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + ## - - - - + ## - - - - - - - - - - + - - - - #subproblems# - - - #array of integers# - - - ## - - - ## - - - - - - - - - - #add_nonparametric_code# - - - ## - - - ## + + - - ## - - - - - - - - - - - - - - - - - #nonparametric_code# - - - ## - - + + ## - - - - + ## - - - - - - - + - - + + - - - - #enabled# - - - #array of booleans# - - - ## - - - ## - - - - - - - - #problem_numbers# - - - #array of integers# - - - ## - - - ## - - - - - - - - #indicators# - - - #array of booleans# - - - ## - - - ## - - - - - + + - - - #shrinkage_stats# - - + + + + + + + + + + + + + + + + + + + + + + + + #output# + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + ## - + ## + + + + + + - + + + ## - - - - - + + ## - + - - + + - - - - #enabled# - - - #scalar# - - - ## - - - ## - - - - - - - - #problem_numbers# - - - #array of integers# - - - ## - - - ## - - - - - - - - #indicators# - - - #array of booleans# - - - ## - - - ## - - - - - + + - - - #eta_shrinkage# - - + + + + + + + + + + + + + + + + + + + + + + + + #sigma# + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + ## - + ## + + + + + + - + + + ## - - - - - + + ## - + - - + + - - - - #eta_shrinkage# - - - #array of # - - - ## - - - ## - - - - - + + - - - #wres_shrinkage# - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + ## - + ## + + + + + + - + + + ## - + + ## + + - - + + - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + ## + + + ## + + - - - - #wres_shrinkage# - - - #array of# - - - ## - - - ## - - - - - + + - - - - #flush# + + - + + + ## - + ## + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + ## - + + ## + + - - + + - - + + - + + + + ## + + + ## + + - - - - #force# - - - #scalar boolean# - - - #0# - - - ## - - - - - + + + + + - - - - + + + + - + - + - + - + - + - #data# + #infn# ## @@ -11135,7 +9974,7 @@ ## - + @@ -11158,6 +9997,12 @@ + + + + + + @@ -11168,61 +10013,207 @@ - + - + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + ## + + + ## + + + + + + + + + + + + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + - - + + - - + + + + + - - + + + + - - + + - - + + - - + + - - + + ## - - - - + + ## - + + + + - + - + - + - - - - - + + + + + @@ -11253,6 +10244,9 @@ + + + @@ -11267,31 +10261,34 @@ + + + - - + + - + - + - + - + - + - #output# + #error# ## @@ -11300,7 +10297,7 @@ ## - + @@ -11323,6 +10320,12 @@ + + + + + + @@ -11333,24 +10336,24 @@ - + - + - + - + - + - + @@ -11375,19 +10378,57 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + ## + + + + + + + - + - + - - - - - + + + + + @@ -11395,6 +10436,9 @@ + + + ## @@ -11415,6 +10459,9 @@ + + + @@ -11429,31 +10476,34 @@ + + + - - + + - + - + - + - + - + - #sigma# + #des# ## @@ -11485,6 +10535,12 @@ + + + + + + @@ -11501,7 +10557,7 @@ - + @@ -11510,9 +10566,9 @@ - + - + @@ -11537,18 +10593,18 @@ - + - + - + - - - - + + + + @@ -11558,6 +10614,9 @@ + + + @@ -11568,22 +10627,22 @@ ## - - + + - + - + - + - - - - + + + + @@ -11593,6 +10652,9 @@ + + + @@ -11603,23 +10665,163 @@ ## - - + + - + - + - + - - + + + + + + + + + + + + + + + + + ## + + + + + + + + ## + + + ## + + + + + + + + + + + + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + ## + + + ## + + + + + + + + + + + + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + @@ -11650,6 +10852,9 @@ + + + @@ -11664,25 +10869,28 @@ + + + - - + + - + - + - + - - - - + + + + @@ -11692,6 +10900,9 @@ + + + @@ -11702,23 +10913,23 @@ ## - - + + - + - + - + - - + + - - + + @@ -11749,6 +10960,9 @@ + + + @@ -11763,25 +10977,28 @@ + + + - + - + - + - + - - - - + + + + @@ -11791,6 +11008,9 @@ + + + @@ -11801,23 +11021,23 @@ ## - + - + - + - + - - + + - - + + @@ -11848,6 +11068,9 @@ + + + @@ -11862,25 +11085,28 @@ + + + - - + + - + - + - + - - - - + + + + @@ -11890,6 +11116,9 @@ + + + @@ -11900,23 +11129,23 @@ ## - - + + - + - + - + - - - - - + + + + + @@ -11947,6 +11176,9 @@ + + + @@ -11961,31 +11193,34 @@ + + + - - + + - + - + - + - + - + - #infn# + #msfi# ## @@ -12017,6 +11252,12 @@ + + + + + + @@ -12033,7 +11274,7 @@ - + @@ -12042,9 +11283,9 @@ - + - + @@ -12069,18 +11310,18 @@ - + - + - + - - - - + + + + @@ -12090,6 +11331,9 @@ + + + @@ -12100,23 +11344,23 @@ ## - - + + - + - + - + - - + + - - + + @@ -12147,6 +11391,9 @@ + + + @@ -12161,25 +11408,28 @@ + + + - - + + - + - + - + - - - - + + + + @@ -12189,6 +11439,9 @@ + + + @@ -12199,23 +11452,131 @@ ## - - + + - + - + - + - - - - - + + + + + + + + + + + + + + + + + ## + + + + + + + + ## + + + ## + + + + + + + + + + + + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + ## + + + + + + + + + + + + + + + + + + + @@ -12246,6 +11607,9 @@ + + + @@ -12260,31 +11624,34 @@ + + + - - + + - + - + - + - + - + - + - #error# + #table# ## @@ -12311,11 +11678,17 @@ - + + + + + + + @@ -12326,24 +11699,24 @@ - + - + - + - + - + - + @@ -12362,24 +11735,73 @@ - + + + + #contify# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + #cont_column# + + + #scalar integer# + + + ## + + + ## + + + + + + + + - + - + - + - - - - + + + + @@ -12389,102 +11811,41 @@ - + - - ## - - - ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + ## - - - - - - - ## - - - ## - - - - - - - - - - - ## - - - ## - - - - - - - - + + ## - - + + - + - + - + - + - + - #des# + #subroutine# ## @@ -12516,6 +11877,12 @@ + + + + + + @@ -12532,7 +11899,7 @@ - + @@ -12541,9 +11908,9 @@ - + - + @@ -12568,583 +11935,238 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - ## - - - ## - - - - - - - + - + - - - - - - - + - - - - + + - - + + - - + + - ## + #simulation# ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## - - - - - - - - ## - - - ## - - - - - - - - - - - ## - - - ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## - - - - - - - - ## - - - ## - - - - - - - - - - - ## - - - ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + ## - - - - - - - ## - - - ## - - - - - - - - - - - ## - - - ## - - - - - - - - - - - - - - - - - + + - - + + - - - - - + + - - - - + + - + + + + - - + + - - ## + + - - ## + + - - - - - - - - + + - - + + - - - - - - + + - - - - - + + - - + + - - ## + + - - + + - - - - ## - - - ## - - - - - - - - - - - ## - - - ## - - - - - - - - + + - - - - - - - - + + - - + + - - - - - + + - - - - + + - - + + - - + + - - ## + + - - ## + + - - - - + + + + + + - + - + - + - - - - - - + + - - - - - + + - - + + + #scatter# + + ## - - + + ## - - - - ## - - - ## - - - - - - - - - - - ## - - - ## - - - - - - - - + + - - - - - - - - + + - - + + - - - - - + + - - - - + + - + - + + + + + + + + + + + + + - - ## + + - - ## + + - - - - - - - - + + - - + + - - - - - - + + + + + + + + + + + + + + + + + - - - - - + + - - + + - - ## + + - - + + - - - - ## - - - ## - - - - - - - - - - - ## - - - ## - - - - - - - - + + + + - - - - + - + - + - + - + - + - #msfi# + #problem# ## @@ -13176,6 +12198,12 @@ + + + + + + @@ -13186,24 +12214,24 @@ - + - + - + - + - + - + @@ -13228,117 +12256,125 @@ - + - + - - - - - - - + - - - - + + - - + + - - + + - ## + #aesinit# ## - - - - - - - - + + ## - - + + - - - - - - + + - - - - - + + - + + + + + + + - - ## + + - - + + - - - - ## - - - ## - - - - - - - - - - - ## - - - ## - - - - - - - - + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - - - - + + + + @@ -13348,6 +12384,9 @@ + + + @@ -13358,23 +12397,23 @@ ## - - + + - + - + - + - - - - - + + + + + @@ -13405,75 +12444,46 @@ - - - - ## - - - ## - - - - - - + + + + + + + ## + + + ## + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## - - - ## - - - - + + - + - + - + - - - - - + + + + + @@ -13504,6 +12514,9 @@ + + + @@ -13518,31 +12531,34 @@ + + + - - + + - + - + - + - + - + - + - #table# + #mix# ## @@ -13574,6 +12590,12 @@ + + + + + + @@ -13584,24 +12606,24 @@ - + - + - + - + - + - + @@ -13620,73 +12642,24 @@ - - - - #contify# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - #cont_column# - - - #scalar integer# - - - ## - - - ## - - - - - - - - + - + - + - + - - - - + + + + @@ -13696,6 +12669,9 @@ + + + @@ -13706,28 +12682,98 @@ ## - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + ## + + + ## + + + + + + + + + + + + + + ## + + + ## + + + + + + + + + + + + + + + + + + - + - + - + - + - + - #subroutine# + #pred# ## @@ -13759,6 +12805,12 @@ + + + + + + @@ -13769,24 +12821,24 @@ - + - + - + - + - + - + @@ -13804,31 +12856,93 @@ - + + + + #secondary_columns# + + + #array of arrays# + + + ## + + + ## + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + ## + + + + + + + - + - + - + - + - #simulation# + #tol# ## @@ -13860,6 +12974,12 @@ + + + + + + @@ -13876,7 +12996,7 @@ - + @@ -13885,9 +13005,9 @@ - + - + @@ -13910,26 +13030,64 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + ## + + + + + - + - + - + - + - + - #scatter# + #model# ## @@ -13961,6 +13119,12 @@ + + + + + + @@ -13971,24 +13135,24 @@ - + - + - + - + - + - + @@ -14013,24 +13177,24 @@ - + - + - + - + - + - #problem# + #input# ## @@ -14062,6 +13226,12 @@ + + + + + + @@ -14072,24 +13242,24 @@ - + - + - + - + - + - + @@ -14114,24 +13284,24 @@ - + - + - + - + - + - #aesinit# + #estimation# ## @@ -14163,6 +13333,12 @@ + + + + + + @@ -14179,7 +13355,7 @@ - + @@ -14188,9 +13364,9 @@ - + - + @@ -14215,187 +13391,24 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - ## - - - ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## - - - - - - - - ## - - - ## - - - - - - - - - - - ## - - - ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## - - - - - - - - ## - - - ## - - - - - - - - - - - ## - - - ## - - - - - - - - - - - - - - - + - + - + - + - + - + - #mix# + #data# ## @@ -14427,6 +13440,12 @@ + + + + + + @@ -14437,24 +13456,24 @@ - + - + - + - + - + - + @@ -14472,130 +13491,78 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## - - - ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## - - - - - - - - ## + + + + #ignoresign# - + + #scalar string# + + + ### + + ## - + + + + - - + + - - + + + #ignore_list# + + + #array of strings# + + ## - + ## - + + + + - - + + - - - - + + + + + - + - + - + - + - + - + - #pred# + #covariance# ## @@ -14627,6 +13594,12 @@ + + + + + + @@ -14637,24 +13610,24 @@ - + - + - + - + - + - + @@ -14672,90 +13645,31 @@ - - - - #secondary_columns# - - - #array of arrays# - - - ## - - - ## - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - ## - - - ## - - - - - - - + - + - + - + - + - #tol# + #contr# ## @@ -14787,6 +13701,12 @@ + + + + + + @@ -14803,7 +13723,7 @@ - + @@ -14812,9 +13732,9 @@ - + - + @@ -14839,59 +13759,24 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - ## - - - ## - - - - - - - + - + - + - + - + - + - #code_record# + #abbreviated# ## @@ -14923,6 +13808,12 @@ + + + + + + @@ -14933,24 +13824,24 @@ - + - + - + - + - + - + @@ -14962,237 +13853,387 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + ## + + + ## + + + + + + + + + + + + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## - - + + - - - - #code# - - - #array of strings# - - + + + ## - + ## - - - - - - - + - - - - #verbatim_last# + + - - #array of strings# + + - + + + ## - + ## + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + ## - + + ## + + - - - - #verbatim_first# + + - - #array of strings# + + - + + + ## - + ## - - - - + - - + + + + + - - - - #_format_record# - - - #helper# - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + ## - - - - + ## - - - - - - - - - - + - - - - #nonparametric_code# - - - #scalar boolean# - - - ## - - - ## - - - - - - - - #shrinkage_code# - - - #scalar boolean# - - - ## - - - ## - - - - - - - - #eigen_value_code# - - - #scalar boolean# - - - ## - - - ## - - - - - - - - #formatted# - - - #array of strings# - - - ## - - - ## - - - - - - - - - - #_read_options# + + - - #initiator# + + - + + + ## - + + ## + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + ## - + + ## + + - - + + - - + + - + + + + ## + + + ## + + - + + + + + + - - - - + + + + - + - + - + - + - + - #model# + #table_file# ## @@ -15224,6 +14265,12 @@ + + + + + + @@ -15240,7 +14287,7 @@ - + @@ -15249,9 +14296,9 @@ - + - + @@ -15276,24 +14323,128 @@ - + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + ## + + + ## + + + + + + + + + + + + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + ## + + + + + + + - + - + - + - + - + - #input# + #extra_data# ## @@ -15325,6 +14476,12 @@ + + + + + + @@ -15335,24 +14492,24 @@ - + - + - + - + - + - + @@ -15371,131 +14528,183 @@ - - - - - - - - - - - - - - - - - - - - - - - - #estimation# - - - ## - - - ## - - - + + + + #_write# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + #filename# + + + #scalar string# + + + #$self -> full_name# + + + ## + + + + + + + - + - - + + + + + - - + + - - + + + + + - - + + + + - + - - - - + - - - - + - - - - - - - - - - - + + ## - - + + ## - - + + + + + + + + - - + + - - + + + + - - + + + - - + + - - + + ## - - + + - - - - + + + + ## + + + #1# + + + + + + + + + + + + + + ## + + + ## + + + + + + + + + + + - + + + + - + - + - + - + - + - + - #data# + #init_record# ## @@ -15527,6 +14736,12 @@ + + + + + + @@ -15543,7 +14758,7 @@ - + @@ -15552,9 +14767,9 @@ - + - + @@ -15575,75 +14790,458 @@ - #ignoresign# + #type# + + + #scalar string# + + + #undef# + + + ## + + + + + + + + + + + + + + #size# + + + #scalar string# + + + #undef# + + + ## + + + + + + + + + + + + + + #same# + + + #scalar string# + + + #0# + + + ## + + + + + + + + + + + + + + #fix# + + + #scalar boolean# + + + #0# + + + ## + + + + + + + + + + + + + + + + #_read_options# + + + #initiator# + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + + #_add_option# + + + #helper# - #scalar string# + ## - - ### + + + + + ## + + + + + + + + + + + + + + + + + #option_string# + + + #scalar string# + + + ## + + + ## + + + + + + + + #fix# + + + #scalar boolean# + + + #0# + + + ## + + + + + + + + #comment# + + + #scalar string# + + + ## + + + ## + + + + + + + + #on_diagonal# + + + #scalar boolean# + + + ## + + + ## + + + + + + + + + + #_format_record# + + + #helper# + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + #nonparametric_code# + + + #scalar boolean# + + + ## + + + ## + + + + + + + + #shrinkage_code# + + + #scalar boolean# + + + ## + + + ## + + + + + + + + #eigen_value_code# + + + #scalar boolean# + + + ## + + + ## + + + + + + + + #formatted# + + + #array of strings# + + + ## + + + ## + + + + + + + + + + #store_inits# + + + #helper# + + + ## + + + ## + + + + + + + + + + + + + + + + + #restore_inits# + + + #helper# + + + ## + - + + ## + + + + + + + + + - + - #ignore_list# - - - #array of strings# + #set_random_inits# - - ## + + #helper# - + ## + + ## + + + + + + + + + + + #degree# + + + #scalar number# + + + #0.1# + + + ## + + + + + + - - + - + - + - + - + - #covariance# + #nonparametric# ## @@ -15675,6 +15273,12 @@ + + + + + + @@ -15685,24 +15289,24 @@ - + - + - + - + - + - + - + @@ -15726,126 +15330,134 @@ + - + - + - + - - + + + + + + - - + + + + + - - + + - #contr# - - ## - - ## - - - + + - - + + + + ## + + + ## + + + + + + + + + + + + + + ## + + + ## + + + + + + + + + + + - - + + + + + + + + - - + + - - + + + + + - - + + + + - + - - - - + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + ## - - - - + + ## - + + + + - + - + - + - + - + - + - #abbreviated# + #shrinkage_module# ## @@ -15877,6 +15489,12 @@ + + + + + + @@ -15887,66 +15505,672 @@ - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #enabled# + + + #scalar boolean# + + + #0# + + + ## + + + + + + + + + + + + + + #model# + + + #object model# + + + ## + + + ## + + + + + + + + + + + + + + #problem# + + + #object model::problem# + + + ## + + + ## + + + + + + + + + + + + + + #temp_problem_number# + + + #scalar integer# + + + ## + + + ## + + + + + + + + + + + - - + + + + #eta_tablename# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + #filename# + + + #scalar string# + + + ## + + + ## + + + + + + + + + + #wres_tablename# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + #filename# + + + #scalar string# + + + ## + + + ## + + + + + + + + + + #format_shrinkage_tables# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + #formatted# + + + #array of strings# + + + ## + + + ## + + + + + + + + + + #problem_number# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + #problem_number# + + + #scalar integer# + + + ## + + + ## + + + + + + + + + + #enable# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + + #disable# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + + #eta_shrinkage# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + #eta_shrinkage# + + + #array of# + + + ## + + + ## + + + + + + + + + + #wres_shrinkage# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + #wres_shrinkage# + + + #array of# + + + ## + + + ## + + + + + + + + + + #eta_table_exists# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + #exists# + + + #scalar boolean# + + + #0# + + + ## + + + + + + + + + + #wres_table_exists# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + #exists# + + + #scalar boolean# + + + #0# + + + ## + + + + + + + - - + + - - + + + + + - - + + - - + + + + + - - + + + + - - + + - - + + ## - - + + - - - - + + + + ## + + + ## + + + + + + + + + + + + + + ## + + + ## + + + + + + + + + + + - + + + + - + - + - + - + - + - + - #record# + #nonparametric_module# ## @@ -15978,6 +16202,12 @@ + + + + + + @@ -15988,24 +16218,24 @@ - + - + - + - + - + - + - + @@ -16026,87 +16256,475 @@ - #debug# + #enabled# + + + #scalar boolean# + + + #0# + + + ## + + + + + + + + + + + + + + #model# + + + #object model# + + + ## + + + ## + + + + + + + + + + + + + + #problem# + + + #object model::problem# + + + ## + + + ## + + + + + + + + + + + + + + #temp_problem_number# + + + #scalar integer# + + + ## + + + ## + + + + + + + + + + + + + + + + #etas_tablename# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + #filename# + + + #scalar string# + + + ## + + + ## + + + + + + + + + + #marginals_tablename# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + #filename# + + + #scalar string# + + + ## + + + ## + + + + + + + + + + #format_etas_table# + + + ## - #scalar boolean# + ## - - #0# + + ## + + + + + + + + + + + + + + + + #formatted# + + + #array of strings# + + + ## + + + ## + + + + + + + + + + #format_marginals_table# + + + ## + + + ## + + + ## + + + + + + + + + + + #formatted# + + + #array of strings# + + + ## + + + ## + + + + + + - + - #record_arr# + #format_table# - - #array of string# + + ## - + ## + + + ## + + + + + + + + + + + + + + + + #type# + + + #scalar string# + + + ## + + + ## + + + + + + + + #formatted# + + + #array of strings# + + + ## + + + ## + + + + + + + + + + #problem_number# + + + ## + + + ## + - + + + + ## + + + + + + + + + + #problem_number# + + + #scalar integer# + + + ## + + + ## + + + + + + - + - #comment# + #enable# - - #array of strings# + + ## - + ## + + + ## + + + + + + + + + + + + + + + + + #disable# + + + ## + + + ## + + + ## + + + + + + + + - - - #_add_option# + #etas_table_exists# - #helper# + ## ## - + ## @@ -16126,35 +16744,35 @@ - #option_string# + #exists# - #scalar string# + #scalar boolean# - ## + #0# ## - + - #_read_options# + #marginals_table_exists# - #initiator# + ## ## - + ## @@ -16171,20 +16789,38 @@ - + + + + #exists# + + + #scalar boolean# + + + #0# + + + ## + + + + + + - #_format_record# + #format_nonparametric# - #helper# + ## ## - + ## @@ -16204,10 +16840,10 @@ - #nonparametric_code# + #type# - #scalar boolean# + #scalar string# ## @@ -16221,10 +16857,10 @@ - #shrinkage_code# + #formatted# - #scalar boolean# + #array of strings# ## @@ -16233,15 +16869,46 @@ ## - + + + + + + #format_etas_nonparametric# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + - #eigen_value_code# + #formatted# - #scalar boolean# + #array of strings# ## @@ -16250,9 +16917,40 @@ ## - + + + + + + #format_marginals_nonparametric# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + #formatted# @@ -16274,7 +16972,7 @@ - #remove_option# + #format_etas_msfi# ## @@ -16303,10 +17001,10 @@ - #name# + #formatted# - #scalar string# + #array of strings# ## @@ -16315,7 +17013,7 @@ ## - + @@ -16326,22 +17024,20 @@ - + - + - + - - - - - + + + + - @@ -16352,595 +17048,589 @@ ## - - + + + + + + + ## + + + ## + + + + + + + + + + + + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #problem# + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - ## + + + + + + + #compute_cwres# - + + #scalar booleans# + + + #0# + + ## - + + + + - - + + - - + + + #directory# + + + #scalar string# + + ## - + ## - + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## - - - - - - - + + + #extra_data_file_name# + + + #scalar string# + + ## - + ## - + + + + - - + + - - + + + #extra_data_header# + + + #array of strings# + + ## - + ## - + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## - - - - - - - - ## + + + #ignore_missing_files# - + + #scalar boolean# + + + #1# + + ## - + + + + - + + + + + + + #ignore_missing_output_files# + + + #scalar boolean# + + + #1# + + + ## + + + + + + + + - - + + + #nm_version# + + + #scalar# + + ## - + ## - + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## - - - - - - - + + + #prob_arr# + + + #array of strings# + + + ## + + ## - - ## + + + + + - + - + + + + #sde# + + + #scalar boolean# + + + #0# + + + ## + + + + + + + + - - + + + #primary_columns# + + + #array of arrays# + + ## - + ## - + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## - - - - - - - + + + #secondary_columns# + + + #array of arrays# + + ## - + ## - + + + + - - + + - - + + + #shrinkage_module# + + + #object model::shrinkage_module# + + ## - + ## - + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - #table_file# - - - ## - - - ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## - - - - - - - + + + #eigen_value_code# + + + #scalar boolean# + + + #1# + + ## - + + + + + + + + + + + + + #nonparametric_code# + + + #scalar boolean# + + + #1# + + ## - + + + + - + + + + + + + #wres_shrinkage_table# + + + #scalar string# + + + ## + + + ## + + + + + + + + - - + + + #eta_shrinkage_table# + + + #scalar string# + + ## - + ## - + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## - - - ## - - - - - - - - - - - - - - - - - - - - - - - - #extra_data# - - - ## - - - ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #_write# + #add_records# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + #record_strings# + + + #mandatory array of strings# + + + ## + + + ## + + + + + + + + #type# + + + #mandatory scalar string# + + + ## + + + ## + + + + + + + + + + #contify_tables# ## @@ -16966,16 +17656,63 @@ + + + + + #set_records# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + - #filename# + #record_strings# - #scalar string# + #mandatory array of strings# - #$self -> full_name# + ## + + + ## + + + + + + + + #type# + + + #mandatory scalar string# + + + ## ## @@ -16986,308 +17723,454 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## - - - ## - - - - - - - - - - - - - - - - - - - - - - - - - - - ## - - - - - - - - ## - - - #1# - - - + + + #_read_records# - - + + #initiator# - - - + ## - + + + + ## - + - + - - - - - - - - - - - - - - - - - - - - - - - - - #init_record# - - - ## - - - ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + #type# + + + #scalar string# + + + ## + + + ## + + + + + + + + - #type# + #_format_problem# + + + #helper# - #scalar string# + ## - - #undef# + + ## - - - + + + + + + + + + + #filename# + + + #scalar string# + + + ## + + + ## + + + + + + + + #problem_number# + + + #scalar integer# + + + ## + + + ## + + + + + + + + #formatted# + + + #array of strings# + + + ## + + + ## + + + + + + - + - #size# - - - #scalar string# + #store_inits# - - #undef# + + #helper# - + ## + + ## + + + + + + + + - + - #same# + #restore_inits# + + + #helper# - #scalar string# + ## - - #0# + + ## + + + + + + + + + + + + + + + + + #set_random_inits# + + + #helper# + + + ## + + + ## + + + + + + + + + + + #degree# + + + #scalar number# + + + #0.1# + + + ## + + + + + + - + - #fix# + #record_count# + + + ## - #scalar boolean# + ## - - #0# + + ## + + + + + + + + + + + + + + + + #record_name# + + + #scalar string# + + + ## + + + ## + + + + + + + + #return_value# + + + #scalar integer# + + + #0# + + + ## + + + + + + + + + + #_init_attr# + + + #helper# + + + ## + + + ## + + + + + + + + + + + #parameter_type# + + + #scalar string# + + + ## + + + ## + + + + + + + + #parameter_numbers# + + + #array of integers# + + + ## + + + ## + + + + + + + + #attribute# + + + #scalar string# + + + ## + + + ## + + + + + + + + #new_values# + + + #array of strings# + + + ## + + + ## + + + + + + + + #add_if_absent# + + + #scalar boolean# + + + #0# + + + ## + + + + + + + + #parameter_values# + + + #array of strings# + + + ## + + + ## + + + + + + - - - #_read_options# + #indexes# - #initiator# + ## ## - + ## @@ -17304,20 +18187,72 @@ - + + + + #parameter_type# + + + #scalar string# + + + ## + + + ## + + + + + + + + #parameter_numbers# + + + #array of numbers# + + + ## + + + ## + + + + + + + + #indexes# + + + #array of strings# + + + ## + + + ## + + + + + + - #_add_option# + #covariance# - #helper# + ## ## - + ## @@ -17337,10 +18272,10 @@ - #option_string# + #enabled# - #scalar string# + #scalar boolean# ## @@ -17354,7 +18289,7 @@ - #fix# + #indicator# #scalar boolean# @@ -17366,12 +18301,43 @@ ## - + + + + + + #eigen# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + - #comment# + #enabled# #scalar string# @@ -17383,31 +18349,31 @@ ## - + - #on_diagonal# + #indicator# #scalar boolean# - ## + #0# ## - + - #_format_record# + #_option_val_pos# #helper# @@ -17416,7 +18382,7 @@ ## - + ## @@ -17425,7 +18391,7 @@ - + @@ -17436,10 +18402,10 @@ - #nonparametric_code# + #record_name# - #scalar boolean# + #scalar string# ## @@ -17453,10 +18419,44 @@ - #shrinkage_code# + #instance_numbers# - #scalar boolean# + #array of integers# + + + ## + + + ## + + + + + + + + #name# + + + #scalar string# + + + ## + + + ## + + + + + + + + #new_values# + + + #array of strings# ## @@ -17470,13 +18470,13 @@ - #eigen_value_code# + #exact_match# #scalar boolean# - ## + #1# ## @@ -17487,7 +18487,7 @@ - #formatted# + #values# #array of strings# @@ -17502,515 +18502,271 @@ - - - - - #store_inits# - - - #helper# - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - - #restore_inits# - - - #helper# - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - - #set_random_inits# - - - #helper# - - - ## - - - - - - ## - - - - - - - - - - - - - - - #degree# + #positions# - #scalar number# + #array of integers# - #0.1# + ## ## - + - - - - - - - - - - - - - - - - - - - - - - - - #nonparametric# - - - ## - - - ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## - - - - - - - - ## - - - ## - - - - - - - - - - - ## - - - ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## - - - ## - - - - - - - - - - - - - - - - - - - - - - - - #shrinkage_module# - - - ## - - - ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - #enabled# - - - #scalar boolean# + #name_val# - - #0# + + ## - + ## + + ## + + + + + + + + + + + #parameter_type# + + + #scalar string# + + + ## + + + ## + + + + + + + + #parameter_numbers# + + + #array of integers# + + + ## + + + ## + + + + + + + + #names_values# + + + #array of# + + + ## + + + ## + + + + + + - + - #model# - - - #object model# + #remove_records# - + ## - + ## + + ## + + + + + + + + + + + #type# + + + #mandatory scalar string# + + + ## + + + ## + + + + + + - + - #problem# - - - #object model::problem# + #_read_table_files# - + ## - - ## + + #initiator# + + ## + + + + + + + + + + + #ignore_missing_files# + + + #scalar boolean# + + + #0# + + + ## + + + + + + - + - #temp_problem_number# - - - #scalar integer# + #_normalize_record_name# - + ## - + ## - + + + + ## + + + + + + + + + + #record_name# + + + #mandatory scalar string# + + + ## + + + ## + + + + + + + + #normalized_name# + + + #scalar string# + + + ## + + + ## + + + + + + - - - #eta_tablename# + #header# ## @@ -18039,10 +18795,10 @@ - #filename# + #header# - #scalar string# + #array of strings# ## @@ -18058,7 +18814,7 @@ - #wres_tablename# + #dropped_columns# ## @@ -18087,10 +18843,10 @@ - #filename# + #dropped_columns# - #scalar string# + #array of booleans# ## @@ -18106,7 +18862,7 @@ - #format_shrinkage_tables# + #cont_wrap_columns# ## @@ -18135,10 +18891,27 @@ - #formatted# + #cont_column# - #array of strings# + #scalar integer# + + + ## + + + ## + + + + + + + + #wrap_column# + + + #scalar integer# ## @@ -18154,7 +18927,37 @@ - #problem_number# + #drop_dropped# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + + #remove_option# ## @@ -18183,10 +18986,10 @@ - #problem_number# + #record_name# - #scalar integer# + #scalar string# ## @@ -18195,14 +18998,31 @@ ## - + + + + + + #option_name# + + + #scalar string# + + + ## + + + ## + + + - #enable# + #add_option# ## @@ -18228,11 +19048,80 @@ - + + + + #record_name# + + + #scalar string# + + + ## + + + ## + + + + + + + + #option_name# + + + #scalar string# + + + ## + + + ## + + + + + + + + #option_value# + + + #scalar# + + + ## + + + ## + + + + + + + + #add_record# + + + #scalar boolean# + + + #0# + + + ## + + + + + + - #disable# + #add_marginals_code# ## @@ -18258,11 +19147,29 @@ - + + + + #nomegas# + + + #scalar integer# + + + ## + + + ## + + + + + + - #eta_shrinkage# + #nomegas# ## @@ -18291,10 +19198,10 @@ - #eta_shrinkage# + #nomegas# - #array of# + #scalar integer# ## @@ -18310,7 +19217,7 @@ - #wres_shrinkage# + #nsigmas# ## @@ -18339,10 +19246,10 @@ - #wres_shrinkage# + #nsigmas# - #array of# + #scalar integer# ## @@ -18358,7 +19265,7 @@ - #eta_table_exists# + #eta_shrinkage# ## @@ -18387,13 +19294,13 @@ - #exists# + #eta_shrinkage# - #scalar boolean# + #array of# - #0# + ## ## @@ -18406,7 +19313,7 @@ - #wres_table_exists# + #wres_shrinkage# ## @@ -18435,13 +19342,13 @@ - #exists# + #wres_shrinkage# - #scalar boolean# + #array of# - #0# + ## ## @@ -18458,85 +19365,24 @@ - - - - - - - - - - - - - - - - - - - - - - - ## - - - - - - - - ## - - - ## - - - - - - - - - - - ## - - - ## - - - - - - - - - - - - - - + - + - + - + - + - #nonparametric_module# + #record# ## @@ -18568,6 +19414,12 @@ + + + + + + @@ -18578,24 +19430,24 @@ - + - + - + - + - + - + - + @@ -18616,7 +19468,7 @@ - #enabled# + #debug# #scalar boolean# @@ -18639,33 +19491,10 @@ - #model# - - - #object model# - - - ## - - - ## - - - - - - - - - - - - - - #problem# + #record_arr# - #object model::problem# + #array of string# ## @@ -18674,7 +19503,7 @@ ## - + @@ -18685,10 +19514,10 @@ - #temp_problem_number# + #comment# - #scalar integer# + #array of strings# ## @@ -18710,16 +19539,16 @@ - #etas_tablename# + #_add_option# - ## + #helper# ## - + ## @@ -18739,7 +19568,7 @@ - #filename# + #option_string# #scalar string# @@ -18751,23 +19580,23 @@ ## - + - #marginals_tablename# + #_read_options# - ## + #initiator# ## - + ## @@ -18784,38 +19613,20 @@ - - - - #filename# - - - #scalar string# - - - ## - - - ## - - - - - - + - #format_etas_table# + #_format_record# - ## + #helper# ## - + ## @@ -18835,10 +19646,10 @@ - #formatted# + #nonparametric_code# - #array of strings# + #scalar boolean# ## @@ -18847,94 +19658,32 @@ ## - + - - - - - #format_marginals_table# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - - #formatted# - - - #array of strings# - - - ## - - - ## - - - + #shrinkage_code# - - - - - - #format_table# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - + + #scalar boolean# + + + ## + + + ## + + + + + - #type# + #eigen_value_code# - #scalar string# + #scalar boolean# ## @@ -18967,7 +19716,7 @@ - #problem_number# + #remove_option# ## @@ -18996,10 +19745,10 @@ - #problem_number# + #name# - #scalar integer# + #scalar string# ## @@ -19008,131 +19757,201 @@ ## - + - + + + + + + + + + + + + + + + + + + + + + + + + #code_record# + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - #enable# + #code# - + + #array of strings# + + ## - + ## - - ## - - - - - - - - - + - #disable# + #verbatim_last# - + + #array of strings# + + ## - + ## - - ## - - - - - - - - - + - #etas_table_exists# + #verbatim_first# - + + #array of strings# + + ## - + ## - - ## - - - - - - - - - - - #exists# - - - #scalar boolean# - - - #0# - - - ## - - - - - - + + - #marginals_table_exists# + #_format_record# - ## + #helper# ## - + ## @@ -19152,58 +19971,44 @@ - #exists# - - - #scalar boolean# - - - #0# - - - ## - - - + #nonparametric_code# - - - - - - #format_nonparametric# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - + + #scalar boolean# + + + ## + + + ## + + + + + - #type# + #shrinkage_code# - #scalar string# + #scalar boolean# + + + ## + + + ## + + + + + + + + #eigen_value_code# + + + #scalar boolean# ## @@ -19236,16 +20041,16 @@ - #format_etas_nonparametric# + #_read_options# - ## + #initiator# ## - + ## @@ -19262,77 +20067,189 @@ - - - - #formatted# - - - #array of strings# - - - ## - - - ## - - - - - - + - + + + + + + + + + + + + + + + + + + + + + + + + #cwres_module# + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - #format_marginals_nonparametric# - - - ## + #enabled# + #scalar boolean# + + + #0# + + ## + + + + + + + + + + #problem# + + + #mandatory object model::problem# + + + ## + ## + + + - - + + - + + + + #nm_version# + + + #scalar# + + + ## + + + ## + + + + + - - - - #formatted# - - - #array of strings# - - - ## - - - ## - - - - - - + + - #format_etas_msfi# + #post_process# ## @@ -19341,7 +20258,7 @@ ## - + ## @@ -19358,25 +20275,7 @@ - - - - #formatted# - - - #array of strings# - - - ## - - - ## - - - - - - + @@ -19384,18 +20283,18 @@ - + - + - + - - - - + + + + @@ -19425,6 +20324,9 @@ + + + @@ -19439,11 +20341,14 @@ + + + - - + + diff --git a/diagrams/modelfit.dia b/diagrams/modelfit.dia index 13c3311..06e0a86 100644 --- a/diagrams/modelfit.dia +++ b/diagrams/modelfit.dia @@ -68,16 +68,16 @@ - + - + - + @@ -245,7 +245,7 @@ - + @@ -254,7 +254,7 @@ - + #modelfit# @@ -824,78 +824,10 @@ - #model# - - - #mandatory object model# - - - ## - - - ## - - - - - - - - #tries# - - - #scalar integer# - - - #0# - - - ## - - - - - - - - #work_dir# - - - #scalar string# - - - ## - - - ## - - - - - - - - #candidate_model# - - - #object model# - - - ## - - - ## - - - - - - - - #modelfile_tainted# + #queue_info# - #ref of scalar boolean# + #ref of# ## @@ -909,10 +841,10 @@ - #job_id# + #run_no# - #ref of scalar# + #mandatory scalar integer# ## @@ -926,7 +858,7 @@ - #queue_info# + #queue_map# #ref of# @@ -974,23 +906,6 @@ - #tries# - - - #ref of scalar integer# - - - ## - - - ## - - - - - - - #retries# @@ -1008,57 +923,6 @@ - #modelfile_tainted# - - - #ref of scalar boolean# - - - ## - - - ## - - - - - - - - #candidate_model# - - - #object model# - - - ## - - - ## - - - - - - - - #model# - - - #object model# - - - ## - - - ## - - - - - - - #marked_for_rerun# @@ -1261,6 +1125,23 @@ + + + #queue_info# + + + #mandatory hash of various# + + + ## + + + ## + + + + + @@ -1311,44 +1192,10 @@ - #nonmem_object# - - - #mandatory object model# - - - ## - - - ## - - - - - - - - #model# - - - #mandatory object model# - - - ## - - - ## - - - - - - - - #candidate_model# + #run_no# - #object model# + #scalar integer# ## @@ -1362,7 +1209,7 @@ - #run_no# + #nm_version# #scalar integer# @@ -1379,10 +1226,10 @@ - #nm_version# + #queue_info# - #scalar integer# + #mandatory hash of# ## diff --git a/diagrams/tool.dia b/diagrams/tool.dia index 61ac343..47299d6 100644 --- a/diagrams/tool.dia +++ b/diagrams/tool.dia @@ -68,16 +68,16 @@ - + - + - + #tool# @@ -112,6 +112,12 @@ + + + + + + @@ -128,7 +134,7 @@ - + @@ -137,9 +143,9 @@ - + - + @@ -2004,54 +2010,6 @@ - #AUTOLOAD# - - - ## - - - ## - - - - - - ## - - - - - - - - - - - - - - - - - #result# - - - #array of various types# - - - ## - - - ## - - - - - - - - - #_make_dir# @@ -3076,16 +3034,16 @@ - + - + - + - + @@ -3123,6 +3081,12 @@ + + + + + + @@ -3139,7 +3103,7 @@ - + @@ -3148,9 +3112,9 @@ - + - + @@ -3175,19 +3139,19 @@ - + - + - + - - - - - + + + + + @@ -3195,6 +3159,9 @@ + + + ## @@ -3215,6 +3182,9 @@ + + + @@ -3229,6 +3199,9 @@ + + + @@ -3236,19 +3209,19 @@ - + - + - - - + + + @@ -3279,6 +3252,9 @@ + + + @@ -3293,6 +3269,9 @@ + + + diff --git a/lib/debug_subs.pm b/lib/debug_subs.pm index f6ae0f2..8e2a17c 100644 --- a/lib/debug_subs.pm +++ b/lib/debug_subs.pm @@ -88,7 +88,7 @@ start level } else { return $the_instance -> {'level'}; } - $self -> psn_in_inc; + #$self -> psn_in_inc; return; } end level @@ -236,12 +236,13 @@ start warn $subroutine. " : " . $message . "\n"; } else { my $level_name_length = length( $level_name ); - my $indent = ' ' x ($level_name_length + 4); - $text = wrap($prefix, $prefix . $indent, $level_name . ': ' . $package . '->' . - $subroutine. " : " . $message . "\n" ); + my $indent = ' ' x (4); + $text = "\n". $level_name . ': ' . $package . '->' . $subroutine. " :"; + $text .= wrap($prefix, $prefix . $indent, "\n" . $message ); + $text .= "\n"; } - if( $the_instance -> {'warn_with_trace'} >= $level ){ + if( $the_instance -> {'warn_with_trace'} ){ cluck( $text ); } else { print STDERR ( $text ); @@ -275,7 +276,7 @@ start die my $arr = scalar(@longmess); $prefix = ' ' x ($arr-2); } - if( $the_instance -> {'level'} > 0 ){ + if( $the_instance -> {'level'} > 1 ){ $! = 1; confess( $prefix . $message ); } else { diff --git a/lib/model/cwres_module_subs.pm b/lib/model/cwres_module_subs.pm index 68e9acb..c0d496a 100644 --- a/lib/model/cwres_module_subs.pm +++ b/lib/model/cwres_module_subs.pm @@ -234,7 +234,7 @@ start new $prob -> add_records( type => 'table', record_strings => ['ID ', join(' ',@table_row), - 'IPRED CP NOPRINT ONEHEADER FILE=cwtab'] ); + 'IPRED DV MDV NOPRINT ONEHEADER FILE=cwtab'] ); } end new diff --git a/lib/nonmem_subs.pm b/lib/nonmem_subs.pm index 248b518..21e1d01 100644 --- a/lib/nonmem_subs.pm +++ b/lib/nonmem_subs.pm @@ -19,16 +19,16 @@ if( $0 =~ /nonmem.pm$/ ) { 'nm_directory' => $ARGV[7], 'show_version' => 0); - my $no_remote_compile = $ARGV[4]; - my $no_remote_execution = $ARGV[5]; - - unless( $no_remote_compile ){ + my $compile = $ARGV[4]; + my $execute = $ARGV[5]; + + if( $compile ){ unless( $nonmem -> compile() ){ debug -> die( message => $nonmem -> error_message ); } } - - unless( $no_remote_execution ){ + + if( $execute ){ $nonmem -> execute; } } @@ -46,7 +46,7 @@ start new } unless( defined $this -> {'nm_directory'} ){ - my $nmdir = $PsN::config -> { 'nm_versions' } -> { $this -> {'version'} }; + my ($nmdir,$version) = split(/,/ , $PsN::config -> { 'nm_versions' } -> { $this -> {'version'} }); unless( defined $nmdir ){ print "Unknown NONMEM version ",$this -> {'version'}," specified.\n"; @@ -56,7 +56,7 @@ start new defined $nmkeys[0] and defined $PsN::config -> { 'nm_versions' } -> {$nmkeys[0]} ) { print "Using the only defined version $nmkeys[0] in ",$PsN::config -> { 'nm_versions' } -> {$nmkeys[0]}," instead\n"; - $nmdir = $PsN::config -> { 'nm_versions' } -> {$nmkeys[0]}; + my( $nmdir, $version ) = split(/,/,$PsN::config -> { 'nm_versions' } -> {$nmkeys[0]});; } } @@ -126,23 +126,25 @@ start compile my $modelfile = $self -> {'modelfile'}; - run3( "$nmdir/tr/nmtran.exe", $modelfile, \$self -> {'nmtran_message'}, \$self -> {'nmtran_message'} ); + run3( "nice -19 $nmdir/tr/nmtran.exe", $modelfile, \$self -> {'nmtran_message'}, \$self -> {'nmtran_message'} ); - #$self -> {'nmtran_message'} = `$nmdir/tr/nmtran.exe < $modelfile 2>&1`; + #$self -> {'nmtran_message'} = `nice -19 $nmdir/tr/nmtran.exe < $modelfile 2>&1`; open( NMMSG, '>compilation_output.txt' ); print( NMMSG $self -> {'nmtran_message'}, "\n" ); - + unless(-e 'FREPORT'){ + close(NMMSG); $self -> {'error_message'} = "NMtran failed: \n" . $self -> {'nmtran_message'} ; return 0; } - + my $nmlink_message; + run3( "$nmlink", undef, \$nmlink_message, \$nmlink_message ); print( NMMSG $nmlink_message, "\n" ); - + my $fsub; if(-e 'FSUBS'){ @@ -189,24 +191,19 @@ start compile $compile_command = "ifort " . $self -> {'compiler_options'} . " -ononmem$version$adaptive $includes $fsub @link @nmlib 2>&1"; } - run3( "$compile_command", undef, \$compile_message, \$compile_message ); print( NMMSG $compile_message, "\n" ); + - close( NMMSG ); - -# if( $self -> {'compiler'} eq 'df' or $self -> {'compiler'} eq 'fl32' ){ - unless(-e "nonmem.exe" or -e "nonmem$version$adaptive" ) { - $self -> {'error_message'} = "Fortran Compilation failed: \n" . $compile_message ; - return 0; - } -# } else { -# unless(-e "nonmem$version") { -# $self -> {'error_message'} = "Fortran Compilation failed: \n" . $compile_message ; -# return 0; -# } -# } + unless(-e "nonmem.exe" or -e "nonmem$version$adaptive" ) { + $self -> {'error_message'} = "Fortran Compilation failed: \n" . $compile_message ; + close( NMMSG ); + return 0; + } else { + print( NMMSG "Compilation done\n" ); + close( NMMSG ); + } } end compile diff --git a/lib/output/problem/subproblem_subs.pm b/lib/output/problem/subproblem_subs.pm index 8e9b1d3..f7be97a 100644 --- a/lib/output/problem/subproblem_subs.pm +++ b/lib/output/problem/subproblem_subs.pm @@ -1477,9 +1477,9 @@ start _read_thomsi # print Dumper \@allests; # print Dumper \@estflags; - die "Something is wrong: All $param"."s: ".($#allests+1)." and estimated $param"."s: ". - ($#estflags+1)." do not match\n" unless - ( $#allests == -1 or $#estflags == $#allests ); + debug -> warn(message => "Something is wrong: All $param"."s: ".($#allests+1)." and estimated $param"."s: ". + ($#estflags+1)." do not match\n" ) unless ( $#allests == -1 or $#estflags == $#allests ); + my $defs = 0; for( my $i = 0; $i <= $#allests; $i++ ) { if( $estflags[$i] ) { diff --git a/lib/output_subs.pm b/lib/output_subs.pm index 9742c43..c277693 100644 --- a/lib/output_subs.pm +++ b/lib/output_subs.pm @@ -755,10 +755,10 @@ start _read_problems $self -> {'lstfile'} = undef; unless( $success ){ if( $self -> {'abort_on_fail'} ){ - debug -> die( message => 'The listfile "' . $self -> full_name . '" seems malformatted.' ); + debug -> die( message => 'The listfile "' . $self -> full_name . '" seems malformatted or is missing.' ); } else { debug -> warn( level => 1, - message => 'The listfile "' . $self -> full_name . '" seems malformatted.' ); + message => 'The listfile "' . $self -> full_name . '" seems malformatted or is missing.' ); return 0; } } else { diff --git a/lib/psn.conf b/lib/psn.conf index ca0f62e..502815c 100644 --- a/lib/psn.conf +++ b/lib/psn.conf @@ -37,9 +37,9 @@ remote_perl=/usr/local/bin/perl ; slash(/) ) [nm_versions] -default=/export/home/nmv -5=/export/home/nmv -6=/export/home/nmvi +default=/export/home/nmv,5 +5=/export/home/nmv,5 +6=/export/home/nmvi,6 ; The compiler section specifies the name and compiler flags of the ; compiler executable. It is also possible to include a path. Like diff --git a/lib/tool/modelfit_subs.pm b/lib/tool/modelfit_subs.pm index f8c7235..9277caf 100644 --- a/lib/tool/modelfit_subs.pm +++ b/lib/tool/modelfit_subs.pm @@ -6,7 +6,7 @@ start include statements use Config; use Cwd; use Data::Dumper; - use File::Copy 'cp'; + use File::Copy qw/cp mv/; use File::Path; use FindBin qw($Bin); # External # @@ -19,7 +19,8 @@ start include statements require hotkey; } use nonmem; - use ext::IPC::Run3; + use IPC::Open3; + use POSIX ":sys_wait_h"; use output; use OSspecific; use ui; @@ -333,6 +334,14 @@ start new if ( $this -> {'ask_if_fail'} ) { eval( 'use Tk' ); } + + $this -> {'run_local'} = 1; + + if( $this -> {'run_on_lsf'} or + $this -> {'run_on_ud'} or + $this -> {'run_on_umbrella'} ){ + $this -> {'run_local'} = 0; + } } end new @@ -417,8 +426,8 @@ start prepare_raw_results } } } elsif( $category eq 'eigen') { - #if( $self -> {'models'} -> [$i] -> outputs -> [0] -> parsed and - # $self -> {'models'} -> [$i] -> outputs -> [0] -> parsed_successfully ){ + if( $self -> {'models'} -> [$i] -> outputs -> [0] -> parsed and + $self -> {'models'} -> [$i] -> outputs -> [0] -> parsed_successfully ){ foreach my $prob_eigens ( @{$self -> {'models'} -> [$i] -> outputs -> [0] -> eigens} ){ foreach my $subprob_eigens( @{$prob_eigens} ){ if( defined $subprob_eigens ){ @@ -426,14 +435,14 @@ start prepare_raw_results } } } - #} + } } else { my $labels; - #if( $self -> {'models'} -> [$i] -> outputs -> [0] -> parsed and - # $self -> {'models'} -> [$i] -> outputs -> [0] -> parsed_successfully ){ + if( $self -> {'models'} -> [$i] -> outputs -> [0] -> parsed and + $self -> {'models'} -> [$i] -> outputs -> [0] -> parsed_successfully ){ $labels = $self -> {'models'} -> [$i] -> {'outputs'} -> [0] -> labels( parameter_type => $category ); - #} + } # we can't use labels directly since different models may have different # labels (still within the same modelfit) if( defined $labels ) { @@ -464,6 +473,7 @@ start prepare_raw_results my $raw_line_structure = ext::Config::Tiny -> new( ); for ( my $i = 0; $i < scalar @{$self -> {'models'}}; $i++ ) { # models level unless( $self -> {'models'} -> [$i] -> outputs -> [0] -> parsed ){ + $self -> {'models'} -> [$i] -> outputs -> [0] -> abort_on_fail(0); $self -> {'models'} -> [$i] -> outputs -> [0] -> _read_problems; } if( $self -> {'models'} -> [$i] -> outputs -> [0] -> parsed_successfully ){ @@ -481,7 +491,7 @@ start prepare_raw_results } # --------------------- Loop all result categories ---------------------- - my $position = 0; + foreach my $category ( @{$self -> {'raw_results_header'}},'npomega' ){ next if( $category eq 'model' or $category eq 'problem' or $category eq 'subproblem' ); my $model_row = 0; # Need to mask previous definition of model_row @@ -499,9 +509,7 @@ start prepare_raw_results my $prob_num = 0; foreach my $prob ( @{$res} ){ if( defined $prob and ref $prob eq 'ARRAY' and $prob -> [0] and ref $prob -> [0] eq 'ARRAY' ){ - $raw_line_structure -> { $i+$prob_num }{ $category } = scalar @{$self -> {'raw_results'} -> [$i+$prob_num]}+$position - . ",". scalar @{$prob -> [0]}; - #$position += $#{$prob -> [0]}; + $raw_line_structure -> { $i+$prob_num }{ $category } = scalar @{$self -> {'raw_results'} -> [$i+$prob_num]} . ",". scalar @{$prob -> [0]}; } $prob_num++; } @@ -555,13 +563,13 @@ start prepare_raw_results # {{{ Push undefs for missing subprobs - for( my $k = 0; $k < $ns; $k++ ) { - my $row = $pushed_rows+$model_row++; - push( @{$self -> {$results_file} -> [$row]}, - (undef) x $max_hash{$category} ); - } + for( my $k = 0; $k < $ns; $k++ ) { + my $row = $pushed_rows+$model_row++; + push( @{$self -> {$results_file} -> [$row]}, + (undef) x $max_hash{$category} ); + } - # }}} Push undefs for missing subprobs + # }}} Push undefs for missing subprobs } @@ -570,21 +578,25 @@ start prepare_raw_results # {{{ Push undefs for missing probs/subprobs - for( my $j = 0; $j < $np; $j++ ) { - my $ns = $probs[$j]; # #subprobs - for( my $k = 0; $k < $ns; $k++ ) { - my $row = $pushed_rows+$model_row++; - push( @{$self -> {$results_file} -> [$row]}, - (undef) x $max_hash{$category} ); + for( my $j = 0; $j < $np; $j++ ) { + my $ns = $probs[$j]; # #subprobs + for( my $k = 0; $k < $ns; $k++ ) { + my $row = $pushed_rows+$model_row++; + push( @{$self -> {$results_file} -> [$row]}, + (undef) x $max_hash{$category} ); + } } - } - # }}} Push undefs for missing probs/subprobs + # }}} Push undefs for missing probs/subprobs } } $self -> {'models'} -> [$i] -> {'outputs'} -> [0] -> flush; map( $pushed_rows += $_, @probs ); + } else { + # Model not parsed successfully. + my $row = $pushed_rows+1; + push( @{$self -> {'raw_results'} -> [$row]}, 'run failed' ); } } $raw_line_structure -> write( 'raw_file_structure' ); @@ -647,11 +659,14 @@ start print_raw_results $raw_file ); my $append = $self -> {'raw_results_append'} ? '>>' : '>'; open( RRES, $append.$dir.$file ); - print RRES join(',',@{$self -> {'raw_results_header'}} ),"\n" - if( not $self -> {'raw_results_append'} ); + + if( (not $self -> {'raw_results_append'}) and $PsN::output_header ){ + print RRES join(',',@{$self -> {'raw_results_header'}} ),"\n"; + } + for ( my $i = 0; $i < scalar @{$self -> {'raw_results'}}; $i++ ) { my @result_array = @{$self -> {'raw_results'} -> [$i]}; - map( $_ = defined $_ ? $_ : $PsN::config -> {'_'} -> {'out_miss_data'}, @result_array ); + map( $_ = defined $_ ? $_ : $PsN::out_miss_data, @result_array ); print RRES join(',',@result_array ),"\n"; } close( RRES ); @@ -661,11 +676,9 @@ start print_raw_results $self -> {'raw_nonp_file'} ); my $append = $self -> {'raw_results_append'} ? '>>' : '>'; open( RRES, $append.$dir.$file ); - # print RRES join(',',@{$self -> {'raw_results_header'}} ),"\n" -# if( not $self -> {'raw_results_append'} ); for ( my $i = 0; $i < scalar @{$self -> {'raw_nonp_results'}}; $i++ ) { my @result_array = @{$self -> {'raw_nonp_results'} -> [$i]}; - map( $_ = defined $_ ? $_ : $PsN::config -> {'_'} -> {'out_miss_data'}, @result_array ); + map( $_ = defined $_ ? $_ : $PsN::out_miss_data, @result_array ); print RRES join(',',@result_array ),"\n"; } close( RRES ); @@ -788,7 +801,7 @@ start copy_model_and_input $self -> {'orig_filename'} = $model -> filename; my $maxeval = $model -> maxeval -> [0][0]; if ( $maxeval > 9999 ) { - $candidate_model -> maxeval( new_values => 9999, + $candidate_model -> maxeval( new_values => [[9999]], problem_numbers => [1] ); } } @@ -940,7 +953,7 @@ start set_msfo_to_msfi new_values => [[$msfo]]); $candidate_model->set_records(type=>'msfi', - record_strings => ["$msfo"]); # $msfi or ???? + record_strings => ["$msfo"]); } end set_msfo_to_msfi @@ -1248,8 +1261,8 @@ start lsf_submit " psn.mod psn.lst " . $self -> {'nice'} . " ". $nm_version . " " . - $self -> {'no_remote_compile'} . " " . - $self -> {'no_remote_execution'} . " " . + ($self -> {'no_remote_compile'} ? 0 : 1) . " " . + ($self -> {'no_remote_execution'} ? 0 : 1) . " " . $fsubs . " " . $self -> {'nm_directory'} . "\""; @@ -1280,6 +1293,11 @@ end lsf_submit start run_nonmem { + my $candidate_model = $queue_info -> {'candidate_model'}; + my $tries = $queue_info -> {'tries'}; + my $compile_only = $queue_info -> {'compile_only'}; + my $model = $queue_info -> {'model'}; + my $fprob = $candidate_model -> problems; if( defined $fprob ) { my $nprob = scalar @{$fprob}; @@ -1302,7 +1320,7 @@ start run_nonmem # We do not expect any values of rerun lower than 1 here. (a bug otherwise...) if( not -e 'psn-' . ( $tries + 1 ) . '.lst' or $self -> {'rerun'} >= 2 ){ - if( ${$modelfile_tainted} ){ # We need to recompile + if( $queue_info -> {'modelfile_tainted'} ){ # We need to recompile # -------------- Notes about local vs remote compilation/execution ----------------- @@ -1311,10 +1329,10 @@ start run_nonmem # so far). So, unless we are doing everything remotely, we will # need a "nonmem" object. Which is created here. - if( not ( $self -> {'run_on_lsf'} or $self -> {'run_on_umbrella'} ) or - ( ( $self -> {'run_on_lsf'} or $self -> {'run_on_umbrella'} ) and - ( $self -> {'no_remote_compile'} or - $self -> {'no_remote_execution'}))){ + if( ( $self -> {'run_on_lsf'} or $self -> {'run_on_umbrella'} ) and + ( $self -> {'no_remote_compile'} or + $self -> {'no_remote_execution'} ) ){ + $nonmem = nonmem -> new( adaptive => $self -> {'adaptive'}, modelfile => 'psn.mod', version => $nm_version, @@ -1325,39 +1343,55 @@ start run_nonmem $nonmem -> fsubs( $candidate_model -> subroutine_files ); } + + if( ( $self -> {'run_local'} and $compile_only ) or + ( not $self -> {'run_local'} and $self -> {'no_remote_compile'} ) ){ - if( not ( $self -> {'run_on_lsf'} or - $self -> {'run_on_umbrella'} ) or - ( ( $self -> {'run_on_lsf'} or $self -> {'run_on_umbrella'} ) and - $self -> {'no_remote_compile'} ) ){ - # {{{ local compile requested - unless( $nonmem -> compile() ){ - debug -> die( message => "NONMEM compilation of ". $model -> full_name . " failed:\n" . $nonmem -> error_message ); - } - unless ( -e 'FCON.orig' ) { - unless( $self -> {'clean'} ){ + + my $fsubs = join( ',' , @{$model -> subroutine_files} ); + my ($stdin,$stdout,$stderr); + my $pid = open3($stdin,$stdout,$stderr, + ($PsN::config -> {'_'} -> {'remote_perl'} ? ' ' . $PsN::config -> {'_'} -> {'remote_perl'} : ' perl ') . " -I" . + $PsN::lib_dir ."/../ " . + $PsN::lib_dir . "/nonmem.pm" . + " psn.mod psn.lst " . + $self -> {'nice'} . " ". + $nm_version . " " . + 1 . " " . # request compilation + 0 . " " . # no execution + $fsubs . " " . + $self -> {'nm_directory'} ); + + $queue_info->{'compile_only'} = 1; + $queue_map->{$pid} = $run_no; + + #unless( $nonmem -> compile() ){ + # debug -> die( message => "NONMEM compilation of ". $model -> full_name . " failed:\n" . $nonmem -> error_message ); + #} + + #unless ( -e 'FCON.orig' ) { + # unless( $self -> {'clean'} ){ # Instead of cleaning its better to never create # garbage :) However, if FCON pertubation becomes # reality, we will need FCON.orig. - cp( 'FCON', 'FCON.orig' ); - } - } + # cp( 'FCON', 'FCON.orig' ); + # } + #} - if( $nonmem -> nmtran_message =~ /WARNING/s and $self -> {'verbose'} ){ - ui -> print( category => 'all', - message => "NONMEM Warning:\n" . $nonmem -> nmtran_message ); - } + #if( $nonmem -> nmtran_message =~ /WARNING/s and $self -> {'verbose'} ){ + # ui -> print( category => 'all', + # message => "NONMEM Warning:\n" . $nonmem -> nmtran_message ); + #} - ${$modelfile_tainted} = 0; + $queue_info->{'modelfile_tainted'} = 0; # }}} } elsif ( $self -> {'run_on_lsf'} and $self -> {'no_remote_execution'} ) { - # lsf_submit will call the "nonmem" module that will # figure out that we want to compile remotely. If we want # to compile AND run remotely that will be done in the @@ -1365,18 +1399,48 @@ start run_nonmem $self -> lsf_submit( model => $candidate_model. nm_version => $nm_version, - work_dir => $work_dir); + work_dir => $self -> {'directory'} . "/NM_run$run_no/"); } } - if( not ( $self -> {'run_on_lsf'} or - $self -> {'run_on_umbrella'} ) or - ( $self -> {'run_on_lsf'} and $self -> {'no_remote_execution'} ) ){ + if( ( $self -> {'run_local'} and not $compile_only ) or + ( not $self -> {'run_local'} and $self -> {'no_remote_execution'} ) ){ # Normal local execution - $nonmem -> execute(); - + + open( NMMSG , "; + my $compilation_message = join( '',@tmp ); + + unless( $compilation_message =~ /Compilation done/ ){ + debug -> warn( message => "NONMEM compilation of ". $model -> full_name . " failed:\n" . $compilation_message ); + } else { + if( $compilation_message =~ /WARNING/s and $self -> {'verbose'} ){ + ui -> print( category => 'all', + message => "NONMEM Warning:\n" . $compilation_message ); + } + } + my $fsubs = join( ',' , @{$model -> subroutine_files} ); + my ($stdin,$stdout,$stderr); + my $pid = open3($stdin,$stdout,$stderr, + ($PsN::config -> {'_'} -> {'remote_perl'} ? ' ' . $PsN::config -> {'_'} -> {'remote_perl'} : ' perl ') . " -I" . + $PsN::lib_dir ."/../ " . + $PsN::lib_dir . "/nonmem.pm" . + " psn.mod psn.lst " . + $self -> {'nice'} . " ". + $nm_version . " " . + 0 . " " . # request compilation + 1 . " " . # no execution + $fsubs . " " . + $self -> {'nm_directory'} ); + + $queue_info->{'compile_only'} = 0; + $queue_info->{'candidate_model'} = $candidate_model; + + $queue_map->{$pid} = $run_no; + } elsif( $self -> {'run_on_lsf'} ) { # lsf_submit will call the "nonmem" module that will figure @@ -1385,7 +1449,7 @@ start run_nonmem $self -> lsf_submit( model => $candidate_model, nm_version => $nm_version, - work_dir => $work_dir); + work_dir => $self -> {'directory'} . "/NM_run$run_no/"); } elsif( $self -> {'run_on_umbrella'} ) { @@ -1436,17 +1500,22 @@ start restart_nonmem # We need the trail of files to select the most appropriate at the end # (see copy_model_and_output) + my $tries = \$queue_info{'tries'}; + my $model = $queue_info{'model'}; + my $candidate_model = $queue_info{'candidate_model'}; + my $modelfile_tainted = \$queue_info{'modelfile_tainted'}; + if( -e 'psn.lst' ){ if( not -e 'psn-' . ( ${$tries} + 1 ) . '.lst' or $self -> {'rerun'} >= 2 ){ - cp( 'compilation_output.txt', 'compilation_output.txt.'.(${$tries}+1) ); - cp( 'FCON', 'FCON.'.(${$tries}+1) ); - cp( 'psn.lst', 'psn-'.(${$tries}+1).'.lst' ); - cp( 'psn.mod', 'psn-'.(${$tries}+1).'.mod' ); + mv( 'compilation_output.txt', 'compilation_output.txt.'.(${$tries}+1) ); + mv( 'FCON', 'FCON.'.(${$tries}+1) ); + mv( 'psn.lst', 'psn-'.(${$tries}+1).'.lst' ); + mv( 'psn.mod', 'psn-'.(${$tries}+1).'.mod' ); if( defined $model -> table_names ){ foreach my $table_files( @{$model -> table_names} ){ foreach my $table_file( @{$table_files} ){ - cp( $table_file, $table_file.'-'.(${$tries}+1) ); + mv( $table_file, $table_file.'-'.(${$tries}+1) ); } } } @@ -1481,7 +1550,7 @@ start restart_nonmem my ( $minimization_successful, $significant_digits, $minimization_message ); my ( $output_file ); - $output_file = output -> new ( filename => 'psn.lst', + $output_file = output -> new ( filename => 'psn-'.(${$tries}+1).'.lst', model_id => $self -> {'model_id'}, abort_on_fail => $self -> {'abort_on_fail'} ); unless( defined $output_file -> problems ){ @@ -1716,7 +1785,7 @@ start restart_nonmem # }}} } else { # psn.lst doesn't exist. - + $run_results -> [${$tries}] -> {'failed'} = 1; } } @@ -1744,7 +1813,10 @@ start select_best_model # Get all runs that passed the picky test (if picky is used) # The order of categories is important. Highest priority goes last. - + + my $model = $queue_info{'model'}; + my $candidate_model = $queue_info{'candidate_model'}; + my @selection_categories = ('really_bad','terminated','normal','picky'); my ( %selection, $selected ); foreach my $category ( @selection_categories ) { @@ -1820,11 +1892,15 @@ start select_best_model print STAT Dumper \@{$run_results}; print STAT "Selected $selected\n"; close( STAT ); - - $self -> copy_model_and_output( final_model => $candidate_model, - model => $model, - use_run => $selected ? $selected : '' ); - + + unless( $run_results -> [$selected-1] -> {'failed'} ){ + + $self -> copy_model_and_output( final_model => $candidate_model, + model => $model, + use_run => $selected ? $selected : '' ); + + } + if( $self -> {'nonparametric_etas'} and ( not -e 'np_etas.lst' or $self -> {'rerun'} >=2 ) ) { @@ -1893,42 +1969,42 @@ start select_best_model # }}} nonp eta model - # ---------------------- run nonp eta model ------------------------------- - - # {{{ run eta model - - ui -> print( category => 'execute', - message => 'Running NPETA model' ); - - $nonmem_object = nonmem -> new( adaptive => $self -> {'adaptive'}, - modelfile => 'np_etas.mod', - version => $nm_version, - nm_directory => $self -> {'nm_directory'}, - nice => $self -> {'nice'}, - show_version => not $self -> {'run_on_lsf'}); - - $nonmem_object -> fsubs( $np_eta_mod -> subroutine_files ); - unless( $nonmem_object -> compile() ){ - debug -> die( message => "NONMEM compilation failed:\n" .$nonmem_object -> error_message ); - } - if( $nonmem_object -> nmtran_message =~ /WARNING/s and $self -> {'verbose'} ){ - ui -> print(category => 'all', - message => "NONMEM Warning: " . $nonmem_object -> nmtran_message ); - } - $nonmem_object -> execute(); - - foreach my $table_files( @{$np_eta_mod -> table_names} ){ - foreach my $table_file( @{$table_files} ){ - my $dir = $model -> directory; - cp( $table_file, $dir ); + # ---------------------- run nonp eta model ------------------------------- + + # {{{ run eta model + + ui -> print( category => 'execute', + message => 'Running NPETA model' ); + + my $nonmem_object = nonmem -> new( adaptive => $self -> {'adaptive'}, + modelfile => 'np_etas.mod', + version => $nm_version, + nm_directory => $self -> {'nm_directory'}, + nice => $self -> {'nice'}, + show_version => not $self -> {'run_on_lsf'}); + + $nonmem_object -> fsubs( $np_eta_mod -> subroutine_files ); + unless( $nonmem_object -> compile() ){ + debug -> die( message => "NONMEM compilation failed:\n" .$nonmem_object -> error_message ); + } + if( $nonmem_object -> nmtran_message =~ /WARNING/s and $self -> {'verbose'} ){ + ui -> print(category => 'all', + message => "NONMEM Warning: " . $nonmem_object -> nmtran_message ); + } + $nonmem_object -> execute(); + + foreach my $table_files( @{$np_eta_mod -> table_names} ){ + foreach my $table_file( @{$table_files} ){ + my $dir = $model -> directory; + cp( $table_file, $dir ); + } } + + unlink 'nonmem', 'nonmem6', 'nonmem5','nonmem.exe', 'nonmem6_adaptive', 'nonmem5_adaptive'; } - unlink 'nonmem', 'nonmem6', 'nonmem5','nonmem.exe', 'nonmem6_adaptive', 'nonmem5_adaptive'; - } - - # }}} run eta model - + # }}} run eta model + } } end select_best_model @@ -2057,22 +2133,20 @@ start run my $threads = $self -> {'threads'}; $threads = $#models + 1 if ( $threads > $#models + 1); - # Currently parallel execution is not supported on windows - # platforms. Because of regular expression issues with - # Parallel::Forkmanager. - # Unless we store "run_no" in the database umbrella can't be parallel. - $threads = 1 if( $Config{osname} eq 'MSWin32' or $self -> {'run_on_umbrella'}); + $threads = 1 if $self -> {'run_on_umbrella'}; # }}} # {{{ print starting messages + ui -> print( category => 'all', message => 'Starting ' . scalar(@models) . ' NONMEM executions. '. $threads .' in parallel.' ) unless $self -> {'parent_threads'} > 1; ui -> print( category => 'all', message => "Run number\tModel name\tOFV\tCovariance step successful." ) if $self -> {'verbose'}; + # }}} # {{{ Print model-NM_run translation file @@ -2085,7 +2159,7 @@ start run # }}} - # {{{ Setup of moshog and parallel forkmanager + # {{{ Setup of moshog my $moshog_client; @@ -2100,447 +2174,434 @@ start run $threads = $self -> {'threads'} + $moshog_client -> granted(); } + # }}} - my $pm = ext::Parallel::ForkManager -> new ($threads) if ( $threads > 1 ); - - # These are variables used in forkmanager callbacks. - # - # $run is the loop variable of the nonmem loop. Can be used to - # keep track of progress. (Which we do in the "adaptive" code). - - my $run = 0; # $run is loopvariable keeps track of progress + # {{{ Local execution - my @children; # @children is a mapping from the run number - # (taken from $run) to the system process id. + my @evals; - my $keepforking = 1; # $keepforking tells PsN is ok to continue. - # If "abort_on_fail" is 1 and a process dies - # keepforking is set to 0 + # %queue_map is a mapping from nonmem.pm pID to run number. + + my %queue_map; - my $aborting = 0; # $aborting is set to 1 when PsN tries to kill its children, so we - # know that kill signals have been sent. + # %queue_info is keyed on run number and contains information + # about each nonmem run. - my $fork_finished = 0; # When $fork_finished is 1, PsN will tell the user that its waiting - # for remaining children + my %queue_info; - if ( $threads > 1 ) { - - # This following call defines a function that will be - # called when all children have exited. It detects - # errors from children and kills remaining children. - $pm -> run_on_finish( - sub { my ( $pid, $tries, $ident, $exit_signal ) = @_; - - if( $tries < 0 ) { - if( $self -> {'abort_on_fail'} and not $aborting){ - $aborting = 1; - debug -> die( message => "Some nonmem runs failed, aborting" ); - $keepforking = 0; - foreach my $child ( @children ){ - if( $child ){ - if( kill( $child ) != 1 ){ - sleep(3); - kill(9, $child); - } - } - } - } else { - debug -> warn( level => 0, - message => "One child died" ); - } - } else { - push( @{$self -> {'prepared_models'}[$ident]{'own'}}, - model -> new( filename => "./NM_run" . ($ident+1) ."/psn.mod", - target => 'disk', - ignore_missing_files => 1 ) ); - $self -> {'ntries'} -> [$ident] = $tries; - - my $modulus = (($#models+1) <= 10) ? 1 : (($#models+1) / 10)+1; - - if ( $ident % $modulus == 0 or $ident == 0 or $ident == $#models ) { - if( $fork_finished ){ - ui -> print( category => 'all', - message => 'F:'.($ident+1).' .. ', - wrap => 0, - newline => 0) - unless ( $self -> {'parent_threads'} > 1 or $self -> {'verbose'} ); - } - } - } - } ); - - # run_on_wait seam to create a penalty when children finishes, - # so if we are not adaptive, we skip it. - - if( $self -> {'adaptive'} ){ - $pm -> run_on_wait( - sub { - - if( $self -> {'adaptive'} and $self -> {'threads'} > 1 ){ - my $request = scalar @models - $run - $self -> {'threads'}; - unless( $request + $self -> {'threads'} eq $threads or $request <= 0 ){ - $moshog_client -> request( request => $request ); - $threads = $self -> {'threads'} + $moshog_client -> granted(); - } - - if( $request <= 0 ){ - $threads = $self -> {'threads'}; - } - - $pm -> set_max_procs($threads); - - } - } - , 5 ); - } + # @queue is an array of NM_run directory numbers. If "X" is in + # @queue, then psn.mod in "NM_runX" is scheduled to be run. It + # initialized to all models in the tool. Note that if X is in + # the queue, it doesn't mean NM_runX exists. - } + my @queue = (0..$#models); + my $all_jobs_started = 0; - # }}} + # We loop while there is content in the queue (which can grow) + # and while we have jobs running (represented in the queue_info - # {{{ Local execution - - my @evals; + while( @queue or (scalar keys %queue_map > 0) ){ - my %queue_info; + # We start by looking for jobs that have been started and have + # finished. If we find one, we set $pid to that job. - for ( $run = 0; $run <= $#models; $run ++ ) { - my $candidate_model; - - last unless( $keepforking ); # Break out if we are "aborting" + my $pid = 0; - # {{{ check for no run conditions. + foreach my $check_pid( keys %queue_map ){ - if ( -e $self -> {'models'} -> [$run] -> outputs -> [0] -> full_name - and - $self -> {'rerun'} < 1 ) { - - if( not -e './NM_run' . ($run+1) . '/done' ){ - # here we have an .lst file, no done file and we are not - # rerunning NONMEM. Which means we must create fake NM_run and - # "done" files. (Usually this case occurs if we want to - # use execute to create a summary or run table). - - mkdir( "./NM_run" . ($run+1) ); - open( DONE, ">./NM_run". ($run+1) ."/done" ); - print DONE "This is faked\n 0 attepmts\nevals: 0\nseed: 1 1\n" ; - close( DONE ); - - # TODO Must copy tablefiles if they exist. - - # We use the existing .lst file as the final product. - cp( $self -> {'models'} -> [$run] -> outputs -> [0] -> full_name, './NM_run' . ($run+1) .'/psn.lst' ); - } - - # TODO Should check for tablefiles. + $pid = waitpid($check_pid,WNOHANG); + if( $pid == -1 ){ - # We read the "done" file to get seed and number of - # evaluations (which could be faked). + my $run = $queue_map{$check_pid}; - my $evals_ref = $self -> _read_done_file(); - @evals = @{$evals_ref}; - - my $modulus = (($#models+1) <= 10) ? 1 : (($#models+1) / 10)+1; - - if ( $run % $modulus == 0 or $run == 0 or $run == $#models ) { - ui -> print( category => 'all', wrap => 0, newline => 0, - message => 'D:'.( $run + 1 ).' .. ' ) - unless( $self -> {'parent_threads'} > 1 or $self -> {'verbose'} ); + $queue_info{$run}{'nr_wait'}++; + if( $queue_info{$run}{'nr_wait'} > 10 ){ + debug -> die(message => "Nonmem run was lost\n"); + } + $pid = $check_pid; } - - $candidate_model = model -> new( filename => "./NM_run".($run+1)."/psn.mod", - target => 'disk', - ignore_missing_files => 1, - quick_reload => 1 ); - - $self -> print_finish_message( candidate_model => $candidate_model, - run => $run ); + last if $pid; - push( @{$self -> {'prepared_models'}[$run]{'own'}}, $candidate_model ); - push( @{$self -> {'ntries'}}, 0 ); - # push( @{$self -> {'evals'}}, \@evals ); + } + + # Check if no job has finished + if( !$pid ){ + # Then if queue is empty or we have $threads number of jobs + # running. + if( (scalar @queue == 0) or scalar keys %queue_map >= $threads ){ - next; # We are done with this model. It has allready been run. + # In that case we should not start another job. (Also + # sleep to make polling less demanding). + sleep(1); + next; + } } - # }}} - - if( $threads > 1 ){ + # restart_nonmem will set $modelfile_tainted to 1 if a + # recompile is necessary. (run_nonmem will then recompile) + my $modelfile_tainted = 0; + + if( not $pid ) { - # {{{ delay code + my $run = shift( @queue ); - if( $run > 1 ){ - my $start_sleep = Time::HiRes::time(); - - my ($min_sleep, $max_sleep); # min_sleep is in microseconds and max_sleep is in seconds. + # {{{ check for no run conditions. + + if ( -e $self -> {'models'} -> [$run] -> outputs -> [0] -> full_name + and + $self -> {'rerun'} < 1 ) { - if( defined $PsN::config -> {'_'} -> {'min_fork_delay'} ) { - $min_sleep = $PsN::config -> {'_'} -> {'min_fork_delay'}; - } else { - $min_sleep = 0; + if( not -e './NM_run' . ($run+1) . '/done' ){ + # here we have an .lst file, no done file and we are not + # rerunning NONMEM. Which means we must create fake NM_run and + # "done" files. (Usually this case occurs if we want to + # use execute to create a summary or run table). + + mkdir( "./NM_run" . ($run+1) ); + open( DONE, ">./NM_run". ($run+1) ."/done" ); + print DONE "This is faked\n 0 attepmts\nevals: 0\nseed: 1 1\n" ; + close( DONE ); + + # TODO Must copy tablefiles if they exist. + + # We use the existing .lst file as the final product. + cp( $self -> {'models'} -> [$run] -> outputs -> [0] -> full_name, './NM_run' . ($run+1) .'/psn.lst' ); } - if( defined $PsN::config -> {'_'} -> {'max_fork_delay'} ) { - $max_sleep = $PsN::config -> {'_'} -> {'max_fork_delay'}; - } else { - $max_sleep = 0; - } + # TODO Should check for tablefiles. + + # We read the "done" file to get seed and number of + # evaluations (which could be faked). + + my $evals_ref = $self -> _read_done_file(); + @evals = @{$evals_ref}; - if( $min_sleep > $max_sleep * 1000_000 ){ - $max_sleep = $min_sleep; + my $modulus = (($#models+1) <= 10) ? 1 : (($#models+1) / 10)+1; + + if ( $run % $modulus == 0 or $run == 0 or $run == $#models ) { + ui -> print( category => 'all', wrap => 0, newline => 0, + message => 'D:'.( $run + 1 ).' .. ' ) + unless( $self -> {'parent_threads'} > 1 or $self -> {'verbose'} ); } - # Dont wait for psn.lst if clean >= 3 it might have been - # removed. + $queue_info{$run}{'candidate_model'} = model -> new( filename => "./NM_run".($run+1)."/psn.mod", + target => 'disk', + ignore_missing_files => 1, + quick_reload => 1 ); - while( not( -e 'NM_run'.($run-1).'/psn.lst' ) and not $self -> {'clean'} >= 3 - and - (Time::HiRes::time() - $start_sleep) < $max_sleep ){ - Time::HiRes::usleep($min_sleep); - } + $self -> print_finish_message( candidate_model => $queue_info{$run}{'candidate_model'}, + run => $run ); + + push( @{$self -> {'prepared_models'}[$run]{'own'}}, $queue_info{$run}{'candidate_model'} ); + push( @{$self -> {'ntries'}}, 0 ); + # push( @{$self -> {'evals'}}, \@evals ); + + next; # We are done with this model. It has allready been run. + } - + # }}} - $children[$run] = $pm -> start ( $run ); + if( $threads > 1 ){ + + # {{{ delay code - } - - # {{{ printing progress + if( $run > 1 ){ + my $start_sleep = Time::HiRes::time(); + + my ($min_sleep, $max_sleep); # min_sleep is in microseconds and max_sleep is in seconds. + + if( defined $PsN::config -> {'_'} -> {'min_fork_delay'} ) { + $min_sleep = $PsN::config -> {'_'} -> {'min_fork_delay'}; + } else { + $min_sleep = 0; + } + + if( defined $PsN::config -> {'_'} -> {'max_fork_delay'} ) { + $max_sleep = $PsN::config -> {'_'} -> {'max_fork_delay'}; + } else { + $max_sleep = 0; + } + + if( $min_sleep > $max_sleep * 1000_000 ){ + $max_sleep = $min_sleep; + } + + # Dont wait for psn.lst if clean >= 3 it might have been + # removed. + + while( not( -e 'NM_run'.($run-1).'/psn.lst' ) and not $self -> {'clean'} >= 3 + and + (Time::HiRes::time() - $start_sleep) < $max_sleep ){ + Time::HiRes::usleep($min_sleep); + } + } - # We wish to print progress if $threads are 1 (that is, no - # forkmanager object exists) or we have multiple threads and - # are in the parent. + # }}} + + } + + # Make sure that each process gets a unique random sequence: + random_set_seed_from_phrase(random_uniform_integer(1,0,10000*($run+1))); + + # {{{ Call to run_nonmem - if( $threads <= 1 or $children[$run] ) { + # This will stop nasty prints from model, output and data + # which are set to print for the scm. + my $old_category = ui -> category(); - # We don't want to print all starting models if they are - # more than ten. But we allways want to print the first - # and last + ui -> category( 'modelfit' ); - my $modulus = (($#models+1) <= 10) ? 1 : (($#models+1) / 10); + $self -> create_sub_dir( subDir => '/NM_run'.($run+1) ); + chdir( 'NM_run'.($run+1) ); - if ( $run % $modulus == 0 or $run == 0 or $run == $#models ) { + unless( exists $queue_info{$run} ){ + $queue_info{$run}{'candidate_model'} = $self -> copy_model_and_input( model => $models[$run], source => '../' ); + $queue_info{$run}{'model'} = $models[$run]; + $queue_info{$run}{'modelfile_tainted'} = 1; + $queue_info{$run}{'tries'} = 0; + $queue_info{$run}{'compile_only'} = 1; + + # {{{ printing progress + + # We don't want to print all starting models if they are + # more than ten. But we allways want to print the first + # and last - # The unless checks if tool owning the modelfit is - # running more modelfits, in wich case we should be - # silent to avoid confusion. The $done check is made do - # diffrentiate between allready run processes. + my $modulus = (($#models+1) <= 10) ? 1 : (($#models+1) / 10); - ui -> print( category => 'all', wrap => 0, newline => 0, - message => 'S:'.($run+1).' .. ' ) - unless ( $self -> {'parent_threads'} > 1 or $self -> {'verbose'} ); - } - - } + if ( $run % $modulus == 0 or $run == 0 or $run == $#models ) { + + # The unless checks if tool owning the modelfit is + # running more modelfits, in wich case we should be + # silent to avoid confusion. The $done check is made do + # diffrentiate between allready run processes. + + ui -> print( category => 'all', wrap => 0, newline => 0, + message => 'S:'.($run+1).' .. ' ) + unless ( $self -> {'parent_threads'} > 1 or $self -> {'verbose'} ); + } - # }}} + # }}} + } - # Here we skip to the next model if we are running in - # parallel. - if( $threads > 1 and $children[$run] ){ - next; - } + my %options_hash = %{$self -> _get_run_options(run_id => $run)}; - # Make sure that each process gets a unique random sequence: - random_set_seed_from_phrase(random_uniform_integer(1,0,10000*($run+1))); - - # {{{ Call to run_nonmem + $self -> run_nonmem ( run_no => $run, + nm_version => $options_hash{'nm_version'}, + queue_info => $queue_info{$run}, + queue_map => \%queue_map ); - my %options_hash = %{$self -> _get_run_options(run_id => $run)}; + chdir( '..' ); - # This will stop nasty prints from model, output and data - # which are set to print for the scm. - my $old_category = ui -> category(); - - ui -> category( 'modelfit' ); - - my $base_dir = getcwd; - my $work_dir = $self -> create_sub_dir( subDir => '/NM_run'.($run+1) ); - chdir( $work_dir ); - $candidate_model = $self -> copy_model_and_input( model => $models[$run], source => '../' ); - my $modelfile_tainted = 1; - my @run_results; - my $tries = 0; - my $do_restart = 0; - - do { - $self -> run_nonmem ( nm_version => $options_hash{'nm_version'}, - model => $models[$run], - candidate_model => $candidate_model, - work_dir => $work_dir, - tries => $tries, - queue_info => \%queue_info, - modelfile_tainted => \$modelfile_tainted); - if( not $self -> {'run_on_umbrella'} ){ - $do_restart = $self -> restart_nonmem(%options_hash, - model => $models[$run], - candidate_model => $candidate_model, - tries => \$tries, - evals => \@evals, - run_no => $run, - modelfile_tainted => \$modelfile_tainted, - run_results => \@run_results); - } else { - $queue_info{$work_dir}{'run_no'} = $run; + if( $self -> {'run_on_umbrella'} ){ + $queue_info{'NM_run'.($run+1)}{'run_no'} = $run; } - } while ( $do_restart ); - - if( not $self -> {'run_on_umbrella'} ){ - $self -> select_best_model(run_no => $run, - nm_version => $options_hash{'nm_version'}, - run_results => \@run_results, - model => $models[$run], - candidate_model => $candidate_model ); + + ui -> category( $old_category ); + + # }}} + + } else { - } - - chdir( $base_dir ); + my $run = $queue_map{$pid}; - ui -> category( $old_category ); - - if( not $self -> {'run_on_umbrella'} ) { + my $candidate_model = $queue_info{$run}{'candidate_model'}; + + my %options_hash = %{$self -> _get_run_options(run_id => $run)}; - if( $self -> {'clean'} >= 3 ){ - unlink( <$work_dir/*> ); - unless( rmdir( $work_dir ) ){debug -> warn( message => "Unable to remove an NM_runX directory: $! ." )}; - sleep(2); + my @run_results; + + my $work_dir = 'NM_run' . ($run+1) ; + chdir( $work_dir ); + + if( $queue_info{$run}{'compile_only'} ){ + $queue_info{$run}{'compile_only'} = 0; + $self -> run_nonmem ( run_no => $run, + nm_version => $options_hash{'nm_version'}, + queue_info => $queue_info{$run}, + queue_map => \%queue_map ); + + delete( $queue_map{$pid} ); + chdir( '..' ); } else { - - unless( $tries > 0 ){ - $self -> _print_done_file( run => $run, - tries => $tries, - evals_ref => \@evals ); + my $do_restart = $self -> restart_nonmem( %options_hash, + queue_info => $queue_info{$run}, + run_no => $run, + run_results => \@run_results ); + + if( $do_restart ){ + unshift(@queue, $run); + delete($queue_map{$pid}); + } else { + $self -> select_best_model(run_no => $run, + nm_version => $options_hash{'nm_version'}, + run_results => \@run_results, + queue_info => $queue_info{$run}); + + # {{{ Print finishing messages + + if( scalar @queue == 0 ){ + if( $all_jobs_started == 0 ){ + + ui -> print( category => 'all', + message => " done\n") if( $self -> {'parent_threads'} <= 1 and not $self -> {'verbose'} ); + ui -> print( category => 'all', + message => "Waiting for all NONMEM runs to finish:\n" ) if( $self -> {'parent_threads'} <= 1 and $threads > 1 and not $self -> {'verbose'} ); + + $all_jobs_started = 1; + } + + my $modulus = (($#models+1) <= 10) ? 1 : (($#models+1) / 10)+1; + + if ( $run % $modulus == 0 or $run == 0 or $run == $#models ) { + ui -> print( category => 'all', + message => 'F:'.($run+1).' .. ', + wrap => 0, + newline => 0) + unless ( $self -> {'parent_threads'} > 1 or $self -> {'verbose'} ); + } + } + + # }}} + + chdir( '..' ); + + # {{{ cleaning and done file + + if( $self -> {'clean'} >= 3 ){ + unlink( <$work_dir/*> ); + unless( rmdir( $work_dir ) ){debug -> warn( message => "Unable to remove $work_dir directory: $! ." )}; + sleep(2); + } else { + + unless( $queue_info{$run}{'tries'} > 0 ){ + $self -> _print_done_file( run => $run, + tries => $queue_info{$run}{'tries'}, + evals_ref => \@evals ); + } + + } + + # }}} + + $self -> print_finish_message( candidate_model => $candidate_model, + run => $run ); + + if( $threads <= 1 ){ + push( @{$self -> {'prepared_models'}[$run]{'own'}}, $candidate_model ); + push( @{$self -> {'ntries'}}, $queue_info{$run}{'tries'} ); + # push( @{$self -> {'evals'}}, \@evals ); + } + + delete( $queue_info{$run} ); + delete( $queue_map{$pid} ); } + next; } - - $self -> print_finish_message( candidate_model => $candidate_model, - run => $run ); - - if( $threads <= 1 ){ - push( @{$self -> {'prepared_models'}[$run]{'own'}}, $candidate_model ); - push( @{$self -> {'ntries'}}, $tries ); - # push( @{$self -> {'evals'}}, \@evals ); - } - } - - if ( $threads > 1 ) { - $pm -> finish ( $tries ); } - - # }}} - - } # fork loop ends here + } # queue loop ends here if( $self -> {'run_on_umbrella'} ){ + # {{{ Umbrella code - $self -> umbrella_submit( prepare_jobs => 0 ); - - my $start_time = time(); + $self -> umbrella_submit( prepare_jobs => 0 ); + + my $start_time = time(); + + my $dbh = DBI -> connect("DBI:mysql:host=".$PsN::config -> {'_'} -> {'database_server'}. + ";databse=".$PsN::config -> {'_'} -> {'project'}, + $PsN::config -> {'_'} -> {'user'}, + $PsN::config -> {'_'} -> {'password'}, + {'RaiseError' => 1}); + + while( scalar keys %queue_info ){ - my $dbh = DBI -> connect("DBI:mysql:host=".$PsN::config -> {'_'} -> {'database_server'}. - ";databse=".$PsN::config -> {'_'} -> {'project'}, - $PsN::config -> {'_'} -> {'user'}, - $PsN::config -> {'_'} -> {'password'}, - {'RaiseError' => 1}); - - while( scalar keys %queue_info ){ + # Get new "finished" + + if( time() > ($start_time + $self -> {'umbrella_timeout'}) ) { + debug -> die( message => "Waiting for NONMEM run timed out using the umbrella system" ); + last; + } + my $project = $PsN::config -> {'_'} -> {'project'}; + my $sth = $dbh -> prepare( "SELECT t.directory,j.tool_id, t.parent_tool_id, t.tool_id,j.state ". + "FROM $project.job j, $project.tool t ". + "WHERE j.tool_id=t.tool_id ". + "AND t.parent_tool_id = ". $self -> tool_id() ." ". + "AND j.state = 4" ); + + $sth -> execute or 'debug' -> die( message => $sth->errstr ) ; + + my $select_arr = $sth -> fetchall_arrayref; + $sth -> finish; + + foreach my $row ( @{$select_arr} ){ + if( exists $queue_info{$row -> [0]} ){ - # Get new "finished" - - if( time() > ($start_time + $self -> {'umbrella_timeout'}) ) { - debug -> die( message => "Waiting for NONMEM run timed out using the umbrella system" ); - last; + print "\n Getting Job: \t",$row -> [0], "\n"; + + my $work_dir = $row -> [0]; + my $id = $work_dir; + chdir( $work_dir ); + my $modelfile_tainted = 0; + my @run_results; + + unless( defined $queue_info{$id}{'tries'} ){ + $queue_info{$id}{'tries'} = 0; } - my $project = $PsN::config -> {'_'} -> {'project'}; - my $sth = $dbh -> prepare( "SELECT t.directory,j.tool_id, t.parent_tool_id, t.tool_id,j.state ". - "FROM $project.job j, $project.tool t ". - "WHERE j.tool_id=t.tool_id ". - "AND t.parent_tool_id = ". $self -> tool_id() ." ". - "AND j.state = 4" ); - - $sth -> execute or 'debug' -> die( message => $sth->errstr ) ; - - my $select_arr = $sth -> fetchall_arrayref; - $sth -> finish; - - foreach my $row ( @{$select_arr} ){ - if( exists $queue_info{$row -> [0]} ){ - - print "\n Getting Job: \t",$row -> [0], "\n"; - - my $work_dir = $row -> [0]; - my $id = $work_dir; - chdir( $work_dir ); - my $modelfile_tainted = 0; - my @run_results; - - unless( defined $queue_info{$id}{'tries'} ){ - $queue_info{$id}{'tries'} = 0; - } - - my %options_hash = %{$self -> _get_run_options(run_id => $queue_info{$id}{'run_no'})}; - - if( $self -> restart_nonmem( %options_hash, - model => $models[$queue_info{$id}{'run_no'}], - candidate_model => $queue_info{$id}{'candidate_model'}, - tries => \$queue_info{$id}{'tries'}, - #evals => \@evals, - run_no => $id, - modelfile_tainted => \$modelfile_tainted, - run_results => \@run_results ) ){ - - my $new_job_id; - - $self -> run_nonmem ( nm_version => $options_hash{'nm_version'}, - model => $models[$queue_info{$id}{'run_no'}], - candidate_model => $queue_info{$id}{'candidate_model'}, - work_dir => $work_dir, - tries => \$queue_info{$id}{'tries'}, - job_id => \$new_job_id, - modelfile_tainted => \$modelfile_tainted); - - %{$queue_info{$new_job_id}} = %{$queue_info{$id}}; - - delete $queue_info{$id}; - print "rerunning ", $queue_info{$id}{'run_no'}, "\n"; - } else { - - $self -> select_best_model(run_no => $queue_info{$id}{'run_no'}, - nm_version => $options_hash{'nm_version'}, - run_results => \@run_results, - model => $models[$queue_info{$id}{'run_no'}], - candidate_model => $queue_info{$id}{'candidate_model'} ); - - delete $queue_info{$id}; - - } - - chdir( '..' ); - - } + + my %options_hash = %{$self -> _get_run_options(run_id => $queue_info{$id}{'run_no'})}; + + if( $self -> restart_nonmem( %options_hash, + queue_info => $queue_info{$id}, + #evals => \@evals, + run_no => $id, + run_results => \@run_results ) ){ + + my $new_job_id; + + $self -> run_nonmem ( nm_version => $options_hash{'nm_version'}, + model => $models[$queue_info{$id}{'run_no'}], + candidate_model => $queue_info{$id}{'candidate_model'}, + work_dir => $work_dir, + tries => \$queue_info{$id}{'tries'}, + job_id => \$new_job_id, + modelfile_tainted => \$modelfile_tainted); + + %{$queue_info{$new_job_id}} = %{$queue_info{$id}}; + + delete $queue_info{$id}; + print "rerunning ", $queue_info{$id}{'run_no'}, "\n"; + } else { + + $self -> select_best_model(run_no => $queue_info{$id}{'run_no'}, + nm_version => $options_hash{'nm_version'}, + run_results => \@run_results, + queue_info => $queue_info{$id}); + delete $queue_info{$id}; + } + + chdir( '..' ); + + } } - $dbh -> disconnect; - } - # {{{ Print finish message and wait for children - - ui -> print( category => 'all', - message => " done\n") if( $self -> {'parent_threads'} <= 1 and not $self -> {'verbose'} ); - ui -> print( category => 'all', - message => "Waiting for all NONMEM runs to finish:\n" ) if( $self -> {'parent_threads'} <= 1 and $threads > 1 and not $self -> {'verbose'} ); + } + $dbh -> disconnect; - $fork_finished = 1; - $pm -> wait_all_children if ( $threads > 1 ) ; + # }}} + } + # {{{ Print finish message + ui -> print( category => 'all', message => " done\n" ) if( $self -> {'parent_threads'} <= 1 and $threads > 1 and not $self -> {'verbose'}); # }}} - # }}} + # }}} local execution # {{{ Database code diff --git a/lib/tool_subs.pm b/lib/tool_subs.pm index 0f94f45..4cea558 100644 --- a/lib/tool_subs.pm +++ b/lib/tool_subs.pm @@ -722,7 +722,7 @@ start run $threads = $#models + 1 if ( $threads > $#models + 1); # Currently parallel execution is not supported on windows platforms - $threads = 1 if( $Config{osname} eq 'MSWin32' ); + # $threads = 1 if( $Config{osname} eq 'MSWin32' ); # Create new forkmanager my $pm = ext::Parallel::ForkManager -> new($threads) if ( $threads > 1 ); -- 2.11.4.GIT