diff --git a/easybuild/easyconfigs/s/SciPy-bundle/SciPy-bundle-2025.07-iimkl-2025b.eb b/easybuild/easyconfigs/s/SciPy-bundle/SciPy-bundle-2025.07-iimkl-2025b.eb new file mode 100644 index 000000000000..c8b268cfbd19 --- /dev/null +++ b/easybuild/easyconfigs/s/SciPy-bundle/SciPy-bundle-2025.07-iimkl-2025b.eb @@ -0,0 +1,112 @@ +easyblock = 'PythonBundle' + +name = 'SciPy-bundle' +version = '2025.07' + +homepage = 'https://python.org/' +description = "Bundle of Python packages for scientific software" + +toolchain = {'name': 'iimkl', 'version': '2025b'} +toolchainopts = {'pic': True, 'lowopt': True, 'strict': True, + # '-fveclib=none' to avoid 'undefined symbol: pow8_h' in numpy + # see https://github.com/numpy/numpy/issues/27111 + # '-mllvm -disable-hir-backward-temp-dependencies-resolver' to avoid AVX2 failure in numpy build + # see https://github.com/numpy/numpy/issues/29679 + 'extra_cflags': '-fveclib=none -mllvm -disable-hir-backward-temp-dependencies-resolver'} + +builddependencies = [ + ('hypothesis', '6.136.6'), + ('UnZip', '6.0'), + # scipy >= 1.9.0 uses Meson/Ninja + ('Meson', '1.8.2'), + ('meson-python', '0.18.0'), + ('Ninja', '1.13.0'), + ('pkgconf', '2.4.3'), # required by scipy + ('Cython', '3.1.2'), # required by numpy and scipy + ('pybind11', '3.0.0'), # required by scipy + ('spin', '0.14'), # required for testing numpy +] + +dependencies = [ + ('Python', '3.13.5'), + ('Python-bundle-PyPI', '2025.07'), +] + +# order is important! +exts_list = [ + ('numpy', '2.3.2', { + 'patches': ['numpy-1.22.3_disable-broken-override-test.patch', + 'numpy-2.3.2_fix_selected_kind_for_ifort.patch'], + 'checksums': [ + {'numpy-2.3.2.tar.gz': 'e0486a11ec30cdecb53f184d496d1c6a20786c81e55e41640270130056f8ee48'}, + {'numpy-1.22.3_disable-broken-override-test.patch': + '9c589bb073b28b25ff45eb3c63c57966aa508dd8b318d0b885b6295271e4983c'}, + {'numpy-2.3.2_fix_selected_kind_for_ifort.patch': + '765cd11029acb97729d072171b3c9919bb0b09e6e0ea5134fd3d779de23f1a03'}, + ], + }), + ('ply', '3.11', { + 'checksums': ['00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3'], + }), + ('gast', '0.6.0', { + 'checksums': ['88fc5300d32c7ac6ca7b515310862f71e6fdf2c029bbec7c66c0f5dd47b6b1fb'], + }), + ('beniget', '0.4.2.post1', { + 'checksums': ['a0258537e65e7e14ec33a86802f865a667f949bb6c73646d55e42f7c45a052ae'], + }), + ('pythran', '0.18.0', { + 'checksums': ['5c003e8cbedf6dbb68c2869c49fc110ce8b5e8982993078a4a819f1dadc4fc6a'], + }), + ('versioneer', '0.29', { + 'checksums': ['5ab283b9857211d61b53318b7c792cf68e798e765ee17c27ade9f6c924235731'], + }), + ('scipy', '1.16.1', { + 'enable_slow_tests': True, + 'ignore_test_result': False, + 'patches': [ + 'scipy-1.11.1_disable-tests.patch', + 'scipy-1.16.0_skip-tests-broken-grace.patch', + 'scipy-1.16.0_relax-tests-broken-neoverse-v1.patch', + 'scipy-1.16.0_remove-float16-differentiate-test.patch', + 'scipy-1.16.1_bump-orth-memory-efficiency-tolerance.patch', + 'scipy-1.16.1_relax-tolerance.patch', + ], + 'checksums': [ + {'scipy-1.16.1.tar.gz': '44c76f9e8b6e8e488a586190ab38016e4ed2f8a038af7cd3defa903c0a2238b3'}, + {'scipy-1.11.1_disable-tests.patch': '906bfb03397d94882ccdc1b93bc2c8e854e0e060c2d107c83042992394e6a4af'}, + {'scipy-1.16.0_skip-tests-broken-grace.patch': + '33885518a572f843a0edeb7a58aa938202aae70267f6de1ce60acef97f393126'}, + {'scipy-1.16.0_relax-tests-broken-neoverse-v1.patch': + 'a72d794b95dc437c03b323f86392b264c7ecfdbfa19e3bc01fba8d5d3ab2f21a'}, + {'scipy-1.16.0_remove-float16-differentiate-test.patch': + 'f857fc1e941c196285f2e871e803cf463fc59c040dd2955deda1dd277d4b00db'}, + {'scipy-1.16.1_bump-orth-memory-efficiency-tolerance.patch': + '1eb58b162d04cbf957979897966bfcf318f05a2bdbb61f0b47c0b3881910b354'}, + {'scipy-1.16.1_relax-tolerance.patch': 'd78b91cd896951cea39f194a64e9f88bb696f2cb805915b34c9021dd186e3de3'}, + ], + }), + ('numexpr', '2.11.0', { + # workaround for: ValueError: invalid pyproject.toml config: project.license + 'preinstallopts': "sed -i '/^license =/d' pyproject.toml && ", + 'checksums': ['75b2c01a4eda2e7c357bc67a3f5c3dd76506c15b5fd4dc42845ef2e182181bad'], + }), + ('bottleneck', '1.5.0', { + 'checksums': ['c860242cf20e69d5aab2ec3c5d6c8c2a15f19e4b25b28b8fca2c2a12cefae9d8'], + }), + ('tzdata', '2025.2', { + 'checksums': ['b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9'], + }), + ('pandas', '2.3.1', { + 'preinstallopts': "export PANDAS_CI=0 && ", + 'checksums': ['0a95b9ac964fe83ce317827f80304d37388ea77616b1425f0ae41c9d2d0d7bb2'], + }), + ('mpmath', '1.3.0', { + 'checksums': ['7a28eb2a9774d00c7bc92411c19a89209d5da7c4c9a9e227be8330a23a25b91f'], + }), + ('deap', '1.4.3', { + 'modulename': 'deap.base', + 'checksums': ['7c97088fb05835bdc255bec475cb0e778de2b43e44cbefbf2bcd655aeec865fd'], + }), +] + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/s/SciPy-bundle/numpy-2.3.2_fix_selected_kind_for_ifort.patch b/easybuild/easyconfigs/s/SciPy-bundle/numpy-2.3.2_fix_selected_kind_for_ifort.patch new file mode 100644 index 000000000000..e3f0096ad954 --- /dev/null +++ b/easybuild/easyconfigs/s/SciPy-bundle/numpy-2.3.2_fix_selected_kind_for_ifort.patch @@ -0,0 +1,68 @@ +Intel Fortran compiler does not support 10-byte reals, nor 16-byte integers. +The f2py module needs to know the supported types to reliably build Fortran extensions. + +This patch was inspired by the discussion at https://github.com/numpy/numpy/issues/13053 +in particular the comments at + https://github.com/numpy/numpy/issues/13053#issuecomment-470314843 +and + https://github.com/numpy/numpy/issues/13053#issuecomment-471008975 +by GitHub user @oleksandr-pavlyk + +Author: Jakob Schiotz (Tech. U. Denmark) +Updated: Simon Branford (University of Birmingham) + +--- numpy/f2py/crackfortran.py.old 2023-10-23 14:39:51.510964440 +0200 ++++ numpy/f2py/crackfortran.py 2023-10-23 15:10:21.963115914 +0200 +@@ -2407,7 +2407,8 @@ + return 'kind(' + string + ')' + + +-def _selected_int_kind_func(r): ++def _selected_int_kind_func_intel(r): ++ # Intel(R) Fortran compiler only supports kinds 1, 2, 4, 8. + # XXX: This should be processor dependent + m = 10 ** r + if m <= 2 ** 8: +@@ -2418,29 +2419,31 @@ + return 4 + if m <= 2 ** 63: + return 8 +- if m <= 2 ** 128: +- return 16 ++ # Not supported by ifort ++ #if m <= 2 ** 128: ++ # return 16 + return -1 + + +-def _selected_real_kind_func(p, r=0, radix=0): ++_selected_int_kind_func = _selected_int_kind_func_intel ++ ++ ++def _selected_real_kind_func_intel(p, r=0, radix=0): ++ # Intel(R) Fotran compiler only supports kinds 4, 8, 16 + # XXX: This should be processor dependent +- # This is only verified for 0 <= p <= 20, possibly good for p <= 33 and above ++ # This is only good for 0 <= p <= 20 + if p < 7: + return 4 + if p < 16: + return 8 +- machine = platform.machine().lower() +- if machine.startswith(('aarch64', 'alpha', 'arm64', 'loongarch', 'mips', 'power', 'ppc', 'riscv', 's390x', 'sparc')): +- if p <= 33: +- return 16 +- elif p < 19: +- return 10 +- elif p <= 33: ++ if p <= 33: + return 16 + return -1 + + ++_selected_real_kind_func = _selected_real_kind_func_intel ++ ++ + def get_parameters(vars, global_params={}): + params = copy.copy(global_params) + g_params = copy.copy(global_params) diff --git a/easybuild/easyconfigs/s/SciPy-bundle/scipy-1.16.1_relax-tolerance.patch b/easybuild/easyconfigs/s/SciPy-bundle/scipy-1.16.1_relax-tolerance.patch new file mode 100644 index 000000000000..99eb808289da --- /dev/null +++ b/easybuild/easyconfigs/s/SciPy-bundle/scipy-1.16.1_relax-tolerance.patch @@ -0,0 +1,22 @@ +Relax tolerance for the following with Intel oneAPI: TestBatch.test_solve and TestBatch.test_lu_solve +Patch by Simon Branford (University of Birmingham) +--- scipy/linalg/tests/test_batch.py.orig 2025-09-09 14:48:42.485545000 +0100 ++++ scipy/linalg/tests/test_batch.py 2025-09-09 14:48:54.003644602 +0100 +@@ -445,7 +445,7 @@ + if len(bdim) == 1: + x = x[..., np.newaxis] + b = b[..., np.newaxis] +- assert_allclose(A @ x - b, 0, atol=1.5e-6) ++ assert_allclose(A @ x - b, 0, atol=1.7e-6) + assert_allclose(x, np.linalg.solve(A, b), atol=3e-6) + + @pytest.mark.parametrize('bdim', [(5,), (5, 4), (2, 3, 5, 4)]) +@@ -459,7 +459,7 @@ + if len(bdim) == 1: + x = x[..., np.newaxis] + b = b[..., np.newaxis] +- assert_allclose(A @ x - b, 0, atol=1.5e-6) ++ assert_allclose(A @ x - b, 0, atol=1.7e-6) + assert_allclose(x, np.linalg.solve(A, b), atol=3e-6) + + @pytest.mark.parametrize('l_and_u', [(1, 1), ([2, 1, 0], [0, 1 , 2])])