Problems with cilk++

Problems with cilk++

kickingf的头像

Hello,

I was downloading and testing the clik++ compiler. I am very exited about this, since the first results are showing good performance and a nice coding style too. Now I was moving further, porting my standard application to cilk++. At the beginning this is an octree, where I insert (a lot of) triangles. It took me a long time to find out, but now I ended up with a state, where running the code with g++ gives the correct results. Running the code with cilk++ (only changing the compiler, no cilk_for, or any other parallel stuff used) gives wrong results. If I switch off the optimization in cilk++ it again works (even with the parallel loops). The problem is, if I cannot use the optimization, this is very slow and it makes no sense to use it.

Are there some known compiler problems? How can I proceed, I would still love to do the cilk-typed coding, since this would simplyfy a lot.

best regards

Ferdinand

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

Hello again,

Just by accident I found the problem. It is not related to cilk++, but to the used version of the g++. I do not know exactly what is the reason, but I found a workarround. The method causing the trouble is a "findPoint" in an Octree, which is traversing the tree as long as the correct leave is found. Since I optimized this search by a startpoint, meaning, if I know that a point is near to the last found point, I take this leave as starting point for my search. So I go (in case) up the tree and then down the tree. This was implemented in two recursion, one going up the tree, one going down. This is NOT working within gcc-Version 4.2.4 (Cilk Arts) if I activate some optimization. I use 4.1,4.3 or 4.4 this works. To work arround, I implemented this now in one function, and it works.

best regards

Ferdinand

Stephen Lewin-berlin (Intel)的头像
Quoting - kickingf Hello again,

Just by accident I found the problem. It is not related to cilk++, but to the used version of the g++. I do not know exactly what is the reason, but I found a workarround. The method causing the trouble is a "findPoint" in an Octree, which is traversing the tree as long as the correct leave is found. Since I optimized this search by a startpoint, meaning, if I know that a point is near to the last found point, I take this leave as starting point for my search. So I go (in case) up the tree and then down the tree. This was implemented in two recursion, one going up the tree, one going down. This is NOT working within gcc-Version 4.2.4 (Cilk Arts) if I activate some optimization. I use 4.1,4.3 or 4.4 this works. To work arround, I implemented this now in one function, and it works.

best regards

Ferdinand

Ferdinand,


I'm glad you've resolved the problem. If you can share any numbers, I'll be interested in hearing more about your problem and the results you get using Cilk++ to parallelize the app. Steve

登陆并发表评论。