首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Debian 10安装oneAPI intel ToolKit后的问题

Debian 10安装oneAPI intel ToolKit后的问题
EN

Stack Overflow用户
提问于 2021-04-30 21:41:32
回答 1查看 529关注 0票数 1

我刚刚安装了oneAPI和HPC工具包。正如在doc中指出的那样,我已经将以下内容放入我的~/.zshrc中:

代码语言:javascript
运行
复制
source /opt/intel/oneapi/setvars.sh

现在出现了两个问题:

首先,当我打开一个新的终端,我有一个系统的长消息出现在有手在终端上:如何使这个长消息是沉默的?

代码语言:javascript
运行
复制
:: 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 ::

其次,正如您所看到的,在初始化的消息中有一个错误:

代码语言:javascript
运行
复制
/opt/intel/oneapi/intelpython/latest/etc/conda/activate.d/xgboost_activate.sh:16: = not found

我编辑了这个文件:

代码语言:javascript
运行
复制
#!/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上,没有问题。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 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“中将”“和”“分别替换为”[“和”]“。

即替换下面的一行

代码语言:javascript
运行
复制
if [ "${OCL_ICD_FILENAMES}" == "" ]

使用

代码语言:javascript
运行
复制
if [[ "${OCL_ICD_FILENAMES}" == "" ]]
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67340770

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档