public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/julia] epel10: Fix tridiagonal test
@ 2026-12-01 21:38 Milan Bouchet-Valat
  0 siblings, 0 replies; only message in thread
From: Milan Bouchet-Valat @ 2026-12-01 21:38 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/julia
            Branch : epel10
            Commit : 28c0c0c1f94167ce958f6904919be714a1049a22
            Author : Milan Bouchet-Valat <nalimilan@club.fr>
            Date   : 2016-03-20T12:24:24+01:00
            Stats  : +52/-2 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/julia/c/28c0c0c1f94167ce958f6904919be714a1049a22?branch=epel10

            Log:
            Fix tridiagonal test

Add patch from upstream to fix test failure which seems to
have been introduced by OpenBLAS 0.2.16. Fixes #1319456.

---
diff --git a/julia.spec b/julia.spec
index d0cf0fa..07b6c88 100644
--- a/julia.spec
+++ b/julia.spec
@@ -8,8 +8,8 @@
 %global llvmversion 33
 
 Name:           julia
-Version:        0.4.3
-Release:        8%{?dist}
+Version:        0.4.4
+Release:        1%{?dist}
 Summary:        High-level, high-performance dynamic language for technical computing
 Group:          Development/Languages
 # Julia itself is MIT, with a few LGPLv2+ and GPLv2+ files
@@ -23,6 +23,7 @@ Source1:        https://api.github.com/repos/JuliaLang/libuv/tarball/%{uvcommit}
 # Julia currently uses a custom version of Rmath, called Rmath-julia, with a custom RNG system (temporary)
 Source2:        https://api.github.com/repos/JuliaLang/Rmath-julia/tarball/v%{Rmathjuliaversion}#/Rmath-julia-%{Rmathjuliaversion}.tar.gz
 Patch0:         fix-gcc6-build.patch
+Patch1:         tridiag.patch
 Provides:       bundled(libuv) = %{uvversion}
 Provides:       bundled(Rmath) = %{Rmathversion}
 BuildRequires:  arpack-devel
@@ -103,6 +104,7 @@ Julia into external programs or debugging Julia itself.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 pushd deps
     # Julia downloads tarballs for external dependencies even when the folder is present:
@@ -259,6 +261,9 @@ exit 0
 /usr/bin/gtk-update-icon-cache %{_datarootdir}/icons/hicolor &>/dev/null || :
 
 %changelog
+* Sun Mar 20 2016 Milan Bouchet-Valat <nalimilan@club.fr> - 0.4.4-9
+- Add patch to fix non-deterministic test failure with OpenBLAS 0.2.16.
+
 * Sun Mar 20 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.4.3-8
 - Rebuild for libgit2 0.24.0
 

diff --git a/tridiag.patch b/tridiag.patch
new file mode 100644
index 0000000..2e24e2d
--- /dev/null
+++ b/tridiag.patch
@@ -0,0 +1,45 @@
+From 704004634f6712645eb837cd86d7a09fa51ae36a Mon Sep 17 00:00:00 2001
+From: Milan Bouchet-Valat <nalimilan@club.fr>
+Date: Sat, 19 Mar 2016 17:21:15 +0100
+Subject: [PATCH] Fix non-deterministic tridiag test failure
+
+The signs or eigenvectors are random. Fixes #15565.
+---
+ test/linalg/tridiag.jl | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/test/linalg/tridiag.jl b/test/linalg/tridiag.jl
+index 9441244..c43fd03 100644
+--- a/test/linalg/tridiag.jl
++++ b/test/linalg/tridiag.jl
+@@ -313,13 +313,25 @@ let n = 12 #Size of matrix problem to test
+             debug && println("stegr! call with index range")
+             F = eigfact(SymTridiagonal(a, b),1:2)
+             fF = eigfact(Symmetric(full(SymTridiagonal(a, b))),1:2)
+-            @test_approx_eq F[:vectors] fF[:vectors]
++            for i in 1:size(F[:vectors], 2)
++                if sign(F[:vectors][1,i]) == sign(fF[:vectors][1,i])
++                    @test_approx_eq F[:vectors][:,i] fF[:vectors][:,i]
++                else
++                    @test_approx_eq F[:vectors][:,i] -fF[:vectors][:,i]
++                end
++            end
+             @test_approx_eq F[:values] fF[:values]
+ 
+             debug && println("stegr! call with value range")
+             F = eigfact(SymTridiagonal(a, b),0.0,1.0)
+             fF = eigfact(Symmetric(full(SymTridiagonal(a, b))),0.0,1.0)
+-            @test_approx_eq F[:vectors] fF[:vectors]
++            for i in 1:size(F[:vectors], 2)
++                if sign(F[:vectors][1,i]) == sign(fF[:vectors][1,i])
++                    @test_approx_eq F[:vectors][:,i] fF[:vectors][:,i]
++                else
++                    @test_approx_eq F[:vectors][:,i] -fF[:vectors][:,i]
++                end
++            end
+             @test_approx_eq F[:values] fF[:values]
+         end
+ 
+-- 
+2.5.0
+

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-12-01 21:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-01 21:38 [rpms/julia] epel10: Fix tridiagonal test Milan Bouchet-Valat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox