[pythran] Re: Pythran 0.7.4 is out!

  • From: Leopold Haimberger <leopold.haimberger@xxxxxxxxxxxx>
  • To: pythran@xxxxxxxxxxxxx
  • Date: Fri, 8 Jan 2016 16:21:08 +0100

Dear Serge,

I have installed pythran 0.74 using conda, however I get the following error:

pythran x.py
/home/opt/anaconda/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.9.1/cc1plus: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /home/opt/anaconda/libexec/gcc/x86_64-unknown-linux-gnu/4.9.1/../../../../lib/libgmp.so.10)
/home/opt/anaconda/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.9.1/cc1plus: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /home/opt/anaconda/libexec/gcc/x86_64-unknown-linux-gnu/4.9.1/../../../../lib/libgmp.so.10)
CRITICAL Cover me Jack. Jack? Jaaaaack!!!!
E: ('error: Command "/opt/anaconda/bin/g++-4.9 -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DUSE_GMP -DENABLE_PYTHON_MODULE -I/opt/anaconda/include -I/opt/anaconda/lib/python2.7/site-packages/pythran -I/opt/anaconda/lib/python2.7/site-packages/numpy/core/include -I/opt/anaconda/include/python2.7 -c /tmp/tmpRx_VQG.cpp -o /tmp/tmpKS_cYv/tmp/tmpRx_VQG.o -std=c++11 -fno-math-errno -w" failed with exit status 1',)

I am using CentOS 6.7. You will make many CentOS 6.x users out there happy if you add packages that are compatible with GLIBC_2.12.
Of course I could try to build libgmp on my machine but before I do that I though I let you know.

Kind regards,

Leo Haimberger

Am 07.01.2016 um 20:51 schrieb serge guelton:

(sorry for the double posting, if any)

Dear pythraners and pythonists,

The pythran team (a great total of 2 active developers) is delighted to
announce the release of Pythran 0.7.4, available on the traditional
channels:

- pypi: https://pypi.python.org/pypi/pythran
- conda: https://anaconda.org/serge-sans-paille/pythran
- github: https://github.com/serge-sans-paille/pythran

As usual, here is a (new) code sample, once again adapted from a
stackoverflow question[0] that showcases pythran capability:


#pythran export check_mask(bool[][], bool[])
# ^~~~~~~ non intrusive top-level annotation

import numpy as np
# ^~~~~~ numpy support (partial)
def check_mask(db, out, mask=[1, 0, 1]):
for idx, line in enumerate(db):
target, vector = line[0], line[1:]
# ^~~~~ type destructuring, array view
if (mask == np.bitwise_and(mask, vector)).all():
# ^~~~~~~ optimization of high level construct
if target == 1:
out[idx] = 1
return out


Compiled with:

% pythran check_mask.py

And benchmarked with:

% python -m timeit -s 'n=10e3 ; import numpy as np;db =
np.array(np.random.randint(2, size=(n, 4)), dtype=bool); out =
np.zeros(int(n),dtype=bool); from eq import check_mask' 'check_mask(db, out)'

On average, the CPython version runs in 137 msec while the pythran version run
in 450us on my laptop :-)


Here is an extract of the changelog:

2016-01-05 Serge Guelton <serge.guelton@xxxxxxxxxxxxxxxxxxx>

* IPython's magic for pythran now supports extra compile flags

* Pythran's C++ output is compatible with Python3 and pythran3 can
compile it!

* More syntax checks (and less template traceback)

* Improved UI (multiline pythran exports, better setup.py...)

* Pythonic leaning / bugfixing (this tends to be a permanent item)

* More generic support for numpy's dtype

* Simpler install (no more boost.python deps, nor nt2 configuration)

* Faster compilation (no more boost.python deps, smarter pass manager)

* Better testing (gcc + clang)

Again, thanks a lot to Pierrick for his continuous top-quality work, and
to the OpenDreamKit[1] project that funded (most of) the recent developments!

Special thanks to @hainm, @nbecker, @pkoch, @fsteinmetz, @Suor for their
feedbacks. *You* give us the motivation to go on!


[0]
http://stackoverflow.com/questions/34500913/numba-slower-for-numpy-bitwise-and-on-boolean-arrays
[1] http://opendreamkit.org/

--
Ao. Prof. Dr. Leopold Haimberger
Department of Meteorology and Geophysics
Althanstrasse 14 1090 Wien
AUSTRIA
Tel. +43 1 4277 53712
Mobile: +43 664 260 5378
Fax +43 1 4277 9537
www: http://imgw.univie.ac.at/


Other related posts: