CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [OpenFOAM.org] Can't compile with '-ipo' flag (https://www.cfd-online.com/Forums/openfoam-installation/190662-cant-compile-ipo-flag.html)

xuegy July 19, 2017 13:28

Can't compile with '-ipo' flag
 
Hello all,

I'm compiling OF 4.1 with ICC. I have version 16 17 and 18 beta on a CentOS 7 HPC.

I tried both '-xHost' and '-fast' flags but all versions of icc gave the same error in the very beginning:
Code:

/home/gux215/OpenFOAM/OpenFOAM-icc/platforms/linux64IccDPInt32Opt/src/OSspecific/POSIX/signals/sigWriteNow.o:(.data+0x0): multiple definition of `vtable for Foam::simpleRegIOobject'
/home/gux215/OpenFOAM/OpenFOAM-icc/platforms/linux64IccDPInt32Opt/src/OSspecific/POSIX/signals/sigStopAtWriteNow.o:(.data+0x0): first defined here
/home/gux215/OpenFOAM/OpenFOAM-icc/platforms/linux64IccDPInt32Opt/src/OSspecific/POSIX/signals/sigWriteNow.o:(.data+0x0): multiple definition of `typeinfo for Foam::simpleRegIOobject'
/home/gux215/OpenFOAM/OpenFOAM-icc/platforms/linux64IccDPInt32Opt/src/OSspecific/POSIX/signals/sigStopAtWriteNow.o:(.data+0x0): first defined here
/home/gux215/OpenFOAM/OpenFOAM-icc/platforms/linux64IccDPInt32Opt/src/OSspecific/POSIX/signals/sigWriteNow.o:(.data+0x0): multiple definition of `typeinfo name for Foam::simpleRegIOobject'
/home/gux215/OpenFOAM/OpenFOAM-icc/platforms/linux64IccDPInt32Opt/src/OSspecific/POSIX/signals/sigStopAtWriteNow.o:(.data+0x0): first defined here
/home/gux215/OpenFOAM/OpenFOAM-icc/platforms/linux64IccDPInt32Opt/src/OSspecific/POSIX/timer.o:(.data+0x0): multiple definition of `vtable for Foam::simpleRegIOobject'
/home/gux215/OpenFOAM/OpenFOAM-icc/platforms/linux64IccDPInt32Opt/src/OSspecific/POSIX/signals/sigStopAtWriteNow.o:(.data+0x0): first defined here
/home/gux215/OpenFOAM/OpenFOAM-icc/platforms/linux64IccDPInt32Opt/src/OSspecific/POSIX/timer.o:(.data+0x0): multiple definition of `typeinfo for Foam::simpleRegIOobject'
/home/gux215/OpenFOAM/OpenFOAM-icc/platforms/linux64IccDPInt32Opt/src/OSspecific/POSIX/signals/sigStopAtWriteNow.o:(.data+0x0): first defined here
/home/gux215/OpenFOAM/OpenFOAM-icc/platforms/linux64IccDPInt32Opt/src/OSspecific/POSIX/timer.o:(.data+0x0): multiple definition of `typeinfo name for Foam::simpleRegIOobject'
/home/gux215/OpenFOAM/OpenFOAM-icc/platforms/linux64IccDPInt32Opt/src/OSspecific/POSIX/signals/sigStopAtWriteNow.o:(.data+0x0): first defined here
/home/gux215/OpenFOAM/OpenFOAM-icc/platforms/linux64IccDPInt32Opt/src/OSspecific/POSIX/POSIX.o:(.data+0x0): multiple definition of `vtable for Foam::simpleRegIOobject'
/home/gux215/OpenFOAM/OpenFOAM-icc/platforms/linux64IccDPInt32Opt/src/OSspecific/POSIX/signals/sigStopAtWriteNow.o:(.data+0x0): first defined here
/home/gux215/OpenFOAM/OpenFOAM-icc/platforms/linux64IccDPInt32Opt/src/OSspecific/POSIX/POSIX.o:(.data+0x0): multiple definition of `typeinfo for Foam::simpleRegIOobject'
/home/gux215/OpenFOAM/OpenFOAM-icc/platforms/linux64IccDPInt32Opt/src/OSspecific/POSIX/signals/sigStopAtWriteNow.o:(.data+0x0): first defined here
/home/gux215/OpenFOAM/OpenFOAM-icc/platforms/linux64IccDPInt32Opt/src/OSspecific/POSIX/POSIX.o:(.data+0x0): multiple definition of `typeinfo name for Foam::simpleRegIOobject'
/home/gux215/OpenFOAM/OpenFOAM-icc/platforms/linux64IccDPInt32Opt/src/OSspecific/POSIX/signals/sigStopAtWriteNow.o:(.data+0x0): first defined here
/home/gux215/OpenFOAM/OpenFOAM-icc/platforms/linux64IccDPInt32Opt/src/OSspecific/POSIX/fileMonitor.o:(.data+0x0): multiple definition of `vtable for Foam::simpleRegIOobject'
/home/gux215/OpenFOAM/OpenFOAM-icc/platforms/linux64IccDPInt32Opt/src/OSspecific/POSIX/signals/sigStopAtWriteNow.o:(.data+0x0): first defined here
/home/gux215/OpenFOAM/OpenFOAM-icc/platforms/linux64IccDPInt32Opt/src/OSspecific/POSIX/fileMonitor.o:(.data+0x0): multiple definition of `typeinfo for Foam::simpleRegIOobject'
/home/gux215/OpenFOAM/OpenFOAM-icc/platforms/linux64IccDPInt32Opt/src/OSspecific/POSIX/signals/sigStopAtWriteNow.o:(.data+0x0): first defined here
/home/gux215/OpenFOAM/OpenFOAM-icc/platforms/linux64IccDPInt32Opt/src/OSspecific/POSIX/fileMonitor.o:(.data+0x0): multiple definition of `typeinfo name for Foam::simpleRegIOobject'
/home/gux215/OpenFOAM/OpenFOAM-icc/platforms/linux64IccDPInt32Opt/src/OSspecific/POSIX/signals/sigStopAtWriteNow.o:(.data+0x0): first defined here
make: *** [/home/gux215/OpenFOAM/OpenFOAM-icc/platforms/linux64IccDPInt32Opt/lib/libOSspecific.o] Error 1

So instead of doing that, I tried all flags separately. Finally it turns out that '-ipo' flag is the reason. I have seen people compiled successfully with '-xHost' so '-ipo' shouldn't be a problem. Any idea?


All times are GMT -4. The time now is 03:14.