Problems with cilk++

Problems with cilk++

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 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

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

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

Deixar um comentário

Faça login para adicionar um comentário. Não é membro? Inscreva-se hoje mesmo!