Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Spack-subspack

a Spack extension to maked "subspack" instances; a new spack area which is connected via "upstream.yaml" configs ton an existing spack area, generally for development, adding extra packages, etc.

This includes:

  • cloning relevant config files
  • attaching the curent spack instance as an upstream
  • symlinking existing environments in the new instance

Usage

In most cases you can just do:

spack subspack /destination/directory

but there are a few option flags that are often useful

  • --with-padding includes 'padded_width: 255' in the config.yaml of the new instance
  • --local-env environment_name besides the usual symlinking of environments in the subspack, copy the environment "environment_name" as "local_environment_name" (i.e with the prefix "local_")
  • --dev-pkg pkg@ver Run a 'spack develop pkg@ver' in the local environment copies, above; can be repeated for multiple packages. 'ver' should usually be 'develop' or 'main' etc.

Installation

After cloning the repository somewhere, See the Spack docs on adding the path to config.yaml under 'extensions:'

Using with spack localbuildcache and jobsub_submit

If you make an environment in a subspack instance (that was made --with-padding)

spack env activate myenvironment
spack localbuildcache --local

You can now send reconstruct an environment in a job by using jobsub options

--tar-file-name=tardir:///path/to/myenvironment/bc -f reconstitute.bash

then in your job script:

  bash $INPUT_TAR_DIR_LOCAL/reconstitute.bash
  source packages/setup-env.sh
  spack env activate myenvironment

About

Spack extension to make a chained spack instance for development

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages