Skip to content

Commit

Permalink
Fixing problems
Browse files Browse the repository at this point in the history
  • Loading branch information
hkaiser committed Oct 7, 2020
1 parent 0d0f74f commit 8cba94c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions flecsi/execution/test/finite_difference_dense.cc
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ flecsi_register_task(init, flecsi::execution, loc, index);
void
check_results(mesh<ro> mesh, field<ro, ro, ro> values, size_t global_target) {
auto target = flecsi_get_global_object(global_target, global, vec_2d_t);
auto rank = context_t::instance().color();
size_t rank = context_t::instance().color();

for(auto c : mesh.cells(owned)) {
auto v = values(c);
Expand All @@ -115,7 +115,7 @@ check_results(mesh<ro> mesh, field<ro, ro, ro> values, size_t global_target) {
auto t = (*target)[i][j];

if(std::abs(v - t) > test_tolerance) {
printf("[Rank %llu] at [%llu,%llu] %.15e != %.15e\n", rank, i, j, v, t);
printf("[Rank %zu] at [%zu,%zu] %.15e != %.15e\n", rank, i, j, v, t);
throw std::runtime_error("Got wrong result");
}
}
Expand Down
4 changes: 2 additions & 2 deletions flecsi/execution/test/finite_difference_sparse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ check_results(mesh<ro> mesh,
size_t field_idx,
size_t global_target) {
auto target = flecsi_get_global_object(global_target, global, vec_2d_t);
auto rank = context_t::instance().color();
size_t rank = context_t::instance().color();

for(auto c : mesh.cells(owned)) {
auto v = values(c, field_idx);
Expand All @@ -113,7 +113,7 @@ check_results(mesh<ro> mesh,
auto t = (*target)[i][j];

if(std::abs(v - t) > test_tolerance) {
printf("[Rank %llu] at [%llu,%llu] %.15e != %.15e\n", rank, i, j, v, t);
printf("[Rank %zu] at [%zu,%zu] %.15e != %.15e\n", rank, i, j, v, t);
throw std::runtime_error("Got wrong result");
}
}
Expand Down
12 changes: 7 additions & 5 deletions flecsi/topology/hpx/set_storage_policy.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,18 @@ struct hpx_set_topology_storage_policy_u {
void finalize_storage() {
auto & context = execution::context_t::instance();

auto & im = context.local_index_space_data_map();
for(auto & itr : im) {
std::size_t index_space = itr.first;
/*
auto& im = context.local_index_space_data_map();
for(auto& itr : im){
size_t index_space = itr.first;
auto sitr = index_space_map.find(index_space);
clog_assert(sitr != index_space_map.end(), "invalid index space");
auto & is = index_spaces[sitr->second];
execution::context_t::local_index_space_data_t & isd = itr.second;
auto& is = index_spaces[sitr->second];
execution::context_t::local_index_space_data_t& isd = itr.second;
isd.size = is.size();
}
*/
}

template<class T, class... ARG_TYPES>
Expand Down

0 comments on commit 8cba94c

Please sign in to comment.