Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*
696 Discussions

DPL 2021.7.0 env script cause environment-modules module load fail

Quanm
Beginner
1,440 Views

RHEL 9.0, Installed l_BaseKit_p_2022.2.0.262_offline.sh.

Create a modulefile oneapi2022

 

#%Module

module-whatis "Intel oneAPI 2022"

conflict intel/oneapi

source-sh bash /opt/intel/oneapi/2022/setvars.sh

 

then run

 

module load oneapi2022

 

I get a error

 

-bash: syntax error near unexpected token `done'

 

If I comment the function rreadlink() in file /opt/intel/oneapi/2022/dpl/2021.7.0/env/vars.sh.

The problem disappeared.

 

So, what caused this problem, the function rreadlink() or environment-modules?

0 Kudos
5 Replies
HemanthCH_Intel
Moderator
1,414 Views

Hi,


Thanks for posting in Intel communities.


Unfortunately, RHEL 9 is not supported by Intel oneAPI Base Toolkit. Could you please refer to the below link to find the supported OS of the Intel oneAPI Base Toolkit:

https://www.intel.com/content/www/us/en/developer/articles/system-requirements/intel-oneapi-base-toolkit-system-requirements.html


Could you please try with any one of the supported OS? 


Thanks & Regards,

Hemanth


0 Kudos
HemanthCH_Intel
Moderator
1,391 Views

Hi,


We haven't heard back from you. Could you please provide any updates on your issue?


Thanks & Regards,

Hemanth


0 Kudos
HemanthCH_Intel
Moderator
1,375 Views

Hi,


We assume that your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.


Thanks & Regards,

Hemanth


0 Kudos
jangmys
Beginner
1,037 Views

Arrived here by searching for the same error (with oneapi 2021 and 2024). The problem seems to come from the environment-modules source-sh and sh-to-mod tools.

Generating modulefile with

 

 

module sh-to-mod bash /share/compilers/intel/2021/setvars.sh > oneapi/2021.0

 

 

then loading the module gives

 

 

-bash: syntax error near unexpected token `done'

 

 

Editing the rreadlink() function in the modulefile as follows

 

275c275
<         \unset -f command
---
>         \unset -f command;
281c281
<             return 1
---
>             return 1;

 

solves the problem. Same for 2024.0 (different line numbers)

The original rreadcheck() function from Intel's script has the missing semicolons, so I guess it's a bug in environment-modules.

0 Kudos
xdelaruelle
Beginner
994 Views

This environment-modules issue has been fixed in version 5.1.0.

 

environment-modules 5.3.0 is now available on RHEL 9. Updating environment-modules will fix your issue.

 

Regards,

Xavier

0 Kudos
Reply