Skip to content

blosc.set_nthreads() not working #246

@ali-arbabian

Description

@ali-arbabian

Hi all,
Having an issue where blosc.set_nthreads() and blosc.set_releasegil() are not actually changing the arguments inside the blosc package.
I'm checking blosc.nthreads and it stays at 8 despite the blosc.n_threads() call. I've also tried moving these lines to the top of my first entry script, still no luck.

Steps to reproduce:

import blosc   
blosc.set_nthreads(12)
blosc.set_releasegil(True)
print(blosc.print_versions())
print("nthreads: ", blosc.nthreads)

Output:

python-blosc version: 1.10.2
Blosc version: 1.21.0 ($Date:: 2020-12-22 #$)
Compressors available: ['blosclz', 'lz4', 'lz4hc', 'zlib', 'zstd']
Compressor library versions:
  BloscLZ: 2.3.0
  LZ4: 1.9.3
  Zlib: 1.2.8
  Zstd: 1.4.8
Python version: 3.7.3 (default, Mar 27 2019, 22:11:17) 
[GCC 7.3.0]
Platform: Linux-4.15.0-91-generic-x86_64 (#92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020)
Linux dist: Ubuntu 18.04.4 LTS
Processor: x86_64
Byte-ordering: little
Detected cores: 80
Number of threads to use by default: 8
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
None
nthreads:  8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions