Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting errors trying to parallelize my code #77

Open
jainanuj opened this issue Jun 15, 2020 · 1 comment
Open

getting errors trying to parallelize my code #77

jainanuj opened this issue Jun 15, 2020 · 1 comment

Comments

@jainanuj
Copy link

jainanuj commented Jun 15, 2020

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.

@drcut
Copy link

drcut commented Dec 8, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants