ENDCALL ParallelFFT3D("INV",scr1,scr2)scr2(1:N p x,1:N y ,1:N z ) = scr2(1:N p x,1:N y ,1:N z ) * && vpot(1:N p x ,1:N y,1:N z )CALL ParallelFFT3D("FW",scr1,scr2)FOR j=1:N p PWFP = scr1(ipg(1,i),mapxy(ipg(2,i),ipg(3,i))) && + scr1(img(1,i),mapxy(img(2,i),img(3,i)))FM = scr1(ipg(1,i),mapxy(ipg(2,i),ipg(3,i))) && - scr1(img(1,i),mapxy(img(2,i),img(3,i)))fc(j,i) = f(i) * CMPLX[REAL[FP],IMAG[FM]]fc(j,i+1) = f(i+1) * CMPLX[IMAG[FP],-REAL[FM]]ENDENDThe parallel Fourier transform routine can be built from a multiple one-dimensionalFourier transform <strong>and</strong> a parallel matrix transpose. As mentioned above, only onedimension of the real space grid is distributed in the CPMD code. This allows tocombine the transforms in y <strong>and</strong> z direction to a series of two-dimensional transforms.The h<strong>and</strong>ling of the plane waves in Fourier space breaks the symmetry <strong>and</strong>two different transpose routines are needed, depending on the direction. All thecommunication is done in the routine ParallelTranspose. This routine consistsof a part where the coefficients are gathered into matrix form, the parallel matrixtranspose, <strong>and</strong> a final part where the coefficients are put back according to themapping used.MODULE ParallelFFT3D(tag,a,b)IF (tag == "INV") THENCALL MLTFFT1D(a)CALL ParallelTranspose("INV",b,a)CALL MLTFFT2D(b)ELSECALL MLTFFT2D(b)CALL ParallelTranspose("FW",b,a)CALL MLTFFT1D(a)END IFAll other parts of the program use the same patterns for the parallelization as theones shown in this section.3.9.4 LimitationsTwo types of limitations can be encountered when trying to run a parallel code on acomputer. Increasing the number of processors working on a problem will no longerlead to a faster calculation or the memory available is not sufficient to perform acalculation, independently on the number of processors available. The first type of89
12010080Speedup60402000 50 100ProcessorsFigure 13. Maximal theoretical speedup for a calculation with a real space grid of dimension 100(solid line). Effective speedup for a 32 water molecule system with an energy cutoff of 70 Rydberg<strong>and</strong> a real space grid of dimension 100 (dotted line with diamonds)limitation is related to bad load-balancing or the computation becomes dominatedby the non-scaling part of the communication routines. Load–balancing problemsin the CPMD code are almost exclusively due to the distribution of the real spacearrays. Only the x coordinate is distributed. There are typically of the order of100 grid points in each direction. Figure 13 shows the maximal theoretical speedupfor a calculation with a real space grid of dimension 100. The steps are due to theload–balancing problems initiated by the granularity of the problem (the dimensionis an integer value). No further speedup can be achieved once 100 processors arereached. The second curve in Fig. 13 shows actual calculations of the fullCPMD code.It is clearly shown that the load balancing problem in the Fourier transforms affectsthe performance of this special example. Where this steps appear <strong>and</strong> how severethe performance losses are depends of course on the system under consideration.To overcome this limitation a method based on processor groups has been implementedinto the code. For the two most important routines where the real spacegrid load–balancing problem appears, the calculation of the charge density <strong>and</strong> theapplication of the local potential, a second level of parallelism is introduced. Theprocessors are arranged into a two-dimensional grid <strong>and</strong> groups are build accordingto the row <strong>and</strong> column indices. Each processor is a member of its column group(colgrp) <strong>and</strong> its row group (rowgrp). In a first step a data exchange in the columngroup assures that all the data needed to perform Fourier transforms within therow groups are available. Then each row group performs the Fourier transformsindependently <strong>and</strong> in the end another data exchange in the column groups rebuildsthe original data distribution. This scheme (shown in the pseudo code for the densitycalculation) needs roughly double the amount of communication. Advantages90
- Page 1 and 2:
John von Neumann Institute for Comp
- Page 4:
2500Number200015001000CP PRL 1985AI
- Page 7 and 8:
The goal of this section is to deri
- Page 9:
¡the Newtonian equation of motion
- Page 13 and 14:
Ehrenfest molecular dynamics is cer
- Page 15 and 16:
the Car-Parrinello approach 108 , s
- Page 17:
According to the Car-Parrinello equ
- Page 20 and 21:
Figure 4. (a) Comparison of the x-c
- Page 22 and 23:
Up to this point the entire discuss
- Page 24 and 25:
parameters are those used to repres
- Page 26 and 27:
in terms of a linear combination of
- Page 28 and 29:
structure calculations, see e.g. Re
- Page 30 and 31:
“unbound electrons” dissolved i
- Page 32 and 33:
Table 1. Timings in cpu seconds and
- Page 34 and 35:
stressed that the energy conservati
- Page 36 and 37:
see e.g. the discussion following E
- Page 38 and 39:
from a set of one-particle spin orb
- Page 40 and 41: is used, which represents exactly a
- Page 42 and 43: 2.8.3 Generalized Plane WavesAn ext
- Page 44 and 45: disposable parameters that can be o
- Page 46 and 47: The index i runs over all states an
- Page 48 and 49: f(G) are related by three-dimension
- Page 50 and 51: where j l are spherical Bessel func
- Page 52 and 53: andE self = ∑ I1√2πZ 2 IR c I.
- Page 54 and 55: ¢££¤¤¢¢¢n tot (G)inv FTn to
- Page 56 and 57: correlation energyΩ ∑E xc = ε x
- Page 58 and 59: 3.4 Total Energy, Gradients, and St
- Page 60 and 61: 3.4.3 Gradient for Nuclear Position
- Page 62 and 63: The local part of the pseudopotenti
- Page 64 and 65: ¢¢¢¢¢i = 1 . . .N b¢c i (G)¢
- Page 66 and 67: ¢¢¢¢¢c i (G)123g, E self∆V I
- Page 68 and 69: where G c is a free parameter that
- Page 70 and 71: and a matrix form of the Gram-Schmi
- Page 72 and 73: The two sets of equations are coupl
- Page 74 and 75: introducing different masses for di
- Page 76 and 77: The Lagrange multiplier have to be
- Page 78 and 79: Table 3. Relative size of character
- Page 80 and 81: of the G vectors, and only real ope
- Page 82 and 83: CALL SGEMM(’T’,’N’,M,N b ,2
- Page 84 and 85: ing standard communication librarie
- Page 86 and 87: over processors. All processors sho
- Page 88 and 89: ab = 2 * sdot(2 * N p D ,A(1),1,B(1
- Page 92 and 93: are the improved load-balancing for
- Page 94 and 95: situations where• it is necessary
- Page 96 and 97: espectively), but completely analog
- Page 98 and 99: 4.2.3 Imposing Pressure: BarostatsK
- Page 100 and 101: in the previous section. The isobar
- Page 102 and 103: 4.3.2 Many Excited States: Free Ene
- Page 104 and 105: down the generalization of the Helm
- Page 106 and 107: free energy functional discussed in
- Page 108 and 109: Figure 16. Four patterns of spin de
- Page 110 and 111: and electrons r = {r i } can be wri
- Page 112 and 113: The effective classical partition f
- Page 114 and 115: up e.g. in Refs. 132,37,596,597,428
- Page 116 and 117: The eigenvalues of A when multiplie
- Page 118 and 119: frequency of the electronic degrees
- Page 120 and 121: 5.2 Solids, Polymers, and Materials
- Page 122 and 123: the penetration of the oxidation la
- Page 124 and 125: in terms of their electronic struct
- Page 126 and 127: culations on very accurate global p
- Page 128 and 129: AcknowledgmentsOur knowledge on ab
- Page 130 and 131: 57. M. Bernasconi, G. L. Chiarotti,
- Page 132 and 133: Superiore di Studi Avanzati (SISSA)
- Page 134 and 135: 175. E. Ermakova, J. Solca, H. Hube
- Page 136 and 137: 244. H. Goldstein, Klassische Mecha
- Page 138 and 139: 313. T. Ikeda, M. Sprik, K. Terakur
- Page 140 and 141:
384. N. A. Marks, D. R. McKenzie, B
- Page 142 and 143:
442. S. Nosé and M. L. Klein, Mol.
- Page 144 and 145:
502. L. M. Ramaniah, M. Bernasconi,
- Page 146 and 147:
562. F. Shimojo, K. Hoshino, and Y.
- Page 148 and 149:
620. A. Tongraar, K. R. Liedl, and
- Page 150:
682. R. M. Wentzcovitch, Phys. Rev.