Skip to content

Commit

Permalink
Remove thread_priority_boost for compiling with master
Browse files Browse the repository at this point in the history
Meant for a quick test if compiliation actually works!
  • Loading branch information
G-071 committed Dec 10, 2021
1 parent a50dce5 commit 7ab7227
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
14 changes: 8 additions & 6 deletions src/io/silo_out.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

#include <ctime>
#include <hpx/runtime/threads/run_as_os_thread.hpp>


#include <cerrno>

#include <sys/stat.h>
Expand Down Expand Up @@ -103,7 +105,7 @@ void output_stage1(std::string fname, int cycle) {
for (auto i = node_registry::begin(); i != node_registry::end(); ++i) {
const auto *node_ptr_ = GET(i->second.get_ptr());
if (!node_ptr_->refined()) {
futs_.push_back(hpx::async(hpx::launch::async(hpx::threads::thread_priority_boost), [](node_location loc, node_registry::node_ptr ptr) {
futs_.push_back(hpx::async([](node_location loc, node_registry::node_ptr ptr) {
const auto *this_ptr = ptr.get_ptr().get();
assert(this_ptr);
const real dx = TWO / real(1 << loc.level()) / real(INX);
Expand Down Expand Up @@ -246,7 +248,7 @@ void output_stage3(std::string fname, int cycle, int gn, int gb, int ge) {
DBClose(db);
}, cycle).get();
if (this_id < ge - 1) {
auto f = hpx::async<output_stage3_action>(hpx::launch::async(hpx::threads::thread_priority_boost), localities[this_id + 1], fname, cycle, gn, gb, ge);
auto f = hpx::async<output_stage3_action>(localities[this_id + 1], fname, cycle, gn, gb, ge);

GET(f);
}
Expand Down Expand Up @@ -536,13 +538,13 @@ void output_all(node_server *root_ptr, std::string fname, int cycle, bool block)
start_step = nsteps;
std::vector<hpx::future<void>> futs1;
for (auto &id : localities) {
futs1.push_back(hpx::async<output_stage1_action>(hpx::launch::async(hpx::threads::thread_priority_boost), id, fname, cycle));
futs1.push_back(hpx::async<output_stage1_action>(id, fname, cycle));
}
GET(hpx::when_all(futs1));

std::vector<hpx::future<node_list_t>> id_futs;
for (auto &id : localities) {
id_futs.push_back(hpx::async<output_stage2_action>(hpx::launch::async(hpx::threads::thread_priority_boost), id, fname, cycle));
id_futs.push_back(hpx::async<output_stage2_action>(id, fname, cycle));
}
node_list_.silo_leaves.clear();
node_list_.group_num.clear();
Expand Down Expand Up @@ -575,10 +577,10 @@ void output_all(node_server *root_ptr, std::string fname, int cycle, bool block)
for (int i = 0; i < ng; i++) {
int gb = (i * localities.size()) / ng;
int ge = ((i + 1) * localities.size()) / ng;
futs.push_back(hpx::async < output_stage3_action > (hpx::launch::async(hpx::threads::thread_priority_boost), localities[gb], fname, cycle, i, gb, ge));
futs.push_back(hpx::async < output_stage3_action > (localities[gb], fname, cycle, i, gb, ge));
}

barrier = hpx::async(hpx::launch::async(hpx::threads::thread_priority_boost), [tstart, fname, cycle](std::vector<hpx::future<void>> &&futs) {
barrier = hpx::async([tstart, fname, cycle](std::vector<hpx::future<void>> &&futs) {
for (auto &f : futs) {
GET(f);
}
Expand Down
4 changes: 2 additions & 2 deletions src/node_server_actions_3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ future<void> node_server::nonrefined_step() {

for (integer rk = 0; rk < NRK; ++rk) {

fut = fut.then(hpx::launch::async(hpx::threads::thread_priority_boost),
fut = fut.then(
hpx::util::annotated_function(
[rk, cfl0, this, dt_fut](future<void> f) {
GET(f);
Expand Down Expand Up @@ -622,7 +622,7 @@ future<real> node_server::local_step(integer steps) {
}
}

fut = fut.then(hpx::launch::async(hpx::threads::thread_priority_boost), hpx::util::annotated_function([this, i, steps](future<void> fut) -> real {
fut = fut.then(hpx::util::annotated_function([this, i, steps](future<void> fut) -> real {
GET(fut);
auto time_start = std::chrono::high_resolution_clock::now();
auto next_dt = timestep_driver_descend();
Expand Down

0 comments on commit 7ab7227

Please sign in to comment.