Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tpetra: Remove informational output from passing tests #10888

Merged
merged 3 commits into from
Aug 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 0 additions & 51 deletions packages/tpetra/core/test/MultiVector/Bug7745.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Bug7745, DefaultToDefault, Scalar,LO,GO,Node)
Teuchos::RCP<const map_t> defaultMap =
rcp(new map_t(nGlobalEntries, 0, comm));

std::cout << me << " DEFAULT MAP" << std::endl;
defaultMap->describe(foo, Teuchos::VERB_EXTREME);

// Create vectors; see what the result is with CombineMode=ADD

vector_t defaultVecTgt(defaultMap);
Expand All @@ -97,9 +94,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Bug7745, DefaultToDefault, Scalar,LO,GO,Node)
Tpetra::Export<LO,GO,Node> defaultToDefault(defaultMap, defaultMap);
defaultVecTgt.doExport(defaultVecSrc, defaultToDefault, Tpetra::ADD_ASSIGN);

std::cout << me << " DEFAULT TO DEFAULT " << std::endl;
defaultVecTgt.describe(foo, Teuchos::VERB_EXTREME);

// Check result; all vector entries should be tgtScalar + srcScalar
auto data = defaultVecTgt.getLocalViewHost(Tpetra::Access::ReadOnly);

Expand Down Expand Up @@ -143,9 +137,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Bug7745, CyclicToDefault, Scalar,LO,GO,Node)
Teuchos::RCP<const map_t> defaultMap =
rcp(new map_t(nGlobalEntries, 0, comm));

std::cout << me << " DEFAULT MAP" << std::endl;
defaultMap->describe(foo, Teuchos::VERB_EXTREME);

// One-to-one cyclic map: deal out entries like cards

int nMyEntries = 0;
Expand All @@ -160,9 +151,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Bug7745, CyclicToDefault, Scalar,LO,GO,Node)
Teuchos::RCP<const map_t> cyclicMap =
rcp(new map_t(dummy, myEntries(0,nMyEntries), 0, comm));

std::cout << me << " CYCLIC MAP" << std::endl;
cyclicMap->describe(foo, Teuchos::VERB_EXTREME);

// Create vectors; see what the result is with CombineMode=ADD

vector_t defaultVecTgt(defaultMap);
Expand All @@ -176,9 +164,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Bug7745, CyclicToDefault, Scalar,LO,GO,Node)
Tpetra::Export<LO,GO,Node> cyclicToDefault(cyclicMap, defaultMap);
defaultVecTgt.doExport(cyclicVecSrc, cyclicToDefault, Tpetra::ADD_ASSIGN);

std::cout << me << " CYCLIC TO DEFAULT " << std::endl;
defaultVecTgt.describe(foo, Teuchos::VERB_EXTREME);

// Check result

auto data = defaultVecTgt.getLocalViewHost(Tpetra::Access::ReadOnly);
Expand Down Expand Up @@ -224,9 +209,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Bug7745, OverlapToDefault, Scalar,LO,GO,Node)
Teuchos::RCP<const map_t> defaultMap =
rcp(new map_t(nGlobalEntries, 0, comm));

std::cout << me << " DEFAULT MAP" << std::endl;
defaultMap->describe(foo, Teuchos::VERB_EXTREME);

// Overlap map; some entries are stored on two procs
int nMyEntries = 0;
for (size_t i = 0; i < defaultMap->getLocalNumElements()/2; i++) {
Expand All @@ -241,9 +223,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Bug7745, OverlapToDefault, Scalar,LO,GO,Node)
Teuchos::OrdinalTraits<Tpetra::global_size_t>::invalid();
Teuchos::RCP<const map_t> overlapMap =
rcp(new map_t(dummy, myEntries(0,nMyEntries), 0, comm));

std::cout << me << " OVERLAP MAP" << std::endl;
overlapMap->describe(foo, Teuchos::VERB_EXTREME);

// Create vectors; see what the result is with CombineMode=ADD

