Intel® oneAPI Data Parallel C++
Support for Intel® oneAPI DPC++ Compiler, Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and GDB*
518 Discussions

Intel oneAPI setvars.sh does not work for not root user oneAPI 2022.1.0 (2022.1.0.20220316)

AnandKulkarniSG
Beginner
991 Views

I setup oneAPI 2022.1.0 (2022.1.0.20220316) on my fedora 31 distribution in path /opt/intel/ via offline method and deployed the installation as a root user.  I want to be able to setup the dev env and used the source /opt/intel/oneapi/setvars.sh intel64 as well as source /opt/intel/oneapi/setvars.sh to no effect. Both throw error from script ( log details attached ).

 

As a root user if i run the same commands it works ( details in log again ).

 

Is there a simple guide/command for non root users to import the setvars.sh settings ? I have to manually otherwise do the below currently to be able to use tbb and dpcpp ( via my .bashrc settings as a non root user ).

# setup intel oneapi pstl,tbb and c++ development env.
export INTEL_ONEAPI_PATH=/opt/intel
export INTEL_ARCH=intel64
source ${INTEL_ONEAPI_PATH}/oneapi/compiler/latest/env/vars.sh $INTEL_ARCH
source ${INTEL_ONEAPI_PATH}/oneapi/dpl/2021.7.0/env/vars.sh $INTEL_ARCH
source ${INTEL_ONEAPI_PATH}/oneapi/tbb/2021.6.0/env/vars.sh $INTEL_ARCH

0 Kudos
1 Solution
Viet_H_Intel
Moderator
871 Views

 

Not sure what happened at your end, but it worked from my end.

 

 

View solution in original post

0 Kudos
8 Replies
AnandKulkarniSG
Beginner
980 Views

Please don't reply to this thread saying fedora 31 isn't supported. This issue is at the script/bash level and hence whether it is fc31 or fc35 doesn't matter. Also, it works under the root user id but does not work under a nonroot regular developer user id.

0 Kudos
SeshaP_Intel
Moderator
955 Views

Hi,

 

Thank you for posting in Intel Communities.

 

Could you please try the below command to execute for normal users(non-root users).

 

export INTEL_ONEAPI_PATH=/opt/intel
. ${INTEL_ONEAPI_PATH}/oneapi/setvars.sh

 

Please refer to the below link for more details.

https://www.intel.com/content/www/us/en/develop/documentation/get-started-with-intel-oneapi-dlfd-linux/top/before-you-begin.html

 

Thanks and Regards,

Pendyala Sesha Srinivas

 

 

0 Kudos
AnandKulkarniSG
Beginner
938 Views

AnandKulkarniSG_0-1660355919088.png

 

 

I hope this helps. It does not work. period!

0 Kudos
AnandKulkarniSG
Beginner
905 Views

@SeshaP_Intel  Any updates ?

0 Kudos
Viet_H_Intel
Moderator
872 Views

 

Not sure what happened at your end, but it worked from my end.

 

 

0 Kudos
AnandKulkarniSG
Beginner
804 Views

AnandKulkarniSG_0-1661387329591.png

 

See if this makes any sense at all. I finally solved it with the help of article : https://community.intel.com/t5/Intel-C-Compiler/How-to-use-zsh-csh-or-tcsh-with-oneAPI-setvars-sh-vars-sh-or/m-p/1227218/thread-id/37878

 

anand@ldnpsr2937 ~]$source ${INTEL_ONEAPI_PATH}/oneapi/setvars.sh ${INTEL_ARCH}
bash: /opt/intel/oneapi/setvars.sh: line 95: syntax error near unexpected token `('
bash: /opt/intel/oneapi/setvars.sh: line 95: `usage() {'
[anand@ldnpsr2937 ~]$source /opt/intel/oneapi/setvars.sh intel64
bash: /opt/intel/oneapi/setvars.sh: line 95: syntax error near unexpected token `('
bash: /opt/intel/oneapi/setvars.sh: line 95: `usage() {'
[anand@ldnpsr2937 ~]$bash -c "source /opt/intel/oneapi/setvars.sh intel64"

:: initializing oneAPI environment ...
bash: BASH_VERSION = 5.0.17(1)-release
args: Using "$@" for setvars.sh arguments: intel64
:: advisor -- latest
:: ccl -- latest
:: compiler -- latest
:: dal -- latest
:: debugger -- latest
:: dev-utilities -- latest
:: dnnl -- latest
:: dpcpp-ct -- latest
:: dpl -- latest
:: intelpython -- latest
:: ipp -- latest
:: ippcp -- latest
:: ipp -- latest
:: mkl -- latest
:: mpi -- latest
:: tbb -- latest
:: vpl -- latest
:: vtune -- latest
:: oneAPI environment initialized ::

 

 

 

0 Kudos
AnandKulkarniSG
Beginner
855 Views

Does seem very odd. Anyway we can close this issue , i have work around by manually importing setting for each component as discussed above. I will live with that meanwhile.

0 Kudos
Viet_H_Intel
Moderator
828 Views

Thank for accepted a solution. We won't monitor this thread anymore. If you have any other questions/concerns, please create a new thread.


0 Kudos
Reply