Coding active partition search in Stage1.