Software Archive
Read-only legacy content
17061 Discussions

Problems using cilkprof

Tao_Schardl
Beginner
442 Views
Hello,

Per the instructions in the README's for cilkprof and libzca, I have downloaded and installed the latest version of pin, compiled libzca, and compiled cilkprof, all seemingly without errors. I have tried to run cilkprof several times in several different ways, sadly with no success. The most successful failed attempt produced the following message:
$CILKPROF_BB_OUT=fib.bb.csv CILKPROF_CC_OUT=fib.cc.csv 3rdparty/pintool/pin -t cilkutil/cilkprof/linux64/cilkprof.so -- ./fib 20
Read a bogus annotation. Exiting.
I have confirmed that my fib code does run correctly without cilkprof.
I am using the following version of icc:
$ icc -V
Intel C Intel 64 Compiler XE for applications running on Intel 64, Version 12.1.0.233 Build 20110811
Do you have any suggestions for things that might be going wrong?
Thank you,
TB
0 Kudos
8 Replies
Barry_T_Intel
Employee
442 Views

I'm not reproducing the problem, but I'm using a nightly build of 12.1 which is much newer. 12.1 Update 10 should now be released. Can you upgrade to a newer version?

Also, the error message being produced isn't helpful. It's produced in INS_of_ADDRINT in zca_table.cpp. Try replacing the fprintf statement with the following statement which might give us a clue:

    fprintf(stderr, "INS_of_ADDRINT: Failed to find address %p in routine %s. Exiting.\n",
             (void *)addr, LEVEL_PINCLIENT::RTN_Name(rtn).c_str());

Obviously since I'm not reproducing the problem, I can't verify that this will help, but at least it compiles...

One other thought. What was the command you used to compile your copy of fib? I'm getting odd results with:

icpc -o fib fib.cpp

The following seems to work correctly:

icpc -O0 -o fib fib.cpp

At this point I don't know why unoptimized code works correctly.

- Barry

0 Kudos
Tao_Schardl
Beginner
442 Views
I just tried upgrading to Update 10, but unfortunately that does not seem to have fixed the problem.
(There were some issues performing the upgrade on my system, but I believe it's working now. To confirm, here's the version number I see:
$ icc -V
Intel C Intel 64 Compiler XE for applications running on Intel 64, Version 12.1.4.319 Build 20120410
Copyright (C) 1985-2012 Intel Corporation. All rights reserved.)
I replaced the fprintf in zca_table.cpp and reran. Here is the error it produced.
INS_of_ADDRINT: Failed to find address 0x7f2b723d6d62 in routine _ZZ13cilk_for_rootImPFvPvmmEEvT0_S0_T_iENK14__cilk_spawn_5clEv. Exiting.
I seem to get the same error regardless of the optimization flags I set when compiling fib.
Thanks for your help,
TB
0 Kudos
Barry_T_Intel
Employee
442 Views
Thanks for verifying the fprintf. I'll check that in now. :o)

When I demangle the name, it's showing that the problem is with cilk_for_root, which is part of the Cilk runtime's support for cilk_for (in cilk-abi-cilk-for.cpp, if you've got the GCC sources or the version we've published). Is it correct to assume that you're using the version of libcilkrts.so.5 shipped with the Intel compiler? Either way, it means that how you compiled your application isn't likely to be the issue.

Also, I'm assuming that you're using a basic fib program, which doesn't have a cilk_for in it. Am I correct?

- Barry
0 Kudos
Tao_Schardl
Beginner
442 Views
I believe I am using the version of libcilkrts.so.5 shipped with the Intel compiler -- in particular the one shipped with Update 10 of Composer. I can give you the contents of LD_LIBRARY_PATH, in case that would help.
The fib code I'm testing is the standard fib code, which does not contain a cilk_for in it.
TB
0 Kudos
Barry_T_Intel
Employee
442 Views

I've reproduced it. It appears to be a difference between the version of PIN we're using (Rev. 43611) and the current version (Rev. 49306). You can try pulling down the old version from http://www.pintool.org/downloads.html

Meanwhile I'll try to track down the problem.

- Barry

0 Kudos
Tao_Schardl
Beginner
442 Views
Recompiling to use the older version of PIN fixes the problem.
Thank you again,
TB
0 Kudos
Barry_T_Intel
Employee
442 Views

FYI, this appears to be a PIN problem. I'm passing it on to the PIN developers.

- Barry

0 Kudos
Barry_T_Intel
Employee
442 Views

Build 171 of libzca and Cilkprof have been posted at thedownload page which should fix the problem with newer versions of PIN.

- Barry

0 Kudos
Reply