diff --git a/.gitignore b/.gitignore
index 6e366f16c2dd577f85088670d4996c625e011333..1b99dcefc0df35933a79953ba3d329951f08e66c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
 .DS_Store
 .idea
 *.log
+spack_*.json
 tmp/
 .spack-env
 compiler_definitions.yaml
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 59a70e6aa26bf092175e8a0c3542c0a3674785bb..659e863530229aff48c514d400a02ab3a64cb635 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -23,28 +23,28 @@ variables:
 .parallel_definition:
   parallel:
     matrix:
-      # - environment: [jed]
-      #   slurm_options: ["-c 72 -p jed -q jed"]
-      #   stack: ["pinot-noir"]
-      #   app_image: ["registry.c4science.ch/scitas-stack/rhel9-kuma"]
       # - environment: [helvetios]
       #   slurm_options: ["-c 36"]
       #   stack: ["pinot-noir"]
       #   app_image: ["registry.c4science.ch/scitas-stack/rhel9-kuma"]
-      - environment: [kuma_h100]
+      # - environment: [izar]
+      #   slurm_options: ['-c 40 --gpus 2']
+      #   apptainer_options: ['-nv']
+      #   stack: ["pinot-noir"]
+      # - environment: [jed]
+      #   slurm_options: ["-c 72 -p jed -q jed"]
+      #   stack: ["pinot-noir"]
+      #   app_image: ["registry.c4science.ch/scitas-stack/rhel9-kuma"]
+      - environment: [kuma-h100]
         slurm_options: ["-c 64"]
-        stack: ["pinot-noir-gcc"]
+        stack: ["pinot-noir"]
         apptainer_options: ['--nv']
         app_image: ["registry.c4science.ch/scitas-stack/rhel9-kuma"]
-      - environment: [kuma_l40s]
+      - environment: [kuma-l40s]
         slurm_options: ["-c 64"]
-        stack: ["pinot-noir-gcc"]
+        stack: ["pinot-noir"]
         apptainer_options: ['--nv']
         app_image: ["registry.c4science.ch/scitas-stack/rhel9-kuma"]
-      # - environment: [izar]
-      #   slurm_options: ['-c 40 --gpus 2']
-      #   apptainer_options: ['-nv']
-      #   stack: ["pinot-noir"]
   tags:
     - ${environment}
     - stack
@@ -71,21 +71,19 @@ variables:
     FAKEHOME: "/scratch/$(id -un)"
     COMMAND_OPTIONS_SBATCH: ${slurm_options}
     STACK_VERSION: $(jq -Mrc .stack.version ${CI_PROJECT_DIR}/stacks/${stack}/config.json)
-    image_name: "${stack}-${environment}-${SQUASHFS_ID}"
+    image_name: ${stack}-${environment}-${SQUASHFS_ID}-${CI_PIPELINE_ID}
     squashfs_image: $(ls -t1 ${CI_DATA_LT}/squashfs-cache/${image_name}*.sqfs 2> /dev/null | head -1)
     APPTAINER_EXEC_OPTIONS: >-
       ${apptainer_options}
          --cleanenv
          -H $(mktemp -d -p ${FAKEHOME}/):/home/$(id -un)
+         --env PYTHONUNBUFFERED=1
          --bind ${CI_DATA_LT}/buildcache:${MOUNT_POINT}/buildcache
          --bind ${CI_DATA_LT}/spack-mirror:${MOUNT_POINT}/spack-mirror
          --bind ${CI_DATA_ST}/squashfs-cache/:/squashfs-cache
          --bind ${CI_DATA_ST}/overlayfs:/overlayfs
          --fusemount "host:${CI_PROJECT_DIR}/ci/squashfuse_ll.sh ${CI_DATA_ST} ${image_name} ${squashfs_image} /overlayfs/lower-${image_name}"
          --fusemount "container:${CI_PROJECT_DIR}/ci/fuse-overlayfs.sh ${image_name} ${MOUNT_POINT}/${stack}/${environment}/${STACK_VERSION}"
-  # after_script:
-  #   - if [ $CI_JOB_STATUS != "success" ]; then exit 0; fi
-  #   - ${CI_PROJECT_DIR}/ci/update_squashfs.sh
 
 .spack_cache:
   cache:
@@ -116,7 +114,7 @@ spack:setup:
   stage: environment
   extends:
     - .parallel_job
-    - .spack_cache
+    #- .spack_cache
   script:
     - ci/setup_spack.sh
     - ${CI_PROJECT_DIR}/ci/update_squashfs.sh
@@ -127,11 +125,11 @@ spack:install_compilers:
   stage: compilers
   extends:
     - .parallel_job
-    - .spack_cache
+    #- .spack_cache
   script:
     - ci/install_compilers.sh
     - source ci/stack_env.sh
-    - ${STACK_LOCATION}/spack/bin/spack -e ${environment} config blame compilers
+    - ${STACK_LOCATION}/spack/bin/spack --color always -e ${environment} config blame compilers
     - ${CI_PROJECT_DIR}/ci/update_squashfs.sh
   artifacts:
     reports:
@@ -144,16 +142,19 @@ spack:concretize:
   stage: concretize
   extends:
     - .parallel_job
-    - .spack_cache
+    #- .spack_cache
   script:
     - source ci/stack_env.sh
 
     - ${STACK_LOCATION}/spack/bin/spack -e ${environment}
           config blame | tee config-${environment}-${stack}.log
 
-    - ${STACK_LOCATION}/spack/bin/spack -e ${environment}
+    - ${STACK_LOCATION}/spack/bin/spack --color always -e ${environment}
           concretize | tee concretize-${environment}-${stack}.log
 
+    - ${STACK_LOCATION}/spack/bin/spack --color always -e ${environment}
+          mirror create -D -d ${MOUNT_POINT}/spack-mirror -a || /usr//bin/true
+
     - cp ${SPACK_SYSTEM_CONFIG_PATH}/spack.lock spack-${environment}-${stack}.lock
     - ${CI_PROJECT_DIR}/ci/update_squashfs.sh
   artifacts:
@@ -169,12 +170,15 @@ spack:install:
   stage: install
   extends:
     - .parallel_job
-    - .spack_cache
+    #- .spack_cache
   script:
     - source ci/stack_env.sh
     - echo "{}" > spack-install-${environment}.xml
 
-    - ${STACK_LOCATION}/spack/bin/spack -e ${environment} install
+    # Cleaning patches in case one has a different hash
+    - ${STACK_LOCATION}/spack/bin/spack --color always -e ${environment} clean -m
+
+    - ${STACK_LOCATION}/spack/bin/spack --color always -e ${environment} install
           --log-file spack-install-${environment}.xml
           --log-format junit
           --only-concrete
@@ -206,15 +210,12 @@ spack:mksquashfs:
   stage: deploy
   extends:
     - .parallel_job
-    - .spack_cache
+    #- .spack_cache
   script:
     - source ci/stack_env.sh
+    - mksquashfs ${STACK_LOCATION} ${stack}-${environment}-${SQUASHFS_ID}.sqfs
 
-    - echo "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/stack/${stack}/stack-${stack}-${environment}-${CI_COMMIT_REF_SLUG}.sqfs"
-    - "mksquashfs ${STACK_LOCATION} stack-${stack}-${environment}-${CI_COMMIT_REF_SLUG}.sqfs"
-    - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file stack-${stack}-${environment}-${CI_COMMIT_REF_SLUG}.sqfs "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/stack/${stack}/stack-${stack}-${environment}-${CI_COMMIT_REF_SLUG}.sqfs"'
   needs:
     - job: spack:install
-  timeout: 10h
-  rules:
-    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
+  #ressource_group: mksquashfs
+  timeout: 1h
diff --git a/ci/apptainer_by_hand.sh b/ci/apptainer_by_hand.sh
index ba95ef61b8d7e50ade9b205f9c4fe81aaf438cfc..21a7d68ddc0d10d242507d904faa90e4ef0b6d87 100755
--- a/ci/apptainer_by_hand.sh
+++ b/ci/apptainer_by_hand.sh
@@ -6,7 +6,7 @@ srun_options="-N1 -n1 -c 64 -p h100"
 apptainer_options="--nv"
 
 export stack=pinot-noir
-export environment=kuma_h100
+export environment=kuma-h100
 
 export SQUASHFS_ID=local
 export CI_PIPELINE_ID=1337
