-
Notifications
You must be signed in to change notification settings - Fork 20
Skip tests that require gpus when crosscompiling Siesta #254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,7 @@ | |
| from easybuild.tools.filetools import apply_regex_substitutions, copy_dir, copy_file, remove_file, symlink, which | ||
| from easybuild.tools.modules import get_software_root, get_software_root_env_var_name | ||
| from easybuild.tools.run import run_cmd | ||
| from easybuild.tools.systemtools import AARCH64, POWER, X86_64, det_parallelism, get_cpu_architecture, get_cpu_features | ||
| from easybuild.tools.systemtools import AARCH64, POWER, X86_64, det_parallelism, get_cpu_architecture, get_cpu_features, get_gpu_info | ||
| from easybuild.tools.toolchain.compiler import OPTARCH_GENERIC | ||
| from easybuild.tools.toolchain.toolchain import is_system_toolchain | ||
| from easybuild.tools.version import VERSION as EASYBUILD_VERSION | ||
|
|
@@ -1705,6 +1705,23 @@ def pre_test_hook_ignore_failing_tests_OpenBabel_a64fx(self, *args, **kwargs): | |
| self.cfg['testopts'] = "|| echo ignoring failing tests" | ||
|
|
||
|
|
||
| def pre_test_hook_Siesta_ignore_failure_with_crosscompilation(self, *args, **kwargs): | ||
| """ | ||
| Ignore failing tests when crosscompiling without gpu pressent. | ||
| """ | ||
| if self.name == 'Siesta': | ||
| if self.version in ['5.4.2']: | ||
| cuda_cc = build_option('cuda_compute_capabilities') | ||
| if cuda_cc and not get_gpu_info(): | ||
| failing_tests=[ | ||
| "Solvers-si-qdot-elsi-elpa-gpu_mpi4_omp1", # runs cuda get device | ||
| "Solvers-si-qdot-elsi-elpa-1stage-gpu_mpi4_omp1", # runs cuda get device | ||
| "Solvers-si-qdot-elpa-native-gpu_mpi4_omp1", # runs cuda get device | ||
| "Solvers-si-qdot-elpa-native-1stage-gpu_mpi4_omp1", # runs cuda get device | ||
| ] | ||
| self.cfg['testopts'] = self.cfg['testopts'][:-1] + "|" + "|".join(failing_tests) + "'" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're making a lot of assumptions here, maybe it's better to use a regular expression here to keep the part that's already there in the >>> testopts
"--output-on-failure -E 'foo|bar'"
>>>
>>>
>>> re.sub(r"-E '(.*)'", r"-E '\1|one|two'", testopts)
"--output-on-failure -E 'foo|bar|one|two'" |
||
|
|
||
|
|
||
| def pre_single_extension_hook(ext, *args, **kwargs): | ||
| """Main pre-extension: trigger custom functions based on software name.""" | ||
| if ext.name in PRE_SINGLE_EXTENSION_HOOKS: | ||
|
|
@@ -2118,6 +2135,7 @@ def post_easyblock_hook(self, *args, **kwargs): | |
| 'Highway': pre_test_hook_exclude_failing_test_Highway, | ||
| 'LAMMPS': pre_test_hook_lammps_ignore_failure_arm_generic, | ||
| 'SciPy-bundle': pre_test_hook_ignore_failing_tests_SciPybundle, | ||
| 'Siesta': pre_test_hook_Siesta_ignore_failure_with_crosscompilation, | ||
| 'netCDF': pre_test_hook_ignore_failing_tests_netCDF, | ||
| 'OpenBabel': pre_test_hook_ignore_failing_tests_OpenBabel_a64fx, | ||
| 'PyTorch': pre_test_hook_increase_max_failed_tests_arm_PyTorch, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| /cvmfs/software.eessi.io | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this file/link supposed to be here...?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know where it came from. I'll fix it but I also need to make updates with Kenneths suggestions so will do it then. |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also check for
CUDAinself.cfg['versionsuffix']?We should only skip these tests for CUDA easyconfigs of Siesta