Skip to content

Commit fc77daf

Browse files
committed
add pre-configure hook to adjust configure options for Zoltan when ParMETIS is not a dependency
1 parent 1e810da commit fc77daf

1 file changed

Lines changed: 23 additions & 5 deletions

File tree

eb_hooks.py

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,6 +1403,23 @@ def pre_configure_hook_cmake_system(self, *args, **kwargs):
14031403
raise EasyBuildError("CMake-specific hook triggered for non-CMake easyconfig?!")
14041404

14051405

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_dependency_software_version('ParMETIS', self.cfg, check_deps=True) 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+
14061423
def pre_test_hook(self, *args, **kwargs):
14071424
"""Main pre-test hook: trigger custom functions based on software name."""
14081425
if self.name in PRE_TEST_HOOKS:
@@ -1959,23 +1976,24 @@ def post_easyblock_hook(self, *args, **kwargs):
19591976

19601977
PRE_CONFIGURE_HOOKS = {
19611978
'BLIS': pre_configure_hook_BLIS,
1979+
'CMake': pre_configure_hook_cmake_system,
19621980
'CUDA-Samples': pre_configure_hook_CUDA_Samples_test_remove,
1963-
'GObject-Introspection': pre_configure_hook_gobject_introspection,
19641981
'Extrae': pre_configure_hook_extrae,
1982+
'GObject-Introspection': pre_configure_hook_gobject_introspection,
19651983
'Graphviz': pre_configure_hook_graphviz,
19661984
'GRASS': pre_configure_hook_grass,
1985+
'LAMMPS': pre_configure_hook_LAMMPS_zen4_and_aarch64_cuda,
19671986
'libfabric': pre_configure_hook_libfabric_disable_psm3_x86_64_generic,
19681987
'LLVM': pre_configure_hook_llvm,
1969-
'ROCm-LLVM': pre_configure_hook_llvm,
19701988
'MetaBAT': pre_configure_hook_metabat_filtered_zlib_dep,
19711989
'OpenBLAS': pre_configure_hook_openblas_optarch_generic,
19721990
'OpenMPI': pre_configure_hook_openmpi_ipv6,
19731991
'PMIx': pre_configure_hook_pmix_ipv6,
19741992
'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,
19771994
'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,
19791997
}
19801998

19811999
PRE_TEST_HOOKS = {

0 commit comments

Comments
 (0)