@@ -20,8 +20,10 @@ export STACK_VERSION=$(jq -Mrc .stack.version ${CI_PROJECT_DIR}/stacks/${stack}/
 
 APPTAINER_IMAGE=~/rhel9-kuma.sif
 image_name=${stack}-${environment}-${SQUASHFS_ID}-${CI_PIPELINE_ID}
+
+./ci/prepare_squashfs.sh
+
 squashfs_image=$(ls -t1 ${CI_DATA_LT}/squashfs-cache/${image_name}*.sqfs 2> /dev/null | head -1)
-#./ci/prepare_squashfs.sh
 
 srun ${srun_options} --pty apptainer run \
     ${apptainer_options}\
@@ -32,11 +34,12 @@ srun ${srun_options} --pty apptainer run \
     --bind ${CI_DATA_LT}/spack-mirror:${MOUNT_POINT}/spack-mirror \
     --bind ${CI_DATA_LT}/squashfs-cache/:/squashfs-cache \
     --bind ${CI_DATA_ST}/overlayfs:/overlayfs \
+    --env PYTHONUNBUFFERED=1 \
     --env stack=${stack} \
     --env environment=${environment} \
     --env GPG_PRIVATE_KEY=${GPG_PRIVATE_KEY} \
     --env CI_PROJECT_DIR=${CI_PROJECT_DIR} \
-    --env CI_JOB_ID=${CI_JOB_ID} \
+    --env CI_PIPELINE_ID=${CI_PIPELINE_ID} \
     --env SQUASHFS_ID=${SQUASHFS_ID} \
     --fusemount "host:${CI_PROJECT_DIR}/ci/squashfuse_ll.sh ${CI_DATA_ST} ${image_name} ${squashfs_image} /overlayfs/lower-${image_name}" \
     --fusemount "container:${CI_PROJECT_DIR}/ci/fuse-overlayfs.sh ${image_name} ${MOUNT_POINT}/${stack}/${environment}/${STACK_VERSION}" \
diff --git a/ci/debug/spack_lock_info.sh b/ci/debug/spack_lock_info.sh
new file mode 100755
index 0000000000000000000000000000000000000000..da1df3267a26465b677bddb52fd27924e8e77b5d
--- /dev/null
+++ b/ci/debug/spack_lock_info.sh
@@ -0,0 +1,133 @@
+#!/usr/bin/env sh
+
+get_all_dep(){
+    file=$2
+    deps=$(jq --arg h "$1" -Mrc '.concrete_specs | to_entries | map(select(.key | match($h))) | .[] | .value.dependencies[] | "\(.hash)"' $file)
+    for i in $deps
+    do
+        jq --arg h "$i" -c '.concrete_specs
+            | to_entries
+            | map(select(.key | match($h)))
+            | .[]
+            | {
+                name: .value.name,
+                key: .key,
+                version: .value.version,
+                compiler: (.value.compiler | "\(.version)"),
+                target: (.value.arch.target | if type == "object" then .name else . end),
+                dep: .value.dependencies[]
+                     | {
+                         name: .name,
+                         key: .hash,
+                         type: .parameters.deptypes,
+                         virtuals: .parameters.virtuals
+                       }
+              }' $file
+    done
+}
+
+get_hash_dep(){
+    jq --arg h "$1" -c '.concrete_specs
+            | to_entries
+            | map(select(.key | match($h)))
+            | .[]
+            | {
+                name: .value.name,
+                key: .key,
+                version: .value.version,
+                compiler: (.value.compiler | "\(.version)"),
+                target: (.value.arch.target | if type == "object" then .name else . end),
+                dep: .value.dependencies[]
+                     | {
+                         name: .name,
+                         key: .hash,
+                         type: .parameters.deptypes,
+                         virtuals: .parameters.virtuals
+                       }
+              }' $2
+}
+
+get_name_dep(){
+    jq --arg n "$1" -c '.concrete_specs
+            | to_entries
+            | map(select(.value.name == $n))
+            | .[]
+            | {
+                name: .value.name,
+                key: .key,
+                version: .value.version,
+                compiler: (.value.compiler | "\(.version)"),
+                target: (.value.arch.target | if type == "object" then .name else . end),
+                dep: .value.dependencies[]
+                     | {
+                         name: .name,
+                         key: .hash,
+                         type: .parameters.deptypes,
+                         virtuals: .parameters.virtuals
+                       }
+              }' $2
+}
+
+
+usage() {
+    echo "-h [hash]"
+    echo "-n [name]"
+    echo "-f [file]"
+}
+
+OPTSTRING=":h:n:f:a"
+
+all=0
+hash=""
+name=""
+file=""
+while getopts ${OPTSTRING} opt; do
+  case ${opt} in
+    f)
+        file=${OPTARG}
+        ;;
+    h)
+        hash=${OPTARG}
+        ;;
+    n)
+        name=${OPTARG}
+        ;;
+    a)
+        all=1
+        ;;
+    :)
+      echo "Option -${OPTARG} requires an argument."
+      usage
+      exit 1
+      ;;
+    ?)
+      echo "Invalid option: -${OPTARG}."
+      usage
+      exit 1
+      ;;
+  esac
+done
+
+if [ "x$file" == "x" ]
+then
+    echo "No file specified"
+    usage
+    exit 1
+fi
+
+echo "name ($name), hash ($hash), file($file), all($all)"
+
+if [ "x$hash" != "x" ]
+then
+    if [ $all -eq 1 ]
+    then
+        get_all_dep $hash $file
+    else
+        get_hash_dep $hash $file
+    fi
+fi
+
+if [ "x$name" != "x" ]
+then
+    get_name_dep $name $file
+fi
diff --git a/ci/install_compilers.sh b/ci/install_compilers.sh
index 46e19e096f15c677de8d1eb1fd33a8165f82bd86..fbfeef455ccdf0d086f757426481a20f2c670f72 100755
--- a/ci/install_compilers.sh
+++ b/ci/install_compilers.sh
@@ -73,13 +73,6 @@ for c in  "core_compilers" "compilers"; do
     fi
 done
 
