diff --git a/mpcdf_common.py b/mpcdf_common.py
index 51b9937f8b36b843592c59950e5d84fbf1ac7869..c7591d639f80d1bbc74f0d67fb5e180645d88097 100644
--- a/mpcdf_common.py
+++ b/mpcdf_common.py
@@ -283,20 +283,20 @@ def repo_tags(reponame, distribution=None):
 
 
 compiler_cuda = {
-    "cuda_8_0": "gcc_5",
-    "cuda_9_1": "gcc_6_3_0",
-    "cuda_9_2": "gcc_6",
-    "cuda_10_0": "gcc_6",
-    "cuda_10_1": "gcc_8",
-    "cuda_10_2": "gcc_8",
-    "cuda_11_0": "gcc_9",
-    "cuda_11_2": "gcc_10",
-    "cuda_11_4": "gcc_11",
-    "cuda_11_6": "gcc_11",
-    "cuda_11_8_nvhpcsdk": "nvhpcsdk_23",
-    "cuda_12_3_nvhpcsdk": "nvhpcsdk_23",
-    "cuda_12_1": "gcc_12",
-    "cuda_12_2": "gcc_12",
+    "cuda_8_0": ["gcc_5"],
+    "cuda_9_1": ["gcc_6_3_0"],
+    "cuda_9_2": ["gcc_6"],
+    "cuda_10_0": ["gcc_6"],
+    "cuda_10_1": ["gcc_8"],
+    "cuda_10_2": ["gcc_8"],
+    "cuda_11_0": ["gcc_9"],
+    "cuda_11_2": ["gcc_10"],
+    "cuda_11_4": ["gcc_11"],
+    "cuda_11_6": ["gcc_11"],
+    "cuda_11_8_nvhpcsdk": ["nvhpcsdk_23"],
+    "cuda_12_3_nvhpcsdk": ["nvhpcsdk_23", "nvhpcsdk_24"],
+    "cuda_12_1": ["gcc_12"],
+    "cuda_12_2": ["gcc_12"],
 }
 
 
@@ -309,7 +309,7 @@ def valid_cuda(cuda, compiler):
     Take care to keep this in sync with the file 'macros.obs_cluster' of
     the package software:dist / mpcdf_cluster_macros
     """
-    return compiler_cuda.get(cuda, None) == compiler
+    return compiler in compiler_cuda.get(cuda, None)
 
 
 project_meta_caches = {}
@@ -716,6 +716,12 @@ def openmpi_flavor_kind(flavor):
     return re.sub("_[0-9_-]+$", "", flavor)
 
 
+def cuda_from_compiler(cuda, compiler):
+    if compiler == "nvhpcsdk_24":
+        return cuda + "_24"
+    return cuda
+
+
 def stringdiff(s1, label1, s2, label2):
     import os
     from subprocess import call
@@ -949,8 +955,8 @@ Macros:
 
     for cuda in cudas:
         for compiler in filter(partial(valid_cuda, cuda), compilers + pgis):
-            repo(cuda + "_" + compiler, ((project, compiler),), cuda=True, cuda_repository=cuda,
-                 additional_tags=("Prefer: mpcdf_" + cuda,))
+            repo(cuda + "_" + compiler, ((project, compiler),), cuda=True, cuda_repository=cuda_from_compiler(cuda, compiler),
+                 additional_tags=("Prefer: mpcdf_" + cuda_from_compiler(cuda, compiler),))
             for mpi in filter(partial(valid_mpi, compiler), mpis):
                 repo(cuda + "_" + mpi + "_" + compiler,
                      ((project, cuda + "_" + compiler),
@@ -962,8 +968,8 @@ Macros:
                          ((project, cuda + "_" + mpi + "_" + compiler),),
                          cuda_aware_mpi=True,
                          mpi_module=mpi_module(mpi).replace("openmpi", "openmpi_gpu"),
-                         additional_tags=("Prefer: mpcdf_mpi_" + mpi + "_" + cuda,
-                                          "Prefer: mpcdf_" + cuda,))
+                         additional_tags=("Prefer: mpcdf_mpi_" + mpi + "_" + cuda_from_compiler(cuda, compiler),
+                                          "Prefer: mpcdf_" + cuda_from_compiler(cuda, compiler),))
                     for of in openmpi_flavors:
                         dependencies = ((project, cuda + "_" + mpi + "_" + compiler),)
                         if not parent:
@@ -973,7 +979,7 @@ Macros:
                              cuda_aware_mpi=True,
                              openmpi_flavor=openmpi_flavor_kind(of),
                              openmpi_flavor_full=of,
-                             additional_tags=("Prefer: mpcdf_" + cuda,))
+                             additional_tags=("Prefer: mpcdf_" + cuda_from_compiler(cuda, compiler),))
 
     if old_repos:
         if remove_old:
diff --git a/mpcdf_remove.py b/mpcdf_remove.py
index c2b2c8a7cc02c865f2678618059401fa1836c80c..709da5a260416640ac0af63afdf5a49c44e63d54 100644
--- a/mpcdf_remove.py
+++ b/mpcdf_remove.py
@@ -5,6 +5,7 @@ import osc.core
 import osc.cmdln
 import urllib
 
+
 @osc.cmdln.option('--ignore-missing', action="store_true",
                   help="Ignore if package is missing in some/all sub-projects")
 def do_mpcdf_remove(self, subcmd, opts, *args):