aboutsummaryrefslogtreecommitdiff
path: root/Carpet/Carpet/src/Comm.cc
diff options
context:
space:
mode:
authorThomas Radke <tradke@aei.mpg.de>2005-04-11 15:55:00 +0000
committerThomas Radke <tradke@aei.mpg.de>2005-04-11 15:55:00 +0000
commit25193c6e54409fd8ecc512ce357fe47e9e528049 (patch)
tree3bbd5878ad36b396499c16d0498879375a0cf001 /Carpet/Carpet/src/Comm.cc
parent405a040a47a4ab4ad9bed9274468991ea12bc8c6 (diff)
Carpet/CarpetLib: deactivate CarpetLib::minimise_outstanding_communications
The code to minimise the number of outstanding communication requests is superseded by the collective buffers communication code. Therefore the corresponding parameter has been deactivated (but not removed in order to keep backwards compatibility with older checkpoints). It is marked as deprecated in the param.ccl file and should not be used anymore (use CarpetLib::use_collective_communication_buffers instead). A level-2 warning of that meaning is printed at startup if the parameter is still set in a user's parfile. darcs-hash:20050411155524-776a0-ed9919869cc1f2821ab8b2fa23b4abea203b72ed.gz
Diffstat (limited to 'Carpet/Carpet/src/Comm.cc')
-rw-r--r--Carpet/Carpet/src/Comm.cc63
1 files changed, 4 insertions, 59 deletions
diff --git a/Carpet/Carpet/src/Comm.cc b/Carpet/Carpet/src/Comm.cc
index e7ec3f54e..f0c64dc1b 100644
--- a/Carpet/Carpet/src/Comm.cc
+++ b/Carpet/Carpet/src/Comm.cc
@@ -138,37 +138,10 @@ namespace Carpet {
DECLARE_CCTK_PARAMETERS;
const int tl = 0;
- // Use collective or single-component buffers for communication ?
- const int vartype =
- use_collective_communication_buffers ? groups.vartype : -1;
-
// use the current time here (which may be modified by the user)
const CCTK_REAL time = (cctkGH->cctk_time - initial_time) / delta_time;
- if (use_collective_communication_buffers ||
- ! minimise_outstanding_communications) {
- for (comm_state state(vartype); ! state.done(); state.step()) {
- for (int group = 0; group < groups.members.size(); ++group) {
- const int g = groups.members.at(group);
- const int grouptype = CCTK_GroupTypeI (g);
- if (grouptype != CCTK_GF) {
- continue;
- }
- assert (reflevel>=0 and reflevel<reflevels);
-
- for (int m = 0; m < arrdata.at(g).size(); ++m) {
- for (int v = 0; v < arrdata.at(g).at(m).data.size(); ++v) {
- ggf *const gv = arrdata.at(g).at(m).data.at(v);
- for (int c = 0; c < vhh.at(m)->components(reflevel); ++c) {
- gv->ref_bnd_prolongate (state, tl, reflevel, c, mglevel, time);
- }
- }
- }
- }
- }
- } else {
- // make the comm_state loop the innermost
- // in order to minimise the number of outstanding communications
+ for (comm_state state(groups.vartype); ! state.done(); state.step()) {
for (int group = 0; group < groups.members.size(); ++group) {
const int g = groups.members.at(group);
const int grouptype = CCTK_GroupTypeI (g);
@@ -181,9 +154,7 @@ namespace Carpet {
for (int v = 0; v < arrdata.at(g).at(m).data.size(); ++v) {
ggf *const gv = arrdata.at(g).at(m).data.at(v);
for (int c = 0; c < vhh.at(m)->components(reflevel); ++c) {
- for (comm_state state(vartype); ! state.done(); state.step()) {
- gv->ref_bnd_prolongate (state, tl, reflevel, c, mglevel, time);
- }
+ gv->ref_bnd_prolongate (state, tl, reflevel, c, mglevel, time);
}
}
}
@@ -200,31 +171,7 @@ namespace Carpet {
assert (groups.members.size() > 0);
- // Use collective or single-component buffers for communication ?
- const int vartype =
- use_collective_communication_buffers ? groups.vartype : -1;
-
- if (use_collective_communication_buffers ||
- ! minimise_outstanding_communications) {
- for (comm_state state(vartype); ! state.done(); state.step()) {
- for (int group = 0; group < groups.members.size(); ++group) {
- const int g = groups.members.at(group);
- const int grouptype = CCTK_GroupTypeI (g);
- const int ml = grouptype == CCTK_GF ? mglevel : 0;
- const int rl = grouptype == CCTK_GF ? reflevel : 0;
- for (int m = 0; m < arrdata.at(g).size(); ++m) {
- for (int v = 0; v < arrdata.at(g).at(m).data.size(); ++v) {
- ggf *const gv = arrdata.at(g).at(m).data.at(v);
- for (int c = 0; c < vhh.at(m)->components(reflevel); ++c) {
- gv->sync (state, tl, rl, c, ml);
- }
- }
- }
- }
- }
- } else {
- // make the comm_state loop the innermost
- // in order to minimise the number of outstanding communications
+ for (comm_state state(groups.vartype); ! state.done(); state.step()) {
for (int group = 0; group < groups.members.size(); ++group) {
const int g = groups.members.at(group);
const int grouptype = CCTK_GroupTypeI (g);
@@ -234,9 +181,7 @@ namespace Carpet {
for (int v = 0; v < arrdata.at(g).at(m).data.size(); ++v) {
ggf *const gv = arrdata.at(g).at(m).data.at(v);
for (int c = 0; c < vhh.at(m)->components(reflevel); ++c) {
- for (comm_state state(vartype); ! state.done(); state.step()) {
- gv->sync (state, tl, rl, c, ml);
- }
+ gv->sync (state, tl, rl, c, ml);
}
}
}