Reference to other published version of this program: CPC 39 versity of Belfast, N. ... Computer: CDC CYBER 205 (Model 682); Installation: correlation ..... 101-IS. IRAH-IS. IVL-ISAI. 0023. 00036. NVO~l. 0/37. C. 0024. 00037. N6~i. 0)34. C.
Computer Physics Communications 42 (1986) 191—196 North-Holland, Amsterdam
191
VECTORIZATION OF THE THREE-DIMENSIONAL ISING MODEL PROGRAM ON THE CDC CYBER 205 Michael CREUTZ Department of Physics, Brookhaven National Laboratoty, Upton, NY 11973, USA
K.J.M. MORIARTY
*
Consortium for Scientific Computing, Inc., John Von Neumann Center for Scientific Computing; P.O. Box 3717, Princeton, NJ 08543, USA
and M. O’BRIEN Institutefor Computational Studies, Department of Mathematics, Statistics and Computing Science, Dalhousie University, Halifax, Nova Scotia B3H 3J5, Canada Received 23 April 1986; in final form 27 June 1986
PROGRAM SUMMARY Title of program: ISING
Peripherals used: terminal, line printer
Catalogue number: AALU
Number of lines in combined program and test deck: 346
Program available from: CPC Program Library, Queen’s Urnversity of Belfast, N. Ireland (see application form in this issue)
Reference to other published version of this program: CPC 39 (1986) 173
Computer: CDC CYBER 205 (Model 682); Installation: CYBERNET Data Center, 1151 Seven Locks Road, Montrose Building, Rockville, MD 20854-2996, USA Operating system: CDC CYBER 200 VSOS 2.1.6 Programming language used: CDC FORTRAN 200 (FORTRAN-77 plus CDC enhancements and vector instructions) High speed storage required: 110 Kwords Number of bits in a word: 64
*
Keywords: Ising model, phase transitions, critical exponents, correlation functions, magnetization, microcanonical methods, vector processors, vectorization methods Nature of the physical problem Equilibrium configurations of the elementary magnets in the three-dimeñsinal Ising model are generated thus allowing the calculation of the critical exponents. Method of solution A previously published FORTRAN program [1] for the threedimensional Ising model using the nncrocanomcal method [2] is vectorized on the CDC CYBER 205 vector processor (with two vector pipelines) and an updating rate of 117 Mspins/s is obtained. On a four vector pipeline machine this rate would be increased to 234 Mspins/s.
Permanent address: Institute for Computational Studies,
Restrictions on the complexity of the program
Department of Mathematics, Statistics and Computing Science, Dalhousie University, Halifax, Nova Scotia B3H 3J5, Canada.
The only possible restriction on the program is the run time which has to be considerable in order to reduce the errors in the measurements of the critical exponents. The storage re-
OO1O-4655/86/$03.50 © Elsevier Science Publishers B.V. (North-Holland Physics Publishing Division)
192
M. Creutz et a!.
/
Vectorization of the 3D Ising model program
quirements for the program, which are IX x IY X IWIDE, are not severe and cause no problems on today’s supercomputers. Typical running time The test run on 129x128x384 lattice with 10000 sweeps through the lattice took 9.1 mm on the 8 Mword, 2 vector pipeline CDC CYBER 205 at Rockville, Maryland.
References [1] M. Creutz and K.J.M. Moriarty, Comput. Phys. Commun. 39 (1986) 173. [2] M. Creutz, Phys. Rev. Lett. 50 (1983) 1411. G. Bhanot, M. Creutz and H. Neuberger, NucI. Phys. B235[FS11] (1984) 417.
LONG WRITE-UP 1. Introduction Numerical simulation of statistical systems is usually done by stochastic methods, mainly the “Metropolis” Monte Carlo scheme [1]. We have found that considerable increase in speed can be achieved by the use of an essentially deterministic method [2] which avoids real arithmetic and simulates randomness by the statistical fluctuations inherent in a large system. Fast programs for studying the three-dimensional Ising model using a scalar computer, the CDC CYBER 170-730, in both assembly language (COMPASS) [3] and standard ANSI FORTRAN-77 [4] have been published. The essentials of such a program for the two-dimensional model appeared in ref. [5]. In order to achieve a higher spin-flip rate than we obtained on the CYBER 170-730, we migrate our code to a vector processor, the CDC CYBER 205.
2. Outline of the theory A spin- ~ Ising model on an IX X IY X (64 x IWIDE) simple cubic lattice is considered. Helical boundary conditions are used in the X-direction, with periodic boundary conditions in the Y and Z-directions. IX should be odd and IY even. There are 0.5 x (IMAX x 64) auxiliary variables called demons, which carry energy. The demons act on the spins and try to invert them, the process being allowed to go through if and only if permitted by energy constraints, described in detail in refs. [2—6]. After the demons, hopping from spin to spin (with a big hop in the Z-direction of about 100 steps), have covered the entire lattice, physical observables may be measured. Further details are given in refs. [3,4]. A description of some preliminary mea-
surements of the critical exponents for the threedimensional Ising model is contained in ref. [6].
3. Code description The program consists of the following routines: ISING(main program), UPDATE, ENERGY, BETA, IBCOUNT and CORX. These routines have the following functions: 1) ISING is the main driver routine which initializes the parameters of the program and starts the simulation. 2) UPDATE carries out one sweep through the lattice. 3) ENERGY evaluates the average bond and demon energies. 4) BETA calculates the inverse temperature from an average demon energy ED.
$
5) IBCOUNT counts the set bits in the bit string X, i.e. carries out the population count. 6) CORX counts the antiparallel spins, separated by given number of sites, in the X-direction. A description of the function of each of these routines is contained in ref. [4] where the routine presently called UPDATE was named MONTE. For the present test run subroutine CORX is not called but it is a simple matter for the user to initiate these correlation measurements. A routine corresponding to CORZ of ref. [4] would have to be added by the user. The test run output is presented at the end of this paper. In table 1 we present the spin update rate on 4 representative computers. The CDC CYBER 170730 is a supermrnicomputer with a performance in the DEC VAX 11/750 range. The CDC 7600, which was introduced in 1968, was the supercom.
M. Creutz et al.
/
Vectorization of the 3D [sing model program
Table 1 The spin update rate for the three-dimensional Ising model with the microcanonical method, with no measurements, on some representative scalar and vector computers. (The results for the performance on the ETA-b are estimated from the known properties of this computer.) Computer CDC CYBER 170-730 CDC 7600 CDC CYBER 205 CDC CYBER 205 ETA-b
Type scalar umprocessor scalar uniprocessor vectoruniprocessor (2 vector pipelines) vector uniprocessor (4 vector pipelines) vector multiprocessor (on one processor) (on eight processors)
Mflips 0.16 29 117 234
193
of lattice sites in any direction does not have to be a multiple of 64. Thus we can study a whole range of lattice sizes very efficiently. Second, the CYBER 205 can have up to 4 vector pipelines (the test run .
was carned out on a 2 vector pipeline machine). This doubling of the number of vector pipelines doubles the arithmetic rate and hence the Mflip rate.
4. Conclusions We now have a very efficient code for calcula-
332 2658
puter of its time with a rated peak performance of 5 Mflops. Even by today’s standards the performance on the CDC 7600 is impressive and this is because of such features as a bit population count instruction. The CDC CYBER 205 performance is achieved making extensive use of the CDC CYBER 200 FORTRAN Q8 hardware calls [7], such as Q8ORV, Q8XORV, Q8XORNV, Q8ANDV, Q8ANDNV, Q8NANDV, Q8SHIFTV and Q8CNTO. By careful arrangement of the lattice in memory, all need for gathers and scatters is eliminated. Our vector length is given by the variable IVL = 0.5 * IMAX. (For the test run the vector length is 8256 which takes optimal advantage of the CDC CYBER 205 memory-to-memory architecture in its vector unit.) Other authors who have adapted similar algorithms to the CDC CYBER 205, e.g. Schumacher [8] and Bhanot et al. [9] have achieved spin-flip rates of 83 and 98 Mflips, respectively. The ETA-b performance is calculated on the basis of a 7 ns clock period and 2 vector pipelines for each of eight vector processors. The performance of the Ising model on several other machines is given in the recent paper by Reddaway et al. [10]. Two interesting points should be made about the CDC CYBER 205 architecture which makes it especially useful for Ising model calculations. First, the CYBER 205 is bit addressable which means that word boundaries are ignored and the number
.
.
tions on the three-dimensional Ising model using the microcanonical method on a machine, the CDC CYBER 205, which has excellent cost/performance. Our future plans include running this code for extremely long runs, say 1 Msweeps per data point on a large lattice, to obtain accurate measurements of the critical exponents of this model. We have already published some measurements for the Ising model [6] see also ref. [5],as well as the graphs in refs. [3,4]. We also intend to test universality by carrying out calculations on lattices other than the cubic lattice, e.g. the bcc and fcc lattices [11]. An interesting recent development has been the proposal for a deterministic method [12] which allows for studies of non-equililbrium phenomena [13]. By using the program described in the present text, giving the demons the same indices as the spins being updated, eliminating the scrambling shifts and rearranging the ioops over 10 and J, we are immediately able to carry out that deterministic dynamics. —
Acknowledgements We would like to thank Lloyd M. Thomdyke, L. Kent Steiner and John E. Zelenka of ETA Systems, Inc. for access to the 2 Mword, 2 vector pipeline CDC CYBER 205 at Colorado State University at Fort Collins, Colorado, Robert M. Price of Control Data Corporation for his continued interest, support and encouragement and access to the CYBERNET 8 Mword, 2 vector pipeline CDC CYBER 205 at Rockville, Maryland, Dietrich
194
M. Creutz et aL
/
Vectorization of the 3D [sing model program
Stauffer for valuable correspondence, the Control Data Corporation PACER Fellowship Grants (Grant nos. 85PCR06 and 86PCRO1) for financial support, the Natural Sciences and Engineering Research Council of Canada (Grant no. NSERC A8420) for further financial support and the DOE for time on the CDC CYBER 205 at Florida State University. This research was also carried out in part under the auspices of the US Department of Energy under contract no. DEAC0276CH00016.
[41M.
Creutz and K.J.M. Moriarty, Comput. Phys. Commun. 39 (b986) b73. [5] G. Bhanot, M. Creutz and H. Neuberger, Nucl. Phys. B235 (1984) 417. [6] M. Creutz, P. Mitra and K.J.M. Moriarty, J. Stat. Phys. 42 (b986) 823. [7] CDC CYBER 200 FORTRAN, Reference Manual, No.
[8] [9] [10]
References [1] Monte Carlo Methods in Statistical Physics, second edition, ed. K. Binder (Springer-Verlag, Berlin, Heidelberg, New York, Tokyo, 1986). [2] M. Creutz, Phys. Rev. Lett. 50 (1983) 1411. [3] M. Creutz, P. Mitra and K.J.M. Moriarty, Comput. Phys. Commun. 33 (1984) 361.
[11]
[12] [13]
60457040 (Control Data Corporation 215 Moffett Park Drive, Sunnyvale, CA 94086, 1983). H. Schumacher, Staatsexamensarbeit Thesis, University of Cologne (September 1985). G. Bhanot, D.W. Duke and R. Salvador, J. Stat. Phys. 44 (1986) 1005. S.F. Reddaway, D.M. Scott and K.A. Smith, Comput. Phys. Commun. 37 (1985) 351. M. Creutz, J.-M. Drouffe and K.J.M. Moriarty, FORTRAN Code for the Three-Dimensional Ising Model on b.c.c. and f.c.c. Lattices, Brookhaven National Laboratory Preprint in preparation. M. Creutz, Ann. Phys. 167 (1986) 62. M. Creutz, Microcanonical Monte Carlo, Invited Talk given at the 1986 Eastern Simulation Conferences, Simulations at the Frontier of Science, Norfolk, Virginia (10—12 March 1986).
M. Creutz et aL
/
Vectorization of the 3D [sing model program
195
PROGRAM LISTING I C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C
00018 00019 00020 00021 00022 00023 00024 00025 00028 00027 00028 00029 00030 0003? 00032 00033 00034 00035 00036 00037 00038 06039 00040 00041 00042 00043 00044 00045 00046 00040 00048 00049 00050 00051 00052 00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 000,4 00015 00018 00017 000IB
THE LATTICE IS IA MV IV DV 64*IBIDE IA SODULD BE ODD AND IV SUDULD RE EVEN. THE LRTTICE 15 STORED IN V AND 0 DIMENSIONS AS )MJMBERS ARE THE FIRST INDEX IN ISP) IL
IVL+IL
1L41
IVL
IMAX 101-IS
I IRAH-IS
IUL*1
2
IVL+2
. .
.
IVL+IS
. IL,
IVL-ISAI
IN Z DIRECTION OSE SECDND INDEX AS: 1,2.3, ... lUbE. I, 2. .. IBIRE 164 REPETITIONS) ROARE REPETITIONS REPRESENT SUCCESSIVE SITS IN THE CORRESPONDING WORE. DIMENSION ISP)IASIU.B).ID1)8256),1D2)B25B)
00002
00003 00004 0000S 00008 00007 00008 00009 00010 DCCII 00012 00013 00014 00015 00018 00017
PROGRAM ISING(OHTPUT) THIS PROGRAM SIMULATES THE THREE DIMENSIONAL ISING MODEL. FOR DETAILED INFORMATION AND REFERENCES SEE THE PAPER “VECTORI2RTION OF THE THREE-DIMENSIONAL 151MG MODEL PROGRAM TN THE CRC CARED 2O5~ DV M.CDEOTZ. DEPROTBFNT OF PHTSICS. DROOAPRVEN NATIONAL LABORATORY. UPTON. LONG ISLAND. NER YORE 11973. HUM. MORIARTY AND 8. 0~BRIEN. INSTITUTE FOR COMPUTATIONAL STUDIES. DEPARTMENT DF MATHEMATICS. STATISTICS AND COMPUTING SCIENCE. DALHOUSIE UNIVERSITY. HALIFAX. NOVA SCTTIR D3H 305. CANADA
SREEP NIT TIMES 0008400 TOE LATTICE REPEAT NBATCH TIMES AND FIND GRAND AVERAGE OF BETA THE FOLLOWING LINE 15 USED IN THE GENERATION OF AN APPRDOIMBTELY RANDOM WORD. NOTE THBT THE CDC COMPILER HAS A DEFICIENCY IN THAT IT RILL USE TOE SOME PANDAS NUMBER BOEN BONE IS CALLED TRICE IN A LINE
AAORD)O)=OOR)RRNF)X),SHIFT)RANF)0),31)) 10.129 IY.12B IM8UIO*IY IRIDE05 IZ~B4*IRIDE POINT IOO,IO,IV.IZ 100 FORMMT)1X.~LATTICE SIZE 15,14, BA ‘14.’ BY ‘Ia) IE~0 IUL.IRAV/2 NIT.2000 NBATCA.5 ABATCA.I.*N8ATCU-I. BS.0. BS20. C INITIALIZE LATTICE. DO I I~I.IVL IDI)I)O 102(11.0 DO I J~I.IRIDE 6.IULCI ISP)I,U).RADRD)X) ISP(K,U).RWORO)X) ISP)I,J).AND(ISP(I.J),RAORO)U)) I ISE(K,J).AND(ISP)K,J),RWORO)O)) C CALCULATE OVERAGE 80MG ENERGY. CALL ENERBY)ISP.IX.IMAO.IAIDE,IOI,102) C MAJOR LOOP STARTS. DO 3 MEAS.I.NBATCH IE.O T~SECOND(O) 00 2 I.I,NIT 2 CALL APDATE)ISP,I0,IRAH,IAIDA,IDI,IO2.IE) TSECOEO)0)-T SPEED.IRAO*IRIDE.64..NIT/)T.l.EA) PRINT 101 .NIT.SPEEO 101 FORMAT(//IO. ‘DOER .14. ITERATIONS/ C IX. RUNNING AT ES. I.’ MEGAFLIPS’ 1 CALL ENERGY)15P,IO,IMMO,IMIDE,ID,,ID2) E.I..IE/)Ha,.NIT.IO.IAIDE) R.SETR)E) PRINT 102,8 102 FORMAC)IO.BETO .‘FSB) IF )MEAS.NE.I) THEN MS.BSAB BS2AS2+B**2 ENDIF 3 CONTINUE 8S85/ABATCI/ BS2.SQRTI.)B520A8RYCH-4S..2)/)ABATCH-, )) PRINT 1O3,O5,RS2 103 PBRMAT)//IO. ... AVERAGE AFTER DISCARDING FIRST BATCO..*’./ C IX.’AO. BETA. ~,Fls.l3.’ 4/- ‘,E9,3) STOP END SUBROUTINE UPAATE)ISP.I0,IMAO.INIDE 101 102 IA) DIMENSION ISP)16N12,B).SBR)82S6B)IDI)92SB)ID2)8 25R) DIMENSION ICARRV)R256),1RITI)8256) 14172)6008) IREJ)8258) ICL.IBAO/2 11*1 183.63 121.21 143.43 IS.)IO-l)/2 IL~b0-I5 1014.101-I IVL5.ICL-I$ IOLB.IOL-IL DO I U~I,I8IAE DO I 10.1.2 IU.i*)IO-I).I01 IN.IO)2-IO)*IvL
0001 0002 0003 0004 000S 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 COIN 0017 0018 0019 0020 0021 0022 0023 0024 002S 0020 0027 0028 0029 0030 0031 0032 0033 0034 003S 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0048 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0080 0061 0062 0083 0004 0005 0066 0067 0060 0069 0070 0071 0072 0073 0074 0075 0070 0077 007B 0079 0080 008? 0002 0083 0084 0085 COBB 0087 0088 0089 0090 0091 0002 0093 0094 0095 0096 0097 0098 0009 0100 0101 0102 0103 0104 0105 0104 0107 0108 OIQ9 0110 DIII 0112 o,is
00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00039 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00048 00047 00048 00049 00050 00051 00052 00053 00054 000ss
oXoso 00057 000=8 00059 00060 0006? 00042 00083 00064 00065 00066 00087 00068 00069 00070 00071
00072 00073 00074 0007S 00001 00002 00003 00004 00005 00006 00007 00004 00009 00010 00011 00012 00013 00014 00015 00016 09017 00018 00019 00020 0002? 00022 00023 00024 00025 00028 00027 00028 00029 00030
C FIRST NEIGHBOR IF (U.FQ.IAIOE) THEN CALL OBSHIFTH)V’OB’,,ISP(IU.l;IOL).,II. .NMR(l,1:IVL)) CALL QBXDRV(O’OO~.. ISP) IU,U; I/IL), MMD) I. I; IVL), NAB) 1.1: CL)) ELSE CALL DROOPY + (X’OO’..ISP)IU,U:IVL)..ISP)IU.J+l;IVL).,NMR)l.l;IVL)) ENDIF C SECOND NEIAA608, IF (U.EG.I) THEN CALL GBSHIFTV(O’DR’,,ISP)IU.IAIOE:IAL),,IB3..NBR)I.a:IVL)) CALL GBXDRV)XO0 - ,ISP)IU,U;IVI). ,N8R)l.2;IVL). .MOR)l.2:IVL)) ELSE CALL GBODRV A (X~O0’- ,ISP)IU,.J:IVL), ,ISP)IU.J-l;IVL), ,NBR)I,2;ICU) ENDIF C THIRD NEIGHBOR CALL GBHORV)X~0O’..1SP)lU.U;IVL),.ISP)IN,J’IVL) ,NBR)1 VIOL)) C SET UP EAR NEIGHBORS 4,5 AND B. IF (bEan) THEN N4.l NV4~2 N5IYL-ISAI NVO~l N6~i NOH.IL+I ELSE N4IOL NO4~I NN.I NU5~I5OI NB.IOLILOI NO6.I ENDIP C FOURTH NEIGHBOR. ~R)N4,4).ODA)ISP)I,J),ISP)IMAH.0)) CALL 090860 * )O’OO~.,ISP(2,J;IOLW). .ISP)IOLDI.U;IYL4). .NDR)NV4,4;IVL4)) C FIFTH NEIGHBDA, CALL AMUBRO * )0~OO’.,ISP)IVLAI,J;IS). ,ISP)IOL-IS*I.J;IS), ,NBR)NS,S;IS)) CALL ORXOBV H )X’OO’ ISP)IYL*ILUIOLS) ,ISP(E,J;IUL5),,NBR)N05.5:IVL5)) C SIXTH NEIGHBOR CALL OBXORV A )HOO~. .ISF)IRMO-IS,0;IL), . ISP),,U;IL). .NDR)NB,B;IL)) CALL 080000 0 000 ISP(IVL+IJIVLH)ISP)IL+IUIVLB)MBR)NVH6IVL6)) C SUBTRACT 3 FROM TUE DEMONS. CALL OBOORV(OOX’.,IDI(I;IOL),IDa)lIXL)IBITU)I•IVL)) CALL OBNRNOO(X~03~,.IDl)I:IOL)..IDI)1:IVL),.IOITI)I:ICL)) CALL OBNANOT(X03’,,IDI)I’IOL)IDO)l-IVL)IREJ(iIOL)) C ADO BNTIPARALLEL NEIGHBORS. DO 2 N~1,H CALL VHANDV)X~0I~,,IMITI(I;IGL),,NBR)l,N;IVL).,ICARMO)I;IVL)) COLL GOXORG)O~00’,.IBITI)l;IUL),,NBR)I,N;IVL).,IMITI)IIVL)) CALL O8ANDV(.V’OI’,.ISITO)I;IULL,ICAHRA)l;IVL)NRR)IN-IVL)) CALL O8XORV)T’00~,,IRE.J)1:IVL),,NBR)I,N:IOL),.IREU(I;IXL)) COLL 080000)X’00’,IBIE2)IIUL)ICARRA)1IOL)IBII2)l-IXU) 2 CONTINUE C ACCEPT CHANGES. . CALL OBYDRNX)U’07’.,ISP)IU,O;IUL),,IREJ)lIOL)ISP)IUJ.IVL() CALL ORANDX)Y’Xl’,.IDI)l;IUL), IREJ)I’IVL) 101(1-IOU) CULL G8ANENO)O’06’.,IBITI)I’IOL)IBEJ(1.IVL)IBITI)l.IUU) CALL O800V)O’02’.,IDUI;IUI),,IDITY)l-IVL)IOI)I-IV1)) CALL G8RFJEV(O’Ol’..lDa)I;IVL),,IDEJ)l’IYL) 102)1-IOU) CALL 080NENV(OON .18102)1:101), ,IREJ)l;IVL). .IBIT2)l;IAL)) CALL VBORH)O’Oa’,.IDZ)I:IOL) .IRITZI.l;IUL)IO2)l-IUL)) C HOP DEMONS IN HOE Z DIRECTION. CALL O8SHIFTV)HOB. .101)1:101). .I21,,IDI)I:IVI)) CALL OBSHIFTA)O’OB’ ..102)1: IAL). .143.. 102)1 IL)) C ACCUMULATE DEMON ENERGIES. BOJUST SECOND VARIABLE IN IRCOUNT C TO GE~ DESIRED COMPROMISE OF ACCURACY AND UPDATING SPEEO. C BPPROPRIATELY ADJUST NORMALIZATION IN CAlLING PROGRAM. FASOES~ C UPDATING OCCURS WITH SMALL LENGTH BHILE LENGTH OF IVL COUNTS ALL C DEMON ENERGIES, ICUEAIBCOUNT( 101(1) .S)+2.IBCOUNT) 102)1) .5) 1 CONIIN)JE RETURN END
oil,
SUBROUTINE ENERGH)15P,IO,IMMO,1AIDE,IDI,IDZ) C THIS SUBROUTINE CALCULATES AOERAGE BOND AND DEMON ENERGIES. OIMENNIDN ISP)165I2,B),NDR)8256,B),ID1)825B),ID2)B25B) IELATO IAOO IOLIMAY/2 II.? I63~A3 IS~)IH-I)/2 ILIO-I5 IYL4.IOL-I ICL5.IOL-IS IVL6.IVL-IL DO I 01,IAIDE 00 1 10.1,2 IU~l+)IO-I).IHL
OIlS Oils 0117 0118 0110 0120 012? 0122 0123 0124 0125 0120 0127 0128 0120 0130 0131 0132 0133 0134 0135 0136 0/37 0)34 0139 0140 CIII 0142 0143 0144 0145 0148 0147 0148 0149 01=0 0151 0152 0153 0154 0155 0)56 0157 0158 0159 0180 0181 0162 0103 0184 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0178 0177 0178 0179 0)80 OIBI 0102 0103 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0189 0200 0201 0202 0203 0204 0205 0206 0207 0200 0209 0210 0211
15.1+ )2-I0).IOL C FIRST NEIGHBOR. IF )J.EV.IRIDE) IREN CALL OMSHIFTV)O’OB’,,ISP)IU 1101) II NBA)? 1101,)) CALL GBXORV)XOO’. ,ISP)IU,.J;IV1),,N8R)I,1;IOL)WB)~I;IHU) ELSE CALL 080080 C )O’OO’,.ISP)IU,U;IUL).,ISP)IU 001-IOU 680)1 I-IOU) ENDIF C SECOND NEIGRYNOR. IF )J.EO.I) THEN CALL QB5A1IFTU)O~0B~,,ISp)IU,bMIDE’IVL)I83NBR)I2.IUU) CALL GBOORV)X’OO’ - ,ISE)IA,J;IOI), .NBO)1.Z:IVL). .F.SB)l,2;IVL)) ELSE CALL 080000 C (H’OO’..ISP)IU,0;IOL),.ISP)IU,U_1;IVL).,NMR)I.2;IVU) ENOIF
0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0202 0223 0224 0225 0226 0227 022B
196
0003? 00082 00033 00035 00036 00037 00038 00039 00040 00041 00042 00043 00042 0004S 00040 00047 00048 00049 00000 000SI 00052 00053 00054 00055 00058 00057 00058 00059 00060 00061 00062 00063 00064 00085
00001 00002 00003 00004 00005 00009 00007 00008 00009 00010 00011 00012 00013
00001 00002 00003 00004 00005 00006 00007 00000 00009 00010 00011 00012 00013 00014 00015 00016 00001 00002 00003 COCOA
M. Creutz el aL
/
Vectorization of the 3D Ising model program
C THIRD NEIGHBOR. CALL QB0000)O’O0’,.ISP)IU,J.IUL),.ISP)IIA,J;IVL),.NBR)I.3;IVL)) C SET UP FOR NEIGOBORS 4, 5. AND 6. IF )I0.EU.I)TOEN NA.~
0229 0230 0281 0232
N5’IOL-IS+I N0541 N61 NV6IL+1 ELSE N4UUL 504.1 N51 NYS.IS+I N6,IVLIL+I 5000? ENDIF C FOURTH NEIGHBOR. NBR)NA,4)OOR)ISP)I.0),ISPIIMAH,U)) CALL 080000 C )V’OO’,,ISP)Z,J:IULH),,ISP)IVL+I,U;IULI),,NOR)NVA,A;IVLA)) C FIFTH NEIGHBOR. CALL 080000 C )H’OV’ - .ISP)IUL+I.J;IS).,ISPIIVL-IS+1,J;IS),.NBR)N5.S,IS)) CALL 080080 C )V’D0~,,ISP)IVLAIL,J;IVL5).,ISP)I,J;IYLS),,NBR)NU5,5;IVLS)) C SIXTH NEIGHBOR. CALL 000000 C )U~O0’,,ISP)IMBY-I5,0;IL),,ISC)1,.J;IL).,NOR)N6,R;IL)) CALL OBXDRO C )O’OO’,,ISF)IYL+I,,I:IYLB),.ISP)IL+l.J;IVLO),,NRO)NVO,B;IULA)) C ADD ANTIP080LLEL NEIGHBORS. DO 2 8=1.0 2 IELATIELAT+IBCOGNT)NRB)1,N),IVL) 1 CONTINUE C ACCUMULATE DEMON ENERGIES. IED.IEOOIBCOUNT)IDI)l),IVL)AZ.IBCOUNT)1D2)I).IVL) C NORMALIZE ENERGIES. ELAT.IELAT/)3. .IMAX~IAIEE54) EO.I,*IED/)1..IVLRA) ETOT.ELOT+2. ED/)IAIOE’3. ) PRINT IOC.EIAT.ED PRINT IOI,ETOT 100 FORMATIIX,’AOERAGE BOND ‘.FB.R,’ AVERAGE ED - ‘P8.0) 101 FOPMAT)IV,’TOTAL ENEBGO PER BOND = ‘FB.6) RETURN END
0235 023H 0237 023M 0239 0240 024/ 0282 0243 0044 0245 0248 0247 0248 0249 02=0 0251 0252 0253 0254 0055 0256 0257 025B 0259 0200 0201 0062 0203 0264 0265 0260 0267 02GB 0269 0270 0271 0272 0275 0274 0275 0276
FUNCTION BETA)EO) C THIS FUNCTION FINDS BETA GlUING AHEBAGE DEMON ENERGO ED. F) V). )V+2*U.~.2+3.V*~ 3/) I+HWO+2HO+5) YLO HH.1.S ER I N.I,N0 ON.)OLHOH). .S FN.F)ON) IF)FN.GT.EO) XH.YN 1 IF)FN.LT.ED) RL.YN META-ALOG)YN)/A RETURN END
0277 0278 0279 0280 0281 02B2 02B5 0284 OaRS 02B0 0287 0260 02B9 0290
FUNCTION IBCOUNT)O,IOL) C THIS FUNCTION COUNTS THE SET BITS IN IVL WORDS DIMENSION 0)10) IBCRUNT.0 NLEFT.BA+IVL ISTABT.I I IF )NLEFT.LT. 1023~B4) GOTO 2 CALL UACNTO)X)ISTART;,023464),,IC) IBCOONT.IRCOUNTAIC ISTART.ISTOAT+1O23 NLEFTNLEFT-102364 GOCO 1 2 CALL ORCNTR)U)ISTAMT;NLEFT), IC) IBCOUNTIBCRUNTAIC RETURN END
STBBTING WITH 0.
SUBROUTINE C040)1SP,IMAX,IWIDE,N,IC) C C C C C
COUNTS RNTIPARALLEL SPINS SEPARATED BR N SITES IN THE 0 DIRECTION AND PLATES RESULTS IN IC. ONLO EVEN VALUES OF N ARE CONSIDERED HERE. FOR SEPARATION ‘5’
00005
IN V DIRECTION N MUST EQUAL S~IO.
DIMENSION ISP)16512.6).IT) 16512) C
00006 00007 00008 00009 00010 00011 00012 C 00013 C 00014 C COOlS C 000IA 00017 00018 00019
1
IVL~IMAX/2 IOLPI.IVL+I 1C~O 52.5/2 IOLMN2.IOL-NZ 00 I .)~1,IAIDE CALL O80000)O’O0’,,ISP)1,0:IVLMN2),,ISP)N3VI,.J;IYLRN2),. IT)I;IHLMP/2)) CALL G000BV)X’00’,,ISP)IVLNN2+1,U;NU),,ISP)1,.J;N2),, IT)IVLRN2+1;N2)) CALL OB000U)XOO’,.ISP)IVLPI,d;IGLMN2),.ISP)IOLPI+N2,J:IOLAMI2),, IT)IYLPI;IOLMN2)) CALL A8000U)V’OO’,.ISP)IMAO-N2+I.J:N2),,ISP)IVLPI,U;N2),, IT)IMAX-N2OI;NZ)) IC.IC+IBCOUNT) IT)?). IMAX) CONTINUE RETURN END
0291 0292 0293 0290 0295 0298 0297 02gB 0299 0500 0501 0302 0505 0304 0305 0306 0307 0308 0309 OSlO 03,1 Oslo 0514 0315 Oslo 0317 0319 0320 032? 0322 0323 0324 0825 0320 0827 0828 0829 0370 033? 0832 0383 0334 0835 0380 0837 0338
TEST RUN OIJ1’PUT LATTICE SIZE 15 129 BR IZR MV 384 AVERAGE BOND .7S0S72 AOERAGA ED = TOTAL ENERGY PEA BOND .750572
.000000
DOER 2000 ITERATIONS RUNNING AT 118.8 MEGAFLIPS AVERAGE BOND . .BAN223 AOERAGE ED = TOTAL ENERGY FEB BOND = .7SOSTU BETR .220077
.SABI39
OVER 2000 ITERATIONS PUNNING AT 116.B MEGAFLIPS AVERAGE 80MG . .685307 AVERAGE AD = TOTAL ENERGY PER BOND. .750572 BETH = .214410
. SBT3B7
OYER 2000 ITERATIONS RUNNING RT 118.8 MEGAFLIPS HYERAGE BOND = .685061 AVERAGE AD = TOTAL ENERGY PER BONE = .0505,2 BETA = .219922
.589596
DYER 2000 ITERATIONS RUNNING AT 116.9 MEGAFLIPS AVERAGE BOND = 885199 AVERAGE ED = TOTAL ENERGY PER BOND = 7S0571 BETA . 219200
SHB5SI
OVER 2000 ITERATIONS BUNNING AT 116.9 AEGAFLIPS AVERAGE BOND . .685109 BUERAGE ED = TOTAL ENERGY PER BOND . .7S0572 BETA .218770
509162
... OVERAGE AFTER DISCARDING FIAST BOTCV.” AO RETA. .21909191S8128 4/.5ZBR~V3