[pythran] %matplotlib instruction crashes pythran.magic

  • From: Pierre Navaro <pierre.navaro@xxxxxxxxxxxxxxx>
  • To: "pythran@xxxxxxxxxxxxx" <pythran@xxxxxxxxxxxxx>
  • Date: Fri, 25 Oct 2019 10:25:18 +0200

Dear Pythran users

I use pythran.magic in a notebook and strangely if run a cell before with 
%matplotlib
It crashes the kernel when i run the %%pythran cell. 
Without %matplotlib it works well. Do you have an idea where it comes from ?


$ ipython
Python 3.7.4 (default, Sep  7 2019, 18:27:02)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.8.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: %matplotlib
Using matplotlib backend: MacOSX

In [2]: %load_ext pythran.magic

In [3]: %%pythran
   ...:
   ...: import numpy as np
   ...:
   ...: #pythran export test_pythran(float64[], float64[])
   ...: def test_pythran(x, y):
   ...:     """
   ...:     returns Julia set
   ...:     """
   ...:     z = np.zeros((x.size, y.size), dtype=np.float64)
   ...:
   ...:     #omp parallel for private(z)
   ...:     for j in range(y.size):
   ...:         for i in range(x.size):
   ...:             z[j,i] = x[i] + y[j]
   ...:
   ...:     return z
   ...:
Python(17886,0x10d79ad40) malloc: *** error for object 0x121a47b80: pointer 
being freed was not allocated
Python(17886,0x10d79ad40) malloc: *** set a breakpoint in malloc_error_break 
to debug
Abort trap: 6


Pierre Navaro
Ingénieur CNRS en calcul scientifique
IRMAR, Campus de Beaulieu, bâtiment 22, bureau 112
263 avenue du Général Leclerc, CS 74205
35042  RENNES Cedex
0223234308
https://osm.org/go/eri2d0PNY




Other related posts: