Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7954 Discussions

Problem setting up the environment using modulefiles


Dear All,


On a fresh system (Rocky Linux 8.8) I installed the HPC Toolkist (as local root user):




The installation program ran successfully, afterwards I created the modulefiles using this command:


cd /opt/intel/oneapi/
./ --output-dir=/opt/modulefiles/intel


This script gave the following output:


:: Initializing oneAPI modulefiles folder ...
:: Removing any previous oneAPI modulefiles folder content.
:: Generating oneAPI modulefiles folder links.
:: init_opencl/2023.2.0 -> /opt/intel/oneapi/compiler/2023.2.0/linux/lib/oclfpga/modulefiles/init_opencl
:: oclfpga/2023.2.0 -> /opt/intel/oneapi/compiler/2023.2.0/linux/lib/oclfpga/modulefiles/oclfpga
:: init_opencl/latest -> /opt/intel/oneapi/compiler/2023.2.0/linux/lib/oclfpga/modulefiles/init_opencl
:: oclfpga/latest -> /opt/intel/oneapi/compiler/2023.2.0/linux/lib/oclfpga/modulefiles/oclfpga
:: debugger/2023.2.0 -> /opt/intel/oneapi/debugger/2023.2.0/modulefiles/debugger
:: debugger/latest -> /opt/intel/oneapi/debugger/latest/modulefiles/debugger
:: dev-utilities/2021.10.0 -> /opt/intel/oneapi/dev-utilities/2021.10.0/modulefiles/dev-utilities
:: dev-utilities/latest -> /opt/intel/oneapi/dev-utilities/latest/modulefiles/dev-utilities
:: inspector/2023.2.0 -> /opt/intel/oneapi/inspector/2023.2.0/modulefiles/inspector
:: inspector/latest -> /opt/intel/oneapi/inspector/latest/modulefiles/inspector
:: itac/2021.10.0 -> /opt/intel/oneapi/itac/2021.10.0/modulefiles/itac
:: itac/latest -> /opt/intel/oneapi/itac/latest/modulefiles/itac
:: mpi/2021.10.0 -> /opt/intel/oneapi/mpi/2021.10.0/modulefiles/mpi
:: mpi/latest -> /opt/intel/oneapi/mpi/latest/modulefiles/mpi
:: tbb/2021.10.0 -> /opt/intel/oneapi/tbb/2021.10.0/modulefiles/tbb
:: tbb32/2021.10.0 -> /opt/intel/oneapi/tbb/2021.10.0/modulefiles/tbb32
:: tbb/latest -> /opt/intel/oneapi/tbb/latest/modulefiles/tbb
:: tbb32/latest -> /opt/intel/oneapi/tbb/latest/modulefiles/tbb32
:: oneAPI modulefiles folder initialized.
:: oneAPI modulefiles folder is here: "/opt/modulefiles/intel"


Unfortunately multiple problems occur:

1.) I cannot determine the modulefile containing the icc compiler. I would expect there should be a module called "compiler" or similar, but as you can see above, there is none.
2.) The paths inside the created modulefiles are wrong, e.g.


module use /opt/modulefiles/intel
module add mpi/latest
which mpicc
/usr/bin/which: no mpicc in (/opt/intel/oneapi/mpi/intel64/libfabric/bin:/opt/intel/oneapi/mpi/intel64/bin:/usr/share/Modules/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/pbs/bin:/opt/pbs/sbin:/root/bin)
echo $PATH


As you can see two mpi-paths are added to the environment:




Both of them do not exist, because the correct path should be:




I would be very grateful if someone could help me with this problem.

Could it be that the modulefiles and/or the are not updated to incorporate the current directory structure obtained from the installer.


Thank you!

Labels (1)
0 Kudos
11 Replies

Before posting my question searched the "oneAPI Registration, Download, Licensing and Installation" forum, because I categorized my problem as a installation problem. Now that my thread was moved here by a moderator I discovered this:

Which links to this:


I'll try the provided fix in this article and report back.

0 Kudos

To fix the path issue temporarily for MPI, I did the following:

# change to the oneapi installation directory
cd /opt/intel/oneapi
ls -l mpi/
# Select the broken MPI Version you wish to fix by exporting it as a variable
export I_MPI_VERSION="2021.10.0"
# make a copy to apply the fix to
cp mpi/${I_MPI_VERSION}/modulefiles/mpi mpi/${I_MPI_VERSION}/modulefiles/mpi-pathfix
# substitute the string "intel64" with the MPI Version string in the copied file
sed -i "s/intel64/${I_MPI_VERSION}/g" mpi//modulefiles/mpi-pathfix
# run again, please check the options for this script before running it:
./ --output-dir=modulefiles
module add mpi-pathfix/2021.10.0
# now mpicc shoud be available again:
mpicc --version


I hope a package maintainer from Intel sees this and can hopefully fix the paths there.

0 Kudos



Thank you for posting in Intel Communities.


Could you please confirm whether your issue regarding Intel compiler modulefiles got resolved with Intel oneAPI C++ compiler 2023.2.1 fix?


We are also able to reproduce the issue regarding incorrect paths with MPI Modulefile. Thankyou for sharing the workaround with us.

We have reported this issue to the concerned development team. They are looking into your issue. We will get back to you soon with an update.


Thanks & Regards,


0 Kudos

Dear NoorjahanSk_Intel,

I've tried to reproduce the issue with Intel oneAPI C++ compiler 2023.2.1, but I ended up being very confused: I wish the names of the individual package-files had the same name as the product I click in the download List, e.g.:

Packagename: Intel® oneAPI DPC++/C++ Compiler for Linux*

No mentioning of "oneAPI" in the filename. This is especially confusing, because there is an almost similar filename for the classic package:

Packagename: Intel® C++ Compiler Classic for Linux*

To continue this list with two more examples:

Packagename: Intel® Math Kernel Library for Linux*

Packagename: Intel® MPI Library for Linux*

Both do not contain the "oneAPI" Keyword in their package name, but the filename does. Furthermore the naming scheme of the files differ, although they are both from the "oneAPI" suite?

I guess it would help many users to consider a full rework of the file and package naming scheme for the next major release to help avoid confusion.

Anyway, to come back to the question if this issue still persists with "Intel® oneAPI DPC++/C++ Compiler for Linux":

I reset my test virtual machine to a clean state and startet installing:

# Installed with default settings to /opt/intel/oneapi
# Exited the installer and changed pwd to the install directory
cd /opt/intel/oneapi/
# Created the module files
./ --output-dir=modulefiles
:: Initializing oneAPI modulefiles folder ...
:: Removing any previous oneAPI modulefiles folder content.
:: WARNING: "modulefiles" exists and will be deleted.
   Okay to proceed with deletion? [yn] y
:: Generating oneAPI modulefiles folder links.
:: compiler/2023.2.1 -> /opt/intel/oneapi/compiler/2023.2.1/modulefiles/compiler
:: compiler32/2023.2.1 -> /opt/intel/oneapi/compiler/2023.2.1/modulefiles/compiler32
:: compiler-rt/2023.2.1 -> /opt/intel/oneapi/compiler/2023.2.1/modulefiles/compiler-rt
:: compiler-rt32/2023.2.1 -> /opt/intel/oneapi/compiler/2023.2.1/modulefiles/compiler-rt32
:: icc/2023.2.1 -> /opt/intel/oneapi/compiler/2023.2.1/modulefiles/icc
:: icc32/2023.2.1 -> /opt/intel/oneapi/compiler/2023.2.1/modulefiles/icc32
:: oclfpga/2023.2.1 -> /opt/intel/oneapi/compiler/2023.2.1/linux/lib/oclfpga/modulefiles/oclfpga
:: compiler/latest -> /opt/intel/oneapi/compiler/latest/modulefiles/compiler
:: compiler32/latest -> /opt/intel/oneapi/compiler/latest/modulefiles/compiler32
:: compiler-rt/latest -> /opt/intel/oneapi/compiler/latest/modulefiles/compiler-rt
:: compiler-rt32/latest -> /opt/intel/oneapi/compiler/latest/modulefiles/compiler-rt32
:: icc/latest -> /opt/intel/oneapi/compiler/latest/modulefiles/icc
:: icc32/latest -> /opt/intel/oneapi/compiler/latest/modulefiles/icc32
:: oclfpga/latest -> /opt/intel/oneapi/compiler/2023.2.1/linux/lib/oclfpga/modulefiles/oclfpga
:: debugger/2023.2.0 -> /opt/intel/oneapi/debugger/2023.2.0/modulefiles/debugger
:: debugger/latest -> /opt/intel/oneapi/debugger/latest/modulefiles/debugger
:: dev-utilities/2021.10.0 -> /opt/intel/oneapi/dev-utilities/2021.10.0/modulefiles/dev-utilities
:: dev-utilities/latest -> /opt/intel/oneapi/dev-utilities/latest/modulefiles/dev-utilities
:: tbb/2021.10.0 -> /opt/intel/oneapi/tbb/2021.10.0/modulefiles/tbb
:: tbb32/2021.10.0 -> /opt/intel/oneapi/tbb/2021.10.0/modulefiles/tbb32
:: tbb/latest -> /opt/intel/oneapi/tbb/latest/modulefiles/tbb
:: tbb32/latest -> /opt/intel/oneapi/tbb/latest/modulefiles/tbb32
:: oneAPI modulefiles folder initialized.
:: oneAPI modulefiles folder is here: "modulefiles"

As you can already see, this package does not contain the mpi package at all. To verify it, I did the following:

$ pwd
$ find . -name mpicc
# Command gave no output, meaning to file named "mpicc" is present
$ module use /opt/intel/oneapi/modulefiles
$ module av
----------------------------------------------------- /opt/intel/oneapi/modulefiles -----------------------------------------------------
compiler-rt/2023.2.1    compiler/2023.2.1    debugger/2023.2.0        icc/2023.2.1    oclfpga/2023.2.1  tbb32/2021.10.0  
compiler-rt/latest      compiler/latest      debugger/latest          icc/latest      oclfpga/latest    tbb32/latest     
compiler-rt32/2023.2.1  compiler32/2023.2.1  dev-utilities/2021.10.0  icc32/2023.2.1  tbb/2021.10.0     
compiler-rt32/latest    compiler32/latest    dev-utilities/latest     icc32/latest    tbb/latest     
# no mpi module listed, so it is indeed not there


Can you please tell me, which package I should install and test?

0 Kudos

I've resetted my test vm once again, this time I use the provided repository to install the packages. Intructions can be found here.


Package naming scheme seems much more straight forward using the repository compared to the individual downloaded packages from


To install everything with one go I decided to install the intel-hpckit package. This includes "intel-oneapi-compiler-dpcpp-cpp-2023.2.1" as well as "intel-oneapi-mpi-2021-10-0". Version 2021.10.0 seems to be the latest of the MPI package and my guess is, that MPI is not included in any other oneapi-package, because it always handled and installed as a dependency.

dnf install intel-hpckit
 Package                                                                        Architecture  Version                Repository     Size
 intel-hpckit                                                                   x86_64        2023.2.0-49438         oneAPI        8.0 k
Abhängigkeiten werden installiert:
 intel-basekit                                                                  x86_64        2023.2.0-49384         oneAPI        8.4 k
 intel-basekit-getting-started                                                  noarch        2023.2.0-49384         oneAPI        9.1 k
 intel-hpckit-getting-started                                                   noarch        2023.2.0-49438         oneAPI        9.2 k
 intel-oneapi-advisor                                                           x86_64        2023.2.0-49486         oneAPI        208 M
 intel-oneapi-ccl-2021.10.0                                                     x86_64        2021.10.0-49084        oneAPI        2.7 M
 intel-oneapi-ccl-devel                                                         x86_64        2021.10.0-49084        oneAPI        6.6 k
 intel-oneapi-ccl-devel-2021.10.0                                               x86_64        2021.10.0-49084        oneAPI        2.5 M
 intel-oneapi-common-licensing                                                  noarch        2023.2.0-49462         oneAPI        8.5 k
 intel-oneapi-common-licensing-2023.2.0                                         noarch        2023.2.0-49462         oneAPI         37 k
 intel-oneapi-common-vars                                                       noarch        2023.2.0-49462         oneAPI         17 k
 intel-oneapi-compiler-cpp-eclipse-cfg                                          noarch        2023.2.1-16            oneAPI        8.1 k
 intel-oneapi-compiler-dpcpp-cpp                                                x86_64        2023.2.1-16            oneAPI        6.8 k
 intel-oneapi-compiler-dpcpp-cpp-2023.2.1                                       x86_64        2023.2.1-16            oneAPI        6.9 k
 intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic                                x86_64        2023.2.1-16            oneAPI        7.0 k
 intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2023.2.1                       x86_64        2023.2.1-16            oneAPI         17 M
 intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-common-2023.2.1                noarch        2023.2.1-16            oneAPI        121 k
 intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-runtime-2023.2.1               x86_64        2023.2.1-16            oneAPI         21 k
 intel-oneapi-compiler-dpcpp-cpp-classic-fortran-shared-runtime-2023.2.1        x86_64        2023.2.1-16            oneAPI         85 k
 intel-oneapi-compiler-dpcpp-cpp-common-2023.2.1                                noarch        2023.2.1-16            oneAPI        2.0 M
 intel-oneapi-compiler-dpcpp-cpp-runtime-2023.2.0                               x86_64        2023.2.0-49495         oneAPI        1.1 M
 intel-oneapi-compiler-dpcpp-cpp-runtime-2023.2.1                               x86_64        2023.2.1-16            oneAPI        1.1 M
 intel-oneapi-compiler-dpcpp-eclipse-cfg                                        noarch        2023.2.1-16            oneAPI        8.0 k
 intel-oneapi-compiler-fortran                                                  x86_64        2023.2.1-16            oneAPI        6.8 k
 intel-oneapi-compiler-fortran-2023.2.1                                         x86_64        2023.2.1-16            oneAPI         34 M
 intel-oneapi-compiler-fortran-common-2023.2.1                                  noarch        2023.2.1-16            oneAPI        193 k
 intel-oneapi-compiler-fortran-runtime-2023.2.1                                 x86_64        2023.2.1-16            oneAPI        522 k
 intel-oneapi-compiler-shared-2023.2.1                                          x86_64        2023.2.1-16            oneAPI         15 M
 intel-oneapi-compiler-shared-common-2023.2.1                                   noarch        2023.2.1-16            oneAPI        102 M
 intel-oneapi-compiler-shared-runtime-2023.2.0                                  x86_64        2023.2.0-49495         oneAPI        123 M
 intel-oneapi-compiler-shared-runtime-2023.2.1                                  x86_64        2023.2.1-16            oneAPI        123 M
 intel-oneapi-condaindex                                                        x86_64        2023.2.0-49417         oneAPI        666 k
 intel-oneapi-dal-2023.2.0                                                      x86_64        2023.2.0-49572         oneAPI         47 M
 intel-oneapi-dal-common-2023.2.0                                               noarch        2023.2.0-49572         oneAPI         39 k
 intel-oneapi-dal-common-devel-2023.2.0                                         noarch        2023.2.0-49572         oneAPI        8.7 M
 intel-oneapi-dal-devel                                                         x86_64        2023.2.0-49572         oneAPI         10 k
 intel-oneapi-dal-devel-2023.2.0                                                x86_64        2023.2.0-49572         oneAPI         62 M
 intel-oneapi-dev-utilities                                                     x86_64        2021.10.0-49423        oneAPI        9.5 k
 intel-oneapi-dev-utilities-2021.10.0                                           x86_64        2021.10.0-49423        oneAPI         11 M
 intel-oneapi-dev-utilities-eclipse-cfg                                         noarch        2021.10.0-49423        oneAPI        7.7 k
 intel-oneapi-diagnostics-utility                                               x86_64        2022.4.0-49091         oneAPI        217 k
 intel-oneapi-dnnl                                                              x86_64        2023.2.0-49516         oneAPI         32 M
 intel-oneapi-dnnl-devel                                                        x86_64        2023.2.0-49516         oneAPI        276 k
 intel-oneapi-dpcpp-cpp-2023.2.1                                                x86_64        2023.2.1-16            oneAPI        408 M
 intel-oneapi-dpcpp-ct                                                          x86_64        2023.2.0-49330         oneAPI        9.5 k
 intel-oneapi-dpcpp-ct-2023.2.0                                                 x86_64        2023.2.0-49330         oneAPI         30 M
 intel-oneapi-dpcpp-ct-eclipse-cfg                                              noarch        2023.2.0-49330         oneAPI        7.8 k
 intel-oneapi-dpcpp-debugger                                                    x86_64        2023.2.0-49330         oneAPI        8.7 k
 intel-oneapi-dpcpp-debugger-2023.2.0                                           x86_64        2023.2.0-49330         oneAPI        191 M
 intel-oneapi-icc-eclipse-plugin-cpp-2023.2.1                                   noarch        2023.2.1-16            oneAPI        7.7 k
 intel-oneapi-inspector                                                         x86_64        2023.2.0-49301         oneAPI         72 M
 intel-oneapi-ipp-2021.9.0                                                      x86_64        2021.9.0-49452         oneAPI         76 M
 intel-oneapi-ipp-common-2021.9.0                                               noarch        2021.9.0-49452         oneAPI         18 k
 intel-oneapi-ipp-common-devel-2021.9.0                                         noarch        2021.9.0-49452         oneAPI        3.4 M
 intel-oneapi-ipp-devel                                                         x86_64        2021.9.0-49452         oneAPI        9.0 k
 intel-oneapi-ipp-devel-2021.9.0                                                x86_64        2021.9.0-49452         oneAPI        116 M
 intel-oneapi-ippcp-2021.8.0                                                    x86_64        2021.8.0-49490         oneAPI        3.7 M
 intel-oneapi-ippcp-common-2021.8.0                                             noarch        2021.8.0-49490         oneAPI         16 k
 intel-oneapi-ippcp-common-devel-2021.8.0                                       noarch        2021.8.0-49490         oneAPI        165 k
 intel-oneapi-ippcp-devel                                                       x86_64        2021.8.0-49490         oneAPI         10 k
 intel-oneapi-ippcp-devel-2021.8.0                                              x86_64        2021.8.0-49490         oneAPI        7.9 M
 intel-oneapi-itac                                                              x86_64        2021.10.0-11           oneAPI        6.6 k
 intel-oneapi-itac-2021.10.0                                                    x86_64        2021.10.0-11           oneAPI         45 M
 intel-oneapi-libdpstd-devel                                                    x86_64        2022.2.0-49284         oneAPI        6.6 k
 intel-oneapi-libdpstd-devel-2022.2.0                                           x86_64        2022.2.0-49284         oneAPI        255 k
 intel-oneapi-mkl-2023.2.0                                                      x86_64        2023.2.0-49495         oneAPI        169 M
 intel-oneapi-mkl-common-2023.2.0                                               noarch        2023.2.0-49495         oneAPI         28 k
 intel-oneapi-mkl-common-devel-2023.2.0                                         noarch        2023.2.0-49495         oneAPI        4.6 M
 intel-oneapi-mkl-devel                                                         x86_64        2023.2.0-49495         oneAPI        9.2 k
 intel-oneapi-mkl-devel-2023.2.0                                                x86_64        2023.2.0-49495         oneAPI        161 M
 intel-oneapi-mpi-2021.10.0                                                     x86_64        2021.10.0-49371        oneAPI         22 M
 intel-oneapi-mpi-devel                                                         x86_64        2021.10.0-49371        oneAPI        6.6 k
 intel-oneapi-mpi-devel-2021.10.0                                               x86_64        2021.10.0-49371        oneAPI         33 M
 intel-oneapi-openmp-2023.2.0                                                   x86_64        2023.2.0-49495         oneAPI        195 M
 intel-oneapi-openmp-2023.2.1                                                   x86_64        2023.2.1-16            oneAPI        195 M
 intel-oneapi-openmp-common-2023.2.0                                            noarch        2023.2.0-49495         oneAPI         26 k
 intel-oneapi-openmp-common-2023.2.1                                            noarch        2023.2.1-16            oneAPI         28 k
 intel-oneapi-tbb-2021.10.0                                                     x86_64        2021.10.0-49541        oneAPI        2.0 M
 intel-oneapi-tbb-common-2021.10.0                                              noarch        2021.10.0-49541        oneAPI         28 k
 intel-oneapi-tbb-common-devel-2021.10.0                                        noarch        2021.10.0-49541        oneAPI        203 k
 intel-oneapi-tbb-devel                                                         x86_64        2021.10.0-49541        oneAPI         10 k
 intel-oneapi-tbb-devel-2021.10.0                                               x86_64        2021.10.0-49541        oneAPI        892 k
 intel-oneapi-vtune                                                             x86_64        2023.2.0-49484         oneAPI        506 M
 intel-oneapi-vtune-eclipse-plugin-vtune                                        noarch        2023.2.0-49484         oneAPI        7.9 k

Installieren  84 Pakete

Gesamte Downloadgröße: 3.0 G
Installationsgröße: 16 G
Ist dies in Ordnung? [j/N]: j
cd /opt/intel/oneapi/
./ --output-dir=modulefiles
module use /opt/intel/oneapi/modulefiles
module add mpi/latest 
which mpicc
/usr/bin/which: no mpicc in (/opt/intel/oneapi/mpi/intel64/libfabric/bin:/opt/intel/oneapi/mpi/intel64/bin:/usr/share/Modules/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin)

This shows, that the paths are not fixed automatically by installing "intel-oneapi-compiler-dpcpp-cpp-2023.2.1".


Please let me know, if there is anything else that I can do or test.







0 Kudos



Thank you for your feedback. We have reported this issue to the concerned development team. They are looking into your issue.


Thanks & Regards,



0 Kudos


We are working on your issue. We will get back to you soon.

Thanks & Regards,


0 Kudos



Thank you for your patience.


The issue regarding incorrect Intel MPI paths inside modulefiles has been targeted to be fixed in Intel MPI 2021.11 Release which will be released in the coming months. If the issue still persists with the new release, then you can start a new discussion for the community to investigate.

Release notes for all the updates regarding the Intel MPI:


Meanwhile, you can use the below workaround to work with the Intel MPI 2021.10 version.




