icpc: error #10014: problem during multi-file optimization compilation (code 1)

icpc: error #10014: problem during multi-file optimization compilation (code 1)

Bild des Benutzers Ildar S.

Hi!

Try to compile your project, but Intel C++ Compiler 13.1 shows an error:

ipo: error #11063: ipp_DFT.o : Amplitude(Ipp64fc&, double&, double)(_Z9AmplitudeR7Ipp64fcRdd) already defined in main.o
icpc: error #10014: problem during multi-file optimization compilation (code 1)

Without -ipo flag:

ipp_DFT.o: In function `Amplitude(Ipp64fc&, double&, double)':
/home/Jam/build-FFT_filter-Linux_QT_5_0_2_LinuxICC_64bit-Debug/../../FFT_filter/ipp_tbb.h:20: multiple definition of `Amplitude(Ipp64fc&, double&, double)'
main.o:/home/Jam/build-FFT_filter-Linux_QT_5_0_2_LinuxICC_64bit-Debug/../../FFT_filter/ipp_tbb.h:20: first defined here
make: *** [FFT_filter] Error 1

What could be the problem?

Tried to use the flag -ip, but to no avail.

Tech info:

icpc version 13.1.1 (gcc version 4.6.0 compatibility);

flags: -O3 -ipo -use-intel-optimized-headers -xCORE-AVX-I -axCORE-AVX-I -openmp -restrict -std=c++11

Thanks!

11 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.
Bild des Benutzers Sergey Kostrov

>>Try to compile your project, but Intel C++ Compiler 13.1 shows an error:
>>
>>ipo: error #11063: ipp_DFT.o : Amplitude(Ipp64fc&, double&, double)(_Z9AmplitudeR7Ipp64fcRdd) already
>>defined in main.o
>>icpc: error #10014: problem during multi-file optimization compilation (code 1)

What project are you talking about? Please specify. Is there a small reproducer?

>>...FFT_filter/ipp_tbb.h:20: multiple definition of `Amplitude( Ipp64fc&, double&, double )'

Did you implement codes for Amplitude function in ipp_tbb.h header file? If Yes, move these codes to a cpp-file and I expect that you should have a ipp_tbb.cpp file.

Bild des Benutzers Tim Prince

As I wild guess, I wonder why you specify CORE-AVX-I twice.  It seems you are asking for run-time detection of "IVB" corei7-3 and to default to the same if it isn't present (but possibly with the order of options backwards).  If CORE_AVX-I does anything more than plain AVX, it would only to be to enable the special intrinsics (AES).  -xAVX or -mAVX would be more straightforward.  If you wanted a dual path build for AVX and SSE4.1, I believe it would be -axAVX -xSSE4.1  As Sergey said, we would need a reproducer.

Bild des Benutzers Ildar S.

Hi!

Thanks for the reply. Sorry for the "Tried to build your project," it's a typo.
The situation is the following, I'm trying to apply a function of the Intel TBB library, but the compiler complains about multiple definitions. After going through all the choices I have made to the code to compile.

Below I have attached the two working version and a version that does not work. As an example, bring the code of page http://software.intel.com/sites/products/documentation/doclib/tbb_sa/hel...

Anlagen: 

AnhangGröße
Herunterladen tbb-examples.tar.gz1.2 KB
Bild des Benutzers Sergey Kostrov

>>After going through all the choices I have made to the code to compile.
>>
>>Below I have attached the two working version and a version that does not work.

Thanks for the update. I could look at the project and what exactly concerns you now? Is there something else to look at?

Bild des Benutzers Ildar S.

I want to understand why there is an error of multiple definitions. And just want to inform about the error, all of a sudden it's another bug in the compiler.

Bild des Benutzers Ildar S.

I want to understand why the compiler generates an error # 10014.

Bild des Benutzers Sergey Kostrov

>>...I want to understand why the compiler generates an error # 10014.

You've added tbb_examples.h header file twice. That is, in the makefile and in main.cpp source file. The fixed versions of your project don't have tbb_examples.h in the makefile. Header files should be included in source files ( C or C++ ).

Note: The fixed version 2 doesn't have that header file at all.

Bild des Benutzers Ildar S.

Hmm, I thought that all cleaned up makefile from a double including the header file. But I have the following situation, there is a project on work, at QtLibraries, and no makefile any mention of the inclusion of header files twice. I'll have another look at my makefile project Qt. But anyway thank you!

Bild des Benutzers mecej4

Your makefile in the "..broken.." directory is defective. A header file is usually not a separately compilable unit by itself, since in normal usage the contents of the header files are merged into the rest of the C/C++ source by the preprocessor before being handed to the compiler pass. Secondly, the conventions of the compiler driver (on most OSes) are that a file with an extension other than  '.c'  or '.cpp' is not a source file and is passed as-is to the linker. The linker, in turn, does not know what to do with a header file.

In such situations, the -n option of the make program is quite useful. Look at the output of make -n on your makefile. Do the resulting commands look sensible? If not, fix the makefile.

Bild des Benutzers Sergey Kostrov

>>...Secondly, the conventions of the compiler driver (on most OSes) are that a file with an extension other than '.c' or '.cpp' is not
>>a source file and is passed as-is to the linker. The linker, in turn, does not know what to do with a header file...

Linkers do not work with c, or cpp, or h, or hxx, etc files and they always process object or library files. If any of source files would be passed to the Linker a message like, Bad Input Format ( or something like this ), would be generated.

Melden Sie sich an, um einen Kommentar zu hinterlassen.