Skip to content

Commit

Permalink
Tpetra: Updating output text
Browse files Browse the repository at this point in the history
  • Loading branch information
csiefer2 committed Sep 11, 2023
1 parent 2924a6e commit 1f0212e
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ namespace Details {
std::string device_label("(");
{
using namespace Kokkos::Tools::Experimental;

ExecutionSpaceIdentifier eid = identifier_from_devid(deviceId);
if (eid.type == DeviceType::Serial) device_label+="Serial";
else if (eid.type == DeviceType::OpenMP) device_label+="OpenMP";
Expand All @@ -163,7 +164,12 @@ namespace Details {
else if (eid.type == DeviceType::Unknown) device_label+="Unknown";
else device_label+="Unknown to Tpetra";

device_label += " " + std::to_string(eid.instance_id) + ")";
if(eid.instance_id == Impl::int_for_synchronization_reason(SpecialSynchronizationCases::GlobalDeviceSynchronization))
device_label += " All Instances)";
else if(eid.instance_id == Impl::int_for_synchronization_reason(SpecialSynchronizationCases::DeepCopyResourceSynchronization))
device_label += " DeepCopyResource)";
else
device_label += " Instance " + std::to_string(eid.instance_id) + ")";
}

timer_ = Teuchos::TimeMonitor::getNewTimer(std::string("Kokkos::fence ")+name + " " + device_label);
Expand Down

0 comments on commit 1f0212e

Please sign in to comment.