spack / spack/spack

Compilers.yaml compiler defs need to be able to unload modules

Open
#32,247 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
Python
Stars
5.1k
Forks
2.5k
Avg merge
3d 4h
Merged PRs (30d)
82

Description

Summary

On cray systems several package builds need tight control of compiler flags. Unfortunately the Cray programming environments load many modules, some of which force the insertion of compiler flags for the compiler wrappers. Our solution for manual builds was to unload those problematic modules before building, and we'd like to be able to do that with Spack as well.

Rationale

As it stands, there are a few packages that cannot be built under Spack in the configuration we needs on Cray systems, most notably openmpi and valgrind.

Description

I would either add an additional option to the compiler definition or syntax to denote a module should be removed instead of loaded. I think the special syntax is best, as that would allow the user to specify where this unload needs to occur relative to the other module loads or swaps.

For example, for the cce compiler we might have:

compilers:
- compiler:
    spec: cce@13.0.0
    paths:
      cc: cc
      cxx: CC
      f77: ftn
      fc: ftn
    operating_system: sles15
    target: any
    modules:
    - PrgEnv-cray
    - 'unload xpmem'
    - cce/13.0.0
Additional information

$ spack --version
0.13.1-8432-c15077403e

General information
  • I have run spack --version and reported the version of Spack
  • I have searched the issues of this repo and believe this is not a duplicate

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how compiler definitions in Compilers.yaml are parsed and how compiler modules are loaded or swapped. Review the existing compiler configuration and module-handling paths; done means users can express an unload operation at a chosen position and the affected Cray package builds can use it.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.