diff options
author | schnetter <> | 2004-04-07 14:58:00 +0000 |
---|---|---|
committer | schnetter <> | 2004-04-07 14:58:00 +0000 |
commit | 5172090797cf3f31935cdaaf2c2f0158d3f204b4 (patch) | |
tree | 6ae6b832b89ccabc9625c094409765aa346ecf35 /Carpet | |
parent | 4e2ed66a37ad31fd23d936df386c04722b3638c2 (diff) |
Insert a check that all gdata arrays are created on all processors.
Insert a check that all gdata arrays are created on all processors.
Expensive, and disabled by default.
darcs-hash:20040407145807-07bb3-7e85aaef2e6f8bac996079f446172e4171c53ab7.gz
Diffstat (limited to 'Carpet')
-rw-r--r-- | Carpet/CarpetLib/src/gdata.cc | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/Carpet/CarpetLib/src/gdata.cc b/Carpet/CarpetLib/src/gdata.cc index 142f900be..f05c88122 100644 --- a/Carpet/CarpetLib/src/gdata.cc +++ b/Carpet/CarpetLib/src/gdata.cc @@ -1,4 +1,4 @@ -// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/gdata.cc,v 1.28 2004/03/23 19:30:14 schnetter Exp $ +// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/gdata.cc,v 1.29 2004/04/07 16:58:07 schnetter Exp $ #include <assert.h> #include <stdlib.h> @@ -6,6 +6,7 @@ #include <iostream> #include "cctk.h" +#include "cctk_Parameters.h" #include "util_ErrorCodes.h" #include "util_Table.h" @@ -72,11 +73,22 @@ gdata<D>::gdata (const int varindex_, const operator_type transport_operator_) _has_storage(false), comm_active(false), tag(nexttag()) -{ } +{ + DECLARE_CCTK_PARAMETERS; + if (barriers) { + MPI_Barrier (dist::comm); + } +} // Destructors template<int D> -gdata<D>::~gdata () { } +gdata<D>::~gdata () +{ + DECLARE_CCTK_PARAMETERS; + if (barriers) { + MPI_Barrier (dist::comm); + } +} |