Role of fluids in petrogenesis