SOMETHING WRONG with Cilkview

SOMETHING WRONG with Cilkview

I'm using cilk-8503-i686 on Linux(Ubuntu 11.04)....and I called cilkview functions just like the examples did:
...
#include
....

int cilk_main(int argc, char** argv)
{
cilkview: cv;
...
cv.start();
SOME CODE HERE
cv.stop();
cv.dump("xxxx");
....
}

and I got these errors from linker:
YAM_P.cilk:(.text+0xbd2): undefined reference to `cilk::get_milliseconds()'
YAM_P.cilk:(.text+0xc9c): undefined reference to `cilk::get_milliseconds()'
YAM_P.cilk:(.text+0xe41): undefined reference to `__cilkview_dump'
collect2: ld returned 1 exit status

I've made up some simpler codes to test cilkview and it worked very well...
But what's wrong with this one????

4 帖子 / 0 全新
最新文章
如需更全面地了解编译器优化,请参阅优化注意事项

It looks like you're using Cilk++, not Intel Cilk Plus, so this is in the wrong forum.

But anyway, you'll need to link with the cilkutil static library which was shipped with Cilk++ V1.1. The sources should be included with the kit, but a built version should be available.

- Barry

Oh, sorry for posting in the wrong forum :)
actually I don't know much about the difference between Cilk++ and Cilk Plus . Yes I linked cilkutil when I got those errors. But I solved it by just moving -lcilkutil to the last place of the cilk++ options( and I just happened to do that). I don't know why this order matters to the linker, but it seems that it really does.

Thank you all the same.

No problem. We (the Cilk runtime team) monitor both forums.

I guess the Linux linker only makes one pass through the libraries, in the order you specify them on the command line.

Cilk++ was a product created by Cilk Arts, Inc. based on technology licensed from MIT. It uses"classic" heap-allocated cactus stack frames, much likeits predecessor, MIT's Cilk 5. This means that you can call C/C++ functions from a function that uses cilk linkage (the heap-allocated cactus stack frame), but you can't call from a C/C++ function directly to a Cilk function.

The Linux version includes a modified version of GCC. 4.2, if I remember correctly. The Windows version "wraps" the Microsoft CL compiler in a "sandwich" to produce cilk linkage functions.

Cilk Arts was acquired by Intel 2 years ago, and Cilk++ is now available from Intel as a WhatIf product. Which means that it's free, but supported only is on a time-available basis.

After Cilk Arts was acquired by Intel, we migrated the functionality into the Intel C/C++ compiler. In the process, weremoved the concept of cilk linkage. So you can freely callbetween C/C++ functions and Cilk functions; the need to create acilk::context and callthe run method to transition into Cilk code is now gone. This makes things like templated functions work *MUCH* better!

In addition, we now support both C and C++; the Cilk Arts version only supported C++.

Since it's part of the Intel C/C++ compiler, Intel Cilk Plus is fully supported.

Finally, we just releasedsupport for Intel Cilk Plusas a branch of GCC 4.6.

- Barry

登陆并发表评论。