We study the evolution of the star formation rate function (SFRF) of massive (M★ > 1010 M⊙) galaxies over the 0.4 < z < 1.8 redshift range and its implications for our understanding of the physical processes responsible for galaxy evolution. We use multiwavelength observations included in the Great Observatories Origins Deep Survey-Multiwavelength Southern Infrared Catalog (GOODS-MUSIC) catalogue, which provides a suitable coverage of the spectral region from 0.3 to 24 m and either spectroscopic or photometric redshifts for each object. Individual SFRs have been obtained by combining ultraviolet and 24-m observations, when the latter were available. For all other sources a ‘spectral energy distribution (SED) fitting’ SFR estimate has been considered. We then define a stellar mass limited sample, complete in the M★ > 1010 M⊙ range and determine the SFRF using the 1/Vmax algorithm. We thus define simulated galaxy catalogues based on the predictions of three different state-of-the-art semi-analytical models (SAMs) of galaxy formation and evolution, and compare them with the observed SFRF. We show that the theoretical SFRFs are well described by a double power law functional form and its redshift evolution is approximated with high accuracy by a pure evolution of the typical SFR (SFR★). We find good agreement between model predictions and the high-SFR end of the SFRF, when the observational errors on the SFR are taken into account. However, the observational SFRF is characterized by a double-peaked structure, which is absent in its theoretical counterparts. At z > 1.0 the observed SFRF shows a relevant density evolution, which is not reproduced by SAMs, due to the well-known overprediction of intermediate-mass galaxies at z∼ 2. SAMs are thus able to reproduce the most intense SFR events observed in the GOODS-MUSIC sample and their redshift distribution. At the same time, the agreement at the low-SFR end is poor: all models overpredict the space density of SFR ∼ 1 M⊙ yr−1 and no model reproduces the double-peaked shape of the observational SFRF. If confirmed by deeper infrared observations, this discrepancy will provide a key constraint on theoretical modelling of star formation and stellar feedback.