OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1719 Discussions

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

Siegmar_G_
Beginner
408 Views

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
SergeyKostrov
Valued Contributor II
408 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
Reply