|
16 | 16 | from easybuild.tools.build_log import EasyBuildError, print_msg, print_warning |
17 | 17 | from easybuild.tools.config import build_option, install_path, update_build_option |
18 | 18 | from easybuild.tools.filetools import apply_regex_substitutions, copy_dir, copy_file, remove_file, symlink, which |
| 19 | +from easybuild.tools.modules import get_software_root, get_software_root_env_var_name |
19 | 20 | from easybuild.tools.run import run_cmd |
20 | 21 | from easybuild.tools.systemtools import AARCH64, POWER, X86_64, det_parallelism, get_cpu_architecture, get_cpu_features |
21 | 22 | from easybuild.tools.toolchain.compiler import OPTARCH_GENERIC |
22 | 23 | from easybuild.tools.toolchain.toolchain import is_system_toolchain |
23 | 24 | from easybuild.tools.version import VERSION as EASYBUILD_VERSION |
24 | | -from easybuild.tools.modules import get_software_root_env_var_name |
25 | 25 |
|
26 | 26 | # prefer importing LooseVersion from easybuild.tools, but fall back to distuils in case EasyBuild <= 4.7.0 is used |
27 | 27 | try: |
@@ -1403,6 +1403,23 @@ def pre_configure_hook_cmake_system(self, *args, **kwargs): |
1403 | 1403 | raise EasyBuildError("CMake-specific hook triggered for non-CMake easyconfig?!") |
1404 | 1404 |
|
1405 | 1405 |
|
| 1406 | +def pre_configure_hook_Zoltan(self, *args, **kwargs): |
| 1407 | + """ |
| 1408 | + Pre-configure hook for Zoltan to filter out ParMETIS configure options, |
| 1409 | + since we filter out ParMETIS as a dependency |
| 1410 | + """ |
| 1411 | + if self.name == 'Zoltan': |
| 1412 | + if get_software_root('ParMETIS') is None: |
| 1413 | + configopts = self.cfg['configopts'] |
| 1414 | + # get rid of all --with-parmetis configure options, and inject --without-parmetis |
| 1415 | + configopts = re.sub('--with-parmetis[^ ]*', '', configopts) |
| 1416 | + configopts += " --without-parmetis" |
| 1417 | + self.cfg['configopts'] = configopts |
| 1418 | + self.log.info("Removed --with-parmetis* configure options for {self.name}, ParMETIS is not a dependency") |
| 1419 | + else: |
| 1420 | + raise EasyBuildError("Zoltan-specific hook triggered for non-Zoltan easyconfig?!") |
| 1421 | + |
| 1422 | + |
1406 | 1423 | def pre_test_hook(self, *args, **kwargs): |
1407 | 1424 | """Main pre-test hook: trigger custom functions based on software name.""" |
1408 | 1425 | if self.name in PRE_TEST_HOOKS: |
@@ -1959,23 +1976,24 @@ def post_easyblock_hook(self, *args, **kwargs): |
1959 | 1976 |
|
1960 | 1977 | PRE_CONFIGURE_HOOKS = { |
1961 | 1978 | 'BLIS': pre_configure_hook_BLIS, |
| 1979 | + 'CMake': pre_configure_hook_cmake_system, |
1962 | 1980 | 'CUDA-Samples': pre_configure_hook_CUDA_Samples_test_remove, |
1963 | | - 'GObject-Introspection': pre_configure_hook_gobject_introspection, |
1964 | 1981 | 'Extrae': pre_configure_hook_extrae, |
| 1982 | + 'GObject-Introspection': pre_configure_hook_gobject_introspection, |
1965 | 1983 | 'Graphviz': pre_configure_hook_graphviz, |
1966 | 1984 | 'GRASS': pre_configure_hook_grass, |
| 1985 | + 'LAMMPS': pre_configure_hook_LAMMPS_zen4_and_aarch64_cuda, |
1967 | 1986 | 'libfabric': pre_configure_hook_libfabric_disable_psm3_x86_64_generic, |
1968 | 1987 | 'LLVM': pre_configure_hook_llvm, |
1969 | | - 'ROCm-LLVM': pre_configure_hook_llvm, |
1970 | 1988 | 'MetaBAT': pre_configure_hook_metabat_filtered_zlib_dep, |
1971 | 1989 | 'OpenBLAS': pre_configure_hook_openblas_optarch_generic, |
1972 | 1990 | 'OpenMPI': pre_configure_hook_openmpi_ipv6, |
1973 | 1991 | 'PMIx': pre_configure_hook_pmix_ipv6, |
1974 | 1992 | 'PRRTE': pre_configure_hook_prrte_ipv6, |
1975 | | - 'WRF': pre_configure_hook_wrf_aarch64, |
1976 | | - 'LAMMPS': pre_configure_hook_LAMMPS_zen4_and_aarch64_cuda, |
| 1993 | + 'ROCm-LLVM': pre_configure_hook_llvm, |
1977 | 1994 | 'Score-P': pre_configure_hook_score_p, |
1978 | | - 'CMake': pre_configure_hook_cmake_system, |
| 1995 | + 'WRF': pre_configure_hook_wrf_aarch64, |
| 1996 | + 'Zoltan': pre_configure_hook_Zoltan, |
1979 | 1997 | } |
1980 | 1998 |
|
1981 | 1999 | PRE_TEST_HOOKS = { |
|
0 commit comments