Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

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

Project Description

OpenMP Thread Counter

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

Why

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

Installation

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

Usage

Importing from python code:

import omp_thread_count

n_threads = omp_thread_count.get_thread_count()

Importing from cython code:

from omp_thread_count._omp cimport get_thread_count

Use omp_thread_count.get_includes() in your extensions’ include_dirs to use the header files.

Credits

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

History

0.2.1 (2016-06-21)

  • Improved packaging and CI support.
  • Simplified cython code.
  • Fixed support for python 3.5.

0.2.0 (2016-06-19)

  • Added pxd files for third-party cimports.

0.1.0 (2016-06-18)

  • First release on PyPI.
Release History

Release History

This version
History Node

0.2.1

History Node

0.2.0

History Node

0.1.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
omp-thread-count-0.2.1.tar.gz (27.2 kB) Copy SHA256 Checksum SHA256 Source Jun 21, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting