From c1764335999be619d5b2ae8629fd9552a1b87abc Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Tue, 24 Sep 2024 15:23:06 +0200 Subject: [PATCH 01/12] Add gmsh --- .../software.eessi.io/2023.06/eessi-2023.06-eb-4.9.3-2023a.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 easystacks/software.eessi.io/2023.06/eessi-2023.06-eb-4.9.3-2023a.yml diff --git a/easystacks/software.eessi.io/2023.06/eessi-2023.06-eb-4.9.3-2023a.yml b/easystacks/software.eessi.io/2023.06/eessi-2023.06-eb-4.9.3-2023a.yml new file mode 100644 index 0000000000..f2d8a9380f --- /dev/null +++ b/easystacks/software.eessi.io/2023.06/eessi-2023.06-eb-4.9.3-2023a.yml @@ -0,0 +1,2 @@ +easyconfigs: + - gmsh-4.12.2-foss-2023a.eb From 8594bb2abbbc01ec5c23e87fb95a6e8198b43284 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Tue, 24 Sep 2024 15:59:45 +0200 Subject: [PATCH 02/12] Also add basemap and geopandas --- .../software.eessi.io/2023.06/eessi-2023.06-eb-4.9.3-2023a.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/easystacks/software.eessi.io/2023.06/eessi-2023.06-eb-4.9.3-2023a.yml b/easystacks/software.eessi.io/2023.06/eessi-2023.06-eb-4.9.3-2023a.yml index f2d8a9380f..a34e5d768e 100644 --- a/easystacks/software.eessi.io/2023.06/eessi-2023.06-eb-4.9.3-2023a.yml +++ b/easystacks/software.eessi.io/2023.06/eessi-2023.06-eb-4.9.3-2023a.yml @@ -1,2 +1,4 @@ easyconfigs: - gmsh-4.12.2-foss-2023a.eb + - basemap-1.3.9-foss-2023a.eb + - geopandas-0.14.2-foss-2023a.eb From 2ca35fc51326cee97b21fe381c55421c047f87ae Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Wed, 25 Sep 2024 09:32:10 +0200 Subject: [PATCH 03/12] Add fPIC through hooks for FreeImage on ARM, see if that resolves https://github.com/EESSI/software-layer/pull/736#issuecomment-2373261889 --- eb_hooks.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/eb_hooks.py b/eb_hooks.py index b3e457cfe3..0987d6d683 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -297,6 +297,18 @@ def parse_hook_ucx_eprefix(ec, eprefix): raise EasyBuildError("UCX-specific hook triggered for non-UCX easyconfig?!") +def parse_hook_freeimage_aarch64(ec, *args, **kwargs): + """ + Make sure to build with -fPIC on ARM to avoid + https://github.com/EESSI/software-layer/pull/736#issuecomment-2373261889 + """ + if ec.name == 'FreeImage' and ec.version in ('3.18.0',): + if os.getenv('EESSI_CPU_FAMILY') == 'aarch64': + if not hasattr(ec, 'toolchainopts'): + ec['toolchainopts'] = {} + ec['toolchainopts']['fPIC'] = True + print_msg("Changed toochainopts for %s: %s", ec.name, ec['toolchainopts']) + def parse_hook_lammps_remove_deps_for_CI_aarch64(ec, *args, **kwargs): """ Remove x86_64 specific dependencies for the CI to pass on aarch64 From b4f6b60c2f5c582360a1148ceb5052077d7287fd Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Wed, 25 Sep 2024 10:41:07 +0200 Subject: [PATCH 04/12] Actually use the hook... --- eb_hooks.py | 1 + 1 file changed, 1 insertion(+) diff --git a/eb_hooks.py b/eb_hooks.py index 0987d6d683..15e51e688c 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -787,6 +787,7 @@ def inject_gpu_property(ec): 'casacore': parse_hook_casacore_disable_vectorize, 'CGAL': parse_hook_cgal_toolchainopts_precise, 'fontconfig': parse_hook_fontconfig_add_fonts, + 'FreeImage': parse_hook_freeimage_aarch64, 'grpcio': parse_hook_grpcio_zlib, 'LAMMPS': parse_hook_lammps_remove_deps_for_CI_aarch64, 'CP2K': parse_hook_CP2K_remove_deps_for_aarch64, From 1d446dcddcc68b09efa85429198435f7a3cdfe05 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Wed, 25 Sep 2024 11:05:38 +0200 Subject: [PATCH 05/12] The eb toolchainopts is called pic, not fPIC --- eb_hooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eb_hooks.py b/eb_hooks.py index 15e51e688c..2b503f4f9d 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -306,7 +306,7 @@ def parse_hook_freeimage_aarch64(ec, *args, **kwargs): if os.getenv('EESSI_CPU_FAMILY') == 'aarch64': if not hasattr(ec, 'toolchainopts'): ec['toolchainopts'] = {} - ec['toolchainopts']['fPIC'] = True + ec['toolchainopts']['pic'] = True print_msg("Changed toochainopts for %s: %s", ec.name, ec['toolchainopts']) def parse_hook_lammps_remove_deps_for_CI_aarch64(ec, *args, **kwargs): From 9f1971c52800881157098bde58e3bac82649c99c Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Wed, 25 Sep 2024 15:15:27 +0200 Subject: [PATCH 06/12] Dont use hasattr on ec, since it's a dict, not an object --- eb_hooks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eb_hooks.py b/eb_hooks.py index 2b503f4f9d..4f9cd88bd3 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -304,10 +304,10 @@ def parse_hook_freeimage_aarch64(ec, *args, **kwargs): """ if ec.name == 'FreeImage' and ec.version in ('3.18.0',): if os.getenv('EESSI_CPU_FAMILY') == 'aarch64': - if not hasattr(ec, 'toolchainopts'): + if toolchainopts not in ec: ec['toolchainopts'] = {} ec['toolchainopts']['pic'] = True - print_msg("Changed toochainopts for %s: %s", ec.name, ec['toolchainopts']) + print_msg("Changed toolchainopts for %s: %s", ec.name, ec['toolchainopts']) def parse_hook_lammps_remove_deps_for_CI_aarch64(ec, *args, **kwargs): """ From eebd184890922cd205ae0c8c2e66892701e1491f Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Wed, 25 Sep 2024 15:25:31 +0200 Subject: [PATCH 07/12] Should be a string of course --- eb_hooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eb_hooks.py b/eb_hooks.py index 4f9cd88bd3..9cff30f939 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -304,7 +304,7 @@ def parse_hook_freeimage_aarch64(ec, *args, **kwargs): """ if ec.name == 'FreeImage' and ec.version in ('3.18.0',): if os.getenv('EESSI_CPU_FAMILY') == 'aarch64': - if toolchainopts not in ec: + if 'toolchainopts' not in ec: ec['toolchainopts'] = {} ec['toolchainopts']['pic'] = True print_msg("Changed toolchainopts for %s: %s", ec.name, ec['toolchainopts']) From 61c61237028ba23b3643fc2478a2e1071c86554f Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Wed, 25 Sep 2024 22:58:45 +0200 Subject: [PATCH 08/12] Fix issue with missing symbol --- eb_hooks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eb_hooks.py b/eb_hooks.py index 9cff30f939..0538650595 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -186,7 +186,7 @@ def parse_hook_casacore_disable_vectorize(ec, eprefix): ): cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR') if cpu_target == CPU_TARGET_NEOVERSE_V1: - if not hasattr(ec, 'toolchainopts'): + if 'toolchainopts' not in ec: ec['toolchainopts'] = {} ec['toolchainopts']['vectorize'] = False print_msg("Changed toochainopts for %s: %s", ec.name, ec['toolchainopts']) @@ -307,8 +307,10 @@ def parse_hook_freeimage_aarch64(ec, *args, **kwargs): if 'toolchainopts' not in ec: ec['toolchainopts'] = {} ec['toolchainopts']['pic'] = True + ec['toolchainopts']['extracflags'] = '-DPNG_ARM_NEON_OPT=0' print_msg("Changed toolchainopts for %s: %s", ec.name, ec['toolchainopts']) + def parse_hook_lammps_remove_deps_for_CI_aarch64(ec, *args, **kwargs): """ Remove x86_64 specific dependencies for the CI to pass on aarch64 From 4273dab9cafffa7f28c3d67e6d999caa5d08ce99 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Wed, 25 Sep 2024 23:10:33 +0200 Subject: [PATCH 09/12] Use correct keyword --- eb_hooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eb_hooks.py b/eb_hooks.py index 0538650595..a33b71a812 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -307,7 +307,7 @@ def parse_hook_freeimage_aarch64(ec, *args, **kwargs): if 'toolchainopts' not in ec: ec['toolchainopts'] = {} ec['toolchainopts']['pic'] = True - ec['toolchainopts']['extracflags'] = '-DPNG_ARM_NEON_OPT=0' + ec['toolchainopts']['extra_cflags'] = '-DPNG_ARM_NEON_OPT=0' print_msg("Changed toolchainopts for %s: %s", ec.name, ec['toolchainopts']) From 0080c9c9b971532482aaba5cb7cc37dad34a9d49 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 1 Oct 2024 20:36:33 +0200 Subject: [PATCH 10/12] add gmsh & co easyconfig at bottom of easystack file --- .../2023.06/eessi-2023.06-eb-4.9.3-2023a.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/easystacks/software.eessi.io/2023.06/eessi-2023.06-eb-4.9.3-2023a.yml b/easystacks/software.eessi.io/2023.06/eessi-2023.06-eb-4.9.3-2023a.yml index 9e5582485c..0c863f0025 100644 --- a/easystacks/software.eessi.io/2023.06/eessi-2023.06-eb-4.9.3-2023a.yml +++ b/easystacks/software.eessi.io/2023.06/eessi-2023.06-eb-4.9.3-2023a.yml @@ -1,8 +1,8 @@ easyconfigs: - - gmsh-4.12.2-foss-2023a.eb - - basemap-1.3.9-foss-2023a.eb - - geopandas-0.14.2-foss-2023a.eb - ccache-4.9-GCCcore-12.3.0.eb - GDB-13.2-GCCcore-12.3.0.eb - tmux-3.3a-GCCcore-12.3.0.eb - - Vim-9.1.0004-GCCcore-12.3.0.eb \ No newline at end of file + - Vim-9.1.0004-GCCcore-12.3.0.eb + - gmsh-4.12.2-foss-2023a.eb + - basemap-1.3.9-foss-2023a.eb + - geopandas-0.14.2-foss-2023a.eb \ No newline at end of file From cde0cc8db464e69baefb9280c3e187b254e5974e Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Wed, 2 Oct 2024 10:50:52 +0200 Subject: [PATCH 11/12] More safely add to the toolchainopts --- eb_hooks.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/eb_hooks.py b/eb_hooks.py index 3754564c5c..79bdeeee0d 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -190,7 +190,9 @@ def parse_hook_casacore_disable_vectorize(ec, eprefix): ): cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR') if cpu_target == CPU_TARGET_NEOVERSE_V1: - if 'toolchainopts' not in ec: + # Make sure the toolchainopts key exists, and the value is a dict, + # before we add the option to disable vectorization + if 'toolchainopts' not in ec or ec['toolchainopts'] is None: ec['toolchainopts'] = {} ec['toolchainopts']['vectorize'] = False print_msg("Changed toochainopts for %s: %s", ec.name, ec['toolchainopts']) @@ -308,7 +310,9 @@ def parse_hook_freeimage_aarch64(ec, *args, **kwargs): """ if ec.name == 'FreeImage' and ec.version in ('3.18.0',): if os.getenv('EESSI_CPU_FAMILY') == 'aarch64': - if 'toolchainopts' not in ec: + # Make sure the toolchainopts key exists, and the value is a dict, + # before we add the option to enable PIC and disable PNG_ARM_NEON_OPT + if 'toolchainopts' not in ec or ec['toolchainopts'] is None: ec['toolchainopts'] = {} ec['toolchainopts']['pic'] = True ec['toolchainopts']['extra_cflags'] = '-DPNG_ARM_NEON_OPT=0' From c9613e79ef0585443a9e36a9773683f2904ca1ef Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 2 Oct 2024 13:22:05 +0200 Subject: [PATCH 12/12] only copy module_files.list.txt if it exists in create_tarball.sh script --- create_tarball.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/create_tarball.sh b/create_tarball.sh index 9c212681a5..01f498e1ac 100755 --- a/create_tarball.sh +++ b/create_tarball.sh @@ -89,13 +89,17 @@ for subdir in ${cpu_arch_subdir} ${cpu_arch_subdir}/accel/${accel_subdir}; do done # add a bit debug output -echo "wrote file list to ${files_list}" -[ -r ${files_list} ] && cat ${files_list} -echo "wrote module file list to ${module_files_list}" -[ -r ${module_files_list} ] && cat ${module_files_list} +if [ -r ${files_list} ]; then + echo "wrote file list to ${files_list}" + cat ${files_list} +fi +if [ -r ${module_files_list} ]; then + echo "wrote module file list to ${module_files_list}" + cat ${module_files_list} -# Copy the module files list to current workindg dir for later use in the test step -cp ${module_files_list} ${current_workdir}/module_files.list.txt + # Copy the module files list to current workindg dir for later use in the test step + cp ${module_files_list} ${current_workdir}/module_files.list.txt +fi topdir=${cvmfs_repo}/versions/