|
18 | 18 | from easybuild.tools.filetools import apply_regex_substitutions, copy_dir, copy_file, remove_file, symlink, which |
19 | 19 | from easybuild.tools.modules import get_software_root, get_software_root_env_var_name |
20 | 20 | from easybuild.tools.run import run_cmd |
21 | | -from easybuild.tools.systemtools import AARCH64, POWER, X86_64, det_parallelism, get_cpu_architecture, get_cpu_features |
| 21 | +from easybuild.tools.systemtools import AARCH64, POWER, X86_64, det_parallelism, get_cpu_architecture, get_cpu_features, get_gpu_info |
22 | 22 | from easybuild.tools.toolchain.compiler import OPTARCH_GENERIC |
23 | 23 | from easybuild.tools.toolchain.toolchain import is_system_toolchain |
24 | 24 | from easybuild.tools.version import VERSION as EASYBUILD_VERSION |
@@ -1731,6 +1731,26 @@ def pre_test_hook_ignore_failing_tests_OpenBabel_a64fx(self, *args, **kwargs): |
1731 | 1731 | self.cfg['testopts'] = "|| echo ignoring failing tests" |
1732 | 1732 |
|
1733 | 1733 |
|
| 1734 | +def pre_test_hook_Siesta_ignore_failure_with_crosscompilation(self, *args, **kwargs): |
| 1735 | + """ |
| 1736 | + Ignore failing tests when crosscompiling without gpu present. |
| 1737 | + """ |
| 1738 | + if self.name == 'Siesta': |
| 1739 | + if self.version in ['5.4.2']: |
| 1740 | + if 'CUDA' in self.cfg['versionsuffix']: |
| 1741 | + cuda_cc = build_option('cuda_compute_capabilities') |
| 1742 | + if cuda_cc and not get_gpu_info(): |
| 1743 | + failing_tests=[ |
| 1744 | + "Solvers-si-qdot-elsi-elpa-gpu_mpi4_omp1", # runs cuda get device |
| 1745 | + "Solvers-si-qdot-elsi-elpa-1stage-gpu_mpi4_omp1", # runs cuda get device |
| 1746 | + "Solvers-si-qdot-elpa-native-gpu_mpi4_omp1", # runs cuda get device |
| 1747 | + "Solvers-si-qdot-elpa-native-1stage-gpu_mpi4_omp1", # runs cuda get device |
| 1748 | + ] |
| 1749 | + extra_testopts = "|".join(failing_tests) |
| 1750 | + testopts = self.cfg['testopts'] |
| 1751 | + self.cfg['testopts'] = re.sub(r"-E '(.*)'", rf"-E '\1|{extra_testopts}'", testopts) |
| 1752 | + |
| 1753 | + |
1734 | 1754 | def pre_single_extension_hook(ext, *args, **kwargs): |
1735 | 1755 | """Main pre-extension: trigger custom functions based on software name.""" |
1736 | 1756 | if ext.name in PRE_SINGLE_EXTENSION_HOOKS: |
@@ -2145,6 +2165,7 @@ def post_easyblock_hook(self, *args, **kwargs): |
2145 | 2165 | 'Highway': pre_test_hook_exclude_failing_test_Highway, |
2146 | 2166 | 'LAMMPS': pre_test_hook_lammps_ignore_failure_arm_generic, |
2147 | 2167 | 'SciPy-bundle': pre_test_hook_ignore_failing_tests_SciPybundle, |
| 2168 | + 'Siesta': pre_test_hook_Siesta_ignore_failure_with_crosscompilation, |
2148 | 2169 | 'netCDF': pre_test_hook_ignore_failing_tests_netCDF, |
2149 | 2170 | 'OpenBabel': pre_test_hook_ignore_failing_tests_OpenBabel_a64fx, |
2150 | 2171 | 'PyTorch': pre_test_hook_increase_max_failed_tests_arm_PyTorch, |
|
0 commit comments