No, the 2-3 months need not be contiguous as long as your have the approval of your mentor. Many projects need the continuity of back-to-back months (e.g., in the basic sciences), but not all do.