diff --git a/index.html b/index.html index 9e63c7d..41708ee 100644 --- a/index.html +++ b/index.html @@ -166,7 +166,7 @@

Hands-on

# Use spack graph to get more insight on DAG structure # To visualize: https://dreampuf.github.io/GraphvizOnline/ - spack graph -d --color hdf5+mpi + spack graph -d --color hdf5~mpi # Use a temporary environment to avoid reconcretizing spack env activate --temp @@ -317,12 +317,12 @@

How does reuse work?

# OpenMPI should not be reused # from store or buildcache... - type: local - exclude: ["openmpi"] + exclude: ["openmpi"] - type: buildcache - exclude: ["openmpi"] + exclude: ["openmpi"] # ...and it must be the only external used - type: external - include: ["openmpi"] + include: ["openmpi"]
@@ -423,90 +423,6 @@

Hands-on

-
-
-

How are errors modeled?

-
-
- clingo is not that helpful on unsat problems -

-							node("a").
-
-							attribute(P) :- node(P).
-							:- attribute(P).
-						
-

-							$ clingo example.lp
-							clingo version 5.6.2
-							Reading from example.lp
-							Solving...
-							UNSATISFIABLE
-						
-

-							$ spack spec foo
-							==> Error: UNSATISFIABLE
-						
-
-
- Make errors part of a valid solution -

-							node("a").
-
-							attribute(P) :- node(P).
-							error("{P} cannot have an attribute!", P) :- attribute(P).
-						
-

-							$ clingo example.lp
-							clingo version 5.6.2
-							Reading from example.lp
-							Solving...
-							Answer: 1
-							node("a") attribute("a") error("{P} cannot have an attribute!","a")
-							SATISFIABLE
-						
-

-							$ spack spec foo
-							==> Error: foo cannot have an attribute!
-						
-
-
- Highest priority optimization is minimize errors -
-
-
- -
-
-
-

-							$ spack spec hdf5@1.14 ^cmake@3.16
-							==> Error: concretization failed for the following reasons:
-
-							1. Cannot select a single "version" for package "cmake"
-							2. Cannot satisfy 'cmake@:3.17'
-							3. Cannot satisfy 'cmake@:3.16'
-							4. Cannot satisfy 'cmake@3.18:'
-							5. Cannot satisfy 'cmake@3.16'
-							6. Cannot satisfy 'cmake@3.18:'
-									required because hdf5 depends on cmake@3.18: when @1.13:
-									required because hdf5@1.14 ^cmake@3.16 requested explicitly
-							7. Cannot satisfy 'cmake@3.16'
-									required because hdf5@1.14 ^cmake@3.16 requested explicitly
-							8. Cannot satisfy 'cmake@3.18:' and 'cmake@3.16
-									required because hdf5@1.14 ^cmake@3.16 requested explicitly
-									required because hdf5 depends on cmake@3.18: when @1.13:
-									required because hdf5@1.14 ^cmake@3.16 requested explicitly
-							9. Cannot satisfy 'cmake@3.16' and 'cmake@3.18:
-									required because hdf5@1.14 ^cmake@3.16 requested explicitly
-									required because hdf5 depends on cmake@3.18: when @1.13:
-									required because hdf5@1.14 ^cmake@3.16 requested explicitly
-							10. Cannot satisfy 'cmake@3.12:' and 'cmake@3.16
-									required because hdf5@1.14 ^cmake@3.16 requested explicitly
-									required because hdf5 depends on cmake@3.12:
-									required because hdf5@1.14 ^cmake@3.16 requested explicitly
-						
-
-

What are runtimes in Spack 0.22?

@@ -776,7 +692,7 @@

What are requirements and strong preferences?

hdf5: require: - spec: "%gcc" - message: "This package must be built with GCC" + message: "This package must be built with GCC"
@@ -833,15 +749,21 @@

What are requirements and strong preferences?

Hands-on

-

-							# Add a requirement to configuration,
-							# try to violate it, check the error message
+						

+							# Try to violate this requirement, check the error message
+							packages:
+								hdf5:
+									require:
+									- spec: "~mpi"
+									  message: "HDF5 must be compiled without MPI"
 
-							# Do the same with a strong preference, observe
-							# spack solve weights
+							# Use a strong preference, and do the same
+							packages:
+								hdf5:
+								  prefer:
+								  - "~mpi"
 
-							# Enforce virtuals in an environment using
-							# requirements
+							# Enforce virtuals in an environment using requirements
 						
@@ -908,6 +830,90 @@

Hands-on

+
+
+

How are errors modeled?

+
+
+ clingo is not that helpful on unsat problems +

+							node("a").
+
+							attribute(P) :- node(P).
+							:- attribute(P).
+						
+

+							$ clingo example.lp
+							clingo version 5.6.2
+							Reading from example.lp
+							Solving...
+							UNSATISFIABLE
+						
+

+							$ spack spec foo
+							==> Error: UNSATISFIABLE
+						
+
+
+ Make errors part of a valid solution +

+							node("a").
+
+							attribute(P) :- node(P).
+							error("{P} cannot have an attribute!", P) :- attribute(P).
+						
+

+							$ clingo example.lp
+							clingo version 5.6.2
+							Reading from example.lp
+							Solving...
+							Answer: 1
+							node("a") attribute("a") error("{P} cannot have an attribute!","a")
+							SATISFIABLE
+						
+

+							$ spack spec foo
+							==> Error: foo cannot have an attribute!
+						
+
+
+ Highest priority optimization is minimize errors +
+
+
+ +
+
+
+

+							$ spack spec hdf5@1.14 ^cmake@3.16
+							==> Error: concretization failed for the following reasons:
+
+							1. Cannot select a single "version" for package "cmake"
+							2. Cannot satisfy 'cmake@:3.17'
+							3. Cannot satisfy 'cmake@:3.16'
+							4. Cannot satisfy 'cmake@3.18:'
+							5. Cannot satisfy 'cmake@3.16'
+							6. Cannot satisfy 'cmake@3.18:'
+									required because hdf5 depends on cmake@3.18: when @1.13:
+									required because hdf5@1.14 ^cmake@3.16 requested explicitly
+							7. Cannot satisfy 'cmake@3.16'
+									required because hdf5@1.14 ^cmake@3.16 requested explicitly
+							8. Cannot satisfy 'cmake@3.18:' and 'cmake@3.16
+									required because hdf5@1.14 ^cmake@3.16 requested explicitly
+									required because hdf5 depends on cmake@3.18: when @1.13:
+									required because hdf5@1.14 ^cmake@3.16 requested explicitly
+							9. Cannot satisfy 'cmake@3.16' and 'cmake@3.18:
+									required because hdf5@1.14 ^cmake@3.16 requested explicitly
+									required because hdf5 depends on cmake@3.18: when @1.13:
+									required because hdf5@1.14 ^cmake@3.16 requested explicitly
+							10. Cannot satisfy 'cmake@3.12:' and 'cmake@3.16
+									required because hdf5@1.14 ^cmake@3.16 requested explicitly
+									required because hdf5 depends on cmake@3.12:
+									required because hdf5@1.14 ^cmake@3.16 requested explicitly
+						
+
+