Skip to content

Handle LLNL system paths #22627

@bvanessen

Description

@bvanessen

Steps to reproduce the issue

Spack should treat /usr/tce/ and /usr/tcemp as system paths on LLNL systems. As it stands common packages like cmake exist in /usr/tce and can preempt a spack required version, leading to spurious errors based on how packages are added to the PATH environment variable. Here is a patch that fixes the issue:

ff --git a/lib/spack/spack/util/environment.py b/lib/spack/spack/util/environment.py
index a9b3529869..47cec8bc1c 100644
--- a/lib/spack/spack/util/environment.py
+++ b/lib/spack/spack/util/environment.py
@@ -23,7 +23,7 @@
 from six.moves import shlex_quote as cmd_quote
 from six.moves import cPickle
 
-system_paths = ['/', '/usr', '/usr/local']
+system_paths = ['/', '/usr', '/usr/local', '/usr/tcetmp', '/usr/tce']
 suffixes = ['bin', 'bin64', 'include', 'lib', 'lib64']
 system_dirs = [os.path.join(p, s) for s in suffixes for p in system_paths] + \
     system_paths

Error Message

Given a package that depends on a specific version of cmake, LBANN fails to execute cmake because it finds the system version, which is too old. The problem is that /usr/tce/ is in the path and proceeds the spack installed version of cmake.

Information on your system

Additional information

  • I have run spack debug report and reported the version of Spack/Python/Platform
  • I have searched the issues of this repo and believe this is not a duplicate
  • I have run the failing commands in debug mode and reported the output
spack debug report
* **Spack:** 0.16.1-1710-195341113e
* **Python:** 3.7.2
* **Platform:** linux-rhel7-broadwell
* **Concretizer:** original

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageThe issue needs to be prioritized

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions