|
50 | 50 | HOST_INJECTIONS_LOCATION = "/cvmfs/software.eessi.io/host_injections/" |
51 | 51 |
|
52 | 52 | # Make sure a single environment variable name is used for this throughout the hooks |
53 | | -EESSI_IGNORE_A64FX_RUST1650_ENVVAR="EESSI_IGNORE_LMOD_ERROR_A64FX_RUST1650" |
54 | 53 | EESSI_IGNORE_ZEN4_GCC1220_ENVVAR="EESSI_IGNORE_LMOD_ERROR_ZEN4_GCC1220" |
55 | 54 |
|
56 | 55 | STACK_REPROD_SUBDIR = 'reprod' |
@@ -156,9 +155,6 @@ def parse_hook(ec, *args, **kwargs): |
156 | 155 | if cpu_target == CPU_TARGET_ZEN4: |
157 | 156 | parse_hook_zen4_module_only(ec, eprefix) |
158 | 157 |
|
159 | | - # All A64FX builds for the 2022b toolchain should use a newer Rust version, as the original one does not work |
160 | | - parse_hook_bump_rust_version_in_2022b_for_a64fx(ec, eprefix) |
161 | | - |
162 | 158 | # inject the GPU property (if required) |
163 | 159 | ec = inject_gpu_property(ec) |
164 | 160 |
|
@@ -453,33 +449,6 @@ def parse_hook_openblas_relax_lapack_tests_num_errors(ec, eprefix): |
453 | 449 | raise EasyBuildError("OpenBLAS-specific hook triggered for non-OpenBLAS easyconfig?!") |
454 | 450 |
|
455 | 451 |
|
456 | | -def parse_hook_bump_rust_version_in_2022b_for_a64fx(ec, eprefix): |
457 | | - """ |
458 | | - Replace Rust 1.65.0 build dependency by version 1.75.0 for A64FX builds, |
459 | | - because version 1.65.0 has build issues. |
460 | | - """ |
461 | | - cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR') |
462 | | - |
463 | | - if cpu_target == CPU_TARGET_A64FX: |
464 | | - # For Rust 1.65.0 itself we inject an error message in the module file |
465 | | - if ec['name'] == 'Rust' and ec['version'] == '1.65.0': |
466 | | - errmsg = "Rust 1.65.0 is not supported on A64FX. Please use version 1.75.0 instead." |
467 | | - ec['modluafooter'] = 'if (not os.getenv("%s")) then LmodError("%s") end' % (EESSI_IGNORE_A64FX_RUST1650_ENVVAR, errmsg) |
468 | | - |
469 | | - # For any builds that have a build dependency on Rust 1.65.0, we bump the version to 1.75.0 |
470 | | - if is_gcccore_1220_based(ecname=ec['name'], ecversion=ec['version'], |
471 | | - tcname=ec['toolchain']['name'], tcversion=ec['toolchain']['version']): |
472 | | - |
473 | | - build_deps = ec['builddependencies'] |
474 | | - rust_name = 'Rust' |
475 | | - rust_original_version = '1.65.0' |
476 | | - rust_new_version = '1.75.0' |
477 | | - for idx, build_dep in enumerate(build_deps): |
478 | | - if build_dep[0] == rust_name and build_dep[1] == rust_original_version: |
479 | | - build_deps[idx] = (rust_name, rust_new_version) |
480 | | - break |
481 | | - |
482 | | - |
483 | 452 | def parse_hook_pybind11_replace_catch2(ec, eprefix): |
484 | 453 | """ |
485 | 454 | Replace Catch2 build dependency in pybind11 easyconfigs with one that doesn't use system toolchain. |
@@ -605,8 +574,6 @@ def is_unsupported_module(ec): |
605 | 574 | """ |
606 | 575 | cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR') |
607 | 576 |
|
608 | | - if cpu_target == CPU_TARGET_A64FX and ec.name == 'Rust' and ec.version == '1.65.0': |
609 | | - return EESSI_IGNORE_A64FX_RUST1650_ENVVAR |
610 | 577 | if cpu_target == CPU_TARGET_ZEN4 and is_gcccore_1220_based(ecname=ec.name, ecversion=ec.version, tcname=ec.toolchain.name, tcversion=ec.toolchain.version): |
611 | 578 | return EESSI_IGNORE_ZEN4_GCC1220_ENVVAR |
612 | 579 | return False |
@@ -736,6 +703,29 @@ def post_prepare_hook_highway_handle_test_compilation_issues(self, *args, **kwar |
736 | 703 | update_build_option('optarch', self.orig_optarch) |
737 | 704 |
|
738 | 705 |
|
| 706 | +def pre_prepare_hook_llvm15_a64fx(self, *args, **kwargs): |
| 707 | + """ |
| 708 | + Solve issues with compiling LLVM 15.0.5 on A64FX by changing the optarch build option. |
| 709 | + Rust 1.65.0 also includes LLVM 15, so we do the same for that application. |
| 710 | + cfr. https://github.com/EESSI/software-layer/issues/1213 |
| 711 | + """ |
| 712 | + cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR') |
| 713 | + if cpu_target == CPU_TARGET_A64FX: |
| 714 | + if (self.name == 'LLVM' and self.version == '15.0.5') or (self.name == 'Rust' and self.version == '1.65.0'): |
| 715 | + self.orig_optarch = build_option('optarch') |
| 716 | + update_build_option('optarch', 'march=armv8.2-a') |
| 717 | + |
| 718 | + |
| 719 | +def post_prepare_hook_llvm15_a64fx(self, *args, **kwargs): |
| 720 | + """ |
| 721 | + Post-prepare hook for LLVM 15 to reset optarch build option. |
| 722 | + """ |
| 723 | + cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR') |
| 724 | + if cpu_target == CPU_TARGET_A64FX: |
| 725 | + if (self.name == 'LLVM' and self.version == '15.0.5') or (self.name == 'Rust' and self.version == '1.65.0'): |
| 726 | + update_build_option('optarch', self.orig_optarch) |
| 727 | + |
| 728 | + |
739 | 729 | def pre_configure_hook(self, *args, **kwargs): |
740 | 730 | """Main pre-configure hook: trigger custom functions based on software name.""" |
741 | 731 | if self.name in PRE_CONFIGURE_HOOKS: |
@@ -1610,11 +1600,15 @@ def post_easyblock_hook(self, *args, **kwargs): |
1610 | 1600 |
|
1611 | 1601 | PRE_PREPARE_HOOKS = { |
1612 | 1602 | 'Highway': pre_prepare_hook_highway_handle_test_compilation_issues, |
| 1603 | + 'LLVM': pre_prepare_hook_llvm15_a64fx, |
| 1604 | + 'Rust': pre_prepare_hook_llvm15_a64fx, |
1613 | 1605 | } |
1614 | 1606 |
|
1615 | 1607 | POST_PREPARE_HOOKS = { |
1616 | 1608 | 'GCCcore': post_prepare_hook_gcc_prefixed_ld_rpath_wrapper, |
1617 | 1609 | 'Highway': post_prepare_hook_highway_handle_test_compilation_issues, |
| 1610 | + 'LLVM': post_prepare_hook_llvm15_a64fx, |
| 1611 | + 'Rust': post_prepare_hook_llvm15_a64fx, |
1618 | 1612 | } |
1619 | 1613 |
|
1620 | 1614 | PRE_CONFIGURE_HOOKS = { |
|
0 commit comments