Now that you know about Ielts and Gre, let me answer your question!! As far as Ielts is concerned the scores are valid for two years and Gre scores are valid for 5years. So ideally you should take the test depending upon when you intend to take the admission to masters. So that your scores dont expire before that.
For eg.-if you are a b.tech. 2nd or 3rd yr student you should take GRE now as it is valid for 5yrs and should take Ielts in your final yr. So that even if you delay your admission plans by an year after your B.Tech, the scores are still valid.
GRE is a standardized test for admissions into a Masters Degree (except Business, Law and Medicine) and PhD courses in several universities in the US. The GRE revised General Test is accepted at thousands of graduate and business schools as well as departments and divisions within these schools.
The International English Language Testing System (IELTS) is designed to assess the language ability of candidates who need to study or work where English is the language of communication and instruction. It covers four basic language skills - listening, reading, writing and speaking.