Skip to content

Commit fd153a7

Browse files
committed
swap requirement with prefer; cmake cfg not needed in new image
1 parent 1bfbda4 commit fd153a7

1 file changed

Lines changed: 8 additions & 16 deletions

File tree

tutorial_configuration.rst

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -423,8 +423,8 @@ When you have an activated environment, you can edit the associated configuratio
423423
unify: true
424424
packages:
425425
all:
426-
require:
427-
- any_of: ["%llvm", "%gcc"]
426+
prefer:
427+
- "%llvm"
428428
providers:
429429
mpi: [mpich, openmpi]
430430
@@ -454,14 +454,13 @@ Instead, we'll update our config to force disable it:
454454
unify: true
455455
packages:
456456
all:
457-
require:
458-
- any_of: ["%llvm", "%gcc"]
457+
prefer:
458+
- "%llvm"
459459
providers:
460460
mpi: [mpich, openmpi]
461461
hdf5:
462462
require:
463463
- spec: "~mpi"
464-
- any_of: ["%llvm", "%gcc"]
465464
466465
467466
Note that defining ``hdf5`` overrides everything under ``all``, so the Clang preference must be reintroduced.
@@ -495,22 +494,18 @@ Let's tell Spack about this package and where it can be found:
495494
unify: true
496495
packages:
497496
all:
498-
require:
499-
- any_of: ["%llvm", "%gcc"]
497+
prefer:
498+
- "%llvm"
500499
providers:
501500
mpi: [mpich, openmpi]
502501
hdf5:
503502
require:
504503
- spec: "~mpi"
505-
- any_of: ["%llvm", "%gcc"]
506504
curl:
507505
externals:
508506
- spec: curl@7.81.0 %gcc@11.4.0
509507
prefix: /usr
510508
buildable: false
511-
cmake:
512-
require:
513-
- spec: "~qtgui"
514509
515510
Here, we've told Spack that Curl 7.81.0 is installed on our system.
516511
We've also told it the installation prefix where Curl can be found.
@@ -547,18 +542,15 @@ While we're editing the ``spack.yaml`` file, make sure to configure HDF5 to be a
547542
unify: true
548543
packages:
549544
all:
550-
require:
551-
- any_of: ["%llvm", "%gcc"]
545+
prefer:
546+
- "%llvm"
552547
providers:
553548
mpi: [mpich, openmpi]
554549
curl:
555550
externals:
556551
- spec: curl@7.81.0 %gcc@11.4.0
557552
prefix: /usr
558553
buildable: false
559-
cmake:
560-
require:
561-
- spec: "~qtgui"
562554
mpich:
563555
externals:
564556
- spec: mpich@4.0+hydra device=ch4 netmod=ofi

0 commit comments

Comments
 (0)