diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2008-02-29 22:05:57 -0600 |
---|---|---|
committer | Erik Schnetter <schnetter@cct.lsu.edu> | 2008-02-29 22:05:57 -0600 |
commit | 47ed3089880ecfdecb496f5e781d46efffe58587 (patch) | |
tree | 07d5dd05e3a316912c0c225b4a2b99d650ec08b5 /Carpet | |
parent | 904355478209f5bef1aabef2efc41dbece5bc1c8 (diff) |
Output list of models at startup in a more compact form
Diffstat (limited to 'Carpet')
-rw-r--r-- | Carpet/Carpet/src/MultiModel.cc | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/Carpet/Carpet/src/MultiModel.cc b/Carpet/Carpet/src/MultiModel.cc index aa2d7c096..975e48aec 100644 --- a/Carpet/Carpet/src/MultiModel.cc +++ b/Carpet/Carpet/src/MultiModel.cc @@ -128,8 +128,29 @@ namespace Carpet for (int n = 0; n < num_procs; ++ n) { int const m = model_ids.at(n); - cout << " processor " << n << ": " - << "model " << m << " \"" << models.at(m) << "\"" << endl; + bool const same_model_as_prev = + n-1 >= 0 and model_ids.at(n-1) == m; + bool const same_model_as_next = + n+1 < num_procs and model_ids.at(n+1) == m; + if (same_model_as_next) { + if (same_model_as_prev) { + // Output nothing + } else { + // This processor has the same model as the next one: + // output only a partial line + cout << " processors " << n << "-"; + } + } else { + if (same_model_as_prev) { + // This processor has the same model as the previous one: + // finish a partial line + cout << n << ": " + << "model " << m << " \"" << models.at(m) << "\"" << endl; + } else { + cout << " processor " << n << ": " + << "model " << m << " \"" << models.at(m) << "\"" << endl; + } + } } int const my_model = model_ids.at(my_proc); CCTK_VInfo (CCTK_THORNSTRING, |