Skip to content

Add tests with reference BLAS and LAPACK#128

Closed
amontoison wants to merge 6 commits into
JuliaLinearAlgebra:mainfrom
amontoison:reference-blas-lapack
Closed

Add tests with reference BLAS and LAPACK#128
amontoison wants to merge 6 commits into
JuliaLinearAlgebra:mainfrom
amontoison:reference-blas-lapack

Conversation

@amontoison

@amontoison amontoison commented Jun 9, 2024

Copy link
Copy Markdown
Member

I have the following tests that are not working:

@testset "Vanilla ReferenceBLAS_jll (ILP64)" begin
    run_all_tests("blas", reverse(ReferenceBLAS_jll.LIBPATH_list), :ILP64, "", tests = [dgemm, sdot])
end

@testset "LBT -> ReferenceBLAS_jll / LAPACK_jll (ILP64)" begin
    libdirs = unique(vcat(lbt_dir, ReferenceBLAS_jll.LIBPATH_list..., LAPACK_jll.LIBPATH_list..., CompilerSupportLibraries_jll.LIBPATH_list...))
    run_all_tests(blastrampoline_link_name(), libdirs, :ILP64, string(ReferenceBLAS_jll.libblas_path, ";", LAPACK_jll.liblapack_path); tests = [dgemm, dpstrf, sgesv, sdot])
end

I commented them.

I suspect that it's because they are already installed.
We should maybe modify the name and soname of the ILP64 libraries of ReferenceBLAS_jll.jl and LAPACK_jll.jl :
libblas.so and liblapack.so -> libblas64.so and liblapack64.so.

@amontoison amontoison requested a review from staticfloat June 9, 2024 02:24
Comment thread test/runtests.jl Outdated

# Test against MKL_jll using `libmkl_rt`, which is :LP64 by default
if MKL_jll.is_available()
if MKL_jll.is_available() && !Sys.iswindows()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you limiting this to non-windows?

@amontoison amontoison Jul 30, 2024

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got an issue with rights ln ibmkl_rt.dll but it seems to be fixed with the latest JLL (2024.2.0).

I still the issue here with buildkit :(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that was the first MKL release where all our known issues got sorted out.

Comment thread test/runtests.jl Outdated
end

@testset "Vanilla ReferenceBLAS_jll (ILP64)" begin
run_all_tests("blas", reverse(ReferenceBLAS_jll.LIBPATH_list), :ILP64, "", tests = [dgemm, sdot])

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the error that you were seeing here? Looking through the CI logs, I don't understand.

Comment thread test/runtests.jl Outdated
@staticfloat staticfloat force-pushed the reference-blas-lapack branch from de61b4d to cccdca2 Compare July 31, 2024 16:43
@staticfloat

Copy link
Copy Markdown
Member

The failure on armv7l is silly; it's because we use Julia v1.7 (the last released version on armv7l) but LAPACK32_jll says it needs Julia v1.9+, presumably because it relies on some newer libblastrampoline versions.

The failures on windows look real however.

@ViralBShah

ViralBShah commented Jun 15, 2025

Copy link
Copy Markdown
Member

The odd thing is that adding ReferenceBLAS tests is failing the regular OpenBLAS tests. So presumably, there is some issues with symbols being messed up.

I wonder if we can run these as tests in separate processes, and only load one set of BLAS/LAPACK in each process. Presumably we should also separate MKL to keep it all clean.

@ViralBShah

ViralBShah commented Nov 8, 2025

Copy link
Copy Markdown
Member

The exit code on windows apparently suggests that it is a DLL not found error.

ViralBShah added a commit that referenced this pull request Jun 6, 2026
`info` is a `blasint`, which is 32-bit in LP64 builds, so `%ld` triggers a
-Wformat warning (and is incorrect) there. Use `%d` for LP64 and `%ld` for
ILP64. Pulled from #128.

Co-authored-by: Alexis Montoison <alexis.montoison@polymtl.ca>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ViralBShah

Copy link
Copy Markdown
Member

#173 is an alternative implementation that does test ReferenceBLAS.

ViralBShah added a commit to Feyorsh/libblastrampoline that referenced this pull request Jun 6, 2026
Pulled from JuliaLinearAlgebra#128.

Co-authored-by: Alexis Montoison <alexis.montoison@polymtl.ca>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ViralBShah ViralBShah closed this Jun 6, 2026
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 this pull request may close these issues.

3 participants