lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] odd/brent b77190e 02/11: Print a trace of all lmi so


From: Greg Chicares
Subject: [lmi-commits] [lmi] odd/brent b77190e 02/11: Print a trace of all lmi solves
Date: Tue, 22 Jun 2021 16:54:04 -0400 (EDT)

branch: odd/brent
commit b77190eb51f9784a1b60462139a8a432cca3c05b
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Print a trace of all lmi solves
    
    Existing code already printed a trace to 'trace.txt' if requested by
    writing 'idiosyncrasyT' in "Comments". Made this unconditional, so that
    a system test will write a trace of every solve to that file. Added two
    solve parameters to the output, which might help detect patterns.
    
    Naturally, with this change, a system test should be run without
    parallelism, after first removing the trace file.
---
 ihs_avsolve.cpp       | 3 ++-
 mc_enum_types_aux.cpp | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/ihs_avsolve.cpp b/ihs_avsolve.cpp
index ed1730b..3122ecc 100644
--- a/ihs_avsolve.cpp
+++ b/ihs_avsolve.cpp
@@ -442,10 +442,11 @@ currency AccountValue::Solve
 
     std::ostream os_trace(status().rdbuf());
     std::ofstream ofs_trace;
-    if(contains(yare_input_.Comments, "idiosyncrasyT") && 
!SolvingForGuarPremium)
+//  if(contains(yare_input_.Comments, "idiosyncrasyT") && 
!SolvingForGuarPremium)
         {
         ofs_trace.open("trace.txt", ios_out_app_binary());
         os_trace.rdbuf(ofs_trace.rdbuf());
+        os_trace << mc_str(a_SolveType) << "; " << mc_str(a_SolveTarget) << 
std::endl;
         }
 
     SolveHelper solve_helper(*this, solve_set_fn);
diff --git a/mc_enum_types_aux.cpp b/mc_enum_types_aux.cpp
index b24dc1d..53b0234 100644
--- a/mc_enum_types_aux.cpp
+++ b/mc_enum_types_aux.cpp
@@ -139,6 +139,8 @@ template std::string mc_str(mcenum_mode                );
 template std::string mc_str(mcenum_report_column       );
 template std::string mc_str(mcenum_run_basis           );
 template std::string mc_str(mcenum_smoking             );
+template std::string mc_str(mcenum_solve_type          );
+template std::string mc_str(mcenum_solve_target        );
 template std::string mc_str(mcenum_state               );
 template std::string mc_str(mcenum_table_rating        );
 template std::string mc_str(mcenum_uw_basis            );



reply via email to

[Prev in Thread] Current Thread [Next in Thread]