Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ toolchainopts = {'openmp': True}

source_urls = ['https://github.com/amd/blis/archive/']
sources = ['%(version)s.tar.gz']
checksums = ['c553bd543eedc87920df9b82634ae4c02662145ed737f51fdf4c9bca5e588028']
patches = ['AOCL-BLAS-5.2_gcc15-openmp-workaround.patch']
checksums = [
{'5.2.tar.gz': 'c553bd543eedc87920df9b82634ae4c02662145ed737f51fdf4c9bca5e588028'},
{'AOCL-BLAS-5.2_gcc15-openmp-workaround.patch': '40671539ef9fd027d441b378060c957cf983b52bc331509215cab25abedfbd64'},
]

builddependencies = [
('Python', '3.14.2'),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Workaround for https://github.com/amd/blis/issues/50 :
GCC15 Compile Fails Due to OpenMP in C extern

Bart Oldeman <bart.oldeman@calculquebec.ca>
diff -ur blis-5.2.orig/frame/thread/bli_thrcomm_openmp.h blis-5.2/frame/thread/bli_thrcomm_openmp.h
--- blis-5.2.orig/frame/thread/bli_thrcomm_openmp.h 2025-12-07 05:22:11.000000000 +0000
+++ blis-5.2/frame/thread/bli_thrcomm_openmp.h 2026-02-04 18:26:48.011905725 +0000
@@ -39,7 +39,15 @@
// Define thrcomm_t for situations when OpenMP multithreading is enabled.
#ifdef BLIS_ENABLE_OPENMP

+// Workaround for GCC 15: https://github.com/flame/blis/pull/875 is more
+// thorough but needs to touch many files in AOCL-BLAS
+#ifdef __cplusplus
+}
+#endif
#include <omp.h>
+#ifdef __cplusplus
+extern "C" {
+#endif

// Define thrcomm_t for tree barriers and non-tree barriers.
#ifdef BLIS_TREE_BARRIER
62 changes: 62 additions & 0 deletions easybuild/easyconfigs/a/AOCL-LAPACK/AOCL-LAPACK-5.2-GCC-15.2.0.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
easyblock = 'Bundle'

name = 'AOCL-LAPACK'
version = '5.2'

homepage = 'https://github.com/amd/libflame'
description = """AOCL-LAPACK is AMD's optimized version of
LAPACK targeted for AMD EPYC and Ryzen CPUs."""

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

builddependencies = [
('CMake', '3.31.11'),
('Python', '3.14.2'),
('Perl', '5.42.0'),
]

dependencies = [
('AOCL-BLAS', '%(version)s'),
]

default_component_specs = {'sources': [{'download_filename': '%(version)s.tar.gz',
'filename': SOURCELOWER_TAR_GZ}]}
sanity_check_all_components = True

components = [
('AOCL-Utils', version, {
'easyblock': 'CMakeMake',
'source_urls': ['https://github.com/amd/aocl-utils/archive/refs/tags'],
'checksums': ['db0d807170a6eb73fcccd720a65a3e3aa8a787ae656c46479f7d9b4e1f9ed08a'],
'start_dir': '%(namelower)s-%(version)s',
'sanity_check_paths': {
'files': ['lib/libaoclutils.%s' % SHLIB_EXT, 'include/Capi/au/cpuid/cpuid.h'],
'dirs': [],
},
}),
(name, version, {
'source_urls': ['https://github.com/amd/libflame/archive/refs/tags'],
'patches': [
'AOCL-LAPACK-5.1_support-shlib-netlib-tests.patch',
'AOCL-LAPACK-5.2_zen4_conditional_compilation.patch',
],
'checksums': [
{SOURCELOWER_TAR_GZ: 'fb5fe5128f718050c9911443fcf7ed91b60538a40d57084ed0124bb91afabb9b'},
{'AOCL-LAPACK-5.1_support-shlib-netlib-tests.patch':
'8a5ab79f9120511e93708919050a1cc575fc6df9fa9cff994ecbe068955958fe'},
{'AOCL-LAPACK-5.2_zen4_conditional_compilation.patch':
'2eb8b5ce4b7f054d9d86295030c0aedda3269e0e4390b6d132fa970511b2a26c'},
],
'start_dir': 'libflame-%(version)s',
'runtest': True,
'run_lapack_tests': True,
'max_failing_lapack_tests_num_errors': 250,
}),
]

sanity_check_paths = {
'dirs': ['include', 'lib'],
'files': [],
}

moduleclass = 'numlib'
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
Only use blis zen4 functions if BLIS_KERNELS_ZEN4 is defined, to avoid compilations
issues if blis does not support zen4 (e.g. compiled with "auto" on zen3)

Bart Oldeman <bart.oldeman@calculquebec.ca>
diff -ur libflame-5.2.orig/src/base/flamec/blis/2/bl1_gemv.c libflame-5.2/src/base/flamec/blis/2/bl1_gemv.c
--- libflame-5.2.orig/src/base/flamec/blis/2/bl1_gemv.c 2026-01-04 06:34:54.000000000 +0000
+++ libflame-5.2/src/base/flamec/blis/2/bl1_gemv.c 2026-02-05 01:31:50.925123665 +0000
@@ -442,7 +442,7 @@
*beta,
y, incy );
#else
-#if FLA_ENABLE_AOCL_BLAS
+#if FLA_ENABLE_AOCL_BLAS && defined(BLIS_KERNELS_ZEN4)
/* Use direct single threaded BLIS kernel */
aocl_fla_init();
if ( FLA_IS_MIN_ARCH_ID( FLA_ARCH_AVX512 ) && incx > 0 && incy > 0 )
diff -ur libflame-5.2.orig/src/map/lapack2flamec/f2c/c/dlarf.c libflame-5.2/src/map/lapack2flamec/f2c/c/dlarf.c
--- libflame-5.2.orig/src/map/lapack2flamec/f2c/c/dlarf.c 2026-01-04 06:34:54.000000000 +0000
+++ libflame-5.2/src/map/lapack2flamec/f2c/c/dlarf.c 2026-02-05 01:32:56.753762529 +0000
@@ -295,7 +295,7 @@
{
/* Process in a single call */
/* w(1:lastc,1) := C(1:lastv,1:lastc)**T * v(1:lastv,1) */
-#if FLA_ENABLE_AOCL_BLAS
+#if FLA_ENABLE_AOCL_BLAS && defined(BLIS_KERNELS_ZEN4)
if(FLA_IS_MIN_ARCH_ID(FLA_ARCH_AVX512) && *incv > 0)
{
/* Use direct single threaded BLIS kernel */
@@ -376,7 +376,7 @@
else
{
/* w(1:lastc,1) := C(1:lastc,1:lastv) * v(1:lastv,1) */
-#if FLA_ENABLE_AOCL_BLAS
+#if FLA_ENABLE_AOCL_BLAS && defined(BLIS_KERNELS_ZEN4)
aocl_fla_init();
if(FLA_IS_MIN_ARCH_ID(FLA_ARCH_AVX512) && *incv > 0)
{
diff -ur libflame-5.2.orig/src/map/lapack2flamec/f2c/c/dlarft.c libflame-5.2/src/map/lapack2flamec/f2c/c/dlarft.c
--- libflame-5.2.orig/src/map/lapack2flamec/f2c/c/dlarft.c 2026-01-04 06:34:54.000000000 +0000
+++ libflame-5.2/src/map/lapack2flamec/f2c/c/dlarft.c 2026-02-05 01:32:31.071123136 +0000
@@ -278,7 +278,7 @@
i__2 = j - i__;
i__3 = i__ - 1;
d__1 = -tau[i__];
-#if FLA_ENABLE_AOCL_BLAS
+#if FLA_ENABLE_AOCL_BLAS && defined(BLIS_KERNELS_ZEN4)
if(FLA_IS_MIN_ARCH_ID(FLA_ARCH_AVX512))
{
bli_dgemv_t_zen4_int(BLIS_CONJUGATE, BLIS_NO_CONJUGATE, i__2, i__3, &d__1,
@@ -315,7 +315,7 @@
i__2 = i__ - 1;
i__3 = j - i__;
d__1 = -tau[i__];
-#if FLA_ENABLE_AOCL_BLAS
+#if FLA_ENABLE_AOCL_BLAS && defined(BLIS_KERNELS_ZEN4)
if(FLA_IS_MIN_ARCH_ID(FLA_ARCH_AVX512) && *ldv > 0)
{
bli_dgemv_n_zen4_int_40x2_st(BLIS_NO_TRANSPOSE, BLIS_NO_CONJUGATE, i__2,
@@ -387,7 +387,7 @@
i__1 = *n - *k + i__ - j;
i__2 = *k - i__;
d__1 = -tau[i__];
-#if FLA_ENABLE_AOCL_BLAS
+#if FLA_ENABLE_AOCL_BLAS && defined(BLIS_KERNELS_ZEN4)
if(FLA_IS_MIN_ARCH_ID(FLA_ARCH_AVX512))
{
bli_dgemv_t_zen4_int(BLIS_CONJUGATE, BLIS_NO_CONJUGATE, i__1, i__2,
@@ -424,7 +424,7 @@
i__1 = *k - i__;
i__2 = *n - *k + i__ - j;
d__1 = -tau[i__];
-#if FLA_ENABLE_AOCL_BLAS
+#if FLA_ENABLE_AOCL_BLAS && defined(BLIS_KERNELS_ZEN4)
if(FLA_IS_MIN_ARCH_ID(FLA_ARCH_AVX512) && *ldv > 0)
{
bli_dgemv_n_zen4_int_40x2_st(BLIS_NO_TRANSPOSE, BLIS_NO_CONJUGATE, i__1,
30 changes: 30 additions & 0 deletions easybuild/easyconfigs/c/CMake/CMake-3.31.11-GCCcore-15.2.0.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name = 'CMake'
version = '3.31.11'

homepage = 'https://www.cmake.org'

description = """
CMake, the cross-platform, open-source build system. CMake is a family of
tools designed to build, test and package software.
"""

toolchain = {'name': 'GCCcore', 'version': '15.2.0'}

source_urls = ['https://www.cmake.org/files/v%(version_major_minor)s']
sources = [SOURCELOWER_TAR_GZ]
checksums = ['c0a3b3f2912b2166f522d5010ffb6029d8454ee635f5ad7a3247e0be7f9a15c9']

builddependencies = [
('binutils', '2.45'),
]

dependencies = [
('ncurses', '6.6'),
('zlib', '2.3.2'),
('bzip2', '1.0.8'),
('cURL', '8.17.0'),
('libarchive', '3.8.5'),
('OpenSSL', '3', '', SYSTEM),
]

moduleclass = 'devel'