Skip to content

Commit

Permalink
Merge pull request #147 from darionyaphet/threads
Browse files Browse the repository at this point in the history
Threads parameter should be a positive number
  • Loading branch information
ustcyu authored Mar 24, 2021
2 parents c20eba6 + c73bb05 commit 7bade20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plato/graph/base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ struct cluster_info_t { // user should keep this struct alive during whole proc
}
}

if (0 != FLAGS_threads) {
if (0 < FLAGS_threads) {
threads_ = FLAGS_threads;
} else if (nullptr != std::getenv("OMP_NUM_THREADS")) {
threads_ = (int)std::strtol(std::getenv("OMP_NUM_THREADS"), nullptr, 10);
Expand Down

0 comments on commit 7bade20

Please sign in to comment.