Prime minister Narendra Modi expressed condolences over the deaths caused by a stampede and Railway Minister ordered an inquiry into the matter.