When I run mpiicc -compile_info I get:
icc -I/softs/intel//impi/5.0.1.035/intel64/include -L/softs/intel//impi/5.0.1.035/intel64/lib/release -L/softs/intel//impi/5.0.1.035/intel64/lib -Xlinker --enable-new-dtags -Xlinker -rpath -Xlinker /softs/intel//impi/5.0.1.035/intel64/lib/release -Xlinker -rpath -Xlinker /softs/intel//impi/5.0.1.035/intel64/lib -Xlinker -rpath -Xlinker /opt/intel/mpi-rt/5.0/intel64/lib/release -Xlinker -rpath -Xlinker /opt/intel/mpi-rt/5.0/intel64/lib -lmpifort -lmpi -lmpigi -ldl -lrt -lpthread
which is wrong (only the -I... is a compilation option, the others are link options, and the icc should not appear).
And there is a similar issue with -link_flag
As a result, most configuration tools (all, actually) fails to detect the options to use to compilewith Intel'MPI.
Is there an option such that icc $(mpiicc -<option>) mpi_prog.c produces a .o ?
And to make things worse:
[alainm@gurney boost_1_56_0]$ mpiicpc -showme:compile
icpc: command line warning #10006: ignoring unknown option '-showme:compile'
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
[alainm@gurney boost_1_56_0]$ echo $?
Meaning that a configuration tool may deduce that he option is actually supported, wich is not the case.
Thanks a lot,
My problem is more with finding a pseudo standard way to have that information (here, by standard, I mean widespread). My problem is that most project I have to deal with comes from open/lam mpi and/or mpich based MPI. And the build generations tools (cmake, bjam, autoconf..) uses a predefined set of 'well known' (since there is no real standard for that) option to extract those option.
Here, these tools will fail for various reasons, the first one being that mpiicc -show:compile will fail with a 0 status, which means success for most tools. The fact that -show-compile/-show-link returns the same set of options could be dealt with I guess.
So my question would be: is that issue identified for intel MPI and can we expect an improvement in the short term or should I try to patch the cmake scripts wth a special case for intel ?
Thanks for your reply.
The compiler is returning 0 because it is able to successfully complete. It is ignoring an unknown option rather than failing. As to whether that should return non-zero, ask that in one of our compiler forums.
I'll file a feature request for our compiler scripts to support options to show only compile and only link arguments. What syntax would you prefer for me to add to the feature request?
It seems that, at least for cmake, the -showme option is tested first, and produces:
alainm@dhcp1-24:~$ /opt/openmpi-1.8.2/bin/mpicxx -showme:compile
alainm@dhcp1-24:~$ /opt/openmpi-1.8.2/bin/mpicxx -showme:link
-pthread -Wl,-rpath -Wl,/opt/openmpi-1.8.2/lib -Wl,--enable-new-dtags -L/opt/openmpi-1.8.2/lib -lmpi_cxx -lmpi
I think mpich based implementations produces the same output with -compile-info and -link-info respectively.
It seems that, often -show* produces the complete link+compile command line.