Expand All @@ -258,9 +237,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Bug7745, OverlapToDefault, Scalar,LO,GO,Node)
Tpetra::Export<LO,GO,Node> overlapToDefault(overlapMap, defaultMap);
defaultVecTgt.doExport(overlapVecSrc, overlapToDefault, Tpetra::ADD_ASSIGN);

std::cout << me << " OVERLAP TO DEFAULT " << std::endl;
defaultVecTgt.describe(foo, Teuchos::VERB_EXTREME);

auto data = defaultVecTgt.getLocalViewHost(Tpetra::Access::ReadOnly);
for (size_t i = 0; i < defaultVecTgt.getLocalLength()/2; i++) {
// overlapped; initial target values were overwritten
Expand Down Expand Up @@ -321,19 +297,13 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Bug7745, OddEvenToSerial, Scalar,LO,GO,Node)
Teuchos::RCP<const map_t> oddEvenMap =
rcp(new map_t(dummy, myEntries(0,nMyEntries), 0, comm));

std::cout << me << " ODDEVEN MAP" << std::endl;
oddEvenMap->describe(foo, Teuchos::VERB_EXTREME);

// Map with all entries on one processor

dummy = Teuchos::OrdinalTraits<Tpetra::global_size_t>::invalid();
size_t nSerialEntries = (me == 0 ? nGlobalEntries : 0);
Teuchos::RCP<const map_t> serialMap =
rcp(new map_t(dummy, nSerialEntries, 0, comm));

std::cout << me << " SERIAL MAP" << std::endl;
serialMap->describe(foo, Teuchos::VERB_EXTREME);

// Create vectors; see what the result is with CombineMode=ADD

vector_t oddEvenVecSrc(oddEvenMap);
Expand All @@ -347,9 +317,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Bug7745, OddEvenToSerial, Scalar,LO,GO,Node)
Tpetra::Export<LO,GO,Node> oddEvenToSerial(oddEvenMap, serialMap);
serialVecTgt.doExport(oddEvenVecSrc, oddEvenToSerial, Tpetra::ADD_ASSIGN);

std::cout << me << " ODDEVEN TO SERIAL " << std::endl;
serialVecTgt.describe(foo, Teuchos::VERB_EXTREME);

// Check result

auto data = serialVecTgt.getLocalViewHost(Tpetra::Access::ReadOnly);
Expand Down Expand Up @@ -399,9 +366,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Bug7745, SupersetToDefault, Scalar,LO,GO,Node)
Teuchos::RCP<const map_t> defaultMap =
rcp(new map_t(nGlobalEntries, 0, comm));

std::cout << me << " DEFAULT MAP" << std::endl;
defaultMap->describe(foo, Teuchos::VERB_EXTREME);

// Superset map; some entries are stored on two procs
int nMyEntries = 0;
for (size_t i = 0; i < defaultMap->getLocalNumElements(); i++) {
Expand All @@ -416,9 +380,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Bug7745, SupersetToDefault, Scalar,LO,GO,Node)
Teuchos::OrdinalTraits<Tpetra::global_size_t>::invalid();
Teuchos::RCP<const map_t> supersetMap =
rcp(new map_t(dummy, myEntries(0,nMyEntries), 0, comm));

std::cout << me << " SUPERSET MAP" << std::endl;
supersetMap->describe(foo, Teuchos::VERB_EXTREME);

// Create vectors; see what the result is with CombineMode=ADD

Expand All @@ -434,9 +395,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Bug7745, SupersetToDefault, Scalar,LO,GO,Node)
defaultVecTgt.doExport(supersetVecSrc, supersetToDefault,
Tpetra::ADD_ASSIGN);

std::cout << me << " SUPERSET TO DEFAULT " << std::endl;
defaultVecTgt.describe(foo, Teuchos::VERB_EXTREME);

auto data = defaultVecTgt.getLocalViewHost(Tpetra::Access::ReadOnly);
for (size_t i = 0; i < defaultVecTgt.getLocalLength()/2; i++)
if (data(i,0) != tgtScalar + srcScalar + srcScalar) ierr++; // overlapped
Expand Down Expand Up @@ -482,9 +440,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Bug7745, NoSamesToDefault, Scalar,LO,GO,Node)
Teuchos::RCP<const map_t> defaultMap =
rcp(new map_t(nGlobalEntries, 0, comm));

