From 522adb9b57fd1cb6631f7a05a32dc6e670b17ca5 Mon Sep 17 00:00:00 2001 From: Joachim Klein Date: Fri, 21 Jul 2017 12:51:41 +0000 Subject: [PATCH] PH iteration methods: use MeasureSupNorm. Uses common code that was refactored to Measures.h git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12080 bbc10eb1-c90d-0410-af57-cb519fbb1720 --- prism/src/hybrid/PH_JOR.cc | 23 ++++++------- prism/src/hybrid/PH_NondetReachReward.cc | 23 ++++++------- prism/src/hybrid/PH_NondetUntil.cc | 23 ++++++------- prism/src/hybrid/PH_PSOR.cc | 21 ++++++----- prism/src/hybrid/PH_Power.cc | 23 ++++++------- prism/src/hybrid/PH_ProbTransient.cc | 19 +++++----- prism/src/hybrid/PH_SOR.cc | 44 ++++++++++-------------- prism/src/hybrid/PH_StochBoundedUntil.cc | 19 +++++----- prism/src/hybrid/PH_StochCumulReward.cc | 19 +++++----- prism/src/hybrid/PH_StochTransient.cc | 19 +++++----- 10 files changed, 100 insertions(+), 133 deletions(-) diff --git a/prism/src/hybrid/PH_JOR.cc b/prism/src/hybrid/PH_JOR.cc index ba9ee266..f4d54c3e 100644 --- a/prism/src/hybrid/PH_JOR.cc +++ b/prism/src/hybrid/PH_JOR.cc @@ -37,6 +37,7 @@ #include "PrismHybridGlob.h" #include "jnipointer.h" #include "prism.h" +#include "Measures.h" #include "ExportIterations.h" #include #include @@ -101,9 +102,11 @@ jdouble omega // omega (over-relaxation parameter) double time_taken, time_for_setup, time_for_iters; // misc int i, iters; - double x, sup_norm, kb, kbt; + double x, kb, kbt; bool done; - + // measure for convergence termination check + MeasureSupNorm measure(term_crit == TERM_CRIT_RELATIVE); + // exception handling around whole function try { @@ -274,21 +277,15 @@ jdouble omega // omega (over-relaxation parameter) iterationExport->exportVector(soln2, n, 0); // check convergence - sup_norm = 0.0; - for (i = 0; i < n; i++) { - x = fabs(soln2[i] - soln[i]); - if (term_crit == TERM_CRIT_RELATIVE) { - x /= soln2[i]; - } - if (x > sup_norm) sup_norm = x; - } - if (sup_norm < term_crit_param) { + measure.reset(); + measure.measure(soln, soln2, n); + if (measure.value() < term_crit_param) { done = true; } - + // print occasional status update if ((util_cpu_time() - start3) > UPDATE_DELAY) { - PH_PrintToMainLog(env, "Iteration %d: max %sdiff=%f", iters, (term_crit == TERM_CRIT_RELATIVE)?"relative ":"", sup_norm); + PH_PrintToMainLog(env, "Iteration %d: max %sdiff=%f", iters, measure.isRelative()?"relative ":"", measure.value()); PH_PrintToMainLog(env, ", %.2f sec so far\n", ((double)(util_cpu_time() - start2)/1000)); start3 = util_cpu_time(); } diff --git a/prism/src/hybrid/PH_NondetReachReward.cc b/prism/src/hybrid/PH_NondetReachReward.cc index af51e475..d49672a2 100644 --- a/prism/src/hybrid/PH_NondetReachReward.cc +++ b/prism/src/hybrid/PH_NondetReachReward.cc @@ -37,6 +37,7 @@ #include "PrismHybridGlob.h" #include "jnipointer.h" #include "prism.h" +#include "Measures.h" #include "ExportIterations.h" #include #include @@ -107,9 +108,11 @@ jboolean min // min or max probabilities (true = min, false = max) double time_taken, time_for_setup, time_for_iters; // misc int i, j, k, iters; - double d, x, sup_norm, kb, kbt; + double d, kb, kbt; bool done; - + // measure for convergence termination check + MeasureSupNorm measure(term_crit == TERM_CRIT_RELATIVE); + // exception handling around whole function try { @@ -297,21 +300,15 @@ jboolean min // min or max probabilities (true = min, false = max) iterationExport->exportVector(soln2, n, 0); // check convergence - sup_norm = 0.0; - for (i = 0; i < n; i++) { - x = fabs(soln2[i] - soln[i]); - if (term_crit == TERM_CRIT_RELATIVE) { - x /= soln2[i]; - } - if (x > sup_norm) sup_norm = x; - } - if (sup_norm < term_crit_param) { + measure.reset(); + measure.measure(soln, soln2, n); + if (measure.value() < term_crit_param) { done = true; } - + // print occasional status update if ((util_cpu_time() - start3) > UPDATE_DELAY) { - PH_PrintToMainLog(env, "Iteration %d: max %sdiff=%f", iters, (term_crit == TERM_CRIT_RELATIVE)?"relative ":"", sup_norm); + PH_PrintToMainLog(env, "Iteration %d: max %sdiff=%f", iters, measure.isRelative()?"relative ":"", measure.value()); PH_PrintToMainLog(env, ", %.2f sec so far\n", ((double)(util_cpu_time() - start2)/1000)); start3 = util_cpu_time(); } diff --git a/prism/src/hybrid/PH_NondetUntil.cc b/prism/src/hybrid/PH_NondetUntil.cc index ba1b5bdf..9db1ec00 100644 --- a/prism/src/hybrid/PH_NondetUntil.cc +++ b/prism/src/hybrid/PH_NondetUntil.cc @@ -37,6 +37,7 @@ #include "PrismHybridGlob.h" #include "jnipointer.h" #include "prism.h" +#include "Measures.h" #include "ExportIterations.h" #include #include @@ -101,9 +102,11 @@ jboolean min // min or max probabilities (true = min, false = max) double time_taken, time_for_setup, time_for_iters; // misc int i, j, iters; - double x, sup_norm, kb, kbt; + double x, kb, kbt; bool done; - + // measure for convergence termination check + MeasureSupNorm measure(term_crit == TERM_CRIT_RELATIVE); + // exception handling around whole function try { @@ -248,21 +251,15 @@ jboolean min // min or max probabilities (true = min, false = max) iterationExport->exportVector(soln2, n, 0); // check convergence - sup_norm = 0.0; - for (i = 0; i < n; i++) { - x = fabs(soln2[i] - soln[i]); - if (term_crit == TERM_CRIT_RELATIVE) { - x /= soln2[i]; - } - if (x > sup_norm) sup_norm = x; - } - if (sup_norm < term_crit_param) { + measure.reset(); + measure.measure(soln, soln2, n); + if (measure.value() < term_crit_param) { done = true; } - + // print occasional status update if ((util_cpu_time() - start3) > UPDATE_DELAY) { - PH_PrintToMainLog(env, "Iteration %d: max %sdiff=%f", iters, (term_crit == TERM_CRIT_RELATIVE)?"relative ":"", sup_norm); + PH_PrintToMainLog(env, "Iteration %d: max %sdiff=%f", iters, measure.isRelative()?"relative ":"", measure.value()); PH_PrintToMainLog(env, ", %.2f sec so far\n", ((double)(util_cpu_time() - start2)/1000)); start3 = util_cpu_time(); } diff --git a/prism/src/hybrid/PH_PSOR.cc b/prism/src/hybrid/PH_PSOR.cc index 5db4e821..c3b3877d 100644 --- a/prism/src/hybrid/PH_PSOR.cc +++ b/prism/src/hybrid/PH_PSOR.cc @@ -37,6 +37,7 @@ #include "hybrid.h" #include "PrismHybridGlob.h" #include "jnipointer.h" +#include "Measures.h" #include "ExportIterations.h" #include #include @@ -102,9 +103,11 @@ jboolean forwards // forwards or backwards? double time_taken, time_for_setup, time_for_iters; // misc int i, j, fb, l, h, i2, h2, iters; - double x, sup_norm, kb, kbt; + double x, kb, kbt; bool done; - + // measure for convergence termination check + MeasureSupNorm measure(term_crit == TERM_CRIT_RELATIVE); + // exception handling around whole function try { @@ -258,7 +261,7 @@ jboolean forwards // forwards or backwards? // PH_PrintToMainLog(env, "Iteration %d: ", iters); // start3 = util_cpu_time(); - sup_norm = 0.0; + measure.reset(); // stuff for block storage int b_n = hddm->blocks->n; @@ -327,13 +330,9 @@ jboolean forwards // forwards or backwards? // do over-relaxation if necessary if (omega != 1) { soln2[i2] = ((1-omega) * soln[row_offset + i2]) + (omega * soln2[i2]); - } - // compute norm for convergence - x = fabs(soln2[i2] - soln[row_offset + i2]); - if (term_crit == TERM_CRIT_RELATIVE) { - x /= soln2[i2]; } - if (x > sup_norm) sup_norm = x; + // compute norm for convergence + measure.measure(soln[row_offset + i2], soln2[i2]); // set vector element soln[row_offset + i2] = soln2[i2]; } @@ -343,10 +342,10 @@ jboolean forwards // forwards or backwards? iterationExport->exportVector(soln, n, 0); // check convergence - if (sup_norm < term_crit_param) { + if (measure.value() < term_crit_param) { done = true; } - + // PH_PrintToMainLog(env, "%.2f %.2f sec\n", ((double)(util_cpu_time() - start3)/1000), ((double)(util_cpu_time() - start2)/1000)/iters); } diff --git a/prism/src/hybrid/PH_Power.cc b/prism/src/hybrid/PH_Power.cc index b7df7af0..3240fe1e 100644 --- a/prism/src/hybrid/PH_Power.cc +++ b/prism/src/hybrid/PH_Power.cc @@ -37,6 +37,7 @@ #include "PrismHybridGlob.h" #include "jnipointer.h" #include "prism.h" +#include "Measures.h" #include "ExportIterations.h" #include #include @@ -98,9 +99,11 @@ jboolean transpose // transpose A? (i.e. solve xA=x not Ax=x?) double time_taken, time_for_setup, time_for_iters; // misc int i, iters; - double x, sup_norm, kb, kbt; + double x, kb, kbt; bool done; - + // measure for convergence termination check + MeasureSupNorm measure(term_crit == TERM_CRIT_RELATIVE); + // exception handling around whole function try { @@ -206,21 +209,15 @@ jboolean transpose // transpose A? (i.e. solve xA=x not Ax=x?) iterationExport->exportVector(soln2, n, 0); // check convergence - sup_norm = 0.0; - for (i = 0; i < n; i++) { - x = fabs(soln2[i] - soln[i]); - if (term_crit == TERM_CRIT_RELATIVE) { - x /= soln2[i]; - } - if (x > sup_norm) sup_norm = x; - } - if (sup_norm < term_crit_param) { + measure.reset(); + measure.measure(soln, soln2, n); + if (measure.value() < term_crit_param) { done = true; } - + // print occasional status update if ((util_cpu_time() - start3) > UPDATE_DELAY) { - PH_PrintToMainLog(env, "Iteration %d: max %sdiff=%f", iters, (term_crit == TERM_CRIT_RELATIVE)?"relative ":"", sup_norm); + PH_PrintToMainLog(env, "Iteration %d: max %sdiff=%f", iters, measure.isRelative()?"relative ":"", measure.value()); PH_PrintToMainLog(env, ", %.2f sec so far\n", ((double)(util_cpu_time() - start2)/1000)); start3 = util_cpu_time(); } diff --git a/prism/src/hybrid/PH_ProbTransient.cc b/prism/src/hybrid/PH_ProbTransient.cc index b6e6d85b..af4de266 100644 --- a/prism/src/hybrid/PH_ProbTransient.cc +++ b/prism/src/hybrid/PH_ProbTransient.cc @@ -37,6 +37,7 @@ #include "hybrid.h" #include "PrismHybridGlob.h" #include "jnipointer.h" +#include "Measures.h" #include // local prototypes @@ -85,11 +86,13 @@ jint time // time double *tmpsoln = NULL, *sum = NULL; // timing stuff long start1, start2, start3, stop; - double x, sup_norm, time_taken, time_for_setup, time_for_iters; + double time_taken, time_for_setup, time_for_iters; // misc bool done; int i, iters; double kb, kbt; + // measure for convergence termination check + MeasureSupNorm measure(term_crit == TERM_CRIT_RELATIVE); // exception handling around whole function try { @@ -161,15 +164,9 @@ jint time // time // check for steady state convergence if (do_ss_detect) { - sup_norm = 0.0; - for (i = 0; i < n; i++) { - x = fabs(soln2[i] - soln[i]); - if (term_crit == TERM_CRIT_RELATIVE) { - x /= soln2[i]; - } - if (x > sup_norm) sup_norm = x; - } - if (sup_norm < term_crit_param) { + measure.reset(); + measure.measure(soln, soln2, n); + if (measure.value() < term_crit_param) { done = true; } } @@ -177,7 +174,7 @@ jint time // time // print occasional status update if ((util_cpu_time() - start3) > UPDATE_DELAY) { PH_PrintToMainLog(env, "Iteration %d (of %d): ", iters, time); - if (do_ss_detect) PH_PrintToMainLog(env, "max %sdiff=%f, ", (term_crit == TERM_CRIT_RELATIVE)?"relative ":"", sup_norm); + if (do_ss_detect) PH_PrintToMainLog(env, "max %sdiff=%f, ", measure.isRelative()?"relative ":"", measure.value()); PH_PrintToMainLog(env, "%.2f sec so far\n", ((double)(util_cpu_time() - start2)/1000)); start3 = util_cpu_time(); } diff --git a/prism/src/hybrid/PH_SOR.cc b/prism/src/hybrid/PH_SOR.cc index b9663621..f09aa039 100644 --- a/prism/src/hybrid/PH_SOR.cc +++ b/prism/src/hybrid/PH_SOR.cc @@ -38,6 +38,7 @@ #include "PrismHybridGlob.h" #include "jnipointer.h" #include "prism.h" +#include "Measures.h" #include "ExportIterations.h" #include #include @@ -57,8 +58,9 @@ static int sm_dist_mask; static double *diags_vec = NULL; static DistVector *diags_dist = NULL; static double *soln = NULL, *soln2 = NULL; -static double x, sup_norm, omega; +static double omega; static bool forwards; +static MeasureSupNorm* measure = NULL; //------------------------------------------------------------------------------ @@ -112,7 +114,10 @@ jboolean fwds // forwards or backwards? int i, j, fb, l, h, i2, h2, iters; double kb, kbt; bool done, diag_done; - + // measure for convergence termination check + // dynamically allocated so sor_rm and sor_cmsr have access as well + measure = new MeasureSupNorm(term_crit == TERM_CRIT_RELATIVE); + // exception handling around whole function try { @@ -265,7 +270,7 @@ jboolean fwds // forwards or backwards? iters++; - sup_norm = 0.0; + measure->reset(); // stuff for block storage int b_n = hddm->blocks->n; @@ -355,13 +360,9 @@ jboolean fwds // forwards or backwards? // do over-relaxation if necessary if (omega != 1) { soln2[i2] = ((1-omega) * soln[row_offset + i2]) + (omega * soln2[i2]); - } - // compute norm for convergence - x = fabs(soln2[i2] - soln[row_offset + i2]); - if (term_crit == TERM_CRIT_RELATIVE) { - x /= soln2[i2]; } - if (x > sup_norm) sup_norm = x; + // compute norm for convergence + measure->measure(soln[row_offset + i2], soln2[i2]); // set vector element soln[row_offset + i2] = soln2[i2]; } @@ -370,9 +371,7 @@ jboolean fwds // forwards or backwards? if (l_b_max) { soln2[0] *= ((!compact_d)?(diags_vec[row_offset]):(diags_dist->dist[(int)diags_dist->ptrs[row_offset]])); if (omega != 1) soln2[0] = ((1-omega) * soln[row_offset]) + (omega * soln2[0]); - x = fabs(soln2[0] - soln[row_offset]); - if (term_crit == TERM_CRIT_RELATIVE) x /= soln2[0]; - if (x > sup_norm) sup_norm = x; + measure->measure(soln[row_offset], soln2[0]); soln[row_offset] = soln2[0]; } } @@ -381,13 +380,13 @@ jboolean fwds // forwards or backwards? iterationExport->exportVector(soln, n, 0); // check convergence - if (sup_norm < term_crit_param) { + if (measure->value() < term_crit_param) { done = true; } // print occasional status update if ((util_cpu_time() - start3) > UPDATE_DELAY) { - PH_PrintToMainLog(env, "Iteration %d: max %sdiff=%f", iters, (term_crit == TERM_CRIT_RELATIVE)?"relative ":"", sup_norm); + PH_PrintToMainLog(env, "Iteration %d: max %sdiff=%f", iters, measure->isRelative()?"relative ":"", measure->value()); PH_PrintToMainLog(env, ", %.2f sec so far\n", ((double)(util_cpu_time() - start2)/1000)); start3 = util_cpu_time(); } @@ -421,6 +420,7 @@ jboolean fwds // forwards or backwards? if (b_vec) delete[] b_vec; if (b_dist) delete b_dist; if (soln2) delete[] soln2; + if (measure) delete measure; return ptr_to_jlong(soln); } @@ -513,13 +513,9 @@ static void sor_rm(RMSparseMatrix *rmsm, int row_offset, int col_offset, int r, // do over-relaxation if necessary if (omega != 1) { soln2[r + i2] = ((1-omega) * soln[row_offset + r + i2]) + (omega * soln2[r + i2]); - } - // compute norm for convergence - x = fabs(soln2[r + i2] - soln[row_offset + r + i2]); - if (term_crit == TERM_CRIT_RELATIVE) { - x /= soln2[r + i2]; } - if (x > sup_norm) sup_norm = x; + // compute norm for convergence + measure->measure(soln[row_offset + r + i2], soln2[r + i2]); // set vector element soln[row_offset + r + i2] = soln2[r + i2]; } @@ -564,13 +560,9 @@ static void sor_cmsr(CMSRSparseMatrix *cmsrsm, int row_offset, int col_offset, i // do over-relaxation if necessary if (omega != 1) { soln2[r + i2] = ((1-omega) * soln[row_offset + r + i2]) + (omega * soln2[r + i2]); - } - // compute norm for convergence - x = fabs(soln2[r + i2] - soln[row_offset + r + i2]); - if (term_crit == TERM_CRIT_RELATIVE) { - x /= soln2[r + i2]; } - if (x > sup_norm) sup_norm = x; + // compute norm for convergence + measure->measure(soln[row_offset + r + i2], soln2[r + i2]); // set vector element soln[row_offset + r + i2] = soln2[r + i2]; } diff --git a/prism/src/hybrid/PH_StochBoundedUntil.cc b/prism/src/hybrid/PH_StochBoundedUntil.cc index bce7ed3f..11e25d1e 100644 --- a/prism/src/hybrid/PH_StochBoundedUntil.cc +++ b/prism/src/hybrid/PH_StochBoundedUntil.cc @@ -37,6 +37,7 @@ #include "hybrid.h" #include "PrismHybridGlob.h" #include "jnipointer.h" +#include "Measures.h" #include // local prototypes @@ -100,7 +101,9 @@ jlong __jlongpointer mu // probs for multiplying // misc bool done; long i, iters, num_iters; - double x, sup_norm, kb, kbt, max_diag, weight, term_crit_param_unif; + double x, kb, kbt, max_diag, weight, term_crit_param_unif; + // measure for convergence termination check + MeasureSupNorm measure(term_crit == TERM_CRIT_RELATIVE); // exception handling around whole function try { @@ -250,15 +253,9 @@ jlong __jlongpointer mu // probs for multiplying // check for steady state convergence if (do_ss_detect) { - sup_norm = 0.0; - for (i = 0; i < n; i++) { - x = fabs(soln2[i] - soln[i]); - if (term_crit == TERM_CRIT_RELATIVE) { - x /= soln2[i]; - } - if (x > sup_norm) sup_norm = x; - } - if (sup_norm < term_crit_param_unif) { + measure.reset(); + measure.measure(soln, soln2, n); + if (measure.value() < term_crit_param_unif) { done = true; } } @@ -284,7 +281,7 @@ jlong __jlongpointer mu // probs for multiplying // print occasional status update if ((util_cpu_time() - start3) > UPDATE_DELAY) { PH_PrintToMainLog(env, "Iteration %d (of %d): ", iters, fgw.right); - if (do_ss_detect) PH_PrintToMainLog(env, "max %sdiff=%f, ", (term_crit == TERM_CRIT_RELATIVE)?"relative ":"", sup_norm); + if (do_ss_detect) PH_PrintToMainLog(env, "max %sdiff=%f, ", measure.isRelative()?"relative ":"", measure.value()); PH_PrintToMainLog(env, "%.2f sec so far\n", ((double)(util_cpu_time() - start2)/1000)); start3 = util_cpu_time(); } diff --git a/prism/src/hybrid/PH_StochCumulReward.cc b/prism/src/hybrid/PH_StochCumulReward.cc index 96cd4a10..afb560c7 100644 --- a/prism/src/hybrid/PH_StochCumulReward.cc +++ b/prism/src/hybrid/PH_StochCumulReward.cc @@ -37,6 +37,7 @@ #include "hybrid.h" #include "PrismHybridGlob.h" #include "jnipointer.h" +#include "Measures.h" #include // local prototypes @@ -99,7 +100,9 @@ jdouble time // time bound // misc bool done; long i, iters, num_iters; - double x, sup_norm, max_diag, weight, kb, kbt, term_crit_param_unif; + double max_diag, weight, kb, kbt, term_crit_param_unif; + // measure for convergence termination check + MeasureSupNorm measure(term_crit == TERM_CRIT_RELATIVE); // exception handling around whole function try { @@ -260,15 +263,9 @@ jdouble time // time bound // check for steady state convergence if (do_ss_detect) { - sup_norm = 0.0; - for (i = 0; i < n; i++) { - x = fabs(soln2[i] - soln[i]); - if (term_crit == TERM_CRIT_RELATIVE) { - x /= soln2[i]; - } - if (x > sup_norm) sup_norm = x; - } - if (sup_norm < term_crit_param_unif) { + measure.reset(); + measure.measure(soln, soln2, n); + if (measure.value() < term_crit_param_unif) { done = true; } } @@ -295,7 +292,7 @@ jdouble time // time bound // print occasional status update if ((util_cpu_time() - start3) > UPDATE_DELAY) { PH_PrintToMainLog(env, "Iteration %d (of %d): ", iters, fgw.right); - if (do_ss_detect) PH_PrintToMainLog(env, "max %sdiff=%f, ", (term_crit == TERM_CRIT_RELATIVE)?"relative ":"", sup_norm); + if (do_ss_detect) PH_PrintToMainLog(env, "max %sdiff=%f, ", measure.isRelative()?"relative ":"", measure.value()); PH_PrintToMainLog(env, "%.2f sec so far\n", ((double)(util_cpu_time() - start2)/1000)); start3 = util_cpu_time(); } diff --git a/prism/src/hybrid/PH_StochTransient.cc b/prism/src/hybrid/PH_StochTransient.cc index 09612bfb..b3600859 100644 --- a/prism/src/hybrid/PH_StochTransient.cc +++ b/prism/src/hybrid/PH_StochTransient.cc @@ -37,6 +37,7 @@ #include "hybrid.h" #include "PrismHybridGlob.h" #include "jnipointer.h" +#include "Measures.h" #include // local prototypes @@ -95,7 +96,9 @@ jdouble time // time bound // misc bool done; long i, iters, num_iters; - double x, sup_norm, kb, kbt, max_diag, weight, term_crit_param_unif; + double kb, kbt, max_diag, weight, term_crit_param_unif; + // measure for convergence termination check + MeasureSupNorm measure(term_crit == TERM_CRIT_RELATIVE); // exception handling around whole function try { @@ -231,15 +234,9 @@ jdouble time // time bound // check for steady state convergence if (do_ss_detect) { - sup_norm = 0.0; - for (i = 0; i < n; i++) { - x = fabs(soln2[i] - soln[i]); - if (term_crit == TERM_CRIT_RELATIVE) { - x /= soln2[i]; - } - if (x > sup_norm) sup_norm = x; - } - if (sup_norm < term_crit_param_unif) { + measure.reset(); + measure.measure(soln, soln2, n); + if (measure.value() < term_crit_param_unif) { done = true; } } @@ -265,7 +262,7 @@ jdouble time // time bound // print occasional status update if ((util_cpu_time() - start3) > UPDATE_DELAY) { PH_PrintToMainLog(env, "Iteration %d (of %d): ", iters, fgw.right); - if (do_ss_detect) PH_PrintToMainLog(env, "max %sdiff=%f, ", (term_crit == TERM_CRIT_RELATIVE)?"relative ":"", sup_norm); + if (do_ss_detect) PH_PrintToMainLog(env, "max %sdiff=%f, ", measure.isRelative()?"relative ":"", measure.value()); PH_PrintToMainLog(env, "%.2f sec so far\n", ((double)(util_cpu_time() - start2)/1000)); start3 = util_cpu_time(); }