Skip to main content

A small utility to get the actual number of threads used by OpenMP via Cython bindings.

Project description

OpenMP Thread Counter Documentation Status

A small Python module to get the actual number of threads used by OMP via Cython bindings.


Because GCC/Cython always returned 1 when calling openmp.get_thread_num or openmp.get_max_threads.


To install run:

pip install omp-thread-count

In OSX, and possibly other platforms, you may need to specify a compiler with OpenMP support, like this:

CC=gcc-4.8 pip install omp-thread-count


import omp_thread_count

n_threads = omp_thread_count.get_thread_count()


This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.


0.2.0 (2016-06-19)

  • Added pxd files for third-party cimports.

0.1.0 (2016-06-18)

  • First release on PyPI.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

omp-thread-count-0.2.0.tar.gz (63.8 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page