Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
15 Views

libraries not found compiling OpenCL program with option "-fast"

Hi,

I'm trying to compile a small OpenCL program and have a problem with option "-fast". I'm using "opencl-1.2-sdk-6.3.0.1904" on a "SUSE Linux Enterprise Server 12.2 (x86_64, kernel: 4.4.38-93-default).

loki introduction 108 icc -v
icc version 17.0.2 (gcc version 6.3.0 compatibility)

loki introduction 109 icc -std=c11 -m64 -fast -prec_div -Wall -Wcheck dot_prod_OpenCL.c errorCodes.c -lOpenCL
ld: cannot find -lOpenCL
ld: cannot find -lm
ld: cannot find -lc
ld: cannot find -ldl
ld: cannot find -lc

Everything works as expected if I replace "-fast" by "-O3".

loki introduction 110 icc -std=c11 -m64 -O3 -prec_div -Wall -Wcheck dot_prod_OpenCL.c errorCodes.c -lOpenCL
loki introduction 111

Can sombody explain the strange behaviour of "-fast" or is it a compiler problem? Thank you very much for any explanation in advance.

Kind regards

Siegmar

 

0 Kudos
1 Reply
Highlighted
Valued Contributor II
15 Views

>>...Can sombody explain the strange behaviour of "-fast" or is it a compiler problem? If you run icc -help you will see that the option -fast turns on a set of another options and one of them is static. ... -fast - enable -xHOST -O3 -ipo -no-prec-div -static -fp-model fast=2 ... -static - prevents linking with shared libraries ...
0 Kudos