diff --git a/easybuild/easyconfigs/a/AOCL-BLAS/AOCL-BLAS-5.2-GCC-15.2.0.eb b/easybuild/easyconfigs/a/AOCL-BLAS/AOCL-BLAS-5.2-GCC-15.2.0.eb index 14fa21d81fb2..71d38ca78530 100644 --- a/easybuild/easyconfigs/a/AOCL-BLAS/AOCL-BLAS-5.2-GCC-15.2.0.eb +++ b/easybuild/easyconfigs/a/AOCL-BLAS/AOCL-BLAS-5.2-GCC-15.2.0.eb @@ -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'), diff --git a/easybuild/easyconfigs/a/AOCL-BLAS/AOCL-BLAS-5.2_gcc15-openmp-workaround.patch b/easybuild/easyconfigs/a/AOCL-BLAS/AOCL-BLAS-5.2_gcc15-openmp-workaround.patch new file mode 100644 index 000000000000..478a81996823 --- /dev/null +++ b/easybuild/easyconfigs/a/AOCL-BLAS/AOCL-BLAS-5.2_gcc15-openmp-workaround.patch @@ -0,0 +1,23 @@ +Workaround for https://github.com/amd/blis/issues/50 : +GCC15 Compile Fails Due to OpenMP in C extern + +Bart Oldeman +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 ++#ifdef __cplusplus ++extern "C" { ++#endif + + // Define thrcomm_t for tree barriers and non-tree barriers. + #ifdef BLIS_TREE_BARRIER diff --git a/easybuild/easyconfigs/a/AOCL-LAPACK/AOCL-LAPACK-5.2-GCC-15.2.0.eb b/easybuild/easyconfigs/a/AOCL-LAPACK/AOCL-LAPACK-5.2-GCC-15.2.0.eb new file mode 100644 index 000000000000..7dbe2e86bee8 --- /dev/null +++ b/easybuild/easyconfigs/a/AOCL-LAPACK/AOCL-LAPACK-5.2-GCC-15.2.0.eb @@ -0,0 +1,65 @@ +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', '4.2.1'), + ('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', + 'AOCL-LAPACK-5.2_no-shlibs-with-pie.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'}, + {'AOCL-LAPACK-5.2_no-shlibs-with-pie.patch': + 'fb164626d8e1bde278c2adb952a3c42752bd8f789b1acf11a8eea124193bbc5f'}, + ], + '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' diff --git a/easybuild/easyconfigs/a/AOCL-LAPACK/AOCL-LAPACK-5.2_no-shlibs-with-pie.patch b/easybuild/easyconfigs/a/AOCL-LAPACK/AOCL-LAPACK-5.2_no-shlibs-with-pie.patch new file mode 100644 index 000000000000..9d8caa56b9b3 --- /dev/null +++ b/easybuild/easyconfigs/a/AOCL-LAPACK/AOCL-LAPACK-5.2_no-shlibs-with-pie.patch @@ -0,0 +1,31 @@ +From 1466c4192f5ec9eb9d464f271a14d0d27371028b Mon Sep 17 00:00:00 2001 +From: Alexander Grund +Date: Fri, 6 Feb 2026 09:52:43 +0100 +Subject: [PATCH] Do not build shared libraries with `-pie` + +`-pie` builds an executable and when passed after `-shared` won't create a shared library anymore. + +CMake 4.1.0 changed the order of `CMAKE_SHARED_LINKER_FLAGS` to be passed after the shared-library-creation-flags and the build now fails. + +However it was wrong to pass this flag to the shared library linking anyway, so remove it from there. +--- + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 962ef4d76..eb649b5a0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -217,10 +217,10 @@ elseif(UNIX) + message(STATUS "No ISA flag set") + endif() + set(COMPILE_FLAGS "-fstack-protector-strong -fpie -Wformat -Wformat-security") +- set(LINKER_FLAGS "-pie -Wl,-z,relro -Wl,-z,now") ++ set(LINKER_FLAGS "-Wl,-z,relro -Wl,-z,now") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMPILER_OPTIMIZATION_FLAGS} ${COMPILE_FLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILER_OPTIMIZATION_FLAGS} ${COMPILE_FLAGS}") +- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LINKER_FLAGS}") ++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie ${LINKER_FLAGS}") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${LINKER_FLAGS}") + else() + message(STATUS "OS UNKNOWN CANNOT SET SIMD") diff --git a/easybuild/easyconfigs/a/AOCL-LAPACK/AOCL-LAPACK-5.2_zen4_conditional_compilation.patch b/easybuild/easyconfigs/a/AOCL-LAPACK/AOCL-LAPACK-5.2_zen4_conditional_compilation.patch new file mode 100644 index 000000000000..39de4296af2c --- /dev/null +++ b/easybuild/easyconfigs/a/AOCL-LAPACK/AOCL-LAPACK-5.2_zen4_conditional_compilation.patch @@ -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 +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,