Although it is not mandatory for the spouses to stay separately, they are advised to stay separately for more than 2 years.  Especially, for single petition, this will amount towards 'proof of irretrievable breakdown' of marriage.