Community
cancel
Showing results for 
Search instead for 
Did you mean: 
268 Views

linker warning (cilk releated)

Hello,

this is a report for a (incorrect?, misleading?) warning message.

- linking a cpp file statically gives a cilk waring mesage although cilk is
not used.

Maybe this report should go to the cilk forum?

The knowledge base explains, that there is not static cilk lib.

http://software.intel.com/en-us/articles/intel-cilk-plus-runtime-library-libcilkrts-can-only-be-link...

But cilk is only necessary for code which use it and
the linker warning exists, even without using cilk.

See the example below.

regards,

Martin

>cat hello.cpp
#include
int main() {
printf("hello world\\n");
return 0;
}
>icpc -i-static hello.cpp
icpc: warning #10237: -lcilkrts linked in dynamically, static library not
available
>./a.out
hello world
>icpc --version
icpc (ICC) 12.1.0 20111011
Copyright (C) 1985-2011 Intel Corporation. All rights reserved.

0 Kudos
1 Reply
Hubert_H_Intel
Employee
268 Views

Martin,
Using option -static-intel (replacement for -i-static)relates toALL Intel libraries; there is no lib check being done whetherlibs are actually being usedwith the application or not. The warning is true for Cilk since there is no static version of the libcilkrts library. The additional option -no-intel-extensions removes check for Intel special libraries (such as libcilkrts) extensions.
So you can either use the additional option -no-intel-extensions or ignore warning #10237 (add compiler option -wd10237).
Nevertheless,the warning is a littel bit misleading since libcilkrts is NOT actually being linked as the warning says. But would you be ok with the workaroundssuggested?
Regards, Hubert.
Reply