In this paper, the optical force exerted on a dielectric and a plasmonic nanowire with a circular cross-section of sub-micrometer radius anw is numerically calculated using the Muller boundary integral equations and the Minkowski electromagnetic stress tensor. A Complex Point Source (CPS) of micrometer lateral size b is used as the incident light in the visible spectral range. Computations show that the optical force acting on the dielectric nanowire is always smaller than that on the plasmonic one under the same conditions which originates from the excitation of surface plasmon waves. Calculations also reveal that the optical force in both nanowires has an oscillatory dependence on λ but there are sharp peaks for the dielectric nanowire due to the excitation of whispering gallery modes. In the plasmonic wire, however, the force angle is positive for all of the studied wavelengths but for the dielectric wire it is negative. This means that, the optical force in the plasmonic nanowire is mainly scattering-dominated but for dielectric one it is gradient-dominated.