In case anyone is curious, I've tracked the problem down to homebrew's 
openBLAS and so it has nothing to do with sage.  If I build numpy from 
source through homebrew then I get exactly the same error using my system 
python3.  I'm wondering if maybe this has something to do with the fact 
that openBLAS is bottled with a different processor type than the one that 
is on my system.  In any case I'll ask over there and see if I can get some 
help.

On Sunday, October 11, 2020 at 10:17:43 PM UTC-4 Zachary Scherr wrote:

> Hi Dima,
>
>    My system-wide numpy is installed via pip.  I was just remarking that I 
> didn't build my system-wide numpy from source so it's not a fair 
> comparison.  It's possible that the issues aren't sage related but are 
> related to building sage's numpy against some homebrew libraries.
>
> On Sunday, October 11, 2020 at 8:11:13 PM UTC-4 dim...@gmail.com wrote:
>
>> On Mon, Oct 12, 2020 at 1:00 AM Zachary Scherr <zsc...@gmail.com> wrote:
>> >
>> > That also crashes with: 86622 segmentation fault ./sage --python
>> >
>> > I tested this both with building sage against homebrew python 3.8.6 and 
>> against sage's default python 3.8.5 and the same error occurred in both 
>> cases. I don't have this problem using my system-wide numpy so it's 
>> possible that because sage numpy is built from source that maybe one of my 
>> homebrew libraries is causing issues. I found 
>> https://github.com/numpy/numpy/issues/11551 which could be relevant and 
>> might indicate that it's not a sage problem.
>>
>> If you are talking about Homebrew's numpy, it should be more or less
>> identical with Sage's numpy (assuming you use Homebrew's openblas in
>> Sage)
>> cf. 
>> https://github.com/Homebrew/homebrew-core/blob/master/Formula/numpy.rb
>>
>> >
>> > I should also add that if I lower the dimension of x to 100000 then it 
>> works without problem.
>> >
>> > On Sunday, October 11, 2020 at 3:26:11 PM UTC-4 dim...@gmail.com wrote:
>> >>
>> >> On Sun, Oct 11, 2020 at 8:14 PM Zachary Scherr <zsc...@gmail.com> 
>> wrote:
>> >> >
>> >> > Hi All,
>> >> >
>> >> > I was doing some bug hunting and noticed that scipy's pytests 
>> crashed pretty early. I tracked down exactly what was causing the problem 
>> and noticed it can be reproduced by the following sequence of commands:
>> >> >
>> >> > sage: import numpy as np
>> >> > sage: x = np.random.randn(1000000,2)
>> >> > sage: y = np.random.randn(2,2)
>> >> > sage: x.dot(y)
>> >>
>> >> please test this in "plain" Sage python, i.e. does
>> >>
>> >> ./sage --python
>> >>
>> >> >>> import numpy as np
>> >> >>> x = np.random.randn(1000000,2)
>> >> >>> y = np.random.randn(2,2)
>> >> >>> x.dot(y)
>> >>
>> >> reproduce the crash?
>> >>
>> >>
>> >>
>> >> >
>> >> > produces:
>> >> >
>> >> > 
>> ------------------------------------------------------------------------
>> >> > 0 signals.cpython-38-darwin.so 0x00000001088bc62a print_backtrace + 
>> 58
>> >> > 1 signals.cpython-38-darwin.so 0x00000001088c0277 sigdie + 39
>> >> > 2 signals.cpython-38-darwin.so 0x00000001088c0212 sigdie_for_sig + 
>> 290
>> >> > 3 libsystem_platform.dylib 0x00007fff6c88e5fd _sigtramp + 29
>> >> > 
>> ------------------------------------------------------------------------
>> >> > Unhandled SIGBUS: A bus error occurred.
>> >> > This probably occurred because a *compiled* module has a bug
>> >> > in it and is not properly wrapped with sig_on(), sig_off().
>> >> > Python will now terminate.
>> >> > 
>> ------------------------------------------------------------------------
>> >> > /Users/zscherr/sage/src/bin/sage-python: line 2: 78812 Bus error: 10 
>> sage -python "$@"
>> >> >
>> >> > I haven't tested on any other platforms, but for what it's worth I 
>> have Catalina 10.15.7 with Xcode 12.
>> >> >
>> >> > Thanks,
>> >> > Zach
>> >> >
>> >> > --
>> >> > You received this message because you are subscribed to the Google 
>> Groups "sage-devel" group.
>> >> > To unsubscribe from this group and stop receiving emails from it, 
>> send an email to sage-devel+...@googlegroups.com.
>> >> > To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sage-devel/28f58136-d3c7-40b7-9a46-36fc347acc2en%40googlegroups.com
>> .
>> >
>> > --
>> > You received this message because you are subscribed to the Google 
>> Groups "sage-devel" group.
>> > To unsubscribe from this group and stop receiving emails from it, send 
>> an email to sage-devel+...@googlegroups.com.
>> > To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sage-devel/a67ca4b5-526b-40d7-a476-520d49890207n%40googlegroups.com
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/7ba7ef07-8460-4180-8670-397e1fb6df93n%40googlegroups.com.

Reply via email to