Thermocapillary flow driven by an unbalanced surface tension plays the most important role for mass and heat transport in floating zone melt crystal growth under microgravity. The authors develop both a serial and a parallel codes with lattice Bhatnagar-Gross-Krook(BGK) model using two distribution functions, and numerically study the thermocapillary flow in a two dimensional square cavity with a single free surface under microgravity condition. The serial code is developed by combining collision and propagation step, using a temporary array to continuously read distribution functions, and its performance is improved two times faster than the code with separating the collision and propagation step. The MPI parallel code is proposed utilizing one dimensional partitioning and non-blocking communication. The accurate and reliable results are achieved with both the serial and parallel codes by comparing with CFD results simulated by the finite volume method; the MPI parallel code has high performance.