From b0513cd8a21880e84fb2093d1ecb48ceae5d6356 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Sat, 23 Aug 2025 09:05:01 +0200 Subject: [PATCH 1/2] about.md: update --- about.md | 158 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 82 insertions(+), 76 deletions(-) diff --git a/about.md b/about.md index 113fd971..27e55f07 100644 --- a/about.md +++ b/about.md @@ -5,22 +5,12 @@ toc: true author_profile: false --- -Spack is a package manager for -[supercomputers](https://en.wikipedia.org/wiki/Supercomputer), Linux, and -macOS. It makes installing scientific software easy. With Spack, you can -build a package with multiple versions, configurations, platforms, and -compilers, and all of these builds can coexist on the same machine. - -Spack isn't tied to a particular language; you can build a software stack -in -[Python](https://spack.readthedocs.io/en/latest/basic_usage.html#extensions-python-support) -or R, link to libraries written in C, C++, or Fortran, easily -[swap compilers](https://spack.readthedocs.io/en/latest/getting_started.html#compiler-configuration), and -target [specific -microarchitectures](https://spack.readthedocs.io/en/latest/basic_usage.html#support-for-specific-microarchitectures). -Use Spack to install without root in your home directory, to -[manage shared installations and modules](https://spack.readthedocs.io/en/latest/module_file_support.html), -or to [build combinatorial versions](https://spack.readthedocs.io/en/latest/basic_usage.html#specs-dependencies) of software for testing. +Spack is a package manager for [supercomputers], Linux, macOS, and Windows. +It makes installing scientific software easy. +With Spack, you can build a package with multiple versions, configurations, and compilers, and all of these builds can coexist on the same machine. + +Spack isn't tied to a particular language; you can build a software stack consisting of Python or R packages, link to libraries written in C, C++, or Fortran, easily [swap compilers], and target [specific microarchitectures]. +Use Spack to install without root in your home directory, to [manage shared installations and modules], or to [build combinatorial versions] of software for testing. ## Install Spack @@ -34,96 +24,112 @@ spack install hdf5 ## Custom versions & configurations -The installation of Spack can be customized in a variety of ways. Users can -specify the package version, compiler, compile-time options, and even -cross-compile platform, all from the command line. +Spack allows installation to be customized. +Users can specify the version, compile-time options, and target architecture, all on the command line. {% highlight bash %} -# Install a specific version by appending @ -$ spack install hdf5@1.10.1 +# Install a particular version by appending @ +$ spack install hdf5@1.14 -# Specify a compiler (and optional version), with % -$ spack install hdf5@1.10.1 %gcc@4.7.3 +# Add special compile-time options by name +$ spack install hdf5@1.14 api=v110 # Add special boolean compile-time options with + -$ spack install hdf5@1.10.1 %gcc@4.7.3 +szip +$ spack install hdf5@1.14 +hl -# Add custom compiler flags -$ spack install hdf5@1.10.1 %gcc@4.7.3 cppflags="-O3 -floop-block" +# Add compiler flags using the conventional names +$ spack install hdf5@1.14 cflags="-O3 -floop-block" -# Cross-compile for compute nodes on a Cray or Blue Gene/Q -$ spack install hdf5@1.10.1 target=backend +# Target a specific micro-architecture +$ spack install hdf5@1.14 target=icelake {% endhighlight %} -Users can specify as many or few options as they care about. Spack will fill in -the unspecified values with sensible defaults. The two listed syntaxes for -variants are identical when the value is boolean. +Users can specify as many or as few options as they care about. +Spack will fill in the unspecified values with sensible defaults. ## Customize dependencies -Spack allows dependencies of particular installations to be customized -extensively. Suppose that `hdf5` depends on `openmpi` and indirectly on -`hwloc`. Using `^`, users can add custom configurations for dependencies: +Spack allows *dependencies* of a particular installation to be customized extensively. +Users can specify both *direct* dependencies of a package, using the `%` sigil, or *transitive* dependencies, using the `^` sigil: {% highlight bash %} -# Install hdf5 and link it with specific versions of openmpi and hwloc -$ spack install hdf5@1.10.1 %gcc@4.7.3 +debug ^openmpi+cuda fabrics=auto ^hwloc+gl +# Install hdf5 using gcc@15 as a compiler (direct dependency of hdf5) +$ spack install hdf5@1.14 %gcc@15 + +# Install hdf5 using hwloc with CUDA enabled (transitive dependency) +$ spack install hdf5@1.14 ^hwloc+cuda {% endhighlight %} -## Packages can peacefully coexist +The expression on the command line can be as simple or as complicated as the user needs: + +{% highlight bash %} +# Install hdf5 compiled with gcc@15, linked to mpich compiled with gcc@14 +$ spack install hdf5@1.14 %gcc@15 ^mpich %gcc@14 +{% endhighlight %} + +## Non-destructive installs + +Spack installs every unique package/dependency configuration into its own prefix, so new installs will not break existing ones. -Spack installs every unique package/dependency configuration into its own -prefix, so new installs will not break existing ones. +## Packages can peacefully coexist Spack avoids library misconfiguration by using `RPATH` to link dependencies. -When a user links a library or runs a program, it is tied to the dependencies -it was built with, so there is no need to manipulate `LD_LIBRARY_PATH` at -runtime. +When a user links a library or runs a program, it is tied to the dependencies it was built with, so there is no need to manipulate `LD_LIBRARY_PATH` at runtime. + +## Unprivileged user installs + +Spack does not require administrator privileges to install packages. +You can install software in any directory you choose, making it easy to manage packages in your home directory or shared project locations without needing sudo access. + +## From source and binary -## Creating packages is easy +Spack's core strength is creating highly customized, optimized software builds from source code. +While it's primarily a from-source package manager, it also supports fast binary installations through build caches. -Spack packages are simple Python scripts. The -[`spack create`](https://spack.readthedocs.io/en/latest/packaging_guide.html#creating-editing-packages) -command will generate boilerplate to get you started, and you can create a -package in a matter of minutes. You write the build instructions; Spack builds -the dependencies for you. +## Contributing is easy + +Spack packages are simple Python scripts. +The [`spack create`][spack create] command will generate boilerplate to get you started, and you can create a package in a matter of minutes. +You write the build instructions; Spack builds the dependencies for you. {% highlight python %} -from spack import * +from spack_repo.builtin.build_systems.autotools import AutotoolsPackage + +from spack.package import * + + +class Libelf(AutotoolsPackage): + """Libelf is a library for handling ELF files.""" -class Kripke(Package): - """Kripke is a simple, scalable, 3D Sn deterministic particle - transport proxy/mini app. - """ - homepage = "https://computing.llnl.gov/projects/co-design/kripke" - url = "https://computing.llnl.gov/downloads/kripke-openmp-1.1.tar.gz" + homepage = "https://example.com" + url = "https://example.com/libelf-0.8.13.tar.gz" - version('1.1', '7fe6f2b26ed983a6ce5495ab701f85bf') + license("LGPL-2.0-only") - variant('mpi', default=True, description='Build with MPI.') - variant('openmp', default=True, description='Build with OpenMP enabled.') + version("0.8.13", sha256="bab128d2328a84181b22eefef54af7122a16b39672046ada16107a2147033575") + version("0.8.12", sha256="61a9dfef3e0a59e58d381887e9d69a9267a42b7ccca3b3da68c658aa39ba5dc2") - depends_on('mpi', when="+mpi") + depends_on("c", type="build") - def install(self, spec, prefix): - with working_dir('build', create=True): - cmake('-DCMAKE_INSTALL_PREFIX:PATH=.', - '-DENABLE_OPENMP=%s' % ('+openmp' in spec), - '-DENABLE_MPI=%s' % ('+mpi' in spec), - '..', - *std_cmake_args) + def configure_args(self): + return ["--enable-shared"] - make() - mkdirp(prefix.bin) - install('kripke', prefix.bin) {% endhighlight %} ## Get Involved! -Visit [Spack on GitHub](https://github.com/spack/spack) and -[take the tutorial](https://spack-tutorial.readthedocs.io/en/latest/). -Join the discussion on the -[GoogleGroup](https://groups.google.com/d/forum/spack), and learn how to -[contribute](https://spack.readthedocs.io/en/latest/contribution_guide.html) -your own packages. Check out the [Upcoming Events](/events/) page for tutorials, -workshops, BoFs, etc. +Visit [Spack on GitHub] and [take the tutorial]. +Join the discussion on the [Slack], and learn how to [contribute] your own packages. +Check out the [Upcoming Events] page for tutorials, workshops, BoFs, etc. + +[build combinatorial versions]: https://spack.readthedocs.io/en/latest/environments.html#spec-matrices +[contribute]: https://spack.readthedocs.io/en/latest/packaging_guide_creation.html +[manage shared installations and modules]: https://spack.readthedocs.io/en/latest/module_file_support.html +[Slack]: https://slack.spack.io/ +[Spack on GitHub]: https://github.com/spack/spack +[spack create]: https://spack.readthedocs.io/en/latest/packaging_guide_creation.html#creating-and-editing-packages +[specific microarchitectures]: https://spack.readthedocs.io/en/latest/spec_syntax.html#support-for-specific-microarchitectures +[supercomputers]: https://en.wikipedia.org/wiki/Supercomputer +[swap compilers]: https://spack.readthedocs.io/en/latest/spec_syntax.html +[take the tutorial]: https://spack-tutorial.readthedocs.io/en/latest/ +[Upcoming Events]: /events/ From 57d83dadb3e7c1949dbdc154a8b288825895dcfb Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Sat, 23 Aug 2025 09:18:33 +0200 Subject: [PATCH 2/2] idem for index.html --- index.html | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/index.html b/index.html index a8ff5eca..69d24ede 100644 --- a/index.html +++ b/index.html @@ -25,15 +25,15 @@ {% capture markdown %} # Welcome to Spack! -Spack is a package manager for -[supercomputers](https://en.wikipedia.org/wiki/Supercomputer), Linux, and -macOS. It makes installing scientific software easy. Spack isn't tied -to a particular language; you can build a software stack in -[Python](https://spack.readthedocs.io/en/latest/basic_usage.html#extensions-python-support) -or R, link to libraries written in C, C++, or Fortran, and easily [swap -compilers](https://spack.readthedocs.io/en/latest/getting_started.html#compiler-configuration) -or target [specific -microarchitectures](https://spack.readthedocs.io/en/latest/basic_usage.html#support-for-specific-microarchitectures). -Learn more [here](/about/). {% endcapture %} +Spack is a package manager for [supercomputers], Linux, macOS, and Windows. +It makes installing scientific software easy. +Spack isn't tied to a particular language; you can build a software stack consisting of Python or R packages, link to libraries written in C, C++, or Fortran, easily [swap compilers], and target [specific microarchitectures]. +Learn more [here][about]. + +[swap compilers]: https://spack.readthedocs.io/en/latest/spec_syntax.html +[supercomputers]: https://en.wikipedia.org/wiki/Supercomputer +[specific microarchitectures]: https://spack.readthedocs.io/en/latest/spec_syntax.html#support-for-specific-microarchitectures +[about]: /about/ "Learn more about Spack" +{% endcapture %} {{ markdown | markdownify }}