camfort icon indicating copy to clipboard operation
camfort copied to clipboard

stencils-check ignoring grouped stencils

Open GuiltyDolphin opened this issue 7 years ago • 1 comments

For example, with the file failing.f90:

program failing
implicit none

integer i, n
parameter (n = 3)
real a(0:n)

do i = 0, n
 != stencil readOnce, atMost, (pointed(dim=1)) :: a
 != stencil readOnce, atMost, (forward(depth=4, dim=1)) :: a
 a(i) = a(i) + a(i+4)
end do

end program

Running camfort stencils-check failing.f90 we get:

Checking stencil specs for 'failing.f90'

failing.f90
(9:2)-(9:51)    Not well specified.
        Specification is:
                stencil readOnce, atMost, (pointed(dim=1)) :: a

        but at (11:2)-(11:21) the code behaves as
                stencil readOnce, atLeast, (pointed(dim=1)) :: a
stencil readOnce, atMost, (forward(depth=4, dim=1)) :: a

(10:2)-(10:60)    Correct.

Which ignores the fact the stencils are grouped, and if the user were to insert the suggested stencils they would end up with redundant stencils.

GuiltyDolphin avatar Jul 04 '17 09:07 GuiltyDolphin

Yeah, but this should be very low priority in list of things to do.

madgen avatar Jul 05 '17 01:07 madgen