std::cout << me << " DEFAULT MAP" << std::endl;
defaultMap->describe(foo, Teuchos::VERB_EXTREME);

// Map with no sames or permutes
int nMyEntries = 0;
for (size_t i = 0; i < defaultMap->getLocalNumElements(); i++) {
Expand All @@ -496,9 +451,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Bug7745, NoSamesToDefault, Scalar,LO,GO,Node)
Teuchos::OrdinalTraits<Tpetra::global_size_t>::invalid();
Teuchos::RCP<const map_t> noSamesMap =
rcp(new map_t(dummy, myEntries(0,nMyEntries), 0, comm));

std::cout << me << " NOSAMES MAP" << std::endl;
noSamesMap->describe(foo, Teuchos::VERB_EXTREME);

// Create vectors; see what the result is with CombineMode=ADD

Expand All @@ -513,9 +465,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Bug7745, NoSamesToDefault, Scalar,LO,GO,Node)
Tpetra::Export<LO,GO,Node> noSamesToDefault(noSamesMap, defaultMap);
defaultVecTgt.doExport(noSamesVecSrc, noSamesToDefault, Tpetra::ADD_ASSIGN);

std::cout << me << " NOSAMES TO DEFAULT " << std::endl;
defaultVecTgt.describe(foo, Teuchos::VERB_EXTREME);

auto data = defaultVecTgt.getLocalViewHost(Tpetra::Access::ReadOnly);
for (size_t i = 0; i < defaultVecTgt.getLocalLength(); i++) {
if (data(i,0) != tgtScalar + srcScalar) ierr++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL( MultiVector, TeuchosArray, LO, GO, Scalar , N
auto dataDevice = defaultVec.getLocalViewDevice(Tpetra::Access::ReadOnly);
}
catch (...) {
std::cout << me
<< " caught exception trying to get a device view"
<< " while holding a local view " << std::endl;
threw = true;
}
ierr += (threw == shouldThrow) ? 0 : 1;
Expand All @@ -103,9 +100,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL( MultiVector, TeuchosArray, LO, GO, Scalar , N
auto dataDevice = defaultVec.getLocalViewDevice(Tpetra::Access::ReadOnly);
}
catch (...) {
std::cout << me
<< " caught exception trying to get a device view"
<< " while holding a local view " << std::endl;
threw = true;
}
ierr += (threw == shouldThrow) ? 0 : 1;
Expand All @@ -118,9 +112,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL( MultiVector, TeuchosArray, LO, GO, Scalar , N
auto dataDevice = defaultVec.getLocalViewDevice(Tpetra::Access::ReadOnly);
}
catch (...) {
std::cout << me
<< " caught exception trying to get a device view"
<< " while holding a local view " << std::endl;
threw = true;
}
ierr += (threw == shouldThrow) ? 0 : 1;
Expand All @@ -133,9 +124,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL( MultiVector, TeuchosArray, LO, GO, Scalar , N
auto dataDevice = defaultVec.getLocalViewDevice(Tpetra::Access::ReadOnly);
}
catch (...) {
std::cout << me
<< " caught exception trying to get a device view"
<< " while holding a local view " << std::endl;
threw = true;
}
ierr += (threw == shouldThrow) ? 0 : 1;
Expand Down Expand Up @@ -263,7 +251,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL( MultiVector, HostDeviceView, LO, GO, Scalar ,
try {
auto data_old = defaultVec.getLocalViewDevice(Tpetra::Access::ReadOnly);
} catch (...) {
std::cout << me << " caught exception trying to get a device view while holding a local view" << std::endl;
threw = true;
}

Expand Down Expand Up @@ -307,7 +294,6 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL( MultiVector, DeviceHostView, LO, GO, Scalar ,
try {
auto data_old = defaultVec.getLocalViewHost(Tpetra::Access::ReadOnly);
} catch (...) {
std::cout << me << " caught exception trying to get a local view while holding a device view" << std::endl;
threw = true;
}

Expand Down