Search code examples
intelintel-oneapi

Replacement of intel compiler classic with intel oneapi compiler in Intel MPI


I am currently replacing the classic Intel compiler with Intel oneAPI compilers in my projects. Before, to be able to use Intel MPI, I called the corresponding compilers using mpiicc/mpiicpc/mpiifort, but I could not find a corresponding compiler command for using the oneAPI compilers (i.e. no mpiicx or similar). What is the current method to use MPI-routines when compiling code with the Intel oneAPI-compiler, then?


Solution

  • According to the Intel official documentation of Intel oneAPI MPI library, the current method to compile MPI routines is still with mpiicc which uses Intel Classic Compiler(mpiicpc for C++ and mpiifort for Fortran). Take a look at the latest documentation on MPI Library https://www.intel.com/content/www/us/en/docs/mpi-library/developer-reference-linux/2021-9/compiler-commands.html. But if you want to use the Intel oneAPI/DPC++ compiler(icx), you can use this command:

    -{cc,cxx,fc}=<compiler> option(<compiler> = icx/icpx/dpcpp) 
    
      Ex: mpiicc -cc=icx test.c
       
    

    You can check the documentation for using LLVM compilers with Intel MPI here: https://www.intel.com/content/www/us/en/docs/mpi-library/developer-reference-linux/2021-9/compilation-command-options.html