Closed kronast closed 7 years ago
Which branch are you using? Please always report the output of ./polycc -v as well.
With the pet branch,
$ ./polycc -v PLUTO version 0.11.4-225-g598d464
$ ./polycc test/test9.c --lastwriter --pet -o kernel.out.c test/test9.c:2:3: error: expected identifier or '(' for (i = 1; i < N+1; i++) ^ test/test9.c:9:3: error: expected identifier or '(' for (i = 1; i < N+1; i++) ^ [pluto] No SCoPs extracted or error extracting SCoPs using pet
Note that with --pet, you need a valid C program as input as opposed to the SCoP snippet; without the --pet, just a SCoP portion will work fine.
Without --pet,
$ ./polycc test/test9.c --lastwriter -o kernel.out.c
[pluto] compute_deps (isl with lastwriter)
[pluto] Number of statements: 2
[pluto] Total number of loops: 6
[pluto] Number of deps: 14
[pluto] Maximum domain dimensionality: 3
[pluto] Number of parameters: 1
[pluto] Affine transformations [<iter coeff's>
T(S1): (i, j, k) loop types (loop, loop, loop)
T(S2): (i+1, j+1, k+1) loop types (loop, loop, loop)
[pluto] using Cloog -f/-l options: 1 3 [Pluto] Output written to kernel.out.c
[pluto] Timing statistics [pluto] SCoP extraction + dependence analysis time: 0.006503s [pluto] Auto-transformation time: 0.055939s [pluto] Code generation time: 0.015238s [pluto] Other/Misc time: 0.070019s [pluto] Total time: 0.147699s [pluto] All times: 0.006503 0.055939 0.015238 0.070019
Both outputs are along expected lines.
I am using the current head of the pet branch:
% git rev-parse HEAD
bb1dbc89e42d2653cb702250830e4d3602e7aa67
% polycc -v
PLUTO version 0.11.4-252-gbb1dbc8 - An automatic parallelizer and locality optimizer
Copyright (C) 2007--2015 Uday Bondhugula
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The complete C-file that triggers the problem can be found here: https://pastebin.com/XqGxX7J3
% polycc kernel.c --pet
[pluto] Number of statements: 2
[pluto] Total number of loops: 6
[pluto] Number of deps: 2
[pluto] Maximum domain dimensionality: 3
[pluto] Number of parameters: 0
.../polycc: line 54: 6104 Segmentation fault (core dumped) $pluto $*
Looks like we missed this issue. I'm able to reproduce this now, and it's due to a constraint explosion. You can work around t his by not using --pet; it works fine with the Clan frontend. But in general, addressing this requires an alternative scheme that we have as default in our internal git. We can push it here in another 3 days.
For the following SCoP a call to polycc (polycc kernel.c --lastwriter --pet -o kernel.out.c) results in a segmentation fault (output:
polycc: line 54: 26951 Segmentation fault
):