Skip to content

Latest commit

 

History

History
64 lines (50 loc) · 2.72 KB

README.md

File metadata and controls

64 lines (50 loc) · 2.72 KB

CoHMM

A Co-design proxy application for the Heterogeneous Multiscale Method (HMM) augmented with adaptive sampling. This source code was used to generate the data in the paper: B. Rouet-Leduc et al., Spatial adaptive sampling in multiscale simulation, Comput. Phys. Commun. 185 (2014) 1857-1864 (link).

Original authors of the source code include Bertrand Rouet-Leduc and the students of the 2013 Los Alamos Co-Design Summer School. CoHMM is now maintained by ExMatEx: Exascale Co-Design Center for Materials in Extreme Environments (exmatex.org).

Quick start

make
./cohmm 1  # 'input/input1.txt' -- fast analytical model, 400 grid points
./cohmm 2  # 'input/input2.txt' -- fast analytical model, 10,000 grid points
./cohmm 3  # 'input/input3.txt' -- slow molecular dynamics, 100 grid points
./cohmm 4  # 'input/input4.txt' -- slow molecular dynamics, 400 grid points

These four inputs are representative of the runs in the Rouet-Leduc et al. (2014) paper. With 400 grid points, full program execution requires approximately 200,000 fine-scale calls. The wall-clock time for full execution with the "fast analytical model" (input 1) is about a second. The equivalent simulation with molecular dynamics response (input 4) is far slower. Each molecular dynamics fine-scale call may require about a minute on a single CPU thread, and task parallelization over the ~200,000 calls becomes very important.

Task Parallelization

At the top of the Makefile, set DO_OPENMP=ON to enable OpenMP parallelization of the fine-scale flux calculation for each HMM cell. The environment variable OMP_NUM_THREADS controls the number of OpenMP threads. There is a single OpenMP command #pragma omp parallel, which appears in the function cohmm.c::fluxes(). We welcome parallelization implementations for alternate coarse task-based programming models and runtimes.

Description of subdirectories

  • CoMDLib/ : CoMD molecular dynamics library modified to allow strained periodic boundaries. This version of CoMD also enables thread-safe concurrency. (Branched from www.exmatex.org/comd.html.)

  • input/inputX.txt : Input file X

  • output/simulationX/ : Corresponding output generated by CoHMM

  • supplement/ : Additional files that were used to generate the figures in the Rouet-Leduc et al. (2014) paper. In particular, supplement/input/ contains the full set of inputs. For simplicity, however, this version of the code replaces spline interpolation with linear interpolation, which we find to be nearly as effective.