subroutine swap_r(a,b) real(8), intent(inout) :: a,b real(8) :: dum dum=a a=b b=dum end subroutine swap_r