在 Debian 10 上安装 oneAPI intel ToolKit 后的问题

Issues after installation of oneAPI intel ToolKit on Debian 10

我刚刚安装了 oneAPI Base Toolkit 和 HPC 工具包。正如文档中所示,我已将 ~/.zshrc :

source /opt/intel/oneapi/setvars.sh

现在出现了 2 个问题:

首先,当我打开一个新的终端时,我有系统地在把手放在终端之前出现的长消息:如何让这个长消息静音?

:: 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 上没有问题。

Debian OS 的 Oneapi /opt/intel/oneapi/setvars.sh 脚本期望 默认 shell 为 bash。该错误是因为您在 bash 与 zsh.

中使用 zsh 和语法差异

xgboost_activate.sh 具有 zsh 不支持的标准 []。在 zsh 中,将使用双 [[]] 代替。

双 [[]] 是标准 [] 的扩展,并受 bash 和其他 shell 支持(例如 zsh、ksh)。

您可以将“/opt/intel/oneapi/intelpython/latest/etc/conda/activate.d/xgboost_activate.sh[=27=中的'['和']'分别替换为'[['和']]' ]:16

即替换下面的行

if [ "${OCL_ICD_FILENAMES}" == "" ]

if [[ "${OCL_ICD_FILENAMES}" == "" ]]