From 1a61767f2c1350e10d3a222158c9d9d6d736e170 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sat, 3 Nov 2007 19:34:00 +0000 Subject: Carpet: Improve grid hierarchy statistics darcs-hash:20071103193419-dae7b-44ea5224eaf65e37da4ba57501b178f810f1650a.gz --- Carpet/Carpet/src/Recompose.cc | 60 +++++++++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 19 deletions(-) diff --git a/Carpet/Carpet/src/Recompose.cc b/Carpet/Carpet/src/Recompose.cc index 6e507f54a..39aaa1a5e 100644 --- a/Carpet/Carpet/src/Recompose.cc +++ b/Carpet/Carpet/src/Recompose.cc @@ -561,8 +561,8 @@ namespace Carpet { // Grid array statistics int num_gfs = 0; int num_arrays = 0; - ibbox::size_type num_active_array_points = 0; - ibbox::size_type num_total_array_points = 0; + CCTK_REAL num_active_array_points = 0; + CCTK_REAL num_total_array_points = 0; for (int g=0; gcomponents(rl); ++c) { ++ num_comps; dh::dboxes const & b = dd->boxes.AT(m).AT(rl).AT(c); - num_active_points += num_gfs * b.active.size(); - num_owned_points += num_gfs * b.owned.size(); - num_total_points += num_gfs * b.exterior.size(); + num_active_mem_points += num_gfs * b.active.size(); + num_owned_mem_points += num_gfs * b.owned.size(); + num_total_mem_points += num_gfs * b.exterior.size(); + num_active_cpu_points += trf * b.active.size(); + num_owned_cpu_points += trf * b.owned.size(); + num_total_cpu_points += trf * b.exterior.size(); } } } } + num_active_cpu_points /= num_steps * delta_time; + num_owned_cpu_points /= num_steps * delta_time; + num_total_cpu_points /= num_steps * delta_time; // Output CCTK_VInfo (CCTK_THORNSTRING, "Grid structure statistics:"); CCTK_VInfo (CCTK_THORNSTRING, - "GF: vars %d, pts %.0fk active, %.0fk owned (%.0f%%), %.0fk total (%.0f%%), %.1f c/p", + "GF: rhs: %.0fk active, %.0fk owned (+%.0f%%), %.0fk total (+%.0f%%), %.3g rhs/M", + double (num_active_cpu_points / 1000), + double (num_owned_cpu_points / 1000), + double (num_owned_cpu_points / num_active_cpu_points * 100 - 100), + double (num_total_cpu_points / 1000), + double (num_total_cpu_points / num_owned_cpu_points * 100 - 100), + double (num_steps / delta_time)); + CCTK_VInfo (CCTK_THORNSTRING, + "GF: vars: %d, pts: %.0fM active, %.0fM owned (+%.0f%%), %.0fM total (+%.0f%%), %.1f c/p", num_gfs, - 1.0 * num_active_points / 1000, - 1.0 * num_owned_points / 1000, - 1.0 * num_owned_points / num_active_points * 100, - 1.0 * num_total_points / 1000, - 1.0 * num_total_points / num_owned_points * 100, - 1.0 * num_comps / (reflevels * CCTK_nProcs (cctkGH))); + double (num_active_mem_points / 1000000), + double (num_owned_mem_points / 1000000), + double (num_owned_mem_points / num_active_mem_points * 100 - 100), + double (num_total_mem_points / 1000000), + double (num_total_mem_points / num_owned_mem_points * 100 - 100), + double (num_comps / (reflevels * CCTK_nProcs (cctkGH)))); CCTK_VInfo (CCTK_THORNSTRING, - "GA: vars %d, pts %.0fk active, %.0fk total (%.0f%%)", + "GA: vars: %d, pts: %.0fM active, %.0fM total (+%.0f%%)", num_arrays, - 1.0 * num_active_array_points / 1000, - 1.0 * num_total_array_points / 1000, - 1.0 * num_total_array_points / num_active_array_points * 100); + double (num_active_array_points / 1000000), + double (num_total_array_points / 1000000), + double (num_total_array_points / num_active_array_points * 100 - 100)); } -- cgit v1.2.3