From b09a4d9b83aec17291962ca4197e5b97b1dda4e8 Mon Sep 17 00:00:00 2001
From: Nicolas Richart <nicolas.richart@epfl.ch>
Date: Fri, 28 Jun 2024 20:56:12 +0200
Subject: [PATCH] Adding more constraint to avoid weird concretizations

---
 stacks/pinot-noir/packages_helvetios.yaml |  6 ++++-
 stacks/pinot-noir/packages_jed.yaml       |  2 +-
 stacks/pinot-noir/packages_stack.yaml     | 27 ++++++++++++-----------
 3 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/stacks/pinot-noir/packages_helvetios.yaml b/stacks/pinot-noir/packages_helvetios.yaml
index f654aa4..17d3788 100644
--- a/stacks/pinot-noir/packages_helvetios.yaml
+++ b/stacks/pinot-noir/packages_helvetios.yaml
@@ -2,4 +2,8 @@ packages:
   all:
     target: ["skylake_avx512"]
     require:
-      - '~cuda'
+      - all_of: ['~cuda', '~rocm']
+
+  py-torch:
+    require:
+    - spec: '~cuda ~cudnn ~nccl ~rocm'
diff --git a/stacks/pinot-noir/packages_jed.yaml b/stacks/pinot-noir/packages_jed.yaml
index c260f3e..2d7f4c2 100644
--- a/stacks/pinot-noir/packages_jed.yaml
+++ b/stacks/pinot-noir/packages_jed.yaml
@@ -20,7 +20,7 @@ packages:
 
   kokkos:
     require:
-    - spec: '+cuda cuda_arch=90 +cuda_uvm +wrapper'
+    - spec: '+cuda cuda_arch=90 +cuda_uvm +wrapper ~openmptarget'
       when: '%gcc'
 
   openmpi:
diff --git a/stacks/pinot-noir/packages_stack.yaml b/stacks/pinot-noir/packages_stack.yaml
index 9b88e23..63ac9b9 100644
--- a/stacks/pinot-noir/packages_stack.yaml
+++ b/stacks/pinot-noir/packages_stack.yaml
@@ -2,6 +2,7 @@ packages:
   all:
     providers:
       mpi: [openmpi, intel-oneapi-mpi]
+      iconv: [libiconv]
       jpeg: [libjpeg]
       zlib-api: [zlib-ng]
     require:
@@ -20,8 +21,14 @@ packages:
       # - spec: ^nvhpc+mpi
       #   when: '%nvhpc ^mpi'
 
-      # - spec: ^openblas
-      #   when: '%gcc ^blas'
+      - spec: ^openblas %gcc
+        when: '%gcc ^blas'
+
+      - spec: ^eigen %gcc
+        when: '%gcc ^eigen'
+
+      - spec: ^kokkos %gcc
+        when: '%gcc ^kokkos'
 
       # - spec: ^openblas
       #   when: '%gcc ^lapack'
@@ -89,16 +96,14 @@ packages:
 
   hypre:
     prefer:
-    - spec: '@2.31.0'
-    require:
-    - spec: '+unified-memory ~magma'
-      when: '+cuda'
+    - spec: '@2.31.0 ~magma'
 
   intel-oneapi-mkl:
     prefer: ['+cluster']
 
   kokkos:
-    prefer: ['+openmp', '+openmptarget', '+numactl', '+memkind', '+threads', '+aggressive_vectorization']
+    prefer: ['+openmp', '+openmptarget', '+numactl', '+memkind', '+threads',
+    '+aggressive_vectorization']
 
   lammps:
     require: ['build_type=Release', '+asphere', '+atc', '+body', '+class2',
@@ -128,7 +133,7 @@ packages:
     prefer: ['+mpi']
 
   openblas:
-    prefer: ['threads=pthreads']
+    prefer: ['threads=pthreads suffix=none ~ilp64']
 
   opencv:
     prefer: ['+vtk', '+python3']
@@ -136,8 +141,6 @@ packages:
   openmpi:
     require:
     - spec: '@5.0.3 fabrics=ofi,ucx,verbs schedulers=slurm ~rsh +romio romio-filesystem=gpfs +internal-pmix ~memchecker'
-    - spec: ^ucx +cuda
-      when: +cuda
 
   petsc:
     require:
@@ -150,7 +153,7 @@ packages:
       when: '%gcc'
 
   py-tensorflow:
-    require: ['+mpi']
+    require: ['+mpi', '+mkl']
 
   py-torch:
     require: ['+mpi', '~magma']
@@ -165,8 +168,6 @@ packages:
   ucx:
     require:
     - spec: +rdmacm +rc +dc +ud +cma +verbs
-    - spec: +gdrcopy
-      when: +cuda
 
   # ----------------------------------------------------------------------------
   # System dependencies
-- 
GitLab