I was able to create a routable grid based network table with gid, source, target, cost columns. I used pgr_create_topology function for this purpose. I use this map to apply the pgrouting algorithms and works perfectly fine.
The worldmap I have used has the boundaries [-180,180] and [-90,90]...