Intel® oneAPI Base Toolkit
Support for core tools and libraries to build and deploy high-performance data-centric applications
335 Discussions

maintaining/using different oneapi compiler versions

may_ka
Beginner
582 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
482 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-de...

 

Thanks & Regards,

Varsha

 

View solution in original post

2 Replies
VarshaS_Intel
Moderator
483 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-de...

 

Thanks & Regards,

Varsha

 

VarshaS_Intel
Moderator
414 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

 

Reply