Skip to content
Snippets Groups Projects
Commit a294da12 authored by Damian Alvarez's avatar Damian Alvarez
Browse files

First shot at aborting when installing the wrong packages

parent e5ff3034
No related branches found
No related tags found
No related merge requests found
...@@ -42,6 +42,15 @@ SUPPORTED_TOOLCHAIN_FAMILIES = ( ...@@ -42,6 +42,15 @@ SUPPORTED_TOOLCHAIN_FAMILIES = (
+ SUPPORTED_MPI_TOOLCHAIN_FAMILIES + SUPPORTED_MPI_TOOLCHAIN_FAMILIES
+ SUPPORTED_TOPLEVEL_TOOLCHAIN_FAMILIES + SUPPORTED_TOPLEVEL_TOOLCHAIN_FAMILIES
) )
VETOED_INSTALLATIONS = {
'juwelsbooster': ['impi'],
'juwels': [],
'jurecadc': [],
'jurecabooster': ['OpenMPI', 'CUDA', 'nvidia-driver', 'UCX', 'NVHPC']
'jusuf': ['impi'],
'hdfml': [],
}
# Also maintain a list of CUDA enabled compilers # Also maintain a list of CUDA enabled compilers
CUDA_ENABLED_TOOLCHAINS = ["pmvmklc", "gmvmklc", "gmvapich2c", "pmvapich2c"] CUDA_ENABLED_TOOLCHAINS = ["pmvmklc", "gmvmklc", "gmvapich2c", "pmvapich2c"]
# Use this for a heuristic to see if the easyconfig comes from the Golden Repo # Use this for a heuristic to see if the easyconfig comes from the Golden Repo
...@@ -184,10 +193,28 @@ family("mpi") ...@@ -184,10 +193,28 @@ family("mpi")
" eb --robot=$EASYBUILD_ROBOT:$EBROOTEASYBUILD/easybuild/easyconfigs --try-update-deps ...." " eb --robot=$EASYBUILD_ROBOT:$EBROOTEASYBUILD/easybuild/easyconfigs --try-update-deps ...."
) )
def installation_vetoer(self):
"Check whether this package is NOT supposed to be installed in this system, and abort if necessary"
ec = self.cfg
name = ec['name']
system_name = os.getenv('SYSTEMNAME')
if name in VETOED_INSTALLATIONS[system_name]:
print_warning(
"\nYou are attempting to install software that should not be installed in this system.\n"
"\nPlease double check the list of packages that you are attempting to install. The following\n"
f"\npackages can't be installed in {system_name}:\n"
)
for package in VETOED_INSTALLATIONS[system_name]:
print_warning(f"- {package}\n")
exit(1)
def pre_ready_hook(self, *args, **kwargs): def pre_ready_hook(self, *args, **kwargs):
"When we are building something, do some checks for bad behaviour" "When we are building something, do some checks for bad behaviour"
ec = self.cfg ec = self.cfg
# First of all check if this should be installed
installation_vetoer(ec)
# Grab name, path, toolchain, install path and check if we are installing # Grab name, path, toolchain, install path and check if we are installing
# GCCcore/MPI # GCCcore/MPI
name = ec["name"] name = ec["name"]
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment