From c73bb0506ab6bdfd5b25235a5b1551718ad5746a Mon Sep 17 00:00:00 2001 From: darionyaphet Date: Tue, 23 Mar 2021 11:14:27 +0800 Subject: [PATCH] threads parameter should be a positive number --- plato/graph/base.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plato/graph/base.hpp b/plato/graph/base.hpp index 4ac5edc5..67e1015d 100644 --- a/plato/graph/base.hpp +++ b/plato/graph/base.hpp @@ -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);