# Efficient GPU Implementation of the McMurchie-Davidson Method for Shell-Based ERI Computations
## 7 Conclusions  
In this study, we have proposed an extended implementation of the efficient GPU-based McMurchie-Davidson (MD) method for shell-based two-electron repulsion integrals \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & \multicolumn{3}{c}{**Benzene (C6H6)**} & \multicolumn{3}{c}{**Naphthalene (C10H8)**} & \multicolumn{2}{c}{**Copper Oxide (CuO)**} \\ \hline \multicolumn{2}{c}{**Basis Function Set**} & \multicolumn{1}{c}{**STO-3G**} & \multicolumn{1}{c}{**6-31G\({}^{**}\)**} & \multicolumn{1}{c}{**STO-3G**} & \multicolumn{1}{c}{**6-31G\({}^{**}\)**} & \multicolumn{1}{c}{**STO-3G**} & \multicolumn{1}{c}{**6-31G\({}^{**}\)**} \\ \hline \multirow{6}{*}{Computation time [ms]} & CPU-Based & 18,094 & 765,999 & 120,246 & 5,249,620 & 19,930 & 389,133 \\  & BBM & 1584.599 & 25,943.201 & 10,344.533 & 166,499.671 & 451.022 & 5238.169 \\  & SBM & 1405.569 & 22,187.632 & 9312.203 & 144,135.328 & 391.059 & 4674.049 \\  & STM & 29.538 & 1288.133 & 140.164 & 4716.869 & 647.790 & 21,548.232 \\ \hline \multirow{6}{*}{Speedup rate (Compared to CPU-based)} & BBM & 11.418 & 29.526 & 11.624 & 31.529 & 44.188 & 74.287 \\  & SBM & 12.873 & 34.523 & 12.912 & 36.421 & 50.964 & 83.253 \\ \cline{1-1}  & BTM & 680.788 & 524.228 & 844.127 & 124.556 & 139.687 & 438.612 \\ \cline{1-1}  & STM & 612.566 & 594.658 & 857.895 & 1112.945 & 30.766 & 18.058 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Comparison of computation times of ERIs for polyatomic molecules including a naive CPU implementation. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline  & \multicolumn{3}{c}{**Benzene (C6H6)**} & \multicolumn{3}{c}{**Naphthalene (C10H8)**} & \multicolumn{2}{c}{**Copper Oxide (CuO)**} \\ \hline \multicolumn{2}{c}{**Basis Function Set**} & \multicolumn{1}{c}{**STO-3G**} & \multicolumn{1}{c}{**6-31G\({}^{**}\)**} & \multicolumn{1}{c}{**STO-3G**} & \multicolumn{1}{c}{**6-31G\({}^{**}\)**} & \multicolumn{1}{c}{**STO-3G**} & \multicolumn{1}{c}{**6-31G\({}^{**}\)**} \\ \hline \multirow{6}{*}{Basis functions} & s-orbitals & 18 & 30 & 28 & 46 & 6 & 8 \\  & p-orbitals & 18 & 54 & 30 & 84 & 12 & 18 \\  & d-orbitals & 0 & 36 & 0 & 60 & 6 & 18 \\  & f-orbitals & 0 & 0 & 0 & 0 & 0 & 10 \\  & ERIs & 222,111 & 26,357,430 & 1,464,616 & 164,629,585 & 45,150 & 1,103,355 \\ \hline \multirow{6}{*}{Shells} & s-shells & 54 & 84 & 84 & 132 & 18 & 32 \\  & p-shells & 18 & 30 & 30 & 48 & 12 & 20 \\  & d-shells & 0 & 6 & 0 & 10 & 3 & 5 \\  & f-shells & 0 & 0 & 0 & 0 & 0 & 1 \\  & ERIs & 3,454,506 & 26,357,430 & 21,487,290 & 164,629,585 & 157,641 & 1,464,616 \\ \hline \multirow{6}{*}{Computation time [ms]} & BBM & 1584.599 & 25,943.201 & 10,344.533 & 166,499.671 & 451.022 & 5238.169 \\  & SBM & 1405.569 & 22,187.632 & 9312.203 & 144,135.328 & 391.059 & 4674.049 \\  & BTM & 26.578 & 1461.193 & 142.450 & 42,146.531 & 142.676 & 887.190 \\ \cline{1-1}  & STM & 29.538 & 1288.133 & 140.164 & 4716.869 & 647.790 & 21,548.232 \\ \hline \multirow{6}{*}{Speedup rate} & BBM/BTM & 59.62 & 17.75 & 72.61 & 3.95 & 3.16 & 5.90 \\ \cline{1-1}  & SBM/STM & 48.58 & 17.22 & 66.43 & 30.55 & 0.60 & 0.21 \\ \cline{1-1}  & STM & 29.538 & 1288.133 & 140.164 & 4716.869 & 647.790 & 21,548.232 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Computation time of ERIs for polyatomic molecules using GPU implementations. (ERI). To this end, our approach capitalizes on the amenability of GPU parallelization of the MD recurrence relations through notions of shell, batch, and triple-buffering of the shared memory, and ordering similar ERIs to ensure threads follow identical computation paths, thus exploring the overall effective parallelism frontiers. Whereas the related study used Basis-ERIs as the computational unit, this paper has adopted the shell-based ERIs as the key computational unit. Furthermore, instead of being limited to assigning one CUDA block to each computational unit, this paper has extended the approach by assigning one CUDA thread to each computational unit.