Structural mean models (SMMs) have been proposed for estimating causal treatment effects in the presence of non-ignorable non-compliance in clinical trials. To obtain a valid causal estimate, we must impose several assumptions. One of these is the correct specification of the parametric part of the SMMs. Model checking is an important task for data analysts to detect any departure of an assumed model from the true one. However, little work has been done on the goodness-of-fit (GOF) test for the SMMs. In this article, we propose a global GOF test of SMMs. Numerical studies show the proposed test can control type I errors if the SMM is correctly specified. Furthermore, the proposed test detects non-linear effect modification of continuous covariates powerfully, while an existing test does not. We apply the proposed method to data derived from a randomized trial to evaluate the impact of a primary care-based intervention on depression.