我正在尝试使用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 notation)。
该错误提到'lcompilers‘是意外的,但我非常确定在我修改文件之前它就在那里了。我所做的就是删掉了旧版的gcc。
发布于 2021-06-09 20:13:20
尝试将lcompilers更改为compilers。这只是一个打字错误。
https://stackoverflow.com/questions/67903874
复制相似问题