writing a program with cilk

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.

Also i saw that i need to be extra careful with exceptions and cilk.In case that i want to use exceptions in my program should i include the exception code from the beggining is the serial program or write them with cilk.

I hope i was clear enough.Im asking because i dont want to start writing code and end up with an ill program and have to start all over again.

Thanks

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

The Intel Cilk Plus documentation for the Intel Composer C/C++ compiler applies to both the Intel and GCC implementations. The chaptertitledConvert a C++ Program lays it out pretty plainly:

  1. Start with a correct serial implementation.
  2. Identify regions to be parallelized. Typically you'll use a program like VTune/Amplifier or other profiling tool to find them.
  3. Add the Intel Cilk Plus keywords.
  4. Run the parallelized program to test for correctness.
  5. Correct any race condititions. The Cilkscreen race detector can help you find them, or you can use other tools like VTune/Amplifier.

And I'll add: Use the Cilkview scalability analyzer to see how well your application will scale as the number of processors increases.

- Barry

Leave a Comment

Please sign in to add a comment. Not a member? Join today