just to clarify: the Makefile does smth like touch .install/<hash> after a successful installation, so that if you interrupt make and restart it, it immediately continues from where it stopped. But if the database state changes in the meantime, then things error
fix:
make clean && make -j8
Aidan
(Aidan Heerdegen, ACCESS-NRI Release Team Lead)
26
If you want to add new versions to a package you’ve already created, this is automated with the spack checksum command. Here’s an example for libelf:
$ spack checksum libelf
==> Found 16 versions of libelf.
0.8.13 http://www.mr511.de/software/libelf-0.8.13.tar.gz
0.8.12 http://www.mr511.de/software/libelf-0.8.12.tar.gz
0.8.11 http://www.mr511.de/software/libelf-0.8.11.tar.gz
0.8.10 http://www.mr511.de/software/libelf-0.8.10.tar.gz
0.8.9 http://www.mr511.de/software/libelf-0.8.9.tar.gz
0.8.8 http://www.mr511.de/software/libelf-0.8.8.tar.gz
0.8.7 http://www.mr511.de/software/libelf-0.8.7.tar.gz
0.8.6 http://www.mr511.de/software/libelf-0.8.6.tar.gz
0.8.5 http://www.mr511.de/software/libelf-0.8.5.tar.gz
...
0.5.2 http://www.mr511.de/software/libelf-0.5.2.tar.gz
How many would you like to checksum? (default is 1, q to abort)
This does the same thing that spack create does, but it allows you to go back and add new versions easily as you need them (e.g., as they’re released). It fetches the tarballs you ask for and prints out a list of version commands ready to copy/paste into your package file:
==> Checksummed new versions of libelf:
version("0.8.13", "4136d7b4c04df68b686570afa26988ac")
version("0.8.12", "e21f8273d9f5f6d43a59878dc274fec7")
version("0.8.11", "e931910b6d100f6caa32239849947fbf")
version("0.8.10", "9db4d36c283d9790d8fa7df1f4d7b4d9")
By default, Spack will search for new tarball downloads by scraping the parent directory of the tarball you gave it. So, if your tarball is at http://example.com/downloads/foo-1.0.tar.gz, Spack will look in http://example.com/downloads/ for links to additional versions. If you need to search another path for download links, you can supply some extra attributes that control how your package finds new versions. See the documentation on list_url and list_depth.
Aidan
(Aidan Heerdegen, ACCESS-NRI Release Team Lead)
28
Want to find out what packages depend on an installed package?
You may need to make the following change to use target=x86_64:
--- a/etc/spack/defaults/concretizer.yaml
+++ b/etc/spack/defaults/concretizer.yaml
@@ -25,7 +25,7 @@ concretizer:
# microarchitectures. Valid values are: "microarchitectures" or "generic".
# An example of "microarchitectures" would be "skylake" or "bulldozer",
# while an example of "generic" would be "aarch64" or "x86_64_v4".
- granularity: microarchitectures
+ granularity: generic
# If "false" allow targets that are incompatible with the current host (for
# instance concretize with target "icelake" while running on "haswell").
# If "true" only allow targets that are compatible with the host.
I just saw Spack convert compiler version 2019.5.281 to 19.0.5.281:
$ module load intel-compiler/2019.5.281
$ spack compilers
==> Available compilers
-- clang rocky8-x86_64 ------------------------------------------
clang@14.0.6
-- gcc rocky8-x86_64 --------------------------------------------
gcc@8.5.0
$ spack compiler find
==> Added 1 new compiler to $DOTSPACKDIR/linux/compilers.yaml
intel@19.0.5.281
==> Compilers are defined in the following files:
$DOTSPACKDIR/linux/compilers.yaml
$ spack compilers
==> Available compilers
-- clang rocky8-x86_64 ------------------------------------------
clang@14.0.6
-- gcc rocky8-x86_64 --------------------------------------------
gcc@8.5.0
-- intel rocky8-x86_64 ------------------------------------------
intel@19.0.5.281
Aidan
(Aidan Heerdegen, ACCESS-NRI Release Team Lead)
34
Before I forget, I contacted someone who’d used spack on gadi and he said
A shared spack installation will not work correctly on the /g/data filesystem, since POSIX file locking is disabled for lustre mounts on gadi (see the Spack documentation here on why this is needed: https://spack.readthedocs.io/en/latest/basic_usage.html#filesystem-requirements). This decision was made by the NCI staff because they think it has a negative performance impact. So this means you will either have to make a shared Spack installation read-only, or convince the NCI staff to enable flock on the Lustre mounts.
@Aidan Thanks for the info. I think this is fine for the COSIMA spack instance on /g/data/ik11, as few people have write access and we don’t install things very often. At least I’ve not encountered any problem up to now.
Aidan
(Aidan Heerdegen, ACCESS-NRI Release Team Lead)
36
Random spack question, but it seems mom5@master is a synonym/short-cut for mom5@git.master.