Abstract
This chapter shows how the electronic structure can be propagated without diagonalization in the LvNMD approach. It also demonstrates how to integrate GPU code written in C/CUDA with the main Fortran program. The implementation combines Fortran with nonthunking CUBLAS (matrix multiplications) and direct CUDA kernels. The physical model for the direct molecular dynamics described here contains nuclei and electrons. In direct molecular dynamics, the positions of nuclei are changing with time and the electronic structure adjusts following the time-dependent Schroedinger equation (TDSE). Time dependence of electronic structure is often neglected, and instead, the time-independent Schroedinger equation is solved. This leads to the so-called Born-Oppenheimer approximation. The algorithm based on diagonalization and which also maps poorly to GPU architecture can be replaced by an alternative approach that is based on matrix-matrix multiplication that maps well to GPU architectures. The current implementation combines Fortran with C and CUDA. The main program and initialization of the dynamics is written in Fortran. For each time step of MD (Molecular Dynamics) the Fock matrix is evaluated on the CPU and transferred to GPU memory. It is important to analyze the theoretical scaling of the algorithm and of its major components and the computation of various building blocks for the target problem size. Focus must be on the most expensive part (building block) of the algorithm. Use existing efficient libraries if possible. It is generally cheaper and more effective to use existing libraries than to optimize the code by hand. If the most expensive building blocks do not exist yet in the form of the efficient library and if no GPU library exists, then focus on the optimization of CUDA code. © 2011
Original language | English |
---|---|
Title of host publication | GPU Computing Gems Emerald Edition |
Publisher | Elsevier Inc. |
Pages | 59-73 |
Number of pages | 15 |
ISBN (Print) | 9780123849885 |
DOIs | |
State | Published - 2011 |
Externally published | Yes |
Funding
The support for this project is provided by the National Science Foundation (grant No. ARRA-NSF-EPS-0919436). NICS computational resources are gratefully acknowledged. We would like to acknowledge the donation of equipment by NVIDIA within the Professor Partnership Program to K.M. J.J. would like to thank Jack Wells for the inspiring discussions. K.M. acknowledges support of AFSOR grants (FA9550-07-1-0395 and FA9550-10-1-030). S.I. acknowledges support by the Program for Improvement of Research Environment for Young Researchers from Special Coordination Funds for Promoting Science and Technology (SCF) commissioned by the Ministry of Education, Culture, Sports, Science and Technology (MEXT) of Japan.
Funders | Funder number |
---|---|
Special Coordination Funds for Promoting Science and Technology | |
National Science Foundation | ARRA-NSF-EPS-0919436 |
Air Force Office of Scientific Research | FA9550-10-1-030, FA9550-07-1-0395 |
Saskatoon Community Foundation | |
Ministry of Education, Culture, Sports, Science and Technology |