Using the plot function pylab it raises a segmentation fault on freebsd 12.2-release This is the example: >>> from matplotlib import pylab as pl >>> import numpy as np >>> x = np.arange(-10,10,0.1) >>> y = np.sin(0.2*x) >>> pl.plot(x,y) Segmentation fault I tested this in freebsd and pcbsd and the same error is obtained
Sorry I mean freebsd 10.2-release
@Trago, if you could include a backtrace of the .core file using gdb (bt), that might prove helpful.
Here using FreeBSD 10.3-BETA3 #7 r296154 the curve is plotted as excpected. The numpy options are as below: # Options for py27-numpy-1.9.2,1 _OPTIONS_READ=py27-numpy-1.9.2,1 _FILE_COMPLETE_OPTIONS_LIST=DOCS SUITESPARSE TESTS ATLAS NETLIB OPENBLAS OPTIONS_FILE_UNSET+=DOCS OPTIONS_FILE_SET+=SUITESPARSE OPTIONS_FILE_UNSET+=TESTS OPTIONS_FILE_UNSET+=ATLAS OPTIONS_FILE_SET+=NETLIB OPTIONS_FILE_UNSET+=OPENBLAS Others should be as default. I hope it helps to narrow down the problem. Kind regards, Christoph
(In reply to Kubilay Kocak from comment #2) >>> x = np.arange(-10,10,0.1) >>> y = np.sin(0.2*x) >>> pl.plot(x,y) Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 801c06400 (LWP 100748/python2.7)] 0x0000000806bd8690 in dgemm_beta () from /usr/local/lib/libopenblasp.so (gdb) bt #0 0x0000000806bd8690 in dgemm_beta () from /usr/local/lib/libopenblasp.so #1 0x00000008069bcb2e in dgemm_nn () from /usr/local/lib/libopenblasp.so #2 0x0000000000000000 in ?? () This is what I obtain using backtrace in gdb. I seems it has some thing with the openblas library
(In reply to Trago from comment #4) Please see for also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203638. It might be related to the problem discussed here.
(In reply to c.brinkhaus from comment #5) Yes, thank you but I don't think so. The problem in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203638 is a link problem, the symbol cblas_sgemm is not found so the library can't be loaded. Here, the library is loaded correctly, no link problem exists. The problem here is a segmentation fault in the loaded library.
Hi guys, I don't know what exactly is the problem but it seems that some of the openblas port options is causing the segmentation fault of the example given here. I compiled openblas from ports with the following options [ ] AVX [X] AVX2 [X] DYNAMIC_ARCH [X] INTERFACE64 [X] OPENMP Using this compiled library it raises the segmentation fault shown. But now, I deinstalled the port and installed the binary package using % pkg install openblas With the pkg binary, the example given here works without any problem. Therefore, one of the compilation options I gave above is giving problems. Which one? I don't know. Regards
Does your CPU support AVX2?
(In reply to mainland from comment #8) That is a very good question. I really don't know. How can I check that?
(In reply to mainland from comment #8) Just in case, I recompiled openblas with the following options [ ] AVX [ ] AVX2 [ ] DYNAMIC_ARCH [X] INTERFACE64 [ ] OPENMP Still the same segmentation fault problem
Then turn off INTERFACE64... The only default option is DYNAMIC_ARCH. This appears to be a problem with the openblas and/or numpy port, not matplotlib.
Please excuse my curiosity, but has py27-numpy worked with openblas in a period between November 2015 and now?
(In reply to mainland from comment #11) Yes, that option is the problem. I recompiled with the following options and works perfectly [ ] AVX [X] AVX2 [ ] DYNAMIC_ARCH [ ] INTERFACE64 [ ] OPENMP And yes, I agree with you. It seems is a problem with the openblas and numpy when using the option INTERFACE64. Thanks
c.brinkhaus, yes it has. But apparently not when the INTERFACE64 option is enabled.