【问题标题】:How should I fix the configure.yaml file?我应该如何修复 configure.yaml 文件?
【发布时间】:2021-08-26 10:36:05
【问题描述】:

我正在尝试使用 spack 安装 hpctoolkit。为了做到这一点,我执行了:

git clone https://github.com/spack/spack.git
cd spack/share/spack
source setup-env.sh 
spack fetch -D hpctoolkit
spack install hpctoolkit 

为了查看可用的编译器,我需要查看 compilers.yaml 的内容。 以下是它的内容:

lcompilers:
- compiler:
    spec: clang@10.0.0
    paths:
      cc: /usr/bin/clang
      cxx: /usr/bin/clang++
      f77: null
      fc: null
    flags: {}
    operating_system: ubuntu20.04
    target: x86_64
    modules: []
    environment: {}
    extra_rpaths: []
- compiler:
    spec: clang@7.0.1
    paths:
      cc: null
      cxx: null
      f77: /usr/bin/flang
      fc: /usr/bin/flang
    flags: {}
    operating_system: ubuntu20.04
    target: x86_64
    modules: []
    environment: {}
    extra_rpaths: []
    
- compiler:
    spec: gcc@10.2.0
    paths:
      cc: /usr/bin/gcc-10
      cxx: null
      f77: /usr/bin/gfortran-10
      fc: /usr/bin/gfortran-10
    flags: {}
    operating_system: ubuntu20.04
    target: x86_64
    modules: []
    environment: {}
    extra_rpaths: []

正如您在此处看到的,我有 2 个编译器,分别是 clang(2 个实例)和 gcc。 在执行此命令之前,我认为该文件已正确写入:

spack compiler list  

这给了我以下错误:

==> Available compilers
==> Error: /home/hakim/.spack/linux/compilers.yaml:1: Additional properties are not allowed ('lcompilers' was unexpected)

在我修改之前,该文件运行良好。我删除了代表gcc 的另一个版本的部分,即gcc@9.3.0(Spack 表示法)。

错误提到“lcompilers”是意外的,但我很确定在我修改文件之前它就在那里。我所做的只是删除旧版本的 gcc。

【问题讨论】:

  • 我认为您应该尝试删除“l”以获取“compilers”而不是“lcompilers”
  • @Linkthehero2222 你是最棒的!!非常感谢。
  • 哈哈没问题!

标签: c++ c++11 gcc boost yaml


【解决方案1】:

尝试将lcompilers 更改为compilers。这只是一个拼写错误。

【讨论】:

    猜你喜欢
    • 2017-03-31
    • 1970-01-01
    • 2016-02-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-03-05
    • 2015-11-05
    • 2022-01-21
    相关资源
    最近更新 更多