-export target=$(jq -Mrc '
-.stack.targets
- | to_entries
- | .[]
- | select(.key == env.environment)
- | .value' ${STACK_CONFIG})
-
 compilers_specs=$(jq -Mr '
 .stack
  | .system_arch as $arch
@@ -131,10 +124,21 @@ jq -Mrc '
  | .system_arch as $arch
  | .compilers
  | to_entries
+ | map(select(.value.constraint == null))
  | map(" - compiler_\(.key): [\(.value.compiler)@\(.value.version) target=\(env.target)]")
  | .[]
 '  ${STACK_CONFIG} >> ${SPACK_SYSTEM_CONFIG_PATH}/compiler_definitions.yaml
 
+jq -Mrc '
+.stack
+ | .system_arch as $arch
+ | .compilers
+ | to_entries
+ | map(select(.value.constraint != null))
+ | map(" - compiler_\(.key): []\n - when: \(.value.constraint)\n   compiler_\(.key): [\(.value.compiler)@\(.value.version) target=\(env.target)]")
+ | .[]
+'  ${STACK_CONFIG} >> ${SPACK_SYSTEM_CONFIG_PATH}/compiler_definitions.yaml
+
 cat ${SPACK_SYSTEM_CONFIG_PATH}/compiler_definitions.yaml
 #yq -y -s  ".[0].spack.definitions = .[1].definitions + .[0].spack.definitions | .[0]" ${SPACK_SYSTEM_CONFIG_PATH}/spack.yaml ${SPACK_SYSTEM_CONFIG_PATH}/compiler_definitions.yaml > ${SPACK_SYSTEM_CONFIG_PATH}/spack.yaml.new
 
diff --git a/ci/prepare_squashfs.sh b/ci/prepare_squashfs.sh
index ed5f5b33c97c7551cb7fc5301b8dc76a86947e51..b51e4b97beb3d65ee44336dab56f963e4ec9f50b 100755
--- a/ci/prepare_squashfs.sh
+++ b/ci/prepare_squashfs.sh
@@ -21,20 +21,29 @@ set +o errexit
 sqfs_image=$(ls -t1 ${CI_DATA_LT}/squashfs-cache/${image_name}.sqfs 2> /dev/null | head -1)
 if [ $? -ne 0 ]
 then
-    echo "No MR ($squash_id) squashfs found"
-    # Check if MR default branch as squashfs
-    sqfs_base_image=$(ls -t1 ${CI_DATA_LT}/squashfs-cache/${stack}-${environment}-${squash_base}*.sqfs 2> /dev/null | head -1)
+    echo "No MR ($squash_id-${CI_PIPELINE_ID}) squashfs found"
+
+    # look for base in the branch
+    sqfs_base_image=$(ls -t1 ${CI_DATA_LT}/squashfs-cache/${stack}-${environment}-${squash_id}.sqfs 2> /dev/null | head -1)
     if [ $? -ne 0 ]
     then
-        echo "No default branch ($squash_base) squashfs found"
-        echo "Creating an empty one"
-        empty=$(mktemp -d)
-        sqfs_base_image="${CI_DATA_LT}/squashfs-cache/${stack}-${environment}-${squash_base}-initial.sqfs"
-        mksquashfs ${empty} ${sqfs_base_image}
+        echo "No MR ($squash_id) squashfs found"
+
+        # look for base in default branch
+        sqfs_base_image=$(ls -t1 ${CI_DATA_LT}/squashfs-cache/${stack}-${environment}-${squash_base}*.sqfs 2> /dev/null | head -1)
+        if [ $? -ne 0 ]
+        then
+            echo "No default branch ($squash_base) squashfs found"
+            echo "Creating an empty one"
+            empty=$(mktemp -d)
+            sqfs_base_image="${CI_DATA_LT}/squashfs-cache/${stack}-${environment}-${squash_base}-initial.sqfs"
+            mksquashfs ${empty} ${sqfs_base_image}
+        else
+            echo "Found ${sqfs_base_image}"
+        fi
     else
         echo "Found ${sqfs_base_image}"
     fi
-
     set -o errexit
 
     # Link MR sqaushfs to the one of default branch
diff --git a/ci/setup_spack.sh b/ci/setup_spack.sh
index 8ce478151f1201b22841cc1dd0c642274793f026..5881e70b45f524f72e69573af0a072f5da35665d 100755
--- a/ci/setup_spack.sh
+++ b/ci/setup_spack.sh
@@ -26,30 +26,48 @@ then
   spack/bin/spack env create ${environment}
 fi
 
-for file in mirrors packages concretizer config spack definitions modules
-do
-  if [ -e "${STACK_CONFIG_PATH}/${file}.yaml" ]; then
-    echo "Copying ${STACK_CONFIG_PATH}/${file}.yaml to ${SPACK_SYSTEM_CONFIG_PATH}"
-    cp "${STACK_CONFIG_PATH}/${file}.yaml" \
-      ${SPACK_SYSTEM_CONFIG_PATH}
-    cp "${STACK_CONFIG_PATH}/${file}.yaml" spack/etc/spack
-  fi
-
-  if [ -e "${STACK_CONFIG_PATH}/${file}_stack.yaml" ]; then
-    echo "Copying ${STACK_CONFIG_PATH}/${file}_stack.yaml to ${SPACK_SYSTEM_CONFIG_PATH}"
-    cp "${STACK_CONFIG_PATH}/${file}_stack.yaml" \
-      ${SPACK_SYSTEM_CONFIG_PATH}
-  fi
 
-  if [ -e "${STACK_CONFIG_PATH}/${file}_${environment}.yaml" ]; then
-    echo "Copying ${STACK_CONFIG_PATH}/${file}_${environment}.yaml to ${SPACK_SYSTEM_CONFIG_PATH}/${file}_env.yaml"
-    cp "${STACK_CONFIG_PATH}/${file}_${environment}.yaml" \
-      ${SPACK_SYSTEM_CONFIG_PATH}/${file}_env.yaml
-  fi
-done
+echo "Copying cp ${STACK_CONFIG_PATH}/spack.yaml to ${SPACK_SYSTEM_CONFIG_PATH}/"
+cp ${STACK_CONFIG_PATH}/spack.yaml ${SPACK_SYSTEM_CONFIG_PATH}
 
 cp -r "${STACK_CONFIG_PATH}/templates" ${SPACK_SYSTEM_CONFIG_PATH}
 
+declare -A file_mapping
+file_mapping["_common"]=""
+file_mapping["_stack"]="_stack"
+file_mapping["_acc_${acc_type}"]="_accel"
+file_mapping["_${environment}"]="_env"
+
+declare -A placeholders
+placeholders["{target}"]="${target}"
+placeholders["{gcc_version}"]=$(jq -Mrc '.stack.compilers.gcc.version' ${STACK_CONFIG})
+if [ "${accelerator}" != "none" ]
+then
+  placeholders["{${acc_type}_arch}"]="${acc_arch}"
+fi
+
+echo blip
+
+for file in mirrors packages concretizer config definitions modules
+do
+  for suffix in ${!file_mapping[@]}
+  do
+    src=${STACK_CONFIG_PATH}/${file}${suffix}.yaml
+    dst=${SPACK_SYSTEM_CONFIG_PATH}/${file}"${file_mapping[$suffix]}".yaml
+    if [ -e "${STACK_CONFIG_PATH}/${file}${suffix}.yaml" ]
+    then
+      echo "Copying $src to $dst"
+      cp "$src" "$dst"
+
+      for ph in ${!placeholders[@]}
+      do
+        rep=${placeholders[$ph]}
+        sed -i -e "s/$ph/$rep/g" "$dst"
+      done
+    fi
+  done
+done
+
 
 cat <<EOF > ${SPACK_SYSTEM_CONFIG_PATH}/config_stack.yaml
 config:
@@ -78,7 +96,6 @@ mirrors:
 ${mirrors}
 EOF
 
-cp "${SPACK_SYSTEM_CONFIG_PATH}/mirrors.yaml" spack/etc/spack
 
 echo "Setting up packages"
 
@@ -91,16 +108,19 @@ echo "packages:" > ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
 
 export system_compiler=$(jq -Mrc '
 .stack
- | .system_arch as $arch
  | .system_compiler
  | to_entries
  | .[].value
- | "\(.compiler)@\(.version) \($arch)"
+ | "\(.compiler)@\(.version)"
+' ${STACK_CONFIG})
+
+export system_arch=$(jq -Mrc '
+.stack.system_arch
 ' ${STACK_CONFIG})
 
 jq -Mrc '
 .stack.system_packages
- | map("  \(.):\n    require:\n    - spec: \"%\(env.system_compiler)\"")
+ | map("  \(.):\n    require:\n    - \"%\(env.system_compiler)\"\n    - \"\(env.system_arch)\"")
  | .[]
 ' ${STACK_CONFIG} >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
 
@@ -111,8 +131,6 @@ then
   rm packages.yaml.old
 fi
 
-cp "${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml" spack/etc/spack
-
 echo "Setting up extra repos"
 
 EXTERNAL_REPOS=$(jq -r '.spack.repos | keys[]' ${STACK_CONFIG})
@@ -140,7 +158,14 @@ do
   fi
 done
 
-cp "${SPACK_SYSTEM_CONFIG_PATH}/repos.yaml" spack/etc/spack
+for file in mirrors packages concretizer config modules repos
+do
+  if [ -e "${SPACK_SYSTEM_CONFIG_PATH}/${file}.yaml" ]
+  then
+    cp "${SPACK_SYSTEM_CONFIG_PATH}/${file}.yaml" spack/etc/spack
+  fi
+done
+
 
 echo "Setting up buildcache"
 
diff --git a/ci/stack_env.sh b/ci/stack_env.sh
index 66bae86e7222f400c6ab761523938e966f2a4ea2..fb6d028c5cb0273523cdb867b80b93a7731933cb 100644
--- a/ci/stack_env.sh
+++ b/ci/stack_env.sh
@@ -14,6 +14,18 @@ export SPACK_SYSTEM_CONFIG_PATH=${STACK_LOCATION}/spack/var/spack/environments/$
 #export SPACK_USER_CONFIG_PATH=$(mktemp -p /tmp -d slurm_user_config_XXXXXXX)
 
 export environment_type="local_cluster"
+export SPACK_VERSION=$(jq -r .spack.version ${STACK_CONFIG})
+
+env_json=$(jq '.stack.environments | to_entries | .[] | select(.key == env.environment) | .value' ${STACK_CONFIG})
+
+export target=$(echo $env_json | jq -Mrc '.target')
+export accelerator=$(echo $env_json | jq -Mrc '.accelerator // "none"')
+
+if [ "$accelerator" != "none" ]
+then
+    export acc_type=$(echo $env_json | jq -Mrc '.accelerator.type')
+    export acc_arch=$(echo $env_json | jq -Mrc '.accelerator.arch')
+fi
 
 echo "STACK_CONFIG_PATH: ${STACK_CONFIG_PATH}"
 echo "STACK_CONFIG: ${STACK_CONFIG}"
diff --git a/ci/update_squashfs.sh b/ci/update_squashfs.sh
index 66e962e1205abacb0a779232368687368f591073..7c63d4dfe7b3f2d6951e7c1405df3335ea979d24 100755
--- a/ci/update_squashfs.sh
+++ b/ci/update_squashfs.sh
@@ -8,6 +8,6 @@ source ${CI_PROJECT_DIR}/ci/stack_env.sh
 
 cd /squashfs-cache
 
-mksquashfs ${STACK_LOCATION} ${stack}-${environment}-${squash_id}-$(date +'%Y%m%d_%H%M').sqfs
+mksquashfs ${STACK_LOCATION} ${stack}-${environment}-${squash_id}-${CI_PIPELINE_ID}-$(date +'%Y%m%d_%H%M').sqfs
 
 #ln -sf ${stack}-${environment}-${squash_id}-$(date +'%Y%m%d_%H%M').sqfs ${stack}-${environment}-${squash_id}.sqfs
diff --git a/stacks/pinot-noir-gcc/concretizer.yaml b/stacks/pinot-noir-gcc/concretizer_common.yaml
similarity index 100%
rename from stacks/pinot-noir-gcc/concretizer.yaml
rename to stacks/pinot-noir-gcc/concretizer_common.yaml
diff --git a/stacks/pinot-noir-gcc/config.json b/stacks/pinot-noir-gcc/config.json
index 530523f1986eaa170a83399cacdfa20fa1732a74..1066541f266774bb8cb8b21558aafae0d8c438df 100644
--- a/stacks/pinot-noir-gcc/config.json
+++ b/stacks/pinot-noir-gcc/config.json
@@ -37,8 +37,8 @@
             "helvetios": "skylake_avx512",
             "izar": "cascadelake",
             "jed": "icelake",
-            "kuma_l40s": "zen4",
-            "kuma_h100": "zen4"
+            "kuma-l40s": "zen4",
+            "kuma-h100": "zen4"
         },
         "compilers": {
             "gcc": {
diff --git a/stacks/pinot-noir-gcc/config.yaml b/stacks/pinot-noir-gcc/config_common.yaml
similarity index 100%
rename from stacks/pinot-noir-gcc/config.yaml
rename to stacks/pinot-noir-gcc/config_common.yaml
diff --git a/stacks/pinot-noir-gcc/definitions_cuda.yaml b/stacks/pinot-noir-gcc/definitions_acc_cuda.yaml
similarity index 100%
rename from stacks/pinot-noir-gcc/definitions_cuda.yaml
rename to stacks/pinot-noir-gcc/definitions_acc_cuda.yaml
diff --git a/stacks/pinot-noir-gcc/definitions_empty.yaml b/stacks/pinot-noir-gcc/definitions_acc_none.yaml
similarity index 100%
rename from stacks/pinot-noir-gcc/definitions_empty.yaml
rename to stacks/pinot-noir-gcc/definitions_acc_none.yaml
diff --git a/stacks/pinot-noir-gcc/definitions_izar.yaml b/stacks/pinot-noir-gcc/definitions_izar.yaml
deleted file mode 120000
index 2c65e6a4923cf87b9addc7a71f26c0e6acb0f36f..0000000000000000000000000000000000000000
--- a/stacks/pinot-noir-gcc/definitions_izar.yaml
+++ /dev/null
@@ -1 +0,0 @@
-definitions_cuda.yaml
\ No newline at end of file
diff --git a/stacks/pinot-noir-gcc/definitions_kuma_h100.yaml b/stacks/pinot-noir-gcc/definitions_kuma_h100.yaml
deleted file mode 120000
index 2c65e6a4923cf87b9addc7a71f26c0e6acb0f36f..0000000000000000000000000000000000000000
--- a/stacks/pinot-noir-gcc/definitions_kuma_h100.yaml
+++ /dev/null
@@ -1 +0,0 @@
-definitions_cuda.yaml
\ No newline at end of file
diff --git a/stacks/pinot-noir-gcc/definitions_kuma_l40s.yaml b/stacks/pinot-noir-gcc/definitions_kuma_l40s.yaml
deleted file mode 120000
index 2c65e6a4923cf87b9addc7a71f26c0e6acb0f36f..0000000000000000000000000000000000000000
--- a/stacks/pinot-noir-gcc/definitions_kuma_l40s.yaml
+++ /dev/null
@@ -1 +0,0 @@
-definitions_cuda.yaml
\ No newline at end of file
diff --git a/stacks/pinot-noir-gcc/mirrors.yaml b/stacks/pinot-noir-gcc/mirrors.yaml
deleted file mode 100644
index 2c338aa265ca4ab7735374e44dd491d1f2c81115..0000000000000000000000000000000000000000
--- a/stacks/pinot-noir-gcc/mirrors.yaml
+++ /dev/null
@@ -1 +0,0 @@
-mirrors: {}
diff --git a/stacks/pinot-noir-gcc/modules_empty.yaml b/stacks/pinot-noir-gcc/modules_acc_none.yaml
similarity index 100%
rename from stacks/pinot-noir-gcc/modules_empty.yaml
rename to stacks/pinot-noir-gcc/modules_acc_none.yaml
diff --git a/stacks/pinot-noir-gcc/modules.yaml b/stacks/pinot-noir-gcc/modules_common.yaml
similarity index 100%
rename from stacks/pinot-noir-gcc/modules.yaml
rename to stacks/pinot-noir-gcc/modules_common.yaml
diff --git a/stacks/pinot-noir-gcc/modules_kuma_h100.yaml b/stacks/pinot-noir-gcc/modules_kuma-h100.yaml
similarity index 100%
rename from stacks/pinot-noir-gcc/modules_kuma_h100.yaml
rename to stacks/pinot-noir-gcc/modules_kuma-h100.yaml
diff --git a/stacks/pinot-noir-gcc/modules_kuma_l40s.yaml b/stacks/pinot-noir-gcc/modules_kuma-l40s.yaml
similarity index 100%
rename from stacks/pinot-noir-gcc/modules_kuma_l40s.yaml
rename to stacks/pinot-noir-gcc/modules_kuma-l40s.yaml
diff --git a/stacks/pinot-noir-gcc/packages.yaml b/stacks/pinot-noir-gcc/packages_common.yaml
similarity index 100%
rename from stacks/pinot-noir-gcc/packages.yaml
rename to stacks/pinot-noir-gcc/packages_common.yaml
diff --git a/stacks/pinot-noir-gcc/packages_kuma_h100.yaml b/stacks/pinot-noir-gcc/packages_kuma-h100.yaml
similarity index 100%
rename from stacks/pinot-noir-gcc/packages_kuma_h100.yaml
rename to stacks/pinot-noir-gcc/packages_kuma-h100.yaml
diff --git a/stacks/pinot-noir-gcc/packages_kuma_l40s.yaml b/stacks/pinot-noir-gcc/packages_kuma-l40s.yaml
similarity index 100%
rename from stacks/pinot-noir-gcc/packages_kuma_l40s.yaml
rename to stacks/pinot-noir-gcc/packages_kuma-l40s.yaml
diff --git a/stacks/pinot-noir/concretizer.yaml b/stacks/pinot-noir/concretizer.yaml
deleted file mode 100644
index 698e4c7865156575e6807306e18573c647c921c2..0000000000000000000000000000000000000000
--- a/stacks/pinot-noir/concretizer.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
-concretizer:
-  reuse: false
-  unify: false
-  duplicates:
-    strategy: minimal
diff --git a/stacks/pinot-noir/concretizer_common.yaml b/stacks/pinot-noir/concretizer_common.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..220ee695ee554146894ea39fb6a6ffd10d288de1
--- /dev/null
+++ b/stacks/pinot-noir/concretizer_common.yaml
@@ -0,0 +1,10 @@
+concretizer:
+  reuse:
+    roots: true
+    include:
+      - "%gcc@12.3.0"
+    from:
+      - type: local
+  unify: false
+  duplicates:
+    strategy: minimal
diff --git a/stacks/pinot-noir/config.json b/stacks/pinot-noir/config.json
index f566368b0be457dde11b8e463541c5e18f73a1b4..174e76651437e2fb2a016aa9243c3e0237c4fe5a 100644
--- a/stacks/pinot-noir/config.json
+++ b/stacks/pinot-noir/config.json
@@ -1,6 +1,6 @@
 {
     "spack": {
-        "version": "v0.22.0",
+        "version": "releases/v0.22",
         "repos": {
             "scitas-externals": {
                 "url": "https://gitlab.epfl.ch/SCITAS/software-stack/spack-repo-externals.git",
@@ -33,23 +33,47 @@
                 "version": "11.2.1"
             }
         },
-        "targets": {
-            "helvetios": "skylake_avx512",
-            "izar": "cascadelake",
-            "jed": "icelake",
-            "kuma_l40s": "zen4",
-            "kuma_h100": "zen4"
+        "environments": {
+            "helvetios": {
+                "target": "skylake_avx512",
+                "accelerator": "none"
+            },
+            "izar": {
+                "target": "cascadelake",
+                "accelerator": {
+                    "type": "cuda",
+                    "arch": "75"
+                }
+            },
+            "jed": {
+                "target": "icelake"
+            },
+            "kuma-l40s": {
+                "target": "zen4",
+                "accelerator": {
+                    "type": "cuda",
+                    "arch": "89"
+                }
+            },
+            "kuma-h100": {
+                "target": "zen4",
+                "accelerator": {
+                    "type": "cuda",
+                    "arch": "90"
+                }
+            }
         },
         "compilers": {
             "oneapi": {
                 "compiler": "oneapi",
                 "spec": "intel-oneapi-compilers@2024.1.0 %gcc@11.2.1",
-                "version": "2024.1.0"
+                "version": "2024.1.0",
+                "constraint": "env['environment'] in ['jed', 'helvetios']"
             },
             "gcc": {
                 "compiler": "gcc",
-                "spec": "gcc@12.3.0 %gcc@11.2.1",
-                "version": "12.3.0"
+                "spec": "gcc@13.2.0 %gcc@11.2.1",
+                "version": "13.2.0"
             }
         },
         "system_packages": [
@@ -62,45 +86,49 @@
             "ca-certificates-mozilla",
             "check",
             "cmake",
-            "cuda",
             "curl",
             "diffutils",
             "expat",
             "findutils",
             "flex",
             "font-util",
+            "fontconfig",
             "freetype",
             "gawk",
             "gdbm",
             "gettext",
             "git",
-            "glibc",
             "gmake",
             "gmp",
             "gnuplot",
+            "gperf",
             "hcoll",
             "help2man",
             "libaec",
             "libedit",
             "libevent",
+            "libffi",
             "libfuse",
             "libidn2",
             "libpciaccess",
+            "libpng",
             "libsigsegv",
             "libssh2",
             "libtiff",
             "libtool",
             "libunistring",
             "libuuid",
+            "libx11",
+            "libxcrypt",
+            "libxct",
+            "libxft",
             "libxml2",
             "lz4",
             "m4",
             "macro-utils",
-            "meson",
             "mpc",
             "mpfr",
             "ncurses",
-            "ninja",
             "openssl",
             "pcre",
             "pcre2",
@@ -113,7 +141,9 @@
             "slurm",
             "sqlite",
             "tar",
+            "tcl",
             "texinfo",
+            "tk",
             "utf8proc",
             "util-linux-uuid",
             "xpmem",
diff --git a/stacks/pinot-noir/config.yaml b/stacks/pinot-noir/config_common.yaml
similarity index 100%
rename from stacks/pinot-noir/config.yaml
rename to stacks/pinot-noir/config_common.yaml
diff --git a/stacks/pinot-noir/definitions_cuda.yaml b/stacks/pinot-noir/definitions_acc_cuda.yaml
similarity index 58%
rename from stacks/pinot-noir/definitions_cuda.yaml
rename to stacks/pinot-noir/definitions_acc_cuda.yaml
index 4710276c2be849f7ba905a7c66ce192ee3a206eb..99f50932cbb96ebe4318e34748304fa099769aec 100644
--- a/stacks/pinot-noir/definitions_cuda.yaml
+++ b/stacks/pinot-noir/definitions_acc_cuda.yaml
@@ -1,8 +1,11 @@
 definitions:
-  - cuda_system_codes:
-      - cuda
-      - cudnn
+  - cuda_system_codes: []
 
   - cuda_serial_codes:
+      - cuda
+      - cudnn
       - nccl
+
+  - cuda_mpi_codes:
       - nvshmem
+      - nccl-tests
diff --git a/stacks/pinot-noir-gcc/definitions_helvetios.yaml b/stacks/pinot-noir/definitions_acc_none.yaml
similarity index 100%
rename from stacks/pinot-noir-gcc/definitions_helvetios.yaml
rename to stacks/pinot-noir/definitions_acc_none.yaml
diff --git a/stacks/pinot-noir/definitions_izar.yaml b/stacks/pinot-noir/definitions_izar.yaml
index 2c65e6a4923cf87b9addc7a71f26c0e6acb0f36f..3552a78f67656b1b6647cced51cbfb18b5882f10 120000
--- a/stacks/pinot-noir/definitions_izar.yaml
+++ b/stacks/pinot-noir/definitions_izar.yaml
@@ -1 +1 @@
-definitions_cuda.yaml
\ No newline at end of file
+definitions_empty.yaml
\ No newline at end of file
diff --git a/stacks/pinot-noir/definitions_jed.yaml b/stacks/pinot-noir/definitions_jed.yaml
deleted file mode 100644
index 0f156fa830b9567b3e7839218a0a88c16076c6ca..0000000000000000000000000000000000000000
--- a/stacks/pinot-noir/definitions_jed.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
-definitions:
-  - cuda_system_codes:
-      - cuda
-      - cudnn
-
-  - cuda_serial_codes:
-      - nccl
diff --git a/stacks/pinot-noir/definitions_jed.yaml b/stacks/pinot-noir/definitions_jed.yaml
new file mode 120000
index 0000000000000000000000000000000000000000..3552a78f67656b1b6647cced51cbfb18b5882f10
--- /dev/null
+++ b/stacks/pinot-noir/definitions_jed.yaml
@@ -0,0 +1 @@
+definitions_empty.yaml
\ No newline at end of file
diff --git a/stacks/pinot-noir/definitions_kuma-h100.yaml b/stacks/pinot-noir/definitions_kuma-h100.yaml
new file mode 120000
index 0000000000000000000000000000000000000000..3552a78f67656b1b6647cced51cbfb18b5882f10
--- /dev/null
+++ b/stacks/pinot-noir/definitions_kuma-h100.yaml
@@ -0,0 +1 @@
+definitions_empty.yaml
\ No newline at end of file
diff --git a/stacks/pinot-noir/definitions_kuma-l40s.yaml b/stacks/pinot-noir/definitions_kuma-l40s.yaml
new file mode 120000
index 0000000000000000000000000000000000000000..3552a78f67656b1b6647cced51cbfb18b5882f10
--- /dev/null
+++ b/stacks/pinot-noir/definitions_kuma-l40s.yaml
@@ -0,0 +1 @@
+definitions_empty.yaml
\ No newline at end of file
diff --git a/stacks/pinot-noir/definitions_kuma_h100.yaml b/stacks/pinot-noir/definitions_kuma_h100.yaml
deleted file mode 120000
index 2c65e6a4923cf87b9addc7a71f26c0e6acb0f36f..0000000000000000000000000000000000000000
--- a/stacks/pinot-noir/definitions_kuma_h100.yaml
+++ /dev/null
@@ -1 +0,0 @@
-definitions_cuda.yaml
\ No newline at end of file
diff --git a/stacks/pinot-noir/definitions_kuma_l40s.yaml b/stacks/pinot-noir/definitions_kuma_l40s.yaml
deleted file mode 120000
index 2c65e6a4923cf87b9addc7a71f26c0e6acb0f36f..0000000000000000000000000000000000000000
--- a/stacks/pinot-noir/definitions_kuma_l40s.yaml
+++ /dev/null
@@ -1 +0,0 @@
-definitions_cuda.yaml
\ No newline at end of file
diff --git a/stacks/pinot-noir/mirrors.yaml b/stacks/pinot-noir/mirrors.yaml
deleted file mode 100644
index 2c338aa265ca4ab7735374e44dd491d1f2c81115..0000000000000000000000000000000000000000
--- a/stacks/pinot-noir/mirrors.yaml
+++ /dev/null
@@ -1 +0,0 @@
-mirrors: {}
diff --git a/stacks/pinot-noir/modules_acc_cuda.yaml b/stacks/pinot-noir/modules_acc_cuda.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..6baee16b9a1286c8af13e7e5ba223b08c96f2d4f
--- /dev/null
+++ b/stacks/pinot-noir/modules_acc_cuda.yaml
@@ -0,0 +1,21 @@
+modules:
+  default:
+    lmod:
+      nvhpc+mpi@24.3:
+        environment:
+          set:
+            HPCX_DIR: "{prefix}/Linux_x86_64/24.3/comm_libs/12.3/hpcx/hpcx-2.17.1"
+            OPAL_PREFIX: "${HPCX_DIR}/ompi"
+          prepend_path:
+            LD_LIBRARY_PATH: "${HPCX_DIR}/ompi/lib"
+            LD_LIBRARY_PATH: "${HPCX_DIR}/ucx/lib"
+            LD_LIBRARY_PATH: "${HPCX_DIR}/ucx/lib/ucx"
+            LD_LIBRARY_PATH: "${HPCX_DIR}/ucc/lib"
+            LD_LIBRARY_PATH: "${HPCX_DIR}/ucc/lib/ucc"
+            LD_LIBRARY_PATH: "${HPCX_DIR}/hcoll/lib"
+            LD_LIBRARY_PATH: "${HPCX_DIR}/sharp/lib"
+            LD_LIBRARY_PATH: "${HPCX_DIR}/nccl_rdma_sharp_plugin/lib"
+            PATH: "${HPCX_DIR}/ucx/bin"
+            PATH: "${HPCX_DIR}/ucc/bin"
+            PATH: "${HPCX_DIR}/hcoll/bin"
+            PATH: "${HPCX_DIR}/sharp/bin"
diff --git a/stacks/pinot-noir/modules_acc_none.yaml b/stacks/pinot-noir/modules_acc_none.yaml
new file mode 120000
index 0000000000000000000000000000000000000000..5be0f314270ddfe2b36d1716f4ea55e43bff43b4
--- /dev/null
+++ b/stacks/pinot-noir/modules_acc_none.yaml
@@ -0,0 +1 @@
+modules_empty.yaml
\ No newline at end of file
diff --git a/stacks/pinot-noir/modules.yaml b/stacks/pinot-noir/modules_common.yaml
similarity index 92%
rename from stacks/pinot-noir/modules.yaml
rename to stacks/pinot-noir/modules_common.yaml
index 38fcc67d3399d00e3662efcae31e385da1fb39ad..08558927791b43b6741f8126d6d529439f2e056c 100644
--- a/stacks/pinot-noir/modules.yaml
+++ b/stacks/pinot-noir/modules_common.yaml
@@ -3,10 +3,13 @@ modules:
     enable: [lmod]
     lmod:
       hash_length: 0
+
       core_compilers:
         - gcc@11.2.1
+
       hierarchy:
         - mpi
+
       all:
         environment:
           set:
@@ -40,53 +43,63 @@ modules:
             F77: "{prefix}/bin/gfortran"
             FC: "{prefix}/bin/gfortran"
             F90: "{prefix}/bin/gfortran"
-      cuda@12.4.0:
-        environment:
-          append_path:
-            JULIA_LOAD_PATH: ":/ssoft/spack/external/julia/syrah.v1/cuda"
+
+#     cuda:
+#        environment:
+#          append_path:
+#            JULIA_LOAD_PATH: ":/ssoft/spack/external/julia/syrah.v1/cuda"
 
       openmpi:
         environment:
           set:
             SLURM_MPI_TYPE: pmix
             OMPI_MCA_btl_openib_warn_default_gid_prefix: '0'
-          append_path:
-            JULIA_LOAD_PATH: ":/ssoft/spack/external/julia/syrah.v1/mpi"
+#          append_path:
+#            JULIA_LOAD_PATH: ":/ssoft/spack/external/julia/syrah.v1/mpi"
+
       openblas threads=pthreads:
         environment:
           set:
             OPENBLAS_NUM_THREADS: '1'
+
       hdf5~mpi+cxx:
         environment:
           set:
             HDF5_CC: h5cc
             HDF5_CXX: h5c++
             HDF5_FC: h5fc
+
       hdf5+mpi~cxx:
         environment:
           set:
             HDF5_CC: h5pcc
             HDF5_FC: h5pfc
+
       intel-oneapi-mpi:
         environment:
           set:
             I_MPI_PMI_LIBRARY: /usr/lib64/libpmi2.so
             I_MPI_EXTRA_FILESYSTEM: '0'
             SLURM_MPI_TYPE: pmi2
+
       metis:
         suffixes:
           ~real64: sp
+
       molpro:
         template: modules/group_restricted.lua
+
       plumed:
         environment:
           set:
             PLUMED_KERNEL: "{prefix}/lib/libplumedKernel.so"
           unset:
           - PLUMED_ROOT
+
       quantum-espresso:
         suffixes:
           hdf5=parallel: hdf5
+
       scons:
         suffixes:
           '^python@:2.99': py2
@@ -94,16 +107,21 @@ modules:
 
       abaqus:
         template: modules/group_restricted.lua
+
       adf:
         template: modules/group_restricted.lua
+
       ams:
         template: modules/group_restricted.lua
+
       comsol:
         environment:
           prepend_path:
             MATLABPATH: "{prefix}/mli"
+
       crystal17:
         template: modules/group_restricted.lua
+
       fdtd:
         environment:
           prepend_path:
@@ -111,12 +129,15 @@ modules:
             LD_LIBRARY_PATH: "{prefix}/mpich2/nemesis/lib"
           set:
             SLURM_MPI_TYPE: pmi2
+
       gaussian:
         template: modules/group_restricted.lua
+
       spark:
         environment:
           prepend_path:
             PATH: "/ssoft/spack/scripts/all/spark"
+
       ucx:
         environment:
           unset:
diff --git a/stacks/pinot-noir/modules_kuma-h100.yaml b/stacks/pinot-noir/modules_kuma-h100.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..8ddd771fff8e49d8a00ac2ba17096cdd8ff145ed
--- /dev/null
+++ b/stacks/pinot-noir/modules_kuma-h100.yaml
@@ -0,0 +1,19 @@
+modules:
+  default:
+    lmod:
+      openmpi:
+        environment:
+          set:
+            OMPI_MCA_pml: 'ucx'
+            OMPI_MCA_osc: 'ucx'
+            UCX_NET_DEVICES: 'mlx5_2:1,mlx5_3:1'
+      nccl:
+        environment:
+          set:
+            NCCL_IB_HCA: 'mlx5_2:1,mlx5_3:1'
+            NCCL_SOCKET_IFNAME: 'bond0'
+      nvshmem:
+        environment:
+          set:
+            NVSHMEM_HCA_LIST: 'mlx5_2:1,mlx5_3:1'
+            NVSHMEM_BOOTSTRAP: MPI
diff --git a/stacks/pinot-noir/modules_kuma-l40s.yaml b/stacks/pinot-noir/modules_kuma-l40s.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..10a02d6a9cb56d2f1bcb9e66730d60c124561bda
--- /dev/null
+++ b/stacks/pinot-noir/modules_kuma-l40s.yaml
@@ -0,0 +1,19 @@
+modules:
+  default:
+    lmod:
+      openmpi:
+        environment:
+          set:
+            OMPI_MCA_pml: 'ucx'
+            OMPI_MCA_osc: 'ucx'
+            UCX_NET_DEVICES: 'mlx5_0:1,mlx5_1:1'
+      nccl:
+        environment:
+          set:
+            NCCL_IB_HCA: 'mlx5_0:1,mlx5_1:1'
+            NCCL_SOCKET_IFNAME: 'bond0'
+      nvshmem:
+        environment:
+          set:
+            NVSHMEM_HCA_LIST: 'mlx5_0:1,mlx5_1:1'
+            NVSHMEM_BOOTSTRAP: MPI
diff --git a/stacks/pinot-noir/modules_kuma_h100.yaml b/stacks/pinot-noir/modules_kuma_h100.yaml
deleted file mode 100644
index 997a2e17dbd2183ee05688ae39bbc6a9be1403e4..0000000000000000000000000000000000000000
--- a/stacks/pinot-noir/modules_kuma_h100.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
-modules:
-  default:
-    lmod:
-      openmpi:
-        environment:
-          set:
-            OMPI_MCA_pml: 'ucx'
-            OMPI_MCA_osc: 'ucx'
-            UCX_NET_DEVICES: 'mlx5_2:1,mlx5_3:1'
-    nccl:
-      environment:
-        set:
-          NCCL_IB_HCA: 'mlx5_2:1,mlx5_3:1'
-          NCCL_SOCKET_IFNAME: 'bond0'
diff --git a/stacks/pinot-noir/modules_kuma_l40s.yaml b/stacks/pinot-noir/modules_kuma_l40s.yaml
deleted file mode 100644
index 7be541da7ebaa02cccf6874f657a141d82f56541..0000000000000000000000000000000000000000
--- a/stacks/pinot-noir/modules_kuma_l40s.yaml
+++ /dev/null
@@ -1,9 +0,0 @@
-modules:
-  default:
-    lmod:
-      openmpi:
-        environment:
-          set:
-            OMPI_MCA_pml: 'ucx'
-            OMPI_MCA_osc: 'ucx'
-            UCX_NET_DEVICES: 'mlx5_0:1,mlx5_1:1'
diff --git a/stacks/pinot-noir/packages.yaml b/stacks/pinot-noir/packages.yaml
deleted file mode 100644
index 01e4aa6bffd49e9caf3c243de15edba0287bd56f..0000000000000000000000000000000000000000
--- a/stacks/pinot-noir/packages.yaml
+++ /dev/null
@@ -1,13 +0,0 @@
-packages:
-  all:
-    providers:
-      mpi: [openmpi, intel-oneapi-mpi]
-      iconv: [libiconv]
-      jpeg: [libjpeg]
-      zlib-api: [zlib-ng]
-    require:
-      - spec: "^libiconv"
-        when: "^iconv"
-
-  zlib-ng:
-    require: ['build_system=autotools']
diff --git a/stacks/pinot-noir/packages_acc_cuda.yaml b/stacks/pinot-noir/packages_acc_cuda.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..ae5b5aab7d61ee68b55219ed108e610755d78cdb
--- /dev/null
+++ b/stacks/pinot-noir/packages_acc_cuda.yaml
@@ -0,0 +1,82 @@
+packages:
+  all:
+    require:
+      - "~rocm"
+
+      - spec: cuda_arch={cuda_arch}
+        when: '+cuda'
+
+      - spec: '+cuda'
+        when: '%gcc'
+
+  # ---------------------------------------------------------------------------
+  cuda:
+    prefer:
+    - spec: "^gcc-runtime@{gcc_version}"
+      when: "%gcc"
+    - spec: "%gcc@{gcc_version} target={target}"
+      when: "%gcc"
+    require:
+    - '@12.4.1'
+
+  hypre:
+    require:
+    - spec: '+cuda cuda_arch={cuda_arch} +unified-memory'
+      when: '%gcc'
+
+  kokkos:
+    require:
+    - spec: '+cuda +cuda_lambda cuda_arch={cuda_arch} +wrapper ~openmptarget'
+      when: '%gcc'
+
+  kokkos-kernels:
+    require: ['+cuda', '+cublas', '+cusolver', '+cusparse', 'cuda_arch={cuda_arch}']
+
+  libxc:
+    require: ['+cuda', 'cuda_arch={cuda_arch}']
+
+  nvshmem:
+    require:
+    - spec: '+cuda cuda_arch={cuda_arch} +ibgda +nccl +ucx +mpi'
+
+  openmpi:
+    require: ['+cuda', 'cuda_arch={cuda_arch}', 'fabrics=hcoll']
+
+  papi:
+    require: ['+nvml', '+infiniband', '+cuda']
+
+  paraview:
+    require: ['~cuda']
+
+  petsc:
+    require:
+    - spec: '+cuda cuda_arch={cuda_arch}'
+      when: '%gcc'
+
+  py-tensorflow:
+    require:
+    - spec: '+cuda cuda_arch={cuda_arch} +nccl'
+
+  py-torch:
+    require:
+    - spec: '+cuda cuda_arch={cuda_arch} +nccl +cudnn'
+
+  python:
+    require:
+    - spec: 'target={target}'
+      when: '%gcc@{gcc_version}'
+
+  suite-sparse:
+    require:
+    - spec: '+cuda'
+      when: '@7.3.1'
+    - spec: '~cuda'
+      when: '@7.2.1'
+
+  ucc:
+    require:
+    - spec: '+cuda cuda_arch={cuda_arch} +nccl'
+
+  ucx:
+    require:
+    - spec: '+xpmem +cma +rdmacm +rc +ud +dc +verbs +ib_hw_tm +gdrcopy +cuda cuda_arch={cuda_arch} ~rocm'
diff --git a/stacks/pinot-noir/packages_acc_none.yaml b/stacks/pinot-noir/packages_acc_none.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..0aa29d8aa89378efccc88721d31443a6c52c5595
--- /dev/null
+++ b/stacks/pinot-noir/packages_acc_none.yaml
@@ -0,0 +1,3 @@
+packages:
+  all:
+    require: ['~cuda', '~rocm']
diff --git a/stacks/pinot-noir/packages_common.yaml b/stacks/pinot-noir/packages_common.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..4b636f1e928fb31053eeb8dfc59f3be76c87e94e
--- /dev/null
+++ b/stacks/pinot-noir/packages_common.yaml
@@ -0,0 +1,26 @@
+packages:
+  all:
+    compiler:
+      - gcc
+      - aocc
+      - nvhpc
+
+    providers:
+      mpi: [openmpi, intel-oneapi-mpi]
+      jpeg: [libjpeg]
+      zlib-api: [zlib-ng]
+      pkgconfig: [pkgconf]
+      szip: [libaec]
+      unwind: [libunwind]
+      uuid: [libuuid]
+      zlib-api: [zlib-ng+compat]
+
+    require:
+    - spec: '^libuuid'
+      when: '^uuid'
+
+  glibc:
+    prefer: ['%gcc@11.2.1']
+
+  zlib-ng:
+    require: ['build_system=autotools']
diff --git a/stacks/pinot-noir/packages_helvetios.yaml b/stacks/pinot-noir/packages_helvetios.yaml
deleted file mode 100644
index fe0d4ad01829f0895adce34a9071fe0eb4218e18..0000000000000000000000000000000000000000
--- a/stacks/pinot-noir/packages_helvetios.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-packages:
-  all:
-    target: ["skylake_avx512"]
-    require: ['~cuda', '~rocm']
-
-  # py-torch:
-  #   require:
-  #   - spec: '~cuda ~cudnn ~nccl ~rocm'
diff --git a/stacks/pinot-noir/packages_izar.yaml b/stacks/pinot-noir/packages_izar.yaml
deleted file mode 100644
index 9ce65d95e200925fe7b5bd50d0f76c18b2f33097..0000000000000000000000000000000000000000
--- a/stacks/pinot-noir/packages_izar.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
-packages:
-  all:
-    target: ["cannonlake"]
-    require:
-      - spec: ^openmpi +cuda
-        when: '%gcc ^mpi'
-
-      - spec: cuda_arch=70
-        when: '+cuda'
-
-      - '+cuda'
diff --git a/stacks/pinot-noir/packages_jed.yaml b/stacks/pinot-noir/packages_jed.yaml
deleted file mode 100644
index 822d1e2f6b56828d7269ba821ecb27be99c9d6d2..0000000000000000000000000000000000000000
--- a/stacks/pinot-noir/packages_jed.yaml
+++ /dev/null
@@ -1,85 +0,0 @@
-packages:
-  all:
-    target: ["icelake"]
-    require:
-      - "~rocm"
-
-      - spec: cuda_arch=90 target=icelake
-        when: '+cuda'
-      # - spec: '~cuda'
-      #   when: '%oneapi'
-
-      - spec: '+cuda'
-        when: '%gcc'
-
-  # ---------------------------------------------------------------------------
-  hypre:
-    require:
-    - spec: '+cuda cuda_arch=90 +unified-memory'
-      when: '%gcc'
-
-  kokkos:
-    require:
-    - spec: '+cuda cuda_arch=90 +cuda_uvm +wrapper ~openmptarget'
-      when: '%gcc'
-
-  kokkos-kernels:
-    require:
-    - spec: '+cuda cuda_arch=90'
-      when: '%gcc'
-
-  openmpi:
-    require:
-      - spec: '+cuda cuda_arch=90 target=icelake'
-
-  petsc:
-    require:
-    - spec: '+cuda cuda_arch=90'
-      when: '%gcc'
-
-  py-tensorflow:
-    require:
-    - spec: '+cuda cuda_arch=90 +nccl'
-
-  py-torch:
-    require:
-    - spec: '+cuda cuda_arch=90 +nccl +cudnn'
-
-  quantum-espresso:
-    require:
-    - spec: '~cuda'
-
-  suite-sparse:
-    require:
-    - spec: '+cuda'
-
-  ucx:
-    require:
-      - spec: '+xpmem +cma +rdmacm +rc +ud +dc +verbs +ib_hw_tm +gdrcopy +cuda cuda_arch=90 target=icelake ~rocm'
-
-  # ---------------------------------------------------------------------------
-  # Externals
-  # ---------------------------------------------------------------------------
-  pmix:
-    buildable: false
-    externals:
-    - spec: 'pmix@5.0.2'
-      prefix: /usr
-
-  rdma-core:
-    buildable: false
-    externals:
-    - spec: 'rdma-core@47.1'
-      prefix: /usr
-
-  slurm:
-    buildable: false
-    externals:
-    - spec: 'slurm@24-05-0-2'
-      prefix: /usr
-
-  xpmem:
-    buildable: false
-    externals:
-    - spec: 'xpmem@2.7.3'
-      prefix: /usr
diff --git a/stacks/pinot-noir/packages_kuma-h100.yaml b/stacks/pinot-noir/packages_kuma-h100.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..fb5764966000dd33ff469f833f1851d7fb1daeb0
--- /dev/null
+++ b/stacks/pinot-noir/packages_kuma-h100.yaml
@@ -0,0 +1,36 @@
+packages:
+  cp2k:
+    require: ['+cuda', 'cuda_arch=90']
+
+  # ---------------------------------------------------------------------------
+  # Externals
+  # ---------------------------------------------------------------------------
+  hcoll:
+    buildable: false
+    externals:
+    - spec: 'hcoll@4.8.3227'
+      prefix: /opt/mellanox/hcoll
+
+  pmix:
+    buildable: false
+    externals:
+    - spec: 'pmix@5.0.2'
+      prefix: /usr
+
+  rdma-core:
+    buildable: false
+    externals:
+    - spec: 'rdma-core@51.1'
+      prefix: /usr
+
+  slurm:
+    buildable: false
+    externals:
+    - spec: 'slurm@24-05-0-2'
+      prefix: /usr
+
+  xpmem:
+    buildable: false
+    externals:
+    - spec: 'xpmem@2.7.3'
+      prefix: /usr
diff --git a/stacks/pinot-noir/packages_kuma-l40s.yaml b/stacks/pinot-noir/packages_kuma-l40s.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..31774ed2def2ea16cf24f23f73f2c199664b324e
--- /dev/null
+++ b/stacks/pinot-noir/packages_kuma-l40s.yaml
@@ -0,0 +1,40 @@
+packages:
+  # ---------------------------------------------------------------------------
+  cp2k:
+    require: ['~cuda']
+
+  dbcsr:
+    require: ['~cuda']
+
+  # ---------------------------------------------------------------------------
+  # Externals
+  # ---------------------------------------------------------------------------
+  hcoll:
+    buildable: false
+    externals:
+    - spec: 'hcoll@4.8.3227'
+      prefix: /opt/mellanox/hcoll
+
+  pmix:
+    buildable: false
+    externals:
+    - spec: 'pmix@5.0.2'
+      prefix: /usr
+
+  rdma-core:
+    buildable: false
+    externals:
+    - spec: 'rdma-core@51.1'
+      prefix: /usr
+
+  slurm:
+    buildable: false
+    externals:
+    - spec: 'slurm@24-05-0-2'
+      prefix: /usr
+
+  xpmem:
+    buildable: false
+    externals:
+    - spec: 'xpmem@2.7.3'
+      prefix: /usr
diff --git a/stacks/pinot-noir/packages_kuma_h100.yaml b/stacks/pinot-noir/packages_kuma_h100.yaml
deleted file mode 100644
index 281c15220290598dbe1e9d38ffc6a9268089bce4..0000000000000000000000000000000000000000
--- a/stacks/pinot-noir/packages_kuma_h100.yaml
+++ /dev/null
@@ -1,82 +0,0 @@
-packages:
-  all:
-    target: ["zen4"]
-    require:
-      - "~rocm"
-
-      - spec: cuda_arch=90 target=zen4
-        when: '+cuda'
-
-      - spec: '+cuda'
-        when: '%gcc'
-
-  # ---------------------------------------------------------------------------
-  hypre:
-    require:
-    - spec: '+cuda cuda_arch=90 +unified-memory'
-      when: '%gcc'
-
-  kokkos:
-    require:
-    - spec: '+cuda cuda_arch=90 +cuda_uvm +wrapper ~openmptarget'
-      when: '%gcc'
-
-  nvshmem:
-    require:
-    - spec: '+cuda cuda_arch=90 +ibgda +nccl +ucx +mpi'
-
-  openmpi:
-    require:
-      - spec: '+cuda cuda_arch=90 target=zen4'
-
-  petsc:
-    require:
-    - spec: '+cuda cuda_arch=90'
-      when: '%gcc'
-
-  py-tensorflow:
-    require:
-    - spec: '+cuda cuda_arch=90 +nccl'
-
-  py-torch:
-    require:
-    - spec: '+cuda cuda_arch=90 +nccl +cudnn'
-
-  quantum-espresso:
-    require:
-    - spec: '~cuda'
-
-  suite-sparse:
-    require:
-    - spec: '+cuda'
-
-  ucx:
-    require:
-      - spec: '+xpmem +cma +rdmacm +rc +ud +dc +verbs +ib_hw_tm +gdrcopy +cuda cuda_arch=90 ~rocm target=zen4'
-
-  # ---------------------------------------------------------------------------
-  # Externals
-  # ---------------------------------------------------------------------------
-  pmix:
-    buildable: false
-    externals:
-    - spec: 'pmix@5.0.2'
-      prefix: /usr
-
-  rdma-core:
-    buildable: false
-    externals:
-    - spec: 'rdma-core@51.1'
-      prefix: /usr
-
-  slurm:
-    buildable: false
-    externals:
-    - spec: 'slurm@24-05-0-2'
-      prefix: /usr
-
-  xpmem:
-    buildable: false
-    externals:
-    - spec: 'xpmem@2.7.3'
-      prefix: /usr
diff --git a/stacks/pinot-noir/packages_kuma_l40s.yaml b/stacks/pinot-noir/packages_kuma_l40s.yaml
deleted file mode 100644
index a1b6aef1ba3ec155b9dedcdc3825c7206f3222f0..0000000000000000000000000000000000000000
--- a/stacks/pinot-noir/packages_kuma_l40s.yaml
+++ /dev/null
@@ -1,82 +0,0 @@
-packages:
-  all:
-    target: ["zen4"]
-    require:
-      - "~rocm"
-
-      - spec: cuda_arch=89 target=zen4
-        when: '+cuda'
-
-      - spec: '+cuda'
-        when: '%gcc'
-
-  # ---------------------------------------------------------------------------
-  hypre:
-    require:
-    - spec: '+cuda cuda_arch=89 +unified-memory'
-      when: '%gcc'
-
-  kokkos:
-    require:
-    - spec: '+cuda cuda_arch=89 +cuda_uvm +wrapper ~openmptarget'
-      when: '%gcc'
-
-  nvshmem:
-    require:
-    - spec: '+cuda cuda_arch=89 +ibgda +nccl +ucx +mpi'
-
-  openmpi:
-    require:
-      - spec: '+cuda cuda_arch=89 target=zen4'
-
-  petsc:
-    require:
-    - spec: '+cuda cuda_arch=89'
-      when: '%gcc'
-
-  py-tensorflow:
-    require:
-    - spec: '+cuda cuda_arch=89 +nccl'
-
-  py-torch:
-    require:
-    - spec: '+cuda cuda_arch=89 +nccl +cudnn'
-
-  quantum-espresso:
-    require:
-    - spec: '~cuda'
-
-  suite-sparse:
-    require:
-    - spec: '+cuda'
-
-  ucx:
-    require:
-      - spec: '+xpmem +cma +rdmacm +rc +ud +dc +verbs +ib_hw_tm +gdrcopy +cuda cuda_arch=89 ~rocm target=zen4'
-
-  # ---------------------------------------------------------------------------
-  # Externals
-  # ---------------------------------------------------------------------------
-  pmix:
-    buildable: false
-    externals:
-    - spec: 'pmix@5.0.2'
-      prefix: /usr
-
-  rdma-core:
-    buildable: false
-    externals:
-    - spec: 'rdma-core@51.1'
-      prefix: /usr
-
-  slurm:
-    buildable: false
-    externals:
-    - spec: 'slurm@24-05-0-2'
-      prefix: /usr
-
-  xpmem:
-    buildable: false
-    externals:
-    - spec: 'xpmem@2.7.3'
-      prefix: /usr
diff --git a/stacks/pinot-noir/packages_stack.yaml b/stacks/pinot-noir/packages_stack.yaml
index 65bebbff72b75fc05be003c6c16492fbf27e07a0..cc7f0d9ec5782f741b30617d0e389f6a6ea7e99d 100644
--- a/stacks/pinot-noir/packages_stack.yaml
+++ b/stacks/pinot-noir/packages_stack.yaml
@@ -1,19 +1,27 @@
 packages:
   all:
-    providers:
-      mpi: [openmpi, intel-oneapi-mpi]
-      iconv: [libiconv]
-      jpeg: [libjpeg]
-      zlib-api: [zlib-ng]
+    target: ["{target}"]
+    prefer: ['target={target}']
+
     require:
       - spec: '+ipo'
         when: '%gcc'
 
+      - spec: '^netlib-scalapack'
+        when: '%gcc ^scalapack'
+
   # ----------------------------------------------------------------------------
   # Requirements
   # ----------------------------------------------------------------------------
   adios2:
-    require: ['+kokkos']
+    require: ['+kokkos', '+mgard']
+
+  apr:
+    # https://issues.apache.org/jira/browse/SVN-4813
+    require: ['@1.6.2']
+
+  arpack-ng:
+    prefer: ['+mpi']
 
   boost:
     prefer: ['~mpi']
@@ -24,25 +32,55 @@ packages:
     '+system', '~taggedlayout', '+test', '+thread', '+timer', '~type_erasure',
     '~versionedlayout', '+wave', '+exception']
 
+  cairo:
+    # ~X avoids a dependency to python (only prefer due to gtkplus)
+    prefer: ['~X', '+svg']
+    require: ['+fc', '+ft', '+pdf', '+gobject']
+
+  cmake:
+    prefer: ['~ncurses']
+
+  costa:
+    require: ['~apps']
+
+  cp2k:
+    require: ['~ipo']
+
   cuda:
     require:
-    - spec: '@12.4.0'
     - spec: '+allow-unsupported-compilers'
       when: '%oneapi'
 
+  curl:
+    require:
+    - '+nghttp2'
+    - '+libidn2'
+    - '+libssh2'
+    - one_of: ['tls=openssl', 'tls=mbedtls']
+
+  emacs:
+    prefer: ['+tls', '+X', 'toolkit=athena']
+
+  expat:
+    prefer: ['libbsd']
+
   fenics-dolfinx:
-    require: ['+slepc']
+    require: ['@0.8.0', '+slepc']
+
+  ffmpeg:
+    require: ['+libx264']
 
   fftw:
     prefer: ['+mpi', '+openmp']
 
+  gettext:
+    require: ['+libxml2', '+xz']
+
   gnuplot:
-    require:
-    - spec: '@5.4.10'
+    require: ['@5.4.10', '+cairo']
 
   hdf5:
     prefer:
-    - spec: '+mpi'
     - spec: '@1.14.3'
     require:
     - spec: '+hl +threadsafe +szip +cxx +fortran'
@@ -56,79 +94,212 @@ packages:
   intel-oneapi-mkl:
     prefer: ['~cluster']
 
+  julia:
+    require: ['@1.10.4']
+
   kokkos:
-    prefer: ['+openmp', '+numactl', '+memkind', '+threads',
-    '+aggressive_vectorization']
+    require: ['+numactl', '+memkind', '+serial',
+              '+openmp', '~openmptarget',
+              '~threads', '~sycl',
+              '+aggressive_vectorization', '@4.3.01']
+
+  kokkos-kernels:
+    require: ['@4.3.01', '+openmp', '~threads', '~ipo']
 
-  kokkos-kernel:
-    prefer: ['+openmp', '+threads']
+  kokkos-nvcc-wrapper:
+    prefer: ['@4.3.01']
 
   lammps:
-    require: ['build_type=Release', '+asphere', '+atc', '+body', '+class2',
-    '+colloid', '+compress', '+coreshell', '+dipole', '+diffraction', '+extra-dump',
-    '+granular', '+h5md', '+kspace', '+latboltz', '+latte', '+lib', '+manybody',
-    '+mc', '+misc', '+molecule', '+mpi', '+mpiio', '+netcdf', '+peri', '~poems',
-    '+python', '+qeq', '+replica ', '+rigid', '+shock', '+ml-snap', '+srd',
-    '+voronoi', '+plumed', '+kokkos']
+    require: ['@20230802.3',
+              'build_type=Release', '+asphere', '+atc', '+body', '+class2',
+              '+colloid', '+compress', '+coreshell', '+dipole', '+diffraction',
+              '+extra-dump', '+granular', '+h5md', '+kspace', '+latboltz',
+              '+lib', '+manybody', '+mc', '+misc', '+molecule',
+              '+mpi', '+netcdf', '+peri', '~poems', '+python', '+qeq',
+              '+replica ', '+rigid', '+shock', '+ml-snap', '+srd', '+voronoi',
+              '+plumed', '+kokkos']
 
   libfabric:
     require:
     - spec: 'fabrics=mlx,mrail,psm3,verbs,udp,tcp,sockets,shm'
 
-  llvm:
-    prefer: ['~clang']
+  libffi:
+    require: ['@3.4.6']
+
+  libssh2:
+    prefer: ['crypto=openssl']
+
+  libtiff:
+    require: ['build_system=cmake', '+pic', '+shared', '+jpeg']
+
+  libtool:
+    require: ['@2.4.6']
+
+  libxc:
+    require: ['build_system=cmake', '+shared']
 
   libxcb:
     require: ['+use_spack_interpreter']
 
+  libxml2:
+    # python depends on libxml2 this avoid cyclic dependency
+    require: ['~python']
+
+  likwid:
+    require: ['@5.3.0']
+
+  llvm:
+    # avoid compiler in lmod module
+    prefer: ['~clang']
+    require:
+    - spec: '~cuda'
+      when: '@15:'
+
+  m4:
+    require: ['+sigsegv']
+
+  magma:
+    # https://groups.google.com/a/icl.utk.edu/g/magma-user/c/l2XWTKmuBH0
+    require: ['~ipo']
+
+  mbedtls:
+    prefer: ['@3.3.0']
+
   mesa:
     require: ['~llvm', '+opengl', '+opengles', '+osmesa']
 
+  meson:
+    prefer: ['@1.2.1']
+
   metis:
     require: ['+real64']
 
+  mgard:
+    require: ['~cuda']
+
+  mpfr:
+    require: ['@4.0.2']
+
+  mumps:
+    require: ['+openmp', '+metis', '+parmetis']
+
   netcdf-c:
     prefer: ['+mpi']
 
   openblas:
-    prefer: ['threads=pthreads symbol_suffix=none ~ilp64']
+    require: ['build_system=makefile']
+    prefer: ['threads=openmp', 'symbol_suffix=none', '~ilp64']
 
   opencv:
     prefer: ['+vtk', '+python3']
 
   openmpi:
-    require:
-    - spec: '@5.0.3 fabrics=ofi,ucx,verbs schedulers=slurm ~rsh +romio romio-filesystem=gpfs +internal-pmix ~memchecker'
+    require: ['@5.0.3',
+              'fabrics=ofi,ucc,ucx,verbs',
+              'schedulers=slurm',
+              '+romio', 'romio-filesystem=gpfs',
+              '+internal-pmix', '~rsh',
+              '~memchecker']
+
+  openssl:
+    prefer: ['+shared', 'certs=system', '~docs']
+
+  pango:
+    prefer: [~X]
+
+  papi:
+    require: ['+powercap', '+rapl']
 
   petsc:
-    require:
-    - spec: '+hypre +mumps +saws +scalapack +mpi +suite-sparse +kokkos'
+    require: ['+hypre', '+mumps', '+saws', '+scalapack', '+mpi', '+suite-sparse', '+kokkos', '+openmp']
 
   python:
     require:
-    - spec: '+ssl +tkinter'
+    - spec: '+ssl +tkinter +crypt +bz2 +pyexpat +libxml2 +ctypes +uuid ~sqlite3'
     - spec: '+optimizations'
       when: '%gcc'
+    prefer:
+    - spec: '%gcc@13.2.0'
+      when: '%gcc'
+
+  py-cython:
+    require:
+    - one_of: ['@0.29.36', '@3.0.8']
+    prefer: ['@3.0.8']
+
+  py-fenics-dolfinx:
+    require: ['@0.8.0']
+
+  py-horovod:
+    require: ['frameworks=pytorch,keras,tensorflow', 'controllers=mpi', 'tensor_ops=nccl']
+
+  py-mpmath:
+    require: ['@1.2.1']
+
+  py-numpy:
+    prefer: ['@1.26.4']
 
+  py-pandas:
+    prefer: ['@2.2.1']
+
+  py-pysam:
+    prefer: ['@0.22.1']
+
+  # https://github.com/tensorflow/tensorflow/issues/63360#issuecomment-2142735122
+  # MKL support seams not maintained
   py-tensorflow:
-    require: ['+mpi', '+mkl']
+    require: ['+mpi', '~mkl']
 
   py-torch:
-    require: ['+mpi']
+    require: ['@2.3.1', '+mpi', '~valgrind']
+
+  py-scipy:
+    require: ['@1.13.0']
+
+  py-setuptools:
+    require: ['@63.4.3']
+
+  qt:
+    require: ['@5.15.2']
+
+  quantum-espresso:
+    require: ['+mpi', '+openmp', '~gipaw', '+scalapack', '+libxc', '~ipo']
+    prefer: ['hdf5=parallel']
+
+  rust:
+    require: ['+dev']
 
   scotch:
     prefer: ['~mpi']
 
+  sirius:
+    prefer: ['+fortran', '~elpa', '+wannier90']
+
+  slepc:
+    require:
+    - spec: '^arpack-ng +mpi'
+
+  spades:
+    require: ['~ipo']
+
   suite-sparse:
     require:
-    - spec: '+graphblas'
+      - '+graphblas'
+      - one_of: ['@7.3.1', '@7.2.1']
+    prefer: ['@7.3.1']
 
   tk:
     require: ['+xft', '+xss']
 
   ucx:
+    require: ['@1.17.0', '+rdmacm', '+rc', '+dc', '+ud', '+cma', '+verbs']
+
+  vtk:
     require:
-    - spec: '+rdmacm +rc +dc +ud +cma +verbs'
+    - spec: '~python ++mpi +xdmf +ffmpeg'
+
+  xmlto:
+    require: ['@0.0.29']
 
   # ----------------------------------------------------------------------------
   # System dependencies
@@ -139,6 +310,18 @@ packages:
     - spec: 'egl@21.3.4'
       prefix: /usr
 
+  ninja:
+    buildable: false
+    externals:
+    - spec: 'ninja@1.10.2'
+      prefix: /usr
+
+  opengl:
+    buildable: false
+    externals:
+    - spec: 'opengl@4.6'
+      prefix: /usr
+
   pmix:
     buildable: false
     externals:
@@ -157,7 +340,6 @@ packages:
     - spec: 'slurm@23-11-7-1'
       prefix: /usr
 
-
   # ----------------------------------------------------------------------------
   # Externals
   # ----------------------------------------------------------------------------
diff --git a/stacks/pinot-noir/spack.yaml b/stacks/pinot-noir/spack.yaml
index 4450501f931976ff7626285308a5700d39fdbc5a..1b9bdd5145b2cd53f59a21ea5c6d784020a2102d 100644
--- a/stacks/pinot-noir/spack.yaml
+++ b/stacks/pinot-noir/spack.yaml
@@ -3,11 +3,13 @@ spack:
       - compiler_definitions.yaml
 
       - packages_stack.yaml
+      - packages_accel.yaml
       - packages_env.yaml
 
       - modules_stack.yaml
       - modules_env.yaml
 
+      - definitions_accel.yaml
       - definitions_env.yaml
 
       - config_stack.yaml
@@ -23,7 +25,7 @@ spack:
         - intel-oneapi-mpi@2021.12.1
 
     - blas_gcc:
-        - openblas@0.3.26
+        - openblas@0.3.27
 
     - blas_oneapi:
         - intel-oneapi-mkl@2024.1.0
@@ -39,8 +41,8 @@ spack:
     # -------------------------------------------------------------------------
     - core_codes:
         - bzip2
-        - cmake
-        - emacs +tls
+        - cmake +ncurses
+        - emacs
         - fastqc
         - fio
         - git
@@ -48,24 +50,27 @@ spack:
         - gmp
         - gnuplot
         - gzip
-        - imagemagick +ghostscript
         - intel-oneapi-advisor
         - intel-oneapi-inspector
         - intel-oneapi-vtune
         - libarchive
+        - libgd
         - libjpeg-turbo
         - libpng
         - libtiff
         - libxml2
+        - likwid
         - lmod
         - mpfr
         - neovim
-        - ninja
+        #- ninja
+        - papi
         - parallel
         - picard
         - rclone
-        - rust
         - sbt
+        - squashfs
+        - squashfs-mount
         - sratoolkit
         - subversion
         - tar
@@ -80,43 +85,42 @@ spack:
     # Serial codes
     # -------------------------------------------------------------------------
     - serial_codes:
-        - bwa
-        - fftw +openmp ~mpi
-        - fftw ~openmp ~mpi
-        - eigen
+        - fftw +openmp ~~mpi
+        - fftw ~~openmp ~~mpi
         - gsl
-        - hdf5@1.14.1 ~mpi
-        - hisat2
+        - hdf5@1.14.3 ~~mpi
         - htslib
         - intel-oneapi-tbb
         - jasper
-        - kallisto ^hdf5 ~mpi
+        - kallisto ^hdf5 ~~mpi
         - kokkos
         - kokkos-kernels
         - mafft
         - metis
         - muscle
-        - netcdf-c~mpi ^hdf5~mpi
-        - netcdf-fortran ^netcdf-c ~mpi ^hdf5 ~mpi
-        - nfft ^fftw~mpi~openmp
+        - netcdf-c ~~mpi
+        - netcdf-fortran ^netcdf-c ~~mpi
+        - nfft ^fftw~~mpi~~openmp
         - python
-        - scotch ~mpi
+        - scotch ~~mpi
         - star
         - subread
-        - unblur ^fftw~mpi~openmp
+        - unblur ^fftw~~mpi ~~openmp
         - voropp
 
     - gcc_serial_codes:
-        - cistem  ^fftw~mpi
-        - ctffind ^fftw ~mpi
-        - ffmpeg +libx264
+        - bwa
+        - eigen
+        - ffmpeg
         - glpk+gmp
         - hwloc
         - intel-oneapi-mkl
         - libxc
-        - ncview ^hdf5 ~mpi ^netcdf-c ~mpi ~parallel-netcdf
+        - qperf
+        - ncview ^netcdf-c ~~mpi ~parallel-netcdf
         - sox
         - stacks
+        - xgboost
 
     - oneapi_serial_codes:
         - abaqus@2023
@@ -129,16 +133,18 @@ spack:
 
     - cuda_serial_codes: []
 
+    - cuda_mpi_codes: []
+
     # -------------------------------------------------------------------------
     # Blas dependent codes
     # -------------------------------------------------------------------------
     - blas_codes:
-        - arpack-ng ~mpi
+        - arpack-ng ~~mpi
         - superlu
         - suite-sparse
 
     - gcc_blas_codes:
-        - armadillo +hdf5 ^arpack-ng ~mpi ^hdf5 ~mpi
+        - armadillo +hdf5 ^arpack-ng ~~mpi ^hdf5 ~~mpi
         - octave
 
     # -------------------------------------------------------------------------
@@ -188,111 +194,120 @@ spack:
         - snakemake
 
     - python_blas_codes:
-        - boost ~mpi
-        #- gmsh ~mpi +hdf5 +cgns +eigen ~opencascade +openmp ~fltk ~med
+        - boost ~~mpi
+        #- gmsh ~~mpi +hdf5 +cgns +eigen ~opencascade +openmp ~fltk ~med
         - iq-tree
         - py-biopython
         - py-keras-preprocessing
-        - py-macs2
+        - py-macs3
         - py-matplotlib
         - py-numpy
         - py-opt-einsum
         - py-pandas
         - py-pybigwig
         - py-xarray
-        - valgrind
+        - valgrind ~~mpi
 
     - gcc_python_codes:
         - blast-plus
-        - caffe +python
+        - cistem  ^fftw~~mpi
+        - ctffind ^fftw ~~mpi
         - gatk
-        - gdb +tui +source-highlight +xz
+        - hisat2
+        - imagemagick +ghostscript
         - julia+openlibm
-        - libgd
         - mesa
         - mummer
         - node-js
-        - openbabel +python ^boost ~mpi
-        - r
+        - rust
         - spades
-        - xgboost
 
     - gcc_python_blas_codes:
+        - caffe +python ^hdf5~mpi
+        - gdb +tui +source-highlight +xz
+        - openbabel ++python ^boost ~~mpi
         - polymake ^cddlib@0.94h
         - py-cryolobm
         - py-deeptools
-        - py-h5py ~mpi ^hdf5 ~mpi
-        - py-pymol
+        - py-h5py ~~mpi
+        - py-pymol ^hdf5~mpi
         - py-scikit-learn
         - py-scipy
-        - py-statsmodels
+        #- py-statsmodels
         - py-theano
+        - r
 
     # -------------------------------------------------------------------------
     # Parallel codes
     # -------------------------------------------------------------------------
     - mpi_codes:
-        - fftw +mpi +openmp
-        - hdf5@1.14.3 +mpi
+        - fftw ++mpi +openmp
+        - hdf5@1.14.3 ++mpi
         - openfoam-org +metis
         - osu-micro-benchmarks +graphing
         - parmetis
         - phylobayesmpi
-        - py-mpi4py
-        - scotch +mpi
+        - scotch ++mpi
         - netcdf-c
         - netcdf-fortran
         - parmetis
+        - scorep
+
+    - mpi_python_codes:
+        - py-mpi4py
 
     - gcc_mpi_codes:
         - wrf ~pnetcdf build_type=dm+sm
 
     - mpi_blas_codes:
-        - arpack-ng +mpi
+        - arpack-ng ++mpi
         - hypre@2.31.0
         - mumps@5.6.2
         - superlu-dist@8.2.1
-        #- quantum-espresso +mpi +scalapack +gipaw
-        #- quantum-espresso +mpi +scalapack +gipaw hdf5=parallel
+        #- quantum-espresso ++mpi +scalapack +gipaw
+        - quantum-espresso
 
     - gcc_mpi_blas_codes:
-        - gmsh +mpi +eigen +openmp +hdf5 ~fltk ~opencascade ~med ^mmg ~vtk
+        - armadillo +hdf5 ^arpack-ng ++mpi ^hdf5 ++mpi
+        - gmsh ++mpi +eigen +openmp +hdf5 ~fltk ~opencascade ~med ^mmg ~vtk
         - cpmd ~openmp
         - elmerfem +mumps +openmp +hypre
         - netlib-scalapack
-        - yambo +mpi io=iotk,etsf-io
+        - trilinos
+        - vtk
+        - yambo ++mpi io=iotk,etsf-io
 
     - mpi_blas_python_codes:
-        - boost +mpi
+        - boost ++mpi
         - cgal
-        - iq-tree@1.6.12+mpi
-        - neuron +mpi +python
-        - petsc@3.21.1
+        - iq-tree@1.6.12++mpi
+        - neuron ++mpi +python
+        - petsc
         - plumed
         - py-petsc4py
         - slepc
+        - sirius
 
     - gcc_mpi_blas_python_codes:
-        # - eman2 +mpi
+        # - eman2 ++mpi
         - adios2
-        - cp2k +mpi +plumed +openmp smm=blas
+        - cp2k ++mpi +plumed +openmp smm=blas
         # - fenics +parmetis +hdf5 +scotch +suite-sparse ~vtk ~trilinos
         - fenics-dolfinx
-        - gromacs +mpi +plumed
+        - gromacs ++mpi +plumed
         - lammps
         - opencv
         - openfoam +metis
-        - paraview +shared +python +hdf5 ~osmesa +opengl2 +egl
+        - paraview@5.12.0 +shared +python +hdf5  +opengl2
         - py-fenics-dolfinx
-        - py-h5py +mpi
-        - py-horovod
+        - py-h5py ++mpi
+        # - py-horovod cannot resolve dependencies with pytorch
         - py-keras
         - py-tensorflow
         - py-torch
         - py-torchvision
         - relion ~mklfft
         - topaz
-        - vtk
 
     # -------------------------------------------------------------------------
     # External packages
@@ -392,11 +407,22 @@ spack:
         - [$^mpi_gcc]
         - [$%compiler_gcc]
 
+    - matrix:
+        - [$mpi_python_codes]
+        - [$^python_gcc]
+        - [$^mpi_gcc]
+        - [$%compiler_gcc]
+
     - matrix:
         - [$gcc_mpi_codes]
         - [$^mpi_gcc]
         - [$%compiler_gcc]
 
+    - matrix:
+        - [$cuda_mpi_codes]
+        - [$^mpi_gcc]
+        - [$%compiler_gcc]
+
     - matrix:
         - [$mpi_blas_codes]
         - [$^blas_gcc]
@@ -405,16 +431,16 @@ spack:
 
     - matrix:
         - [$mpi_blas_python_codes]
+        - [$^python_gcc]
         - [$^blas_gcc]
         - [$^mpi_gcc]
-        - [$^python_gcc]
         - [$%compiler_gcc]
 
     - matrix:
         - [$gcc_mpi_blas_python_codes]
+        - [$^python_gcc]
         - [$^blas_gcc]
         - [$^mpi_gcc]
-        - [$^python_gcc]
         - [$%compiler_gcc]
 
     # --------------------------------------------------------------------------
@@ -455,6 +481,12 @@ spack:
         - [$^mpi_oneapi]
         - [$%compiler_oneapi]
 
+    - matrix:
+        - [$mpi_python_codes]
+        - [$^python_oneapi]
+        - [$^mpi_oneapi]
+        - [$%compiler_oneapi]
+
     - matrix:
         - [$mpi_blas_codes]
         - [$^blas_oneapi]
@@ -463,9 +495,9 @@ spack:
 
     - matrix:
         - [$mpi_blas_python_codes]
+        - [$^python_oneapi]
         - [$^blas_oneapi]
         - [$^mpi_oneapi]
-        - [$^python_oneapi]
         - [$%compiler_oneapi]
 
   view: false