Skip to content
Open
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
easyblock = 'PythonBundle'

name = 'SciPy-bundle'
version = '2024.05'

homepage = 'https://python.org/'
description = "Bundle of Python packages for scientific software"

toolchain = {'name': 'iimkl', 'version': '2024a'}
toolchainopts = {'pic': True, 'lowopt': True, 'strict': True}

builddependencies = [
('hypothesis', '6.103.1'),
('UnZip', '6.0'),
# scipy >= 1.9.0 uses Meson/Ninja
('Meson', '1.4.0'),
('meson-python', '0.16.0'),
('Ninja', '1.12.1'),
('pkgconf', '2.2.0'), # required by scipy
('Cython', '3.0.10'), # required by numpy and scipy
('pybind11', '2.12.0'), # required by scipy
]

dependencies = [
('Python', '3.12.3'),
('Python-bundle-PyPI', '2024.06'),
]

# order is important!
exts_list = [
('numpy', '1.26.4', {
'patches': [
'numpy-1.26.4-mkl.patch',
'numpy-1.26.4-icx-compiler.patch',
],
'checksums': [
{'numpy-1.26.4.tar.gz': '2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010'},
{'numpy-1.26.4-mkl.patch': '78351b21b271c37d60bf49ff55c5af15214eaa8216377936198ef03427eeffe5'},
{'numpy-1.26.4-icx-compiler.patch': '5e8ca296c0371d076267516aa6c1e009190e9394e1706fdd98db499a35f653fd'},
],
}),
('ply', '3.11', {
'checksums': ['00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3'],
}),
('gast', '0.5.4', {
'checksums': ['9c270fe5f4b130969b54174de7db4e764b09b4f7f67ccfc32480e29f78348d97'],
}),
('beniget', '0.4.1', {
'checksums': ['75554b3b8ad0553ce2f607627dad3d95c60c441189875b98e097528f8e23ac0c'],
}),
('pythran', '0.16.1', {
'checksums': ['861748c0f9c7d422b32724b114b3817d818ed4eab86c09781aa0a3f7ceabb7f9'],
}),
('versioneer', '0.29', {
'checksums': ['5ab283b9857211d61b53318b7c792cf68e798e765ee17c27ade9f6c924235731'],
}),
('scipy', '1.13.1', {
'enable_slow_tests': True,
'ignore_test_result': False,
'patches': [
'scipy-1.11.1_disable-tests.patch',
'scipy-1.11.1_xfail-aarch64_test_maxiter_worsening.patch',
'scipy-1.13.1_TestLinprogIPSparse.patch',
],
'checksums': [
{'scipy-1.13.1.tar.gz': '095a87a0312b08dfd6a6155cbbd310a8c51800fc931b8c0b84003014b874ed3c'},
{'scipy-1.11.1_disable-tests.patch': '906bfb03397d94882ccdc1b93bc2c8e854e0e060c2d107c83042992394e6a4af'},
{'scipy-1.11.1_xfail-aarch64_test_maxiter_worsening.patch':
'918c8e6fa8215d459126f267764c961bde729ea4a116c7f6287cddfdc58ffcea'},
{'scipy-1.13.1_TestLinprogIPSparse.patch':
'7213c2690b76c69f7e7103529cea3fa2098c05fbea556f04325fab9ca8c065f5'},
],
}),
('numexpr', '2.10.0', {
'patches': ['numexpr-2.10.0_fix-numpy-1.x.patch'],
'checksums': [
{'numexpr-2.10.0.tar.gz': 'c89e930752639df040539160326d8f99a84159bbea41943ab8e960591edaaef0'},
{'numexpr-2.10.0_fix-numpy-1.x.patch': '8d70b2e95579e6f0adc07bc615144f7657b3b607f9210ec328b6622458ca726d'},
],
}),
('Bottleneck', '1.3.8', {
'checksums': ['6780d896969ba7f53c8995ba90c87c548beb3db435dc90c60b9a10ed1ab4d868'],
}),
('tzdata', '2024.1', {
'checksums': ['2674120f8d891909751c38abcdfd386ac0a5a1127954fbc332af6b5ceae07efd'],
}),
('pandas', '2.2.2', {
'preinstallopts': "export PANDAS_CI=0 && ",
'checksums': ['9e79019aba43cb4fda9e4d983f8e88ca0373adbb697ae9c6c43093218de28b54'],
}),
('mpmath', '1.3.0', {
'checksums': ['7a28eb2a9774d00c7bc92411c19a89209d5da7c4c9a9e227be8330a23a25b91f'],
}),
('deap', '1.4.1', {
'modulename': 'deap.base',
'checksums': ['cc01de9892dfa7d1bc9803dab28892fead177f0182c81db47360a240ead778ff'],
}),
]

