The problem of controlling the hydrothermal waves in a thermocapillary flow is addressed using a gradient-based control strategy. The state equations are the two-dimensional unsteady incompressible Navier–Stokes and energy equations under the Boussinesq approximation. The modeled problem is the ‘open boat’ process of crystal growth, the flow which is driven by Marangoni and buoyancy effects. The control is a spatially and temporally varying heat flux boundary condition at the free surface. The control that minimizes the hydrothermal waves is found using a conjugate gradient method, where the gradient of the objective function with respect to the control variables is obtained from solving a set of adjoint equations. The effectiveness of choices of the parameters governing the control algorithm is examined. Almost complete suppression of the hydrothermal waves is obtained for certain choices of the parameters governing the control algorithm. The numerical issues involved with finding the control using the optimizer are discussed, and the features of the resulting control are analyzed with the goal of understanding how it affects the flow.Copyright © 2012 John Wiley & Sons, Ltd.