Intel® Cilk™ Plus

Implicit cilk_sync before try-block does not seem to work

Hi, i wanted to implement an example from the Cilk Plus User Guide: Page 37, Exception Handling, where they show, how the implicit sync in front of a try-block could limit the parallelism of the program. My code is as follows:

void mysleep(int a) {

        sleep(a);

}
int main(int argc, char ** argv) {

        cilk_spawn mysleep(5);

        try {

                cilk_spawn mysleep(5);

                mysleep(5);

        }
        catch(int err) {

        }

}

wierd behaviour of cilk_for keyword

I am writting code in C90 and using cilkplus. I use a library which define TRY, CATCH macros to simulate the try catch behaviour similar to C++. Now the following piece of code compiles and runs as expected:

int j ;
for ( j=0; j<some_constant; ++j)
{
TRY {
//some code which throws exception
} CATCH(SQLException) {
//some action.
}
END_TRY;
}

but when the same code is run wth cilk_for keword, I get compile error
The code:

VS2010 installation problem

Hello,I have recently installed VS2010 and Intel Parallel Studio XE. I have been trying to use the ArrayNotation example from the Intel website.I am unable to resolve the following error: "ERROR: identifier __assume_aligned is undefined"I'm sure there is something basic I need to due, but I have been unable to sort it out.Additionally, the array notation in the code is showing up as red underline as if it isn't recognized syntax - How can I resolve this.Any help would be greatly apprciated, I have been pulling my hair out.Regards,Brad

writing a program with cilk

Hello all

I want to move from tests with cilk to an actual program .I would like from someone who has worked in a program with cilk just to explain the procedure( steps ) to follow in order to end up with a cilk program.

What i want to say is in what phase of my program should i import cilk.Should i finish it first as a serial program see that everything is working as expected or should import cilk before the serial program is ready.

array notation with no results

Hello all

Im trying to use array notation in my code but i dont see any kind of improvment.
It takes the same ammount of time to do the same work in parallel and in serial.
And even though i have 4 workers the parallel coderuns with only one worker in one core.

These are the warnings it gives me
cc1plus: warning: label if_stmt_label_00001 defined but not used [-Wunused-label]
cc1plus: warning: label body_label_00001 defined but not used [-Wunused-label]
cc1plus: warning: label exit_label_00001 defined but not used [-Wunused-label]

cilkplus limitations?

Hello
Im using this piece of code in my program just to check time differences bettween the serial program and parallel by changing the CILK_NWORKERS

  1. void doSomething() { int k = 10000000; while( --k ); }
  2. cilk_for( int i = 0 ; i < 1000 ; i++ )
  3. doSomething();

No matter what is the value of CILK_NWORKERS( 4, 8, 16 ) half of the times the program runs correctly and half of the times gives this error.
/cilkplus/libcilkrts/runtime/local_state.c:42: cilk assertion failed: fcn
Aborted (core dumped)

or seg fault

cilk plus tutorials and source code

Hello all

I would like to ask if there are any good tutorials about cilk plus to start with and any kind of source code to use as example.
I managed to find some pdfs but since i dont know much about cilk i would like to start from the beggining.

Anyone who has anything fro share please give a link.
Thanks a lot

Seiten

Intel® Cilk™ Plus abonnieren