A vectorized algorithm for cluster formation in the Swendsen-Wang dynamics

Abstract We present a vectorized implementation of the Swendsen-Wang (SW) dynamics, which is one of the promising methods to simulate large systems near criticality. Formation of spin clusters, the most time consuming step in the SW dynamics, is efficiently vectorized by the help of the “union-find algorithm”. Efficiency was measured for the two-dimensional q-state Potts models on the HITAC-S820/80 vector computer. We achieved a speed of 2.4 million spin updates per second which is faster by one order than that of scalar algorithms. This implementation can be effective on many other vector machines and is also easily applicable to simulations on parallel machines.