Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BandedMatrices Nightly CI failure on Windows with 'could not load library "libblastrampoline"' #981

Closed
jishnub opened this issue Jan 27, 2023 · 4 comments · Fixed by JuliaLang/julia#48435

Comments

@jishnub
Copy link
Collaborator

jishnub commented Jan 27, 2023

The run: https://github.com/JuliaLinearAlgebra/BandedMatrices.jl/actions/runs/4024201852/jobs/6915956298#step:21:120141
Error message:

Test threw exception
  Expression: Matrix(A * B)  Matrix(A) * Matrix(B)
  could not load library "libblastrampoline"
  The specified module could not be found. 
  Stacktrace:
    [1] gbmv!(trans::Char, m::Int64, n::Int64, kl::Int64, ku::Int64, alpha::Float64, A::Ptr{Float64}, st::Int64, x::Ptr{Float64}, incx::Int64, beta::Float64, y::Ptr{Float64}, incy::Int64)
      @ BandedMatrices D:\a\BandedMatrices.jl\BandedMatrices.jl\src\blas.jl:19
    [2] A11_Btop_Ctop_gbmv!
      @ D:\a\BandedMatrices.jl\BandedMatrices.jl\src\banded\gbmm.jl:39 [inlined]
    [3] _gbmm!::Float64, A_data::Matrix{Float64}, B_data::Matrix{Float64}, β::Float64, C_data::SubArray{Float64, 2, Matrix{Float64}, Tuple{UnitRange{Int64}, Base.Slice{Base.OneTo{Int64}}}, false}, ::Tuple{Int64, Int64, Int64}, ::Tuple{Int64, Int64}, ::Tuple{Int64, Int64}, ::Tuple{Int64, Int64})
      @ BandedMatrices D:\a\BandedMatrices.jl\BandedMatrices.jl\src\banded\gbmm.jl:305
    [4] gbmm!(tA::Char, tB::Char, α::Float64, A::BandedMatrix{Float64, Matrix{Float64}, Base.OneTo{Int64}}, B::BandedMatrix{Float64, Matrix{Float64}, Base.OneTo{Int64}}, β::Float64, C::BandedMatrix{Float64, Matrix{Float64}, Base.OneTo{Int64}})
      @ BandedMatrices D:\a\BandedMatrices.jl\BandedMatrices.jl\src\banded\gbmm.jl:288
    [5] _banded_muladd!
      @ D:\a\BandedMatrices.jl\BandedMatrices.jl\src\generic\matmul.jl:196 [inlined]
    [6] materialize!
      @ D:\a\BandedMatrices.jl\BandedMatrices.jl\src\generic\matmul.jl:204 [inlined]
    [7] muladd!
      @ C:\Users\runneradmin\.julia\packages\ArrayLayouts\4IG3b\src\muladd.jl:70 [inlined]
    [8] copyto!
      @ C:\Users\runneradmin\.julia\packages\ArrayLayouts\4IG3b\src\muladd.jl:77 [inlined]
    [9] copy(M::ArrayLayouts.MulAdd{BandedMatrices.BandedColumns{ArrayLayouts.DenseColumnMajor}, BandedMatrices.BandedColumns{ArrayLayouts.DenseColumnMajor}, ArrayLayouts.ZerosLayout, Float64, BandedMatrix{Float64, Matrix{Float64}, Base.OneTo{Int64}}, BandedMatrix{Float64, Matrix{Float64}, Base.OneTo{Int64}}, Zeros{Float64, 2, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}})
      @ ArrayLayouts C:\Users\runneradmin\.julia\packages\ArrayLayouts\4IG3b\src\muladd.jl:72
   [10] copy
      @ C:\Users\runneradmin\.julia\packages\ArrayLayouts\4IG3b\src\mul.jl:119 [inlined]
   [11] materialize
      @ C:\Users\runneradmin\.julia\packages\ArrayLayouts\4IG3b\src\mul.jl:116 [inlined]
   [12] mul
      @ C:\Users\runneradmin\.julia\packages\ArrayLayouts\4IG3b\src\mul.jl:117 [inlined]
   [13] *
      @ C:\Users\runneradmin\.julia\packages\ArrayLayouts\4IG3b\src\mul.jl:204 [inlined]
   [14] macro expansion
      @ C:\hostedtoolcache\windows\julia\nightly\x64\share\julia\stdlib\v1.10\Test\src\Test.jl:477 [inlined]
   [15] macro expansion
      @ D:\a\BandedMatrices.jl\BandedMatrices.jl\test\test_banded.jl:153 [inlined]
   [16] macro expansion
      @ C:\hostedtoolcache\windows\julia\nightly\x64\share\julia\stdlib\v1.10\Test\src\Test.jl:1502 [inlined]
   [17] macro expansion
      @ D:\a\BandedMatrices.jl\BandedMatrices.jl\test\test_banded.jl:149 [inlined]
   [18] macro expansion
      @ C:\hostedtoolcache\windows\julia\nightly\x64\share\julia\stdlib\v1.10\Test\src\Test.jl:1502 [inlined]
   [19] top-level scope
      @ D:\a\BandedMatrices.jl\BandedMatrices.jl\test\test_banded.jl:30

There are many other similar errors.

The package uses Base.libblas_name to get the BLAS library. Tests are passing on other configurations (nightly on linux/max os) and on all platforms for v1.8.5 and v1.6.

Version info:

Julia Version 1.10.0-DEV.443
Commit bd8ffef2b9 (2023-01-27 05:51 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 2 × Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, haswell)
  Threads: 1 on 2 virtual cores
@giordano
Copy link
Contributor

https://github.com/JuliaLang/julia/blob/87f8958a218215df0aaffab59736c30eb6f51d2e/base/Base.jl#L190-L191

should be something like

const libblas_name = "libblastrampoline" * (Sys.iswindows() ? "-5" : "")

@giordano
Copy link
Contributor

Ideally we'd get the name from https://github.com/JuliaLang/julia/blob/87f8958a218215df0aaffab59736c30eb6f51d2e/stdlib/libblastrampoline_jll/src/libblastrampoline_jll.jl#L21-L27 but we can't reference JLLs from Base. An alternative would be devising an automated way to generate the name, without having to remember to keep it in sync.

@gbaraldi
Copy link
Member

This slipped through the cracks in my PR sorry :(.

@jishnub
Copy link
Collaborator Author

jishnub commented May 16, 2023

This seems to be happening on v1.9.0 as well, so perhaps this needs to be backported?

Sorry, it seems to have been hardcoded in the package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants