From 6dc3f0521fc742a71d4e79279b7f6c92f72f91ca Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Tue, 12 Mar 2024 18:53:57 +0100 Subject: [PATCH 01/11] {2023.06}[foss/2022a] ImageMagick v7.1.0-37 --- .../pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.0-2022a.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.0-2022a.yml b/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.0-2022a.yml index 6eef2b9e7a..e745c18963 100644 --- a/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.0-2022a.yml +++ b/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.0-2022a.yml @@ -1,2 +1,6 @@ easyconfigs: - Stacks-2.62-foss-2022a.eb + - ImageMagick-7.1.0-37-GCCcore-11.3.0.eb: + # see https://github.com/easybuilders/easybuild-easyconfigs/pull/20086 + options: + from-pr: 20086 From a2c9afa90c0f2922201f140d345a61bb44afd5a9 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Tue, 12 Mar 2024 20:05:49 +0100 Subject: [PATCH 02/11] try adding dependency for PCRE/8.45 --- ImageMagick-7.1.0-37-GCCcore-11.3.0.eb | 44 +++++++++++++++++++ .../2023.06/eessi-2023.06-eb-4.9.0-2022a.yml | 4 +- 2 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 ImageMagick-7.1.0-37-GCCcore-11.3.0.eb diff --git a/ImageMagick-7.1.0-37-GCCcore-11.3.0.eb b/ImageMagick-7.1.0-37-GCCcore-11.3.0.eb new file mode 100644 index 0000000000..70d4d5eceb --- /dev/null +++ b/ImageMagick-7.1.0-37-GCCcore-11.3.0.eb @@ -0,0 +1,44 @@ +easyblock = 'ConfigureMake' + +name = 'ImageMagick' +version = '7.1.0-37' + +homepage = 'https://www.imagemagick.org/' +description = """ImageMagick is a software suite to create, edit, compose, or convert bitmap images""" + +toolchain = {'name': 'GCCcore', 'version': '11.3.0'} + +source_urls = ['https://github.com/ImageMagick/ImageMagick/archive/'] +sources = ['%(version)s.tar.gz'] +checksums = ['a54888a1a46dbb808705a3e6c6b5ecb93ee30189a8ae6ea0f02300a0ab0d0996'] + +dependencies = [ + ('bzip2', '1.0.8'), + ('X11', '20220504'), + ('Ghostscript', '9.56.1'), + ('JasPer', '2.0.33'), + ('libjpeg-turbo', '2.1.3'), + ('LibTIFF', '4.3.0'), + ('LittleCMS', '2.13.1'), + ('Pango', '1.50.7'), + ('pixman', '0.40.0'), + ('FriBidi', '1.0.12'), + ('PCRE', '8.45'), +] + +builddependencies = [ + ('binutils', '2.38'), + ('pkgconf', '1.8.0'), +] + +configopts = "--with-gslib --with-x" + +sanity_check_paths = { + 'files': [], + 'dirs': ['bin', 'etc/%(name)s-%(version_major)s', + 'include/%(name)s-%(version_major)s', 'lib', 'share'], +} + +modextravars = {'MAGICK_HOME': '%(installdir)s'} + +moduleclass = 'vis' diff --git a/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.0-2022a.yml b/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.0-2022a.yml index e745c18963..ff9f85bbc2 100644 --- a/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.0-2022a.yml +++ b/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.0-2022a.yml @@ -2,5 +2,5 @@ easyconfigs: - Stacks-2.62-foss-2022a.eb - ImageMagick-7.1.0-37-GCCcore-11.3.0.eb: # see https://github.com/easybuilders/easybuild-easyconfigs/pull/20086 - options: - from-pr: 20086 + #options: + # from-pr: 20086 From 0ba102e1c8678b22d858f8bd188f481d6481fde6 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Tue, 12 Mar 2024 22:02:16 +0100 Subject: [PATCH 03/11] remove easyconfig for ImageMagick --- ImageMagick-7.1.0-37-GCCcore-11.3.0.eb | 44 -------------------------- eb_hooks.py | 13 ++++++++ 2 files changed, 13 insertions(+), 44 deletions(-) delete mode 100644 ImageMagick-7.1.0-37-GCCcore-11.3.0.eb diff --git a/ImageMagick-7.1.0-37-GCCcore-11.3.0.eb b/ImageMagick-7.1.0-37-GCCcore-11.3.0.eb deleted file mode 100644 index 70d4d5eceb..0000000000 --- a/ImageMagick-7.1.0-37-GCCcore-11.3.0.eb +++ /dev/null @@ -1,44 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'ImageMagick' -version = '7.1.0-37' - -homepage = 'https://www.imagemagick.org/' -description = """ImageMagick is a software suite to create, edit, compose, or convert bitmap images""" - -toolchain = {'name': 'GCCcore', 'version': '11.3.0'} - -source_urls = ['https://github.com/ImageMagick/ImageMagick/archive/'] -sources = ['%(version)s.tar.gz'] -checksums = ['a54888a1a46dbb808705a3e6c6b5ecb93ee30189a8ae6ea0f02300a0ab0d0996'] - -dependencies = [ - ('bzip2', '1.0.8'), - ('X11', '20220504'), - ('Ghostscript', '9.56.1'), - ('JasPer', '2.0.33'), - ('libjpeg-turbo', '2.1.3'), - ('LibTIFF', '4.3.0'), - ('LittleCMS', '2.13.1'), - ('Pango', '1.50.7'), - ('pixman', '0.40.0'), - ('FriBidi', '1.0.12'), - ('PCRE', '8.45'), -] - -builddependencies = [ - ('binutils', '2.38'), - ('pkgconf', '1.8.0'), -] - -configopts = "--with-gslib --with-x" - -sanity_check_paths = { - 'files': [], - 'dirs': ['bin', 'etc/%(name)s-%(version_major)s', - 'include/%(name)s-%(version_major)s', 'lib', 'share'], -} - -modextravars = {'MAGICK_HOME': '%(installdir)s'} - -moduleclass = 'vis' diff --git a/eb_hooks.py b/eb_hooks.py index 585b70a899..eb2080fe8b 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -184,6 +184,18 @@ def parse_hook_fontconfig_add_fonts(ec, eprefix): raise EasyBuildError("fontconfig-specific hook triggered for non-fontconfig easyconfig?!") +def parse_hook_imagemagick_add_dependency(ec, eprefix): + """Add dependency for PCRE/8.45 for ImageMagick/7.1.0-37""" + if ec.name == 'ImageMagick': + if LooseVersion(ec.version) == LooseVersion('7.1.0-37'): + print_msg("Added dependency for PCRE/8.45 to %s/%s", ec.name, ec.version) + ec.update('builddependencies', ('PCRE', '8.45')) + else: + print_msg("Not adding dependency for %s/%s", ec.name, ec.version) + else: + raise EasyBuildError("ImageMagick-specific hook triggered for non-ImageMagick easyconfig?!") + + def parse_hook_openblas_relax_lapack_tests_num_errors(ec, eprefix): """Relax number of failing numerical LAPACK tests for aarch64/* CPU targets for OpenBLAS < 0.3.23""" cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR') @@ -589,6 +601,7 @@ def inject_gpu_property(ec): PARSE_HOOKS = { 'CGAL': parse_hook_cgal_toolchainopts_precise, 'fontconfig': parse_hook_fontconfig_add_fonts, + 'ImageMagick': parse_hook_imagemagick_add_dependency, 'OpenBLAS': parse_hook_openblas_relax_lapack_tests_num_errors, 'Pillow-SIMD' : parse_hook_Pillow_SIMD_harcoded_paths, 'pybind11': parse_hook_pybind11_replace_catch2, From 08fe73129cf45d0e30ac7ef181c3363647be88e0 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Tue, 12 Mar 2024 22:34:58 +0100 Subject: [PATCH 04/11] try different way to add dependency --- eb_hooks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eb_hooks.py b/eb_hooks.py index eb2080fe8b..b55ff652aa 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -189,7 +189,8 @@ def parse_hook_imagemagick_add_dependency(ec, eprefix): if ec.name == 'ImageMagick': if LooseVersion(ec.version) == LooseVersion('7.1.0-37'): print_msg("Added dependency for PCRE/8.45 to %s/%s", ec.name, ec.version) - ec.update('builddependencies', ('PCRE', '8.45')) + #ec.update('dependencies', ('PCRE', '8.45')) + ec['dependencies'].append(('PCRE', '8.45')) else: print_msg("Not adding dependency for %s/%s", ec.name, ec.version) else: From 8f5ec0499de544fb67bed53e790d210dcc840b40 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Wed, 13 Mar 2024 00:36:20 +0100 Subject: [PATCH 05/11] use ec PR 20086 --- .../pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.0-2022a.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.0-2022a.yml b/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.0-2022a.yml index ff9f85bbc2..e745c18963 100644 --- a/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.0-2022a.yml +++ b/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.0-2022a.yml @@ -2,5 +2,5 @@ easyconfigs: - Stacks-2.62-foss-2022a.eb - ImageMagick-7.1.0-37-GCCcore-11.3.0.eb: # see https://github.com/easybuilders/easybuild-easyconfigs/pull/20086 - #options: - # from-pr: 20086 + options: + from-pr: 20086 From 4b44dda3603b1b29cf7037f5ec27bb377bdc39ad Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Wed, 13 Mar 2024 13:25:37 +0100 Subject: [PATCH 06/11] polish parse_hook for ImageMagick/7.1.0-37 --- eb_hooks.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eb_hooks.py b/eb_hooks.py index b55ff652aa..e0f29ea031 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -189,10 +189,9 @@ def parse_hook_imagemagick_add_dependency(ec, eprefix): if ec.name == 'ImageMagick': if LooseVersion(ec.version) == LooseVersion('7.1.0-37'): print_msg("Added dependency for PCRE/8.45 to %s/%s", ec.name, ec.version) - #ec.update('dependencies', ('PCRE', '8.45')) ec['dependencies'].append(('PCRE', '8.45')) else: - print_msg("Not adding dependency for %s/%s", ec.name, ec.version) + print_msg("Not adding dependency for PCRE/8.45 to %s/%s", ec.name, ec.version) else: raise EasyBuildError("ImageMagick-specific hook triggered for non-ImageMagick easyconfig?!") From 8a98e3811cf4cd82c3b21c444fe23ebcc8d45b01 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Wed, 13 Mar 2024 22:26:47 +0100 Subject: [PATCH 07/11] add parse_hook for PyTorch to let CI pass --- eb_hooks.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/eb_hooks.py b/eb_hooks.py index e0f29ea031..4e356431b2 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -252,6 +252,30 @@ def parse_hook_pybind11_replace_catch2(ec, eprefix): build_deps[idx] = (catch2_name, catch2_version) +def parse_hook_PyTorch_replace_z3(ec, eprefix): + """ + Replace Z3 dependency in PyTorch/2.1.2 easyconfig to work around a change + of the Z3 eb/module name + cfr. https://github.com/easybuilders/easybuild-easyconfigs/pull/20050 + """ + # this is mainly necessary to avoid that --missing keeps reporting Z3/4.12.2 + # is missing, because previously it was Z3/4.12.2-GCCcore-12.3.0-Python-3.11.3 + if ec.name == 'PyTorch' and ec.version in ['2.1.2']: + deps = ec['dependencies'] + z3_dep = None + z3_name, z3_version, z3_suffix = ('Z3', '4.12.2', 'Python-3.11.3') + print_msg("scanning dependencies of %s/%s for %s/%s", + ec.name, ec.version, z3_name, z3_version) + for idx, dep in enumerate(deps): + if dep[0] == z3_name and dep[1] == z3_version: + z3_dep = dep + break + if z3_dep and len(z3_dep) == 2: + deps[idx] = (z3_name, z3_version, z3_suffix) + print_msg("replaced dependency %s/%s with %s/%s/%s for %s%s", + z3_name, z3_version, z3_name, z3_version, z3_suffix, ec.name, ec.version) + + def parse_hook_qt5_check_qtwebengine_disable(ec, eprefix): """ Disable check for QtWebEngine in Qt5 as workaround for problem with determining glibc version. @@ -605,6 +629,7 @@ def inject_gpu_property(ec): 'OpenBLAS': parse_hook_openblas_relax_lapack_tests_num_errors, 'Pillow-SIMD' : parse_hook_Pillow_SIMD_harcoded_paths, 'pybind11': parse_hook_pybind11_replace_catch2, + 'PyTorch': parse_hook_PyTorch_replace_z3, 'Qt5': parse_hook_qt5_check_qtwebengine_disable, 'UCX': parse_hook_ucx_eprefix, } From 4870c7290ce1433cf2928a10a0630324d8c0e5bd Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Wed, 13 Mar 2024 22:38:36 +0100 Subject: [PATCH 08/11] add specific toolchain for Z3 --- eb_hooks.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eb_hooks.py b/eb_hooks.py index 4e356431b2..a2a692c8a5 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -263,7 +263,7 @@ def parse_hook_PyTorch_replace_z3(ec, eprefix): if ec.name == 'PyTorch' and ec.version in ['2.1.2']: deps = ec['dependencies'] z3_dep = None - z3_name, z3_version, z3_suffix = ('Z3', '4.12.2', 'Python-3.11.3') + z3_name, z3_version, z3_suffix, z3_toolchain = ('Z3', '4.12.2', '-Python-3.11.3', '-GCCcore-12.3.0') print_msg("scanning dependencies of %s/%s for %s/%s", ec.name, ec.version, z3_name, z3_version) for idx, dep in enumerate(deps): @@ -271,9 +271,9 @@ def parse_hook_PyTorch_replace_z3(ec, eprefix): z3_dep = dep break if z3_dep and len(z3_dep) == 2: - deps[idx] = (z3_name, z3_version, z3_suffix) - print_msg("replaced dependency %s/%s with %s/%s/%s for %s%s", - z3_name, z3_version, z3_name, z3_version, z3_suffix, ec.name, ec.version) + deps[idx] = (z3_name, z3_version, z3_suffix, z3_toolchain) + print_msg("replaced dependency %s/%s with %s/%s/%s/%s for %s%s", + z3_name, z3_version, z3_name, z3_version, z3_suffix, z3_toolchain, ec.name, ec.version) def parse_hook_qt5_check_qtwebengine_disable(ec, eprefix): From db003e772c6408a81cac3c07e90f722c540d39a0 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Wed, 13 Mar 2024 23:08:07 +0100 Subject: [PATCH 09/11] remove toolchain part --- eb_hooks.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eb_hooks.py b/eb_hooks.py index a2a692c8a5..e3c3e43774 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -263,7 +263,7 @@ def parse_hook_PyTorch_replace_z3(ec, eprefix): if ec.name == 'PyTorch' and ec.version in ['2.1.2']: deps = ec['dependencies'] z3_dep = None - z3_name, z3_version, z3_suffix, z3_toolchain = ('Z3', '4.12.2', '-Python-3.11.3', '-GCCcore-12.3.0') + z3_name, z3_version, z3_suffix = ('Z3', '4.12.2', '-Python-3.11.3') print_msg("scanning dependencies of %s/%s for %s/%s", ec.name, ec.version, z3_name, z3_version) for idx, dep in enumerate(deps): @@ -271,9 +271,9 @@ def parse_hook_PyTorch_replace_z3(ec, eprefix): z3_dep = dep break if z3_dep and len(z3_dep) == 2: - deps[idx] = (z3_name, z3_version, z3_suffix, z3_toolchain) - print_msg("replaced dependency %s/%s with %s/%s/%s/%s for %s%s", - z3_name, z3_version, z3_name, z3_version, z3_suffix, z3_toolchain, ec.name, ec.version) + deps[idx] = (z3_name, z3_version, z3_suffix) + print_msg("replaced dependency %s/%s with %s/%s/%s for %s%s", + z3_name, z3_version, z3_name, z3_version, z3_suffix, ec.name, ec.version) def parse_hook_qt5_check_qtwebengine_disable(ec, eprefix): From acb8e43f5c1062e9a5ed38e73e386014d6f22ecc Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Wed, 13 Mar 2024 23:24:09 +0100 Subject: [PATCH 10/11] lowercase hook names --- eb_hooks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eb_hooks.py b/eb_hooks.py index e3c3e43774..95fbfbe8b0 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -252,7 +252,7 @@ def parse_hook_pybind11_replace_catch2(ec, eprefix): build_deps[idx] = (catch2_name, catch2_version) -def parse_hook_PyTorch_replace_z3(ec, eprefix): +def parse_hook_pytorch_replace_z3(ec, eprefix): """ Replace Z3 dependency in PyTorch/2.1.2 easyconfig to work around a change of the Z3 eb/module name @@ -272,7 +272,7 @@ def parse_hook_PyTorch_replace_z3(ec, eprefix): break if z3_dep and len(z3_dep) == 2: deps[idx] = (z3_name, z3_version, z3_suffix) - print_msg("replaced dependency %s/%s with %s/%s/%s for %s%s", + print_msg("replaced dependency %s/%s with %s/%s/%s for %s/%s", z3_name, z3_version, z3_name, z3_version, z3_suffix, ec.name, ec.version) @@ -629,7 +629,7 @@ def inject_gpu_property(ec): 'OpenBLAS': parse_hook_openblas_relax_lapack_tests_num_errors, 'Pillow-SIMD' : parse_hook_Pillow_SIMD_harcoded_paths, 'pybind11': parse_hook_pybind11_replace_catch2, - 'PyTorch': parse_hook_PyTorch_replace_z3, + 'PyTorch': parse_hook_pytorch_replace_z3, 'Qt5': parse_hook_qt5_check_qtwebengine_disable, 'UCX': parse_hook_ucx_eprefix, } From 3050379616dc4a44c36adc47c1ed8e9cb348c340 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Thu, 14 Mar 2024 17:54:35 +0100 Subject: [PATCH 11/11] remove parse_hook for PyTorch after new Z3/4.12.2 has been ingested --- eb_hooks.py | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/eb_hooks.py b/eb_hooks.py index 95fbfbe8b0..e0f29ea031 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -252,30 +252,6 @@ def parse_hook_pybind11_replace_catch2(ec, eprefix): build_deps[idx] = (catch2_name, catch2_version) -def parse_hook_pytorch_replace_z3(ec, eprefix): - """ - Replace Z3 dependency in PyTorch/2.1.2 easyconfig to work around a change - of the Z3 eb/module name - cfr. https://github.com/easybuilders/easybuild-easyconfigs/pull/20050 - """ - # this is mainly necessary to avoid that --missing keeps reporting Z3/4.12.2 - # is missing, because previously it was Z3/4.12.2-GCCcore-12.3.0-Python-3.11.3 - if ec.name == 'PyTorch' and ec.version in ['2.1.2']: - deps = ec['dependencies'] - z3_dep = None - z3_name, z3_version, z3_suffix = ('Z3', '4.12.2', '-Python-3.11.3') - print_msg("scanning dependencies of %s/%s for %s/%s", - ec.name, ec.version, z3_name, z3_version) - for idx, dep in enumerate(deps): - if dep[0] == z3_name and dep[1] == z3_version: - z3_dep = dep - break - if z3_dep and len(z3_dep) == 2: - deps[idx] = (z3_name, z3_version, z3_suffix) - print_msg("replaced dependency %s/%s with %s/%s/%s for %s/%s", - z3_name, z3_version, z3_name, z3_version, z3_suffix, ec.name, ec.version) - - def parse_hook_qt5_check_qtwebengine_disable(ec, eprefix): """ Disable check for QtWebEngine in Qt5 as workaround for problem with determining glibc version. @@ -629,7 +605,6 @@ def inject_gpu_property(ec): 'OpenBLAS': parse_hook_openblas_relax_lapack_tests_num_errors, 'Pillow-SIMD' : parse_hook_Pillow_SIMD_harcoded_paths, 'pybind11': parse_hook_pybind11_replace_catch2, - 'PyTorch': parse_hook_pytorch_replace_z3, 'Qt5': parse_hook_qt5_check_qtwebengine_disable, 'UCX': parse_hook_ucx_eprefix, }