Skip to content

[1.7.0-b4] segfault on m1 #866

Closed
Closed
@mryodo

Description

Hi!
Sorry for that if it is my fault, but I'm getting a segfault on the clean install of 1.7.0-b4 on m1 mac with the eig for the simplest matrices. mwe:

julia> using LinearAlgebra;

julia> A=rand(10, 10);

julia> eigen(A)

signal (11): Segmentation fault: 11
in expression starting at REPL[3]:1
.Ldgemm_tcopy_L8_M8_20 at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libopenblas64_.dylib (unknown line)
Allocations: 1721957 (Pool: 1721200; Big: 757); GC: 2

Version info:

Julia Version 1.7.0-beta4
Commit d0c90f37ba (2021-08-24 12:35 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin20.5.0)
  CPU: Apple M1
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, cyclone)

have a suspicion that something happened upon the transition from macOS 12b5 to b6.
Sorry if this is a waste of time!

Activity

jeremiahpslewis

jeremiahpslewis commented on Sep 9, 2021

@jeremiahpslewis

I can confirm that it segfaults on my machine with the same setup.

Julia Version 1.7.0-beta4
Commit d0c90f37ba (2021-08-24 12:35 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin20.5.0)
  CPU: Apple M1
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, cyclone)
mryodo

mryodo commented on Sep 16, 2021

@mryodo
Author

the issue is still preset in v1.7.0-rc1's binary
probably should close in favour of JuliaLang/julia#42184

mryodo

mryodo commented on Sep 17, 2021

@mryodo
Author

okay, so JuliaLang/julia#42293 by @jeremiahpslewis (kudos) fixes the build problem with julia on cmake12
unfortunately, OpenBLAS problem is still present even after build; one maybe wants to pull from OpenMathLib/OpenBLAS#3383 (apparently I am not able to figure out how)

reopened this on Sep 17, 2021
domschl

domschl commented on Sep 17, 2021

@domschl

Ideally Julia shouldn't use OpenBLAS on Apple M1. By using Apple's proprietary BLAS implementation (via Accelerate), a speed-up of 2x - 4x can be observed, since Apple's implementation uses their undocumented matrix multiplier hardware.
That will probably not be possible to achieve via OpenBLAS in the foreseeable future...

jeremiahpslewis

jeremiahpslewis commented on Sep 17, 2021

@jeremiahpslewis

@domschl This is super interesting, but probably worth opening a new issue on?

KristofferC

KristofferC commented on Sep 17, 2021

@KristofferC
SponsorMember
mryodo

mryodo commented on Sep 19, 2021

@mryodo
Author

Ideally Julia shouldn't use OpenBLAS on Apple M1

Julia can easily change the BLAS used (on 1.7+) see https://github.com/staticfloat/libblastrampoline and https://discourse.julialang.org/t/does-mac-m1-in-multithreads-is-slower-that-in-single-thread/61114/12?u=kristoffer.carlsson

Thanks, it's quite an interesting discussion...
Although the need for the wrapper for the simple * imply that it would be hard to push this through out all the packages, no?
If so, it seems like some kind of a at least temporary workaround for openblas is still a good idea?

domschl

domschl commented on Sep 19, 2021

@domschl

I made a new issue #869 for Apple M1 BLAS HW-acceleration discussions as suggested so that the discussion can continue there...

added
system:apple siliconAffects Apple Silicon only (Darwin/ARM64) - e.g. M1 and other M-series chips
on Sep 19, 2021
mryodo

mryodo commented on Sep 22, 2021

@mryodo
Author

Okay, let me close this one: the segfault is gone in macos12-beta7 (guess, they did it again, ***) on the latest dev version.

If somebody still has the same problem, feel free to comment here (also, even before temporary workaround through LBT were working sort of fine)

Have a nice day, check the discussion above!

2 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    system:apple siliconAffects Apple Silicon only (Darwin/ARM64) - e.g. M1 and other M-series chips

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      [1.7.0-b4] segfault on m1 · Issue #866 · JuliaLang/LinearAlgebra.jl