Skip to content

Commit

Permalink
Merge pull request #2939 from STEllAR-GROUP/reporting_set_affinity_pr…
Browse files Browse the repository at this point in the history
…oblems

Making error reporting during problems with setting affinity masks more verbose
  • Loading branch information
hkaiser committed Oct 10, 2017
2 parents 5acf3d8 + 0573ee9 commit d0fb5d3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/runtime/threads/policies/hwloc_topology_info.cpp
Expand Up @@ -395,9 +395,7 @@ namespace hpx { namespace threads
"failed to set thread affinity mask ("
HPX_CPU_MASK_PREFIX "%x) for cpuset %s",
mask, buffer.get()));

if (ec)
return;
return;
}
}
}
Expand Down
14 changes: 13 additions & 1 deletion src/runtime_impl.cpp
Expand Up @@ -700,9 +700,21 @@ namespace hpx {
// --hpx:bind=none should disable all affinity definitions
if (threads::any(used_processing_units))
{
error_code ec;

this->topology_.set_thread_affinity_mask(
this->topology_.get_service_affinity_mask(
used_processing_units));
used_processing_units), ec);

if (ec)
{
HPX_THROW_EXCEPTION(kernel_error
, "runtime_impl::init_tss_ex"
, hpx::util::format(
"failed to set thread affinity mask ("
HPX_CPU_MASK_PREFIX "%x) for service thread: %s",
used_processing_units, runtime::thread_name_.get()));
}
}
#endif
}
Expand Down

0 comments on commit d0fb5d3

Please sign in to comment.