我刚刚安装了oneAPI和HPC工具包。正如在doc中指出的那样,我已经将以下内容放入我的~/.zshrc
中:
source /opt/intel/oneapi/setvars.sh
现在出现了两个问题:
首先,当我打开一个新的终端,我有一个系统的长消息出现在有手在终端上:如何使这个长消息是沉默的?
:: initializing oneAPI environment ...
zsh: ZSH_VERSION = 5.7.1
:: advisor -- latest
:: ccl -- latest
:: clck -- latest
:: compiler -- latest
:: dal -- latest
:: debugger -- latest
:: dev-utilities -- latest
:: dnnl -- latest
:: dpcpp-ct -- latest
:: dpl -- latest
:: inspector -- latest
:: intelpython -- latest
/opt/intel/oneapi/intelpython/latest/etc/conda/activate.d/xgboost_activate.sh:16: = not found
:: ipp -- latest
:: ippcp -- latest
:: ipp -- latest
:: itac -- latest
:: mkl -- latest
:: mpi -- latest
:: tbb -- latest
:: vpl -- latest
:: vtune -- latest
:: oneAPI environment initialized ::
其次,正如您所看到的,在初始化的消息中有一个错误:
/opt/intel/oneapi/intelpython/latest/etc/conda/activate.d/xgboost_activate.sh:16: = not found
我编辑了这个文件:
#!/bin/sh
#
# Copyright 2003-2021 Intel Corporation.
#
# This software and the related documents are Intel copyrighted materials, and
# your use of them is governed by the express license under which they were
# provided to you (License). Unless the License provides otherwise, you may
# not use, modify, copy, publish, distribute, disclose or transmit this
# software or the related documents without Intel's prior written permission.
#
# This software and the related documents are provided as is, with no express
# or implied warranties, other than those that are expressly stated in the
# License.
#
if [ "${OCL_ICD_FILENAMES}" == "" ]
then
export OCL_ICD_FILENAMES_RESET=1
export OCL_ICD_FILENAMES=libintelocl.so
fi
这会是与conda
或其他事情的冲突吗?
为什么我会在Linux上遇到这些问题呢?在MacOS 11.3上,没有问题。
发布于 2021-07-19 12:03:52
debian的Oneapi /opt/intel/oneapi/setvars.sh脚本期望默认外壳是bash。错误是因为在bash中使用的是zsh和语法差异。
xgboost_activate.sh具有不受zsh支持的标准[]。在zsh中,使用Double [[]]代替。
Double [ [] ]是对标准[]的扩展,由bash和其他shell(例如zsh、ksh)支持。
您可以在"/opt/intel/oneapi/intelpython/latest/etc/conda/activate.d/xgboost_activate.sh:16“中将”“和”“分别替换为”[“和”]“。
即替换下面的一行
if [ "${OCL_ICD_FILENAMES}" == "" ]
使用
if [[ "${OCL_ICD_FILENAMES}" == "" ]]
https://stackoverflow.com/questions/67340770
复制相似问题