Skip to content

Run on lambda #93

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ Release notes
* Updated the msgpack dependency (by :user:`Jerome Kelleher <jeromekelleher>`;
:issue:`74`, :issue:`75`).

* Allow :class:`Blosc` compressor to run on systems where locks are not present (by
:user:`Marcus Kinsella <mckinsel>`; :issue:`#83`).
* Allow :class:`Blosc` compressor to run on systems where locks are not present (by
:user:`Marcus Kinsella <mckinsel>`, :issue:`83`; and :user:`Tom White <tomwhite>`,
:issue:`93`).

* Drop Python 3.4 (by :user:`John Kirkham <jakirkham>`; :issue:`89`).

Expand Down Expand Up @@ -61,7 +62,7 @@ Release notes

* Add support for encoding None values in VLen... codecs (:issue:`59`).


.. _release_0.5.1:

0.5.1
Expand Down
5 changes: 4 additions & 1 deletion numcodecs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@
from numcodecs.blosc import Blosc
register_codec(Blosc)
# initialize blosc
ncores = multiprocessing.cpu_count()
try:
ncores = multiprocessing.cpu_count()
except OSError:
ncores = 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding for reference: We need a # pragma: no cover for this block below since we don't have a way to test it really. PR ( #96 ) addresses that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, didn't know about that. Thanks for reporting and fixing it @jakirkham!

blosc.init()
blosc.set_nthreads(min(8, ncores))
atexit.register(blosc.destroy)
Expand Down