1 / 10

Hartree – Fock Benchmark

Hartree – Fock Benchmark. JOHN FEO. Center for Adaptive Supercomputing Software. Self-Consistent Field Method. Obtain variational solutions to the electronic Schr ödinger Equation. Energy. Wavefront.

nuncio
Download Presentation

Hartree – Fock Benchmark

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Hartree – Fock Benchmark JOHN FEO Center for Adaptive Supercomputing Software

  2. Self-Consistent Field Method • Obtain variational solutions to the electronic Schrödinger Equation Energy Wavefront • By expressing the system’s one electron orbitals as the dot product of the system’s eigenvectors and some set of Gaussian basis functions eigenvector Gaussian basis function

  3. … reduces to • The solution to the electronic Schrödinger Equation reduces to the self-consistent eigenvalue problem Fock matrix Eigenvectors Density matrix Overlap matrix Eigenvalues One-electron forces Two-electron Coulomb forces Two-electron Exchange forces

  4. Logical flow Initial Density Matrix Construct Fock Matrixa) One electronb) Two electron Initial Orbital Matrix Compute Orbitals Schwarz Matrix no convergence Compute Density Matrix Damp Density Matrix convergence Output

  5. Modules denges Construct Fock Matrixa) oneelb) twoel makeob diagon makesz no convergence a) dampb) dendif makden convergence Output

  6. Matrix flow Compute Fock Matrix g_schwartz h g_schwartz g g_fock diagon oneel twoel g_fock eigv g_dens g_orbs g_work makden Damp Density Matrix dendif - constant - current iteration Output - previous iteration

  7. Memory footprint • Ten 2-D arrays of size nbfn x nbfn • Two 1-D arrays of size nbfn • h is size (nbfn)2 • gis size (nbfn)4 • Direct method – compute g each time • Conventional method – compute g once and store nbfn = number of basis functions = 15 * number of atoms

  8. Typical loop structures oneel for (i = 0; i < nbfn; i++) {for (j = 0; j < nbfn; j++) {g_fock[i][j] = (g_schwarz[i][j] > tol) ? h(i,j) : 0.0;} } makden for (i = 0; i < nbfn; i++) {for (j = 0; j < nbfn; j++) { double p = 0.0; for (k = 0; k < nocc; k++) p += g_orbs[i][k] * g_orbs[j][k];g_work[i][j] = 2.0 * p;} } nocc = 2 * number of atoms dendif for (i = 0; i < nbfn; i++) {for (j = 0; j < nbfn; j++) { double xdiff = fabs(g_dens[i][j] – g_work[i][j]); if (xdiff > denmax) denmax = xdiff;} }

  9. The BIG loop twoel for (l = 0; l < nbfn; l++) {for (k = 0; k < nbfn; k++) {for (j = 0; j < nbfn; j++) {for (i = 0; i < nbfn; i++) { if (g_schwarz[i][j] * schwmax ) < tol2e) {icut1 ++; continue;} if (g_schwarz[i][j] * g_schwarz[k][l]) < tol2e) {icut2 ++; continue;} icut3 ++; double gg = g(i, j, k, l);g_fock[i][j] += ( gg + g_dens[k][l]);g_fock[i][k] -= (0.5 * gg * g_dens[j][l]);} } } }

  10. Optimizations • Tiling to improve locality and data reuse • e.g. - twoel • Module collapse to increase thread size and reduce memory operations • e.g. - makden and dendif • Inline g and hoist loop invariant subexpressions • Exploit 8-way symmetry of g --- precompute and save • Conventional method (compute h and g once and store) • Probably enough memory • Probably not enough latency tolerance or power

More Related