Pressure-induced changes in the magnetic and magnetocaloric properties ofRMn2Ge2(R=Sm,Gd)