Skip to content

Conversation

@jack-morrison
Copy link
Member

@jack-morrison jack-morrison commented Jun 10, 2023

1. Add support for user-defined spack env create options

ReFrame, unless targeting a user-specified existing Spack environment, automatically passes the -d rfm_spack_env option to create an ephemeral environment. This is a small addition that allows users to define extra spack env create options (link to Spack docs for list of options).

With the changes proposed here, a user could define the following:

self.build_system.env_create_opts = ["--without-view"]

which produces following in the build job script:

spack env create -d rfm_spack_env --without-view

While technically this allows for any spack env create options, my motivation for this feature is use of --without-view. ReFrame's use of temporary Spack environments leaves little use for a filesystem view, and disabling it can reduce the possibility of spack load-time spec collisions.

2. Add support for inserting commands between Spack environment creation and environment installation

Under certain circumstances it may be necessary to run complex custom commands to prepare a Spack environment. This needs to happen post-creation, but pre-installation. This capability is added to the Spack build system via build_system.preinstall_cmds.

- Add support for inserting commands between Spack environment creation and
  environment installation.
@jenkins-cscs
Copy link
Collaborator

Can I test this patch?

@codecov
Copy link

codecov bot commented Jun 10, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (fa813d0) 86.98% compared to head (b7bf09a) 86.99%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2919   +/-   ##
========================================
  Coverage    86.98%   86.99%           
========================================
  Files           60       60           
  Lines        11627    11635    +8     
========================================
+ Hits         10114    10122    +8     
  Misses        1513     1513           
Impacted Files Coverage Δ
reframe/core/buildsystems.py 96.27% <100.00%> (+0.08%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@victorusu victorusu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@vkarak vkarak merged commit a708b14 into reframe-hpc:develop Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants