Intel® MPI Library
Get help with building, analyzing, optimizing, and scaling high-performance computing (HPC) applications.
2221 Discussions

Difference between mpicc, mpigcc, and mpiicc w.r.t. -cc=<compiler>

Feld__Christian
Beginner
3,890 Views

Dear all,

 

with mpigcc and mpiicc I'm able to select the clang compiler via -cc=clang. I checked with -show and was able to compile a program.

 

Using  mpicc -cc=clang, I get the following:

Error: unsupported compiler name 'clang'.
Check -cc=<compiler_name> command line option and I_MPI_CC='icc' and MPICH_CC='' variables.

 

I'm wondering why mpicc's behavior differs from mpigcc and mpiicc and if there is a recommendation which wrapper to prefer.

 

Thanks,

Christian

Labels (1)
0 Kudos
4 Replies
ShanmukhS_Intel
Moderator
3,831 Views

Hi,

Thanks for reaching out to us.

Initially when we tried to run the command without setting up the oneAPI(2021.3) environment, we also encountered the same error as below.

ShanmukhS_Intel_0-1627474640010.png

Later, We have tried executing a sample code using the below command after setting up oneAPI environment and observed that the code compiles and runs fine.

ShanmukhS_Intel_1-1627474653213.png

>> I'm wondering why mpicc's behavior differs from mpigcc and mpiicc and if there is a recommendation which wrapper to prefer.

By default mpiicc uses ICC whereas mpicc/mpigcc uses GCC compiler. However you can change the compiler by using -CC flag. But if you want to use clang compiler for mpicc, make sure you initialize the oneAPI environment. 

However, it is recommended to use “mpiicc with -cc=dpcpp” if you want to run any dpcpp applications.

Based on the programming language we use, we can choose the compiler wrapper. For more information, please go through the link <https://software.intel.com/content/www/us/en/develop/documentation/mpi-developer-reference-linux/top/command-reference/compiler-commands/compilation-command-options.html>

 

Best Regards,

Shanmukh.SS

 

 

0 Kudos
ShanmukhS_Intel
Moderator
3,772 Views

Hi,

 

We didn't hear back from you, If this resolves your issue, make sure to accept this as a solution. This would help others with similar issue.

 

Thank you!

 

Best Regards,

Shanmukh.SS

 

0 Kudos
Feld__Christian
Beginner
3,727 Views

Sorry for responding late. The difference between mpicc and mpiicc is still not clear to me, but as I'm able to use clang/gcc/icc via mpiicc -cc=clang/gcc/icc, my issue is solved.

 

Thanks,
Christian

 

0 Kudos
ShanmukhS_Intel
Moderator
3,737 Views

Hi,

 

As we have not heard back from you, 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.

 

Best Regards,

Shanmukh.SS

 

0 Kudos
Reply