Skip to content

Commit

Permalink
Fix a couple of examples that failed to compile after recent api changes
Browse files Browse the repository at this point in the history
  • Loading branch information
biddisco committed Sep 24, 2016
1 parent f1c63ce commit beebc93
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions examples/1d_stencil/1d_stencil_4_repart.cpp
Expand Up @@ -57,9 +57,9 @@ void setup_counters() {
// We need to explicitly start all counters before we can use them. For
// certain counters this could be a no-op, in which case start will return
// 'false'.
performance_counter::start(id);
performance_counter::start(hpx::launch::sync, id);
std::cout << "Counter " << counter_name << " initialized " << id << std::endl;
counter_value value = performance_counter::get_value(id);
counter_value value = performance_counter::get_value(hpx::launch::sync, id);
std::cout << "Counter value " << value.get_value<std::int64_t>() << std::endl;
counter_id = id;
end_iteration_event = apex::register_custom_event("Repartition");
Expand All @@ -80,7 +80,7 @@ double get_counter_value() {
return false;
}
try {
counter_value value1 = performance_counter::get_value(counter_id, true);
counter_value value1 = performance_counter::get_value(hpx::launch::sync, counter_id, true);
std::int64_t counter_value = value1.get_value<std::int64_t>();
std::cerr << "counter_value " << counter_value << std::endl;
return (double)(counter_value);
Expand Down
6 changes: 3 additions & 3 deletions examples/1d_stencil/1d_stencil_4_throttle.cpp
Expand Up @@ -60,9 +60,9 @@ void setup_counters() {
// We need to explicitly start all counters before we can use them. For
// certain counters this could be a no-op, in which case start will return
// 'false'.
performance_counter::start(id);
performance_counter::start(hpx::launch::sync, id);
std::cout << "Counters initialized! " << id << std::endl;
counter_value value = performance_counter::get_value(id);
counter_value value = performance_counter::get_value(hpx::launch::sync, id);
std::cout << "Active threads " << value.get_value<int>() << std::endl;
counter_id = id;
}
Expand All @@ -77,7 +77,7 @@ void setup_counters() {
bool test_function(apex_context const& context) {
if (!counters_initialized) return false;
try {
counter_value value1 = performance_counter::get_value(counter_id);
counter_value value1 = performance_counter::get_value(hpx::launch::sync, counter_id);
apex::sample_value("thread_queue_length", value1.get_value<int>());
return APEX_NOERROR;
}
Expand Down
6 changes: 3 additions & 3 deletions examples/apex/apex_policy_engine_active_thread_count.cpp
Expand Up @@ -79,9 +79,9 @@ void setup_counters() {
// We need to explicitly start all counters before we can use them. For
// certain counters this could be a no-op, in which case start will
// return 'false'.
performance_counter::start(id);
performance_counter::start(hpx::launch::sync, id);
std::cout << "Counters initialized! " << id << std::endl;
counter_value value = performance_counter::get_value(id);
counter_value value = performance_counter::get_value(hpx::launch::sync, id);
std::cout << "Active threads " << value.get_value<int>() << std::endl;
counter_id = id;
}
Expand Down Expand Up @@ -117,7 +117,7 @@ bool test_function(apex_context const& context) {
if (!counters_initialized) return false;
try {
//id_type id = get_counter_id();
counter_value value1 = performance_counter::get_value(counter_id);
counter_value value1 = performance_counter::get_value(hpx::launch::sync, counter_id);
if (value1.get_value<int>() % 2 == 1) {
return APEX_NOERROR;
} else {
Expand Down

0 comments on commit beebc93

Please sign in to comment.