Intel® Cilk™ Plus

general questions

Is there a way to get the serial elision of the Cilk c program? This was a nice option in Cilk Arts.

When and why do you underscore precedingcilk_spawn and cilk_for in Intel Cilk ? It seems that it is rare but at times the statements listed above must be precded by an underscore.

Any help appreciated.

Newport_j

segmentation fault with simple cilk_for loop (gcc cilkplus branch)

Using the gcc cilkplus branch, I consistently get a segmentation fault for a very simple example with a cilk_for loop:

#include

void do_work(int i)
{ }

int main(int argc, char* argv[])
{
int n = 10;

cilk_for(int i = 0; i != n; ++i)
{
do_work(i);
}
}

but if I add a dummy cilk_spawn/cilk_sync to that example, it starts to work as expected:

#include

void dummy()
{ }

void do_work(int i)
{ }

declaration error

Igot the following error mesage when I compiled my code with icc.

InitializeScenarioData.c (192) error: Cilk_for initilization must be a declaration

cilk_for ( j = 0; j < (*Env).nz_SSP[i]; j+1 ) {
^

I declared j as an integer. I also am using i (also declared as an integer) it is initialized and declared. Why am I getting this error?

Thanx in advance.

Newport_j

cannot find main?

Istarted to cilkify my program with an error serial program. I took the line that said

int main()

and changed it to

int cilk_main()

I also aded the include file

cilk.h this way

include

Iadded the line at the bottom of my include file list for the main function. I am not sure why I must precede it by

cilk/

,but I did.

I then got the error

ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crtl1.o(.debug_info): relocation 0 has invalid symbol index 12

several more lines similar

cilkscreen and cilkview not found

I finally got my application to compile with icc, not just gcc. However, when I went to check it withprograms like cilkscreen and cilkview it says cilkscreen and cilkview not found.

I tried the Ubuntu file search and I did not find any files with cilkscreen or cilkview as root. I beleive that it must be a path problem, but I do not know where cilkscreen and cilkview files are located. Can you please tell me where?

Thanks in advance.

Newport_j

newbie: Cilk versus TBB

I'm looking forward to using the SIMD vectorization language extension in Cilk within a frame work that is (already) using TBB for threading.
Are there any conflicts between Cilk and TBB, even if I'm not planning to use any of the parallel programming constructs of Cilk?
Is using Cilk to heavy handed to just get the SIMD vectorization extensions?

Thanks.

icc math.h file not being found

Iam having trouble with the icc math.h file and compiling with icc. It seems not to be able to find the math.h file and creates errors as shown.

I used the command

./test1.sh 1> out.txt 2> err46.txt.

I also used the -H compiler command and it seems to be pulling the math.h file in, but stillI am getting errors as shown in err46.txt.

At one point I actually put the Intel icc version of math.h in the same directory as test3.c and it still did not find it.

I need help on this one. Why can it not find my math.h file.

use of math.h

I am assuming that when you compile with icc you must use the icc equivalent include file. There seems to be onlyone that hasthe samename

math.h

now which should I use. The gcc one or the icc one? I would think that I should use the icc one.

Any help appreciated.

Newport_j

replacing stdio.h

If a programmer removes stdio.h in source code that he compiles with icc, then how is

FILE *fid

fprintfid,"FREQ = ");

handled? we obviuosly want to print this into a file not to the screen, but by removing

stdio.h we cannot do it.

Again, theis works fine in gcc, not so fine in icc.

Any help appreciated.

Newport_j

Problem of multiple definition of fake_mutex

Hello,

I call the header file on my header file test.h to lock and unlock sections of code.
And in the file write.cpp, i need to lock and unlock sections of code too. so, i call the test.h file which call the fake_mutex.h.

but when compiling, i have the error of multiple definition `cilkscreen::create_fake_mutex()' as following :

...: In function `cilkscreen::create_fake_mutex()':
...: multiple definition of `cilkscreen::create_fake_mutex()'
...:/home/amina/projet/cilkplus-install/include/cilktools/fake_mutex.h:79: first defined here
....

Pages

Subscribe to Intel® Cilk™ Plus