diff --git a/include/graphblas/nonblocking/init.hpp b/include/graphblas/nonblocking/init.hpp index e01b17e70..f53ad0fb1 100644 --- a/include/graphblas/nonblocking/init.hpp +++ b/include/graphblas/nonblocking/init.hpp @@ -28,6 +28,7 @@ #ifndef _H_GRB_NONBLOCKING_INIT #define _H_GRB_NONBLOCKING_INIT +#include #include #include @@ -134,7 +135,7 @@ namespace grb { * The maximum number of threads available in the system. */ static size_t numThreads() { - return num_threads; + return omp_get_max_threads(); } }; diff --git a/src/graphblas/nonblocking/init.cpp b/src/graphblas/nonblocking/init.cpp index b2f786983..c9957fc2a 100644 --- a/src/graphblas/nonblocking/init.cpp +++ b/src/graphblas/nonblocking/init.cpp @@ -38,7 +38,7 @@ bool grb::internal::NONBLOCKING::warn_if_not_native = true; bool grb::internal::NONBLOCKING::manual_tile_size = false; size_t grb::internal::NONBLOCKING::manual_fixed_tile_size = grb::config::ANALYTIC_MODEL::MIN_TILE_SIZE; -size_t grb::internal::NONBLOCKING::num_threads = grb::config::OMP::threads(); +size_t grb::internal::NONBLOCKING::num_threads; // = grb::config::OMP::threads(); template<> grb::RC grb::init< grb::nonblocking >(