Subgrid in compilation