Skip to main content

OpenMP Thread Counter

https://img.shields.io/pypi/v/omp-thread-count.svg https://img.shields.io/travis/rolando/omp-thread-count.svg Documentation Status

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.

Metadata

Release files for omp-thread-count 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for omp-thread-count 0.2.1
File Size Uploaded Provenance Actions
omp-thread-count-0.2.1.tar.gz 27.2 kB Without provenance Details for omp-thread-count-0.2.1.tar.gz

Release files / omp-thread-count-0.2.1.tar.gz

Download URL omp-thread-count-0.2.1.tar.gz
Size 27.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9f8e228196d9ba0d955aebaaa3e441c82b437a3f21634aff8379a7ed6e903987
BLAKE2b-256 checksum
How to use checksums
ec38a675d9f8f45c661b4d051ea9b22aea223cca0b9adc717742eacb8aa1caa1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for omp-thread-count 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page