Skip to content

Commit

Permalink
Fix incorrect pool usage masks setup in RP/thread manager
Browse files Browse the repository at this point in the history
  • Loading branch information
biddisco committed Aug 31, 2017
1 parent d374d7c commit 23d9710
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/runtime.cpp
Expand Up @@ -665,8 +665,6 @@ namespace hpx
std::size_t cores_needed =
hpx::resource::get_partitioner().assign_cores(first_core);

// this initializes the used_processing_units_ mask
get_thread_manager().init();
return static_cast<std::uint32_t>(cores_needed);
}

Expand Down
2 changes: 1 addition & 1 deletion src/runtime/threads/detail/thread_pool_base.cpp
Expand Up @@ -95,7 +95,7 @@ namespace hpx { namespace threads { namespace detail
auto const& rp = resource::get_partitioner();
for (std::size_t i = 0; i != pool_threads; ++i)
{
bit_or(used_processing_units_, rp.get_pu_mask(threads_offset + i));
used_processing_units_ |= rp.get_pu_mask(threads_offset + i);
}
}
}}}
Expand Down
3 changes: 3 additions & 0 deletions src/runtime_impl.cpp
Expand Up @@ -170,6 +170,9 @@ namespace hpx {
// now create all threadmanager pools
thread_manager_->create_pools();

// this initializes the used_processing_units_ mask
thread_manager_->init();

// now, launch AGAS and register all nodes, launch all other components
agas_client_.initialize(
parcel_handler_, std::uint64_t(runtime_support_.get()),
Expand Down

0 comments on commit 23d9710

Please sign in to comment.