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

Howto compile MPI/OpenMP program through ICC

masroor
Beginner
343 Views
When I compile a program mpich2 and icc with the following command:
mpicc -cc=icc -openmp testmpi.c

testmpi.c includes the hybrid code (both mpi and openmp)

then i get the following error.

icc: command line error: invalid argument for option '-march'

Where I am running the sample program in Gentoo machine (lenovo N100).


0 Kudos
2 Replies
Steven_L_Intel1
Employee
343 Views
I am moving your question to the Intel C++ forum where you should be able to get help.
0 Kudos
Steven_L_Intel1
Employee
343 Views
I think you'd first need to look at the script that defines the mpicc command to see what options it is providing. icc 10.1 does support the following values for -march=
  • pentium3
  • pentium4
  • core2
The Intel option these correspond to is -x, which has many more possibilities.

I note that you are building this code on a laptop - I hope you aren't intending to run MPI code there! My recommendation would be to replace the use of -march= with the appropriate -x switch for the system(s) you'll be running this application on.
0 Kudos
Reply