Intel® oneAPI Base Toolkit
Support for the core tools and libraries within the base toolkit that are used to build and deploy high-performance data-centric applications.
419 Discussions

maintaining/using different oneapi compiler versions

may_ka
Beginner
1,634 Views

Hi,

 

I understand that oneapi compilers are initialized via

 

source /opt/intel/oneapi/setvars.sh

 

I would like to switch dynamically between two different oneapi versions, which is a bit hampered by ```version_default=latest``` in ```setvars.sh```.

 

Currently I change this value manually to the desired version, but I presume there must be an simple option to set this from a config file or command line!?

 

Any idea?

 

Thanks

0 Kudos
1 Solution
VarshaS_Intel
Moderator
1,534 Views

Hi,

 

Thanks for posting in Intel Communities.

 

If you want to use two different versions of oneAPI, at the time of the installation you need to specify two different paths so that you can use the required version. If you give the same path then it will overwrite.

Please find the below screenshot where we have specified the different paths.

pathsOneAPI.jpg

And also, if you want to use the particular version component(mkl,mpi, etc.) with another particular version compiler(icc,icx,dpcpp, etc.) then you can be able to specify it. Please find the below commands:

source /opt/intel/oneapi/setvars.sh --> This will initialize the oneAPI based the version specified in script file.(In general, it will be the latest one)
source /opt/intel/oneapi/compiler/2021.3.0/env/vars.sh --> Incase, if you want different compiler(or any component) version then you can change it's version.

Please find the below screenshot:

diffVersions.jpg

For more information, please find the below link:

https://www.intel.com/content/www/us/en/develop/documentation/oneapi-programming-guide/top/oneapi-development-environment-setup/use-the-setvars-script-with-linux-or-macos/use-a-config-file-for-setvars-sh-on-linux-or-macos.html

 

Thanks & Regards,

Varsha

 

View solution in original post

0 Kudos
2 Replies
VarshaS_Intel
Moderator
1,535 Views

Hi,

 

Thanks for posting in Intel Communities.

 

If you want to use two different versions of oneAPI, at the time of the installation you need to specify two different paths so that you can use the required version. If you give the same path then it will overwrite.

Please find the below screenshot where we have specified the different paths.

pathsOneAPI.jpg

And also, if you want to use the particular version component(mkl,mpi, etc.) with another particular version compiler(icc,icx,dpcpp, etc.) then you can be able to specify it. Please find the below commands:

source /opt/intel/oneapi/setvars.sh --> This will initialize the oneAPI based the version specified in script file.(In general, it will be the latest one)
source /opt/intel/oneapi/compiler/2021.3.0/env/vars.sh --> Incase, if you want different compiler(or any component) version then you can change it's version.

Please find the below screenshot:

diffVersions.jpg

For more information, please find the below link:

https://www.intel.com/content/www/us/en/develop/documentation/oneapi-programming-guide/top/oneapi-development-environment-setup/use-the-setvars-script-with-linux-or-macos/use-a-config-file-for-setvars-sh-on-linux-or-macos.html

 

Thanks & Regards,

Varsha

 

0 Kudos
VarshaS_Intel
Moderator
1,466 Views

Hi,

 

Thanks for accepting our solution. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.

 

Have a good day!

 

Thanks & Regards,

Varsha

 

0 Kudos
Reply