Modi was in Kyrgyz capital on Thursday and Friday to attend the SCO Summit, the first multilateral engagement post his re-election.
The meeting was keenly awaited as it was to take place amid an escalating face-off between Iran and the United States on Tehran's nuclear programme.
PM Modi did not meet Khan on the sidelines of the SCO summit, spurning Pakistan Prime Minister's suggestion for a bilateral meeting in Bishkek.
On the sidelines of the summit on Thursday, Modi held bilateral meetings with Chinese President Xi Jinping, Russian President Vladimir Putin and Afghan President Ashraf Ghani.
The pleasantries were "usual" in nature and were exchanged when the two Prime Ministers were in the Leaders' Lounge along with leaders of other SCO member countries as per the sources.
According to a schedule, Modi was to meet Rouhani at 3:35 PM (local time) but it was changed as the banquet for the Shanghai Cooperation Organisation (SCO) leaders got extended.
He stood briefly when his name was announced and then seated himself again before the other leaders, in a breach of protocol.
Pakistan is yet to take 'concrete action' on India’s concerns and create a terror-free atmosphere necessary to facilitate any engagement between the two sides, Modi had earlier told China.
Although Prime Minister of Pakistan Imran Khan was at the dinner, no pleasantries were exchanged between PM Modi and him.
According to sources, Khan and Modi did not exchange pleasantries during the dinner hosted on the sidelines of the two-day summit.
Modi had met Chinese President Xi Jinping, Russian President Vladimir Putin and Afghanistan President Ashraf Ghani here on Thursday.
In a video shared on PTI's Twitter handle, Khan is seen seating while everyone else stood to welcome the head of states entering the hall.
It will be an informal summit in India later this year but the date and venue of the summit is yet to be decided.
This is the first meeting between the two leaders after Modi's re-election following the stunning victory of the BJP in the general elections last month.
PM Modi, in a statement before his two-day visit to Bishkek from June 13-14 said that he also plans to meet several leaders, including Russian President Vladimir Putin.