moduleclass = 'lang'
198 changes: 198 additions & 0 deletions easybuild/easyconfigs/s/SciPy-bundle/numpy-1.26.4-icx-compiler.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
Makes sure the new icx compiler is being picked up, and not the icc one.
Author: J. Sassmannshausen (Imperial College London/UK)
diff --git a/numpy-1.26.4.orig/numpy/distutils/ccompiler_opt.py b/numpy-1.26.4/numpy/distutils/ccompiler_opt.py
index 37a5368..5af425d 100644
--- a/numpy-1.26.4.orig/numpy/distutils/ccompiler_opt.py
+++ b/numpy-1.26.4/numpy/distutils/ccompiler_opt.py
@@ -211,6 +211,11 @@ class _Config:
opt = '-O3',
werror = '-Werror',
),
+ icx = dict(
+ native = '-xHost',
+ opt = '-O3',
+ werror = '-Werror',
+ ),
iccw = dict(
native = '/QxHost',
opt = '/O3',
@@ -369,7 +374,7 @@ class _Config:
),
AVX512_SPR = dict(flags="-mavx512fp16"),
)
- if on_x86 and self.cc_is_icc: return dict(
+ if on_x86 and self.cc_is_icx: return dict(
SSE = dict(flags="-msse"),
SSE2 = dict(flags="-msse2"),
SSE3 = dict(flags="-msse3"),
@@ -937,7 +942,7 @@ class _CCompiler:
if the compiler is unknown
cc_is_clang : bool
True if the compiler is Clang
- cc_is_icc : bool
+ cc_is_icx : bool
True if the compiler is Intel compiler (unix like)
cc_is_iccw : bool
True if the compiler is Intel compiler (msvc like)
@@ -984,7 +989,8 @@ class _CCompiler:
("cc_is_clang", ".*clang.*", ""),
# intel msvc like
("cc_is_iccw", ".*(intelw|intelemw|iccw).*", ""),
- ("cc_is_icc", ".*(intel|icc).*", ""), # intel unix like
+ ("cc_is_icc", ".*(intel|icc|icx).*", ""), # intel unix like
+ ("cc_is_icx", ".*(intel|icx).*", ""), # intel unix like
("cc_is_msvc", ".*msvc.*", ""),
("cc_is_fcc", ".*fcc.*", ""),
# undefined compiler will be treat it as gcc
@@ -1054,7 +1060,7 @@ class _CCompiler:
break

self.cc_name = "unknown"
- for name in ("gcc", "clang", "iccw", "icc", "msvc", "fcc"):
+ for name in ("gcc", "clang", "iccw", "icc", "icx", "msvc", "fcc"):
if getattr(self, "cc_is_" + name):
self.cc_name = name
break
@@ -1133,7 +1139,7 @@ class _CCompiler:
['-march=core-avx2']
"""
assert(isinstance(flags, list))
- if self.cc_is_gcc or self.cc_is_clang or self.cc_is_icc:
+ if self.cc_is_gcc or self.cc_is_clang or self.cc_is_icx:
return self._cc_normalize_unix(flags)

if self.cc_is_msvc or self.cc_is_iccw:
diff --git a/numpy-1.26.4.orig/numpy/distutils/tests/test_ccompiler_opt.py b/numpy-1.26.4/numpy/distutils/tests/test_ccompiler_opt.py
index 3714aea..37968f9 100644
--- a/numpy-1.26.4.orig/numpy/distutils/tests/test_ccompiler_opt.py
+++ b/numpy-1.26.4/numpy/distutils/tests/test_ccompiler_opt.py
@@ -26,8 +26,8 @@ else:

# architectures and compilers to test
arch_compilers = dict(
- x86 = ("gcc", "clang", "icc", "iccw", "msvc"),
- x64 = ("gcc", "clang", "icc", "iccw", "msvc"),
+ x86 = ("gcc", "clang", "icc", "icx", "iccw", "msvc"),
+ x64 = ("gcc", "clang", "icc", "icx", "iccw", "msvc"),
ppc64 = ("gcc", "clang"),
ppc64le = ("gcc", "clang"),
armhf = ("gcc", "clang"),
@@ -277,7 +277,7 @@ class _Test_CCompilerOpt:

def test_interface(self):
wrong_arch = "ppc64" if self.arch != "ppc64" else "x86"
- wrong_cc = "clang" if self.cc != "clang" else "icc"
+ wrong_cc = "clang" if self.cc != "clang" else "icx"
opt = self.opt()
assert_(getattr(opt, "cc_on_" + self.arch))
assert_(not getattr(opt, "cc_on_" + wrong_arch))
@@ -349,7 +349,7 @@ class _Test_CCompilerOpt:
"""
special cases
"""
- # in icc and msvc, FMA3 and AVX2 can't be separated
+ # in icc/icx and msvc, FMA3 and AVX2 can't be separated
# both need to implies each other, same for avx512f & cd
for f0, f1 in (
("fma3", "avx2"),
@@ -358,11 +358,11 @@ class _Test_CCompilerOpt:
diff = ".* sse42 .* %s .*%s$" % (f0, f1)
self.expect_baseline(f0,
x86_gcc=".* sse42 .* %s$" % f0,
- x86_icc=diff, x86_iccw=diff
+ x86_icx=diff, x86_iccw=diff
)
self.expect_baseline(f1,
x86_gcc=".* avx .* %s$" % f1,
- x86_icc=diff, x86_iccw=diff
+ x86_icx=diff, x86_iccw=diff
)
# in msvc, following features can't be separated too
for f in (("fma3", "avx2"), ("avx512f", "avx512cd", "avx512_skx")):
@@ -400,7 +400,7 @@ class _Test_CCompilerOpt:
self.expect(o,
x86_gcc=".* xop fma4 .* avx512f .* avx512_knl avx512_knm avx512_skx .*",
# in icc, xop and fam4 aren't supported
- x86_icc=".* avx512f .* avx512_knl avx512_knm avx512_skx .*",
+ x86_icx=".* avx512f .* avx512_knl avx512_knm avx512_skx .*",
x86_iccw=".* avx512f .* avx512_knl avx512_knm avx512_skx .*",
# in msvc, avx512_knl avx512_knm aren't supported
x86_msvc=".* xop fma4 .* avx512f .* avx512_skx .*",
@@ -436,7 +436,7 @@ class _Test_CCompilerOpt:
def test_flags(self):
self.expect_flags(
"sse sse2 vsx vsx2 neon neon_fp16 vx vxe",
- x86_gcc="-msse -msse2", x86_icc="-msse -msse2",
+ x86_gcc="-msse -msse2", x86_icx="-msse -msse2",
x86_iccw="/arch:SSE2",
x86_msvc="/arch:SSE2" if self.march() == "x86" else "",
ppc64_gcc= "-mcpu=power8",
@@ -594,7 +594,7 @@ class _Test_CCompilerOpt:
baseline="",
x86_gcc="avx512cd avx512f avx2 fma3 avx sse2",
x86_msvc="avx512cd avx2 avx sse2",
- x86_icc="avx512cd avx2 avx sse2",
+ x86_icx="avx512cd avx2 avx sse2",
x86_iccw="avx512cd avx2 avx sse2",
ppc64="vsx3 vsx2 vsx",
ppc64le="vsx3 vsx2",
@@ -652,7 +652,7 @@ class _Test_CCompilerOpt:
*/
""",
x86_gcc="avx512f avx2 sse42 sse41 sse2",
- x86_icc="avx512f avx2 sse42 sse41 sse2",
+ x86_icx="avx512f avx2 sse42 sse41 sse2",
x86_iccw="avx512f avx2 sse42 sse41 sse2",
x86_msvc="avx512f avx2 sse2"
if self.march() == 'x86' else "avx512f avx2",
@@ -665,7 +665,7 @@ class _Test_CCompilerOpt:
# 'maxopt' and autovec set the max acceptable optimization flags
self.expect_target_flags(
"/*@targets baseline %s */" % policy,
- gcc={"baseline":".*-O3.*"}, icc={"baseline":".*-O3.*"},
+ gcc={"baseline":".*-O3.*"}, icx={"baseline":".*-O3.*"},
iccw={"baseline":".*/O3.*"}, msvc={"baseline":".*/O2.*"},
unknown={"baseline":".*"}
)
@@ -673,7 +673,7 @@ class _Test_CCompilerOpt:
# 'werror', force compilers to treat warnings as errors
self.expect_target_flags(
"/*@targets baseline $werror */",
- gcc={"baseline":".*-Werror.*"}, icc={"baseline":".*-Werror.*"},
+ gcc={"baseline":".*-Werror.*"}, icx={"baseline":".*-Werror.*"},
iccw={"baseline":".*/Werror.*"}, msvc={"baseline":".*/WX.*"},
unknown={"baseline":".*"}
)
@@ -769,7 +769,7 @@ class _Test_CCompilerOpt:
*/
""",
x86_gcc=r"fma3 avx2 \(fma3 avx2\)",
- x86_icc="avx2", x86_iccw="avx2",
+ x86_icx="avx2", x86_iccw="avx2",
x86_msvc="avx2"
)

@@ -793,7 +793,7 @@ def new_test(arch, cc):
)
"""
if 1 and is_standalone:
- FakeCCompilerOpt.fake_info = "x86_icc"
+ FakeCCompilerOpt.fake_info = "x86_icx"
cco = FakeCCompilerOpt(None, cpu_baseline="avx2")
print(' '.join(cco.cpu_baseline_names()))
print(cco.cpu_baseline_flags())
diff --git a/numpy-1.26.4.orig/numpy/distutils/tests/test_ccompiler_opt_conf.py b/numpy-1.26.4/numpy/distutils/tests/test_ccompiler_opt_conf.py
index d9e8b2b..44dd441 100644
--- a/numpy-1.26.4.orig/numpy/distutils/tests/test_ccompiler_opt_conf.py
+++ b/numpy-1.26.4/numpy/distutils/tests/test_ccompiler_opt_conf.py
@@ -9,8 +9,8 @@ else:
from numpy.distutils.ccompiler_opt import CCompilerOpt

arch_compilers = dict(
- x86 = ("gcc", "clang", "icc", "iccw", "msvc"),
- x64 = ("gcc", "clang", "icc", "iccw", "msvc"),
+ x86 = ("gcc", "clang", "icc", "icx", "iccw", "msvc"),
+ x64 = ("gcc", "clang", "icc", "icx", "iccw", "msvc"),
ppc64 = ("gcc", "clang"),
ppc64le = ("gcc", "clang"),
armhf = ("gcc", "clang"),
57 changes: 57 additions & 0 deletions easybuild/easyconfigs/s/SciPy-bundle/numpy-1.26.4-mkl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Based on numpy-1.18.2-mkl.patch
Author: J. Sassmannshause (Imperial College London/UK)
--- a/numpy-1.26.4.orig/numpy/distutils/fcompiler/__init__.py
+++ b/numpy-1.26.4/numpy/distutils/fcompiler/__init__.py
@@ -643,7 +643,10 @@ class FCompiler(CCompiler):
return options

def library_option(self, lib):
- return "-l" + lib
+ if lib[0]=='-':
+ return lib
+ else:
+ return "-l" + lib
def library_dir_option(self, dir):
return "-L" + dir

diff --git a/numpy-1.26.4.orig/numpy/distutils/system_info.py b/numpy-1.26.4/numpy/distutils/system_info.py
index feb28f6..7f6f937 100644
--- a/numpy-1.26.4.orig/numpy/distutils/system_info.py
+++ b/numpy-1.26.4/numpy/distutils/system_info.py
@@ -956,7 +956,7 @@ class system_info:
if is_string(default):
return [default]
return default
- return [b for b in [a.strip() for a in libs.split(',')] if b]
+ return [b for b in [a.strip().replace(':',',') for a in libs.split(',')] if b]

def get_libraries(self, key='libraries'):
if hasattr(self, '_lib_names'):
@@ -1043,6 +1043,9 @@ class system_info:
# make sure we preserve the order of libs, as it can be important
found_dirs, found_libs = [], []
for lib in libs:
+ if lib[0] == '-':
+ found_libs.append(lib)
+ continue
for lib_dir in lib_dirs:
found_lib = self._find_lib(lib_dir, lib, exts)
if found_lib:
diff --git a/numpy-1.26.4.orig/numpy/distutils/unixccompiler.py b/numpy-1.26.4/numpy/distutils/unixccompiler.py
index 4884960..6fdcdc4 100644
--- a/numpy-1.26.4.orig/numpy/distutils/unixccompiler.py
+++ b/numpy-1.26.4/numpy/distutils/unixccompiler.py
@@ -139,3 +139,13 @@ def UnixCCompiler_create_static_lib(self, objects, output_libname,

replace_method(UnixCCompiler, 'create_static_lib',
UnixCCompiler_create_static_lib)
+
+def UnixCCompiler_library_option(self, lib):
+ if lib[0]=='-':
+ return lib
+ else:
+ return "-l" + lib
+
+replace_method(UnixCCompiler, 'library_option',
+ UnixCCompiler_library_option)
+