Molecular Dynamics

General

This code supports the training on Modern Fortran, OpenMP and OpenACC that I teach for LSU and LONI HPC users. This code is not for learning Molecular Dynamics (though I might use it in the future). Can also be used for a tutorial on Makefiles.

Objective

Take the original code and rewrite using Modern Fortran concepts learned viz,

Parallelize the code using

  1. OpenMP
  2. OpenACC
  3. CUDA Fortran (when I learn how to do it)

Code Description

Requires

Compilers:

For OpenACC/CUDA, portland group compilers is required and a machine with NVIDIA GPUs (code is tested on NVIDIA Tesla M2090, don't have access to AMD GPUs)

Compiling

$ make [option] [COMP=compiler]

options:

compiler:

Input Files

Running

Serial Code

$ ./md{0-5} [<input, needed for version 2-5>]

OpenMP Code

$ OMP_NUM_THREADS=x ./mdo <input>

where x is between 1 and number of processor cores

OpenACC Code

$ ./mda <input>

Output Files

The code will produce output to screen, you can redirect output to a file and analyze the simulation temperature and energy.

$ ./md0 > md.out

The code also produces a atom.xyz file with atomic coordinates at each time step.

Visualization of MD Simulation using VMD

The VMD script, atom.vmd will read in the atom.xyz file and enable one to view the simulation

$ vmd -e atom.vmd

Author

Alex Pacheco
Manager, Research Computing
XSEDE Campus Champion
Lehigh University

Material Developed as
HPC User Services Consultant,
Louisiana State University