- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
I'm now trying to build a C/C++ project using ICC (version 11.0) on Centos5.2 x86_64 platform. When I specify
option "-ipo" or "-fast" to the ICC compiler, the warning in title jumped out and the linking failed saying some
symbols that are defined inside the library are undefined reference. The project can build successfully
using ICC _without_ that option but I want to get some performance with those options.
I use "nm" to check that the object file inside that library created with that option but find nothing, like this:
--------------------------------
$nm build/ICC32-Linux-x86/object/pmsgi.o
w __ildata_included
$file build/ICC32-Linux-x86/object/pmsgi.o
ELF 64-bit LSB relocatable, AMD x86-64, version 1 (GNU/Linux), not stripped
--------------------------------
But things change a lot on the object file without that option, like this.
--------------------------------
$nm build/ICC32-Linux-x86/object/pmsgi.o
0000000000000000 r _2__STRING.0.0
000000000000000c r _2__STRING.1.0
0000000000000010 T _Z19pmsgi_set_file_nameP8_IO_FILE
U _ZN9msgSystem11setFileNameEP8_IO_FILE
U _ZN9msgSystem12initMsgMutexEv
U _ZN9msgSystem20print_severity_timesEv
U _ZN9msgSystem6setMaxEii
U _ZN9msgSystem7initialEv
U _ZN9msgSystem8printMsgEiP13__va_list_tag
U __gxx_personality_v0
---------------------------------
So seems that option remove all of the symbols, right? I get quite confused here.
The ICC command I use is in the "intel64" directory, I also try the "ia32" but get a
worse outcome. My CPU info is here and I have two Quad cpus each has 4 cores.
----------------------------------------
$cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Intel Xeon CPU E5430 @ 2.66GHz
stepping : 6
cpu MHz : 2660.004
cache size : 6144 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 4
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
bogomips : 5323.75
clflush size : 64
cache_alignment : 64
address sizes : 38 bits physical, 48 bits virtual
power management:
.............................
.............................
.............................
-------------------------------------------------------
Can any expert give a hand here? Thank in advance.
Regards
I'm now trying to build a C/C++ project using ICC (version 11.0) on Centos5.2 x86_64 platform. When I specify
option "-ipo" or "-fast" to the ICC compiler, the warning in title jumped out and the linking failed saying some
symbols that are defined inside the library are undefined reference. The project can build successfully
using ICC _without_ that option but I want to get some performance with those options.
I use "nm" to check that the object file inside that library created with that option but find nothing, like this:
--------------------------------
$nm build/ICC32-Linux-x86/object/pmsgi.o
w __ildata_included
$file build/ICC32-Linux-x86/object/pmsgi.o
ELF 64-bit LSB relocatable, AMD x86-64, version 1 (GNU/Linux), not stripped
--------------------------------
But things change a lot on the object file without that option, like this.
--------------------------------
$nm build/ICC32-Linux-x86/object/pmsgi.o
0000000000000000 r _2__STRING.0.0
000000000000000c r _2__STRING.1.0
0000000000000010 T _Z19pmsgi_set_file_nameP8_IO_FILE
U _ZN9msgSystem11setFileNameEP8_IO_FILE
U _ZN9msgSystem12initMsgMutexEv
U _ZN9msgSystem20print_severity_timesEv
U _ZN9msgSystem6setMaxEii
U _ZN9msgSystem7initialEv
U _ZN9msgSystem8printMsgEiP13__va_list_tag
U __gxx_personality_v0
---------------------------------
So seems that option remove all of the symbols, right? I get quite confused here.
The ICC command I use is in the "intel64" directory, I also try the "ia32" but get a
worse outcome. My CPU info is here and I have two Quad cpus each has 4 cores.
----------------------------------------
$cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Intel Xeon CPU E5430 @ 2.66GHz
stepping : 6
cpu MHz : 2660.004
cache size : 6144 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 4
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
bogomips : 5323.75
clflush size : 64
cache_alignment : 64
address sizes : 38 bits physical, 48 bits virtual
power management:
.............................
.............................
.............................
-------------------------------------------------------
Can any expert give a hand here? Thank in advance.
Regards
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When -ipo is used, the .o file containsintermediate data instead of object data and only icc can understand it.
So try using icc or icpcfor linking. (icc for C code; icpcfor C++ code)
Jennifer
So try using icc or icpcfor linking. (icc for C code; icpcfor C++ code)
Jennifer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Jennifer Jiang (Intel)
When -ipo is used, the .o file containsintermediate data instead of object data and only icc can understand it.
So try using icc or icpcfor linking. (icc for C code; icpcfor C++ code)
Jennifer
So try using icc or icpcfor linking. (icc for C code; icpcfor C++ code)
Jennifer
Hi Jennifer:
Thanks for your reply. I can confirm that the whole project is compiled and linked with icc and icpc,
no other compiler or linker. The warning mentioned is reported from icpc when linking the binary and
the library is also built by icc/icpc.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - panzhu
Hi Jennifer:
Thanks for your reply. I can confirm that the whole project is compiled and linked with icc and icpc,
no other compiler or linker. The warning mentioned is reported from icpc when linking the binary and
the library is also built by icc/icpc.
Regards.
If you're creating static libraries, make sure you're using the Intel-provided utility "xiar" to do the archiving and not the standard GNU "ar" if you're using IPO.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Brandon Hewitt (Intel)
If you're creating static libraries, make sure you're using the Intel-provided utility "xiar" to do the archiving and not the standard GNU "ar" if you're using IPO.
Thank you Brandon, the warning disappeared when I replace "ar" with "xiar".
Regards.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page