If you have the Intel MPI 2021.9 version installed in your system module file can be inherited from its installation.

>sudo cp -f /opt/intel/oneapi/mpi/2021.9.0/modulefiles/mpi /opt/intel/oneapi/mpi/2021.10.0/modulefiles/

after this below command used should be used to update module files

>sudo sh /opt/intel/oneapi/


If you do not have sudo permissions, please use the MODULEPATH environment variable as an alternative.

After loading module you should have $I_MPI_ROOT/libfabric/bin:$I_MPI_ROOT/bin in you PATH.




If you do not have Intel MPI 2021.9 in your system, then please download the attached file and follow the below steps to get correct path

1.Download the zip file attached here  and unzip the file & place it in a temporary directory, such as your home dir.

We assume home directory for the following instructions:

2.Created a soft link 

ln -s /opt/intel/oneapi/modulefiles/mpi/latest mpi

3. sudo sh /opt/intel/oneapi/

4.module add mpi/latest

5.echo $PATH


Please refer to the below screenshot for correct Path.



>>I ended up being very confused: I wish the names of the individual package-files had the same name as the product I click in the download List

We are still discussing about this with developers. We will get back to you soon.


Thanks & Regards,



0 Kudos



>>I ended up being very confused: I wish the names of the individual package-files had the same name as the product I click in the download List


Thank you for bringing this (confusion regarding the naming convention of Individual package files with oneAPI major product) to our attention. we will consider the feedback to make changes in the next major release of 2025.

We hope the workaround for Intel MPI paths in the Module files provided above helped you. Could you please confirm whether we can close this thread from our end?


Thanks & Regards,


0 Kudos


I have not heard back from you, so I will close this inquiry now. If you need further assistance, please post a new question.

Thanks & Regards,


0 Kudos

Thank you for your answers! To be honest, there was not much going on, that i could reply about. I fixed the mpi path problem for our installation (see answer ‎08-17-2023 10:01 AM) and now I wait for the release of MPI 2021.11


Thank you very much for considering a rework of the files and product naming schems, I'm very glad to hear that!


In the mean time I would like to keep this thread open, so that I can report back, as soon as MPI 2021.11 is released.





0 Kudos