Skip to content

Commit

Permalink
Merge pull request #1758 from STEllAR-GROUP/fixing_1757
Browse files Browse the repository at this point in the history
Fixing #1757
  • Loading branch information
hkaiser committed Sep 23, 2015
2 parents 45a676d + 0f71979 commit fba0a4a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/hpx_init.cpp
Expand Up @@ -585,7 +585,7 @@ namespace hpx

std::size_t get_pu_offset(util::command_line_handling const& cfg)
{
std::size_t pu_offset = 0;
std::size_t pu_offset = -1;
#if defined(HPX_HAVE_HWLOC)
if (cfg.pu_offset_ != 0) {
pu_offset = cfg.pu_offset_;
Expand Down
6 changes: 3 additions & 3 deletions src/runtime/threads/policies/parse_affinity_options.cpp
Expand Up @@ -573,7 +573,7 @@ namespace hpx { namespace threads { namespace detail
std::vector<std::size_t>& num_pus, error_code& ec)
{
std::size_t num_threads = affinities.size();
std::size_t num_cores = max_cores % (t.get_number_of_cores()+1);
std::size_t num_cores = (std::min)(max_cores, t.get_number_of_cores());
num_pus.resize(num_threads);

for (std::size_t num_thread = 0; num_thread != num_threads; /**/)
Expand Down Expand Up @@ -608,7 +608,7 @@ namespace hpx { namespace threads { namespace detail
std::vector<std::size_t>& num_pus, error_code& ec)
{
std::size_t num_threads = affinities.size();
std::size_t num_cores = max_cores % (t.get_number_of_cores()+1);
std::size_t num_cores = (std::min)(max_cores, t.get_number_of_cores());

std::vector<std::size_t> num_pus_cores(num_cores, 0);
num_pus.resize(num_threads);
Expand Down Expand Up @@ -642,7 +642,7 @@ namespace hpx { namespace threads { namespace detail
std::vector<std::size_t>& num_pus, error_code& ec)
{
std::size_t num_threads = affinities.size();
std::size_t num_cores = max_cores % (t.get_number_of_cores()+1);
std::size_t num_cores = (std::min)(max_cores, t.get_number_of_cores());

std::vector<std::size_t> num_pus_cores(num_cores, 0);
num_pus.resize(num_threads);
Expand Down

0 comments on commit fba0a4a

Please sign in to comment.