Parallel-Tempering Cluster Algorithm For Computer Simulations of Critical Phenomena

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Parallel-tempering cluster algorithm for computer simulations of critical phenomena

Elmar Bittner1, 2, and Wolfhard Janke1,


1

Institut fr Theoretische Physik and Centre for Theoretical Sciences (NTZ) Universitt Leipzig, u a Postfach 100 920, D-04009 Leipzig, Germany 2 Institut fr Theoretische Physik Universitt Heidelberg, u a Philosophenweg 16, D-69120 Heidelberg, Germany (Dated: July 29, 2011)

arXiv:1107.5640v1 [cond-mat.stat-mech] 28 Jul 2011

In nite-size scaling analyses of Monte Carlo simulations of second-order phase transitions one often needs an extended temperature range around the critical point. By combining the parallel tempering algorithm with cluster updates and an adaptive routine to nd the temperature window of interest, we introduce a exible and powerful method for systematic investigations of critical phenomena. As a result, we gain one to two orders of magnitude in the performance for 2D and 3D Ising models in comparison with the recently proposed Wang-Landau recursion for cluster algorithms based on the multibondic algorithm, which is already a great improvement over the standard multicanonical variant.
PACS numbers: 05.10.Ln,02.70.Uu,64.60.Cn

I.

INTRODUCTION

While much attention has been paid in the past to simulations of rst-order phase transitions and systems with rugged free-energy landscapes in generalized ensembles (umbrella, multicanonical, Wang-Landau, parallel/simulated tempering sampling) [1], the merits of this non-Boltzmann sampling approach also for simulation studies of critical phenomena have been pointed out only recently. In Ref. [2], Berg and one of the authors combined multibondic sampling [3] with the Wang-Landau recursion [4] to cover the complete desired critical temperature window in a single simulation for each lattice size, where the desired range derives from a careful nite-size scaling (FSS) analysis of all relevant observables. Recent developments in the eld of Graphic Processing Units (GPUs) make it possible to have access to a massively parallel computing solution at a low cost. To use these devices in a most ecient way new parallelized algorithms are needed. Our parallel tempering cluster algorithm is a combination of replica-exchange methods [5] with the Swendsen-Wang cluster algorithm [6] and is therefore predestinated for use in such devices.

reasonable temperature interval. We choose the number of replica Nrep such that the acceptance rate A(1 2) between adjacent replica is about 50%, which can be calculated from A(1 2) =
E1 ,E2

P1 (E1 )P2 (E2 )PPT (E1 , 1 E2 , 2 ),

(1) where Pi (Ei ) is the probability for replica i at inverse temperature i to have energy Ei and PPT (E1 , 1 E2 , 2 ) = min[1, exp(E)] (2)

II.

PARALLEL-TEMPERING CLUSTER ALGORITHM

For the parallel-tempering procedure of the combined algorithm we use a set of Nrep replica, where the number of replica depends on the desired range that is needed for the FSS analysis [7]. To determine this range we perform at the beginning of our simulations a short run in a

Electronic Electronic

address: [email protected] address: [email protected]

with = 2 1 , E = E2 E1 is the probability to accept a proposed exchange of dierent, usually adjacent replica. This choice of A(1 2) ensures that the multi-histogram reweighting [8] works properly and the ow in (inverse) temperature space, that is, the rate of round trips between low and high temperatures is optimal [7]. This is the main dierence to our preliminary note [9], where we used histogram overlaps instead. Using the data of this short run as input for the multi-histogram reweighting routine, we determine the max pseudo-critical points C max = C(C ) of the specic 2 2 2 heat C() = V ( e e ) and max of the susceptibility () = V ( m2 |m| 2 ), where e = E/V is the energy density, m = M/V the magnetization density, and V = Ld the size of the system. Furthermore, we measured the maxima of the slopes of the magnetic cumulants, U2k () = 1 m2k /3 |m|k 2 (k = 1, 2), and of the derivatives of the magnetization, d |m| /d, d ln |m|k /d (k = 1, 2), respectively. We also include the rst structure factor Sk1 (see, e.g., Ref. [10]) in our measurement scheme to allow a direct comparison with the results of Ref. [2]. Next we determine values where the observables +/ S = {C, , . . . } reach the value S(S ) = rS max with +/ values satisr 1. This leads to a sequence of S + max max fying S S , and S S as illustrated for the two-dimensional (2D) Ising model in Fig. 1. The actual

2
III. RESULTS


A. 2D Ising model

FIG. 1: (Color online) Reweighted observables for the 2D Ising model with L = 8. The symbols mark the maximum +/ values S max and the value S(S ) = rS max with r = 2/3.

simulation range is then given by the largest interval cov+/ ered by these S values, i.e., for the example in Fig. 1 + the desired simulation window would be [Sk , C ].
1

In practice we start by estimating for a very small system a reasonable (inverse) temperature interval [ , + ] and the number of replica Nrep by trial and error. For successively larger systems we use the measured temperature interval and Nrep of the next smaller system as input parameters. The work ow of our method is then given by the following general recipe: 1. compute the simulation temperatures of the replica equidistant in , 2. perform several hundred thermalization sweeps and a short measurement run, 3. check the histogram overlap between adjacent replica: if the overlap is too small (< 10%), add a further replica and go back to step 1, else go on, 4. use multi-histogram reweighting to determine + S and S for all observables S, leading + to the temperature interval [min , max ] = + [minS {S }, maxS {S }],
5. start with = min and compute a sequence of temperatures i with xed acceptance rate A(1 + 2) until i = + max ,

Applying this recipe to the 2D Ising model, our computer program simulated system sizes from L = 8 up to L = 1024 fully automatically. This shows how robust our new method is. Table I gives an overview of the resulting temperature intervals and the numbers of replica needed when for comparison with Ref. [2] r = 2/3 is used. Due to the acceptance rate criterion in step 5 of our iterative procedure, the upper bounds + of the temperature intervals + slightly overshoot max and show relatively large uctuations. With increasing system sizes this discretization eect becomes less pronounced, see Fig. 2 where we compare the automatically determined interval of our algo + rithm with the exact temperature interval [C , C ] using the specic-heat formula of Ferdinand and Fisher [11]. To assess the performance of the method, we measured the integrated autocorrelation times int (i , L) and determined the maximum over all replica, int (L) = maxi=1,Nrep int (i , L), for each lattice size. By tting the critical slowing down ansatz int (L) Lz to the data, we nd for e, m2 , and Sk1 rather small dynamical critical exponents z = 0.19(1), z = 0.11(1), and z = 0.01(1), respectively. As an example, we compare in Fig. 3 our data for int,E (L) of the energy with the results of Ref. [2]. Of course, in our case the computational eort depends linearly on the number of replica needed. We therefore also show the eective autocorrelation time e = Nrep int , which enables a fair comparison in units of lattice sweeps. We see that for L > 100, our e is more than one order of magnitude smaller than using the recently proposed multibondic Wang-Landau method [2]. For r = 2/3, Nrep grows with increasing lattice size Lz with z 0.18 (cf. Table I). Consequently, e Lzeff with ze = z + z . For the energy this gives ze 0.37, which is still much smaller than the exponent z 1.04 found in Ref. [2], so that the gain in eciency becomes more and more

TABLE I: Simulation windows and numbers of replica (see text) for the 2D Ising model simulations with r = 2/3 on L2 lattices. L 8 16 32 64 128 256 512 1024
= Sk
1

+ + max = C

Nrep Nrep

6. perform several thousand thermalization sweeps and a long measurement run.

0.191 636 0.489 877 0.565 730 0.320 580 0.470 826 0.471 618 0.380 475 0.460 499 0.471 780 0.410 832 0.452 619 0.457 003 0.425 789 0.448 345 0.449 188 0.433 267 0.446 069 0.446 392 0.437 042 0.443 171 0.443 674 0.438 854 0.442 400 0.442 464 c = ln(1 + 2)/2 = 0.440 686 7935 . . .

7 7 9 10 11 13 14 16

6 7 7 8 8 9 10 10

FIG. 2: (Color online) The desired temperature interval for r = 2/3 as a function of the system size. The horizontal line indicates the critical inverse temperature c , the other lines show exact results derived from Ref. [11]. The circles indicate the simulation windows determined fully automatically, cf. Table I, and the boxes show for completeness the measured + max values for C , C and C .

FIG. 4: (Color online) FSS of the desired simulation window for the 2D Ising model with r = 2/3.

100 compared with Ref. [2]. On the other hand, for r < 2/3, the desired simulation window (and hence also Nrep ) becomes larger, and the eective autocorrelation time e grows faster with system size. For example for r = 1/2, we nd z 0.32. With z = 0.23(1) this leads to ze = 0.55(2) for the energy and similar results for m2 and Sk1 . In order to understand the FSS of e theoretically, we have to recall that the 2D Ising model is a particular case due to its logarithmic divergence of the specic heat C (with critical exponent = 0). First, this leads to a logarithmic correction in the FSS of the reweighting range, rew L1/ / ln L. Second, when C is included in the desired quantities, it (empirically) determines + + the upper bound max = C , which then does not scale generically with L1/ but with Lr/ [12]. For the de+ sired range + C Sk = aL1/ +bLr/ , this
1

FIG. 3: (Color online) Autocorrelation times int and e for the energy of the 2D Ising model, where e = Nrep int with Nrep denoting the number of replica, cf. Table I.

pronounced with increasing lattice size. The choice r = 2/3 of Ref. [2] is quite conservative as even for r = 1 the peaks determining the left and right boundary of the desired simulation window are usually suciently well sampled. This amounts to a somewhat smaller temperature range and repeating the above procedure with r = 1, we arrive at a smaller ze = z = 0.27, see Fig. 3. Here ze = z because the integer valued Nrep turn out be so small (3 for L = 8, 16 and 4 for 32 L 1024) that they practically stay constant over a wide range of system sizes. For large L, this leads to a signicant gain, and also for the moderate system sizes of Fig. 3, e is already reduced by a factor of about 3 compared with the case of r = 2/3 and a factor of about

+ and C c L0.69 do scale as expected, the asymptotically leading term starts to dominate only at around L = 1000 L with a/b = 10, which implies Nrep L0.06 ln L for L < 1000. Since in this range to a very good approximation ln L L0.11 (which can be easily veried directly), this eectively leads to Nrep L0.17 , in good agreement with our direct estimate z 0.18. For r = 1/2, L1 and Lr = L1/2 dier more strongly and we observe the crossover in the FSS of + already at about L = 150 L with a/b = 12, yielding here + L0.80 and hence Nrep L0.20 ln L L0.31 , again as tted directly. Only for r = 1, + L1/

shows that Lr/ is asymptotically the leading term for r < 1, so that Nrep = ( + )/rew L(1r)/ ln L for L > L = (a/b)/(1r) . However, as Fig. 4 demon strates for r = 2/3, this is not observed for practically accessible lattice sizes: Instead of L2/3 (with = 1) we observe + L with = 0.94. The reason is the very slow crossover from subleading to leading scal ing behavior. In fact, whereas both c Sk L1.01
1

4 and Nrep ln L, which as explained above is hardly visible for small (integer) values of Nrep . If one omits C as a criterion to specify the desired FSS window, both the upper bound + and + scale L1/ for any value of r, so that Nrep ln L, see the last column in Table I for the case r = 2/3. If the simulation window is now too narrow to determine the critical exponent directly, one still can use the hyperscaling relation = 2 d with d the dimensionality. Whereas the bare dynamical critical exponents z do not dier much, due to the smaller number of replica needed, e = Nrep int is slightly smaller than in the case including C. If one again simply ts a power law to both int and e (i.e., ignores the logarithmic behavior of Nrep ), one nds excellent ts with z = 0.20(1) and ze = 0.31(1) = z + 0.11 for the energy (z = 0.11(1), ze = 0.22(1) for m2 and z = 0.03(1), ze = 0.13(1) for Sk1 ), conrming that eectively ln L L0.11 for moderately large L < 1000.
B. 3D Ising model

FIG. 5: (Color online) Same as Fig. 3 for the 3D Ising model, cf. Table II.

In the 3D Ising model where 0.11 > 0, both the reweighting range and the desired temperature window should scale with L1/ , so that one would expect that our routine will use the same number of replica for all system sizes. This is indeed the case for the simplest choice r = 1, where our routine determines for all lattice sizes Nrep = 4. The autocorrelation analysis along the same lines as in 2D gives z = ze = 0.62(2) for the energy

TABLE II: Simulation windows and numbers of replica for the 3D Ising model simulations with r = 2/3 on L3 lattices.
L = Sk
1

+ C

+ 0.311 321 0.272 522 0.259 229 0.252 136 0.243 106 0.236 773 0.233 621 0.233 016 0.230 301 0.229 293 0.228 613 0.228 025 0.226 754 0.225 555 0.224 775 0.224 435 0.224 347 [13])

Nrep 7 8 9 10 10 11 12 14 14 15 16 17 18 18 18 19 21

4 6 8 10 12 16 20 24 28 32 36 40 48 56 64 72 80

0.061 955 0.284 066 0.142 959 0.259 876 0.173 712 0.252 866 0.188 447 0.246 916 0.197 404 0.241 159 0.206 422 0.236 610 0.211 183 0.233 407 0.213 807 0.232 462 0.215 553 0.229 853 0.216 670 0.229 221 0.217 572 0.228 026 0.218 172 0.227 703 0.219 082 0.226 669 0.219 621 0.225 353 0.220 031 0.224 758 0.220 309 0.224 359 0.220 505 0.224 331 c 0.221 654 59 (Ref.

(z = ze = 0.59(2) for m2 and z = ze = 0.37(2) for Sk1 ). This exponent is thus again much smaller than z 1.05 obtained in Ref. [2], and already for moderate system sizes L 40 80 the values of e are about 20 30 times smaller, cf. Fig. 5. If we choose r = 2/3 as in Ref. [2], however, we nd also here a weak system-size dependence Nrep L0.36 , cf. Table II where also the automatically determined temperature intervals are given. Here we obtain z = 0.44(1) and thus ze = 0.80(1) for the energy, cf. Fig. 5 (z = 0.41(1), ze = 0.78(1) for m2 and z = 0.18(2), ze = 0.55(2) for Sk1 ). The reason for this unexpected result can be + traced back to the fact that the upper boundary C of the desired simulation window, determined by the lowtemperature tail of C, lies for r = 2/3 clearly outside the FSS region. In fact, omitting C as a criterion for the FSS window, Nrep = 7 9 stays almost constant. The choice r < 1 is thus less favorable, but even for r = 2/3 one gains about one order of magnitude in computing time compared with Ref. [2].

IV.

CONCLUSIONS

To summarize, we have introduced a very exible and simple approach for a systematic determination and simulation of the critical temperature window of interest for second-order phase transitions, which one needs for an accurate estimation of critical exponents and other quantities characterizing critical phenomena. The eciency of the method depends of course on the chosen or available update scheme in the particular case, with non-local cluster ips being the favorable choice. Since the setup of our method is completely general and can be combined also with any other update scheme (multigrid, worms, Metropolis, heat-bath, Glauber, . . . ), it could be employed for all simulations in statistical physics, chemistry and biology, high-energy physics and quantum eld theory where one is interested in critical phenomena.

5
ACKNOWLEDGMENTS

Work supported by the Deutsche Forschungsgemeinschaft (DFG) under grant Nos. JA483/22-1/2 and 231/2, the EU RTN Network ENRAGE Random Ge-

ometry and Random Matrices: From Quantum Gravity to Econophysics under grant No. MRTN-CT-2004005616, and by the computer-time grant No. hlz10 of NIC, Forschungszentrum J lich. u

[1] W. Janke (Ed.), Rugged Free Energy Landscapes: Common Computational Approaches to Spin Glasses, Structural Glasses and Biological Macromolecules, Lect. Notes Phys. 736 (Springer, Berlin, 2008). [2] B.A. Berg and W. Janke, Phys. Rev. Lett. 98, 040602 (2007). [3] W. Janke and S. Kappler, Phys. Rev. Lett. 74, 212 (1995). [4] F. Wang and D.P. Landau, Phys. Rev. Lett. 86, 2050 (2001). [5] K. Hukushima and K. Nemoto, J. Phys. Soc. Jpn. 65, 1604 (1996). [6] R.H. Swendsen and J.-S. Wang, Phys. Rev. Lett. 58, 86 (1987).

[7] E. Bittner, A. Nubaumer, and W. Janke, Phys. Rev. Lett. 101, 130603 (2008). [8] A.M. Ferrenberg and R.H. Swendsen, Phys. Rev. Lett. 63, 1195 (1989). [9] E. Bittner and W. Janke, PoS (LAT2009) 042. [10] H.E. Stanley, Introduction to Phase Transitions and Critical Phenomena (Clarendon Press, Oxford, 1971), p. 98. [11] A.E. Ferdinand and M.E. Fisher, Phys. Rev. 185, 832 (1969). [12] B.A. Berg and W. Janke, Comp. Phys. Comm. 179, 21 (2008). [13] H. W. J. Blte, L. N. Shchur, and A. L. Talapov, Int. J. o Mod. Phys. C 10, 1137 (1999).

You might also like