devito icon indicating copy to clipboard operation
devito copied to clipboard

wrong GPts/s in artificial corner case with multiple overlapping SubDimensions

Open FabioLuporini opened this issue 3 years ago • 0 comments

The following will produce a wrong value for points (and eventually will produce a wrong local per-section GPts/s)

      from devito import *
       
      grid = Grid(shape=(20, 20)) 
        x, y = grid.dimensions
        t = grid.stepping_dim
        thickness = 4
        u = TimeFunction(name='u', save=None, grid=grid, space_order=0, time_order=1)
        v = TimeFunction(name='v', save=None, grid=grid, space_order=0, time_order=1)
        xi = SubDimension.middle(name='xi', parent=x,
                                 thickness_left=thickness, thickness_right=thickness)
        xi2 = SubDimension.middle(name='xi2', parent=x,
                                 thickness_left=thickness, thickness_right=thickness)
        yi = SubDimension.middle(name='yi', parent=y,
                                 thickness_left=thickness, thickness_right=thickness)
        t_in_centre = Eq(u[t+1, xi, yi], 1)
        t2_in_centre = Eq(v[t+1, xi2, yi], u[t+1, xi2+1, yi])
        op = Operator([t_in_centre, t2_in_centre], opt=('advanced', {'blockinner': True}))

this is due to using set rather than (much) more complex calculations (eg distinguishing between different types of Dimensions etc) in Profiler._analyze when the points are calculated

FabioLuporini avatar Jan 13 '21 11:01 FabioLuporini