Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.27-GCC-13.3.0.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name = 'OpenBLAS'
version = '0.3.27'

homepage = 'https://www.openblas.net/'
description = "OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version."

toolchain = {'name': 'GCC', 'version': '13.3.0'}

source_urls = [
# order matters, trying to download the large.tgz/timing.tgz LAPACK tarballs from GitHub causes trouble
'https://www.netlib.org/lapack/timing/',
'https://github.com/xianyi/OpenBLAS/archive/',
]
sources = ['v%(version)s.tar.gz']
patches = [
('large.tgz', '.'),
('timing.tgz', '.'),
'OpenBLAS-0.3.15_workaround-gcc-miscompilation.patch',
'OpenBLAS-0.3.21_fix-order-vectorization.patch',
'OpenBLAS-0.3.27_fix_zscal.patch',
]
checksums = [
{'v0.3.27.tar.gz': 'aa2d68b1564fe2b13bc292672608e9cdeeeb6dc34995512e65c3b10f4599e897'},
{'large.tgz': 'f328d88b7fa97722f271d7d0cfea1c220e0f8e5ed5ff01d8ef1eb51d6f4243a1'},
{'timing.tgz': '999c65f8ea8bd4eac7f1c7f3463d4946917afd20a997807300fe35d70122f3af'},
{'OpenBLAS-0.3.15_workaround-gcc-miscompilation.patch':
'e6b326fb8c4a8a6fd07741d9983c37a72c55c9ff9a4f74a80e1352ce5f975971'},
{'OpenBLAS-0.3.21_fix-order-vectorization.patch':
'08af834e5d60441fd35c128758ed9c092ba6887c829e0471ecd489079539047d'},
{'OpenBLAS-0.3.27_fix_zscal.patch':
'9210d7b66538dabaddbe1bfceb16f8225708856f60876ca5561b19d3599f9fd1'},
]

builddependencies = [
('make', '4.4.1'),
# required by LAPACK test suite
('Python', '3.12.3'),
]

run_lapack_tests = True
max_failing_lapack_tests_num_errors = 150

# extensive testing can be enabled by uncommenting the line below
# runtest = 'PATH=.:$PATH lapack-timing'

moduleclass = 'numlib'
38 changes: 38 additions & 0 deletions easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.3.27_fix_zscal.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From 62f7b244ff5c268f311e5f080d1f44c3b432f3d0 Mon Sep 17 00:00:00 2001
From: Bart Oldeman <[email protected]>
Date: Fri, 24 May 2024 17:20:27 +0000
Subject: [PATCH] Replace use of FLT_MAX in x86_64 zscal.c by isinf()

Commit def4996 fixed issues with inf and nan values in zscal,
but used FLT_MAX, where DBL_MAX or isinf() is more appropriate,
as FLT_MAX is for single precision only.
Using FLT_MAX caused test case failures in the LAPACK tests.

isinf() is consistent with the later fix 969601a1
---
kernel/x86_64/zscal.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/x86_64/zscal.c b/kernel/x86_64/zscal.c
index bc79c0cafd..075b6091fe 100644
--- a/kernel/x86_64/zscal.c
+++ b/kernel/x86_64/zscal.c
@@ -394,7 +394,7 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da_r, FLOAT da_i,
}

}
- else if (da_r < -FLT_MAX || da_r > FLT_MAX) {
+ else if (isinf(da_r)) {
while(j < n)
{
x[i]= NAN;
@@ -410,7 +410,7 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da_r, FLOAT da_i,
while(j < n)
{
temp0 = -da_i * x[i+1];
- if (x[i] < -FLT_MAX || x[i] > FLT_MAX)
+ if (isinf(x[i]))
temp0 = NAN;
x[i+1] = da_i * x[i];
if ( x[i] == x[i]) //preserve NaN