From 3a1a78acde36b3b683b8075c91833f86f74a7313 Mon Sep 17 00:00:00 2001
From: Nicolas Richart <networms@gmail.ch>
Date: Fri, 21 Jun 2024 00:33:53 +0200
Subject: [PATCH] Trying my chance with blas

---
 stacks/pinot-noir/packages_stack.yaml | 26 +++++++++++++++++++++++++-
 stacks/pinot-noir/spack.yaml          |  1 +
 2 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/stacks/pinot-noir/packages_stack.yaml b/stacks/pinot-noir/packages_stack.yaml
index 611328a..b7742ee 100644
--- a/stacks/pinot-noir/packages_stack.yaml
+++ b/stacks/pinot-noir/packages_stack.yaml
@@ -16,7 +16,25 @@ packages:
       - spec: ^nvhpc+mpi
         when: '%nvhpc ^mpi'
 
-      - spec: '^cuda%gcc@12.3.0'
+      - spec: '^openblas %gcc@12.3.0'
+        when: '%gcc@12.3.0 ^blas'
+
+      - spec: '^openblas %gcc@12.3.0'
+        when: '%gcc@12.3.0 ^lapack'
+
+      - spec: '^intel-oneapi-mkl'
+        when: '%oneapi ^blas'
+
+      - spec: '^intel-oneapi-mkl'
+        when: '%oneapi ^lapack'
+
+      - spec: ^nvhpc+blas
+        when: '%nvhpc ^blas'
+
+      - spec: ^nvhpc+lapack
+        when: '%nvhpc ^lapack'
+
+      - spec: '^cuda %gcc@12.3.0'
         when: '%gcc@12.3.0 ^cuda'
 
       - spec: '^cuda +allow-unsupported-compilers %oneapi'
@@ -41,6 +59,9 @@ packages:
   hdf5:
     variants: +hl +threadsafe +szip +cxx +fortran
 
+  intel-oneapi-mkl:
+    prefer: ['+cluster']
+
   libfabric:
     require:
     - spec: fabrics=mlx,mrail,psm3,verbs,udp,tcp,sockets,shm
@@ -51,6 +72,9 @@ packages:
   mesa:
     require: ['~llvm', '+opengl', '+opengles', '+osmesa']
 
+  openblas:
+    prefer: ['threads=pthreads']
+
   openmpi:
     require:
     - spec: '@5.0.3 fabrics=ofi,ucx,verbs schedulers=slurm ~rsh +romio romio-filesystem=gpfs'
diff --git a/stacks/pinot-noir/spack.yaml b/stacks/pinot-noir/spack.yaml
index df90faa..041606f 100644
--- a/stacks/pinot-noir/spack.yaml
+++ b/stacks/pinot-noir/spack.yaml
@@ -10,6 +10,7 @@ spack:
     - mpi_codes:
         - osu-micro-benchmarks +graphing
         - hdf5 +mpi
+        - petsc +mpi
 
     - mpi_oneapi:
         - intel-oneapi-mpi
-- 
GitLab