getting errors trying to parallelize my code
Hi, I am trying to test pluto to parallelize a piece of my code. I get syntax errors of this nature:
ajain@dwarf:~/pluto-0.11.4/examples/vi_alg$ ../../polycc cached_vi.c
--debug --parallel --tile
[Clan] Error: syntax error at line 395, column 25.
Error extracting polyhedra from source file: 'cached_vi.c'
The section of my code around which I have #pragma scop is as follows:
390 #pragma scop
391 for ( i = 0; i < state_cnt; i++ )
392 {
393 l_state = pp->variable_ordering[i];
394 delta = 0;
395 if ( (w->parts[l_part].states[l_state].Terminal != 1)
&& (w->parts[l_part].states[l_state].Terminal !=5) )
396 delta = value_update_iters( w, l_part, l_state );
397 part_internal_heat = fabs( delta ) > part_internal_heat
? fabs( delta ): part_internal_heat;
398 }
399 #pragma endscop
Error is reported is on line# 395. This code compiles perfectly otherwise and runs fine. Do I need to do something more other than the two pragmas for "scop" and "endscop" ?
I was able to run the examples provided along with pluto. Any pointers/help is appreciated.
From my experience, Pluto, which rely on a source level analyzer, cannot handle the definition (delta = 0) and function calls (value_update_iters( w, l_part, l_state )). Please only include something like 'c[tid][kk] += a[tid] * b_s[j][kk];' in the pragma.