As millions of people tried to cross the border between India and Pakistan, communal riots broke out in several parts of the country.