hidden text to trigger early load of fonts ПродукцияПродукцияПродукцияПродукция Các sản phẩmCác sản phẩmCác sản phẩmCác sản phẩm المنتجاتالمنتجاتالمنتجاتالمنتجات מוצריםמוצריםמוצריםמוצרים
Intel® MPI Library
Get help with building, analyzing, optimizing, and scaling high-performance computing (HPC) applications.

Bug with -compile_info and -link_info options

dsi-intel_d_
初学者
1,411 次查看

Hi

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 ?

Regard

0 项奖励
8 回复数
dsi-intel_d_
初学者
1,411 次查看

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 $?
0
[alainm@gurney boost_1_56_0]$

Meaning that a configuration tool may deduce that he option is actually supported, wich is not the case.

 

Regards.

 

0 项奖励
dsi-intel_d_
初学者
1,411 次查看

Even CMake fails to extract compilation and link flags from it.
For one, cmake does test for the return code of the -show... option.

 

Regards


 

0 项奖励
dsi-intel_d_
初学者
1,411 次查看

Any news ???

 

0 项奖励
James_T_Intel
主持人
1,411 次查看

You can get the compilation-only flags with

[plain]mpiifort -c -show ...[/plain]

But I don't think we have any options for just getting the link flags at this time.

0 项奖励
dsi-intel_d_
初学者
1,411 次查看

 

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.

0 项奖励
James_T_Intel
主持人
1,411 次查看

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?

0 项奖励
dsi-intel_d_
初学者
1,411 次查看

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
-I/opt/openmpi-1.8.2/include -pthread
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
alainm@dhcp1-24:~$

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.

Thanks!

 

Alain

 

0 项奖励
James_T_Intel
主持人
1,411 次查看

I've submitted a feature request to have this capability added.

0 项奖励
回复