LAMMPS, Accelerated Packages on Rescale

Overview

LAMMPS is an open source software with the focus on modeling of atomic systems, using classical Molecular Dynamics (MD). It is an acronym for Large-Scale Atomic/Molecular Massively Parallel Simulator. 

Solid-state material (metals and semiconductors) , soft material (polymers and biomolecules), and coarse-grained or mesoscopic systems can be modeled using LAMMPS. Many of its models have versions that provide accelerated performance on CPUs, GPUs, and Intel Xeon Phis. The code is designed to be easy to modify or extend with new functionality.

There are two accelerated packages of LAMMPS available on the Rescale platform : GPU package and User-OpenMP.

The following examples show how to implement them.

Lennard-Jones Liquid

The following example is a simulation of a simple fluid system using Lennard-Jones potential by LAMMPS:

  • 2,048,000 atoms for 100 timesteps
  • Reduced density = 0.8442 (liquid)
  • Force cutoff = 2.5 sigma
  • Neighbor skin = 0.3 sigma
  • NVE time integration

LAMMPS GPU Package

  • Designed for one or more GPUs coupled to many CPUs
  • Pair runs on GPU, fixes/bonds/computes run on CPU
  • Atom-based data (e.g. coordinates, forces) move back and forth between the CPU(s) and GPU every timestep (Default)
  • Asynchronous force computations can be performed simultaneously on the CPU(s) and GPU (dynamic load-balancing).

In order to use this package, the user needs to add the package command in the input file or run with the GPU package from the command line.

Configuring Your Job

Starting Up Rescale

To start up the Rescale platform:

  • Go to the platform.rescale.com, log in using your account info. 
  • From the main screen of the platform, click on the +Create New Job button at the top left corner of your screen. Feel free to rename the job by clicking on the pencil icon next to the job name (“Untitled Job”) at the top of the page. Since Rescale’s platform saves all of your jobs , it is recommended that you name it something specific so that you will be able to find it again later.

This is the first step of submitting your job.

Input File

Now you can upload the input file from your local computer or if you already have it on the cloud, you can upload it using the cloud storage.

  • For this tutorial you will want to upload one file which is the script
  • Click Upload from the computer and select the file LJ.in from your computer.
    • If you cloned an example job, then click on “Use files from cloud storage” and select the files you uploaded from the local computer
  • The user needs to know if the GPU package is compatible with their simulation setting and then add the following line in the very beginning of the script:
package gpu 2  (#of GPU per nodes)

You can find more details here.

Software Settings

Now we can configure our software package options on the “Software Settings” page. You can search for or directly select the tile for LAMMPS:

  • Next, the Analysis options must be set.
  • The drop down selector allows you to choose your preferred version of the software.
  • The input file in this tutorial has been tested with LAMMPS (29Mar2019 (GPU)), so select that option.
  • This is open source software, there is no need to select any type of license.
  • Next you need to add the analysis execution command for your project. This command is specific for each software package and each input file being used. For this input file you will need to add the following:
mpirun -np 16 lmp_rescale -sf gpu -pk gpu 2 -in LJ.in

Now we can select the type and number of cores to run on in the Hardware Settings page.

For a basic job, there are three hardware settings to edit: Coretype, Number of Cores, and Walltime.
For this example, select 8  for the Number of GPUs (1), 6 Hrs for the Walltime (2), and Obsidian for the Core Type. Rescale offers On-Demand Economy and On-Demand Priority  core type options. You can find more information on these options here.

There is no need to specify any Post Processing options for this tutorial. To continue to Review, click Next from the Post Processing screen.

After reviewing your selections, your case should now be ready for batch submission at this point.

Review

The Review step shows you a summary of your job prior to submission.

  • Click the blue Submit button in the top right corner on any of the job configuration pages or in the middle of the Review page.
  • Alternatively, instead of submitting the job, you can elect to Save the problem setup to be run at some later time.

Status

Now you can monitor the progress of your job from the Status tab:

  • You can monitor the status of your job and get information about your cluster in real-time. Here you can see the live-tailing of the output “process_out.log
  • Because this analysis is entirely run in the cloud, feel free to close your browser window or shut down your computer. You can check on the progress at any time by logging into Rescale and clicking the Jobs tab. You will receive an email notifying you when the job is completed.
  • A guide on Monitoring Status on Rescale can be found here
  • Once the job has completed its run, you can Download all of the output files from the Results page. You can also launch a Desktop and attach this job to perform post-processing. 
  • A guide on Managing your Job Results on Rescale is found here.

LAMMPS User-OpenMP Package

  • Uses OpenMP to enable multithreading on CPUs
  • Extensive LAMMPS coverage (108 pair styles, 30 fixes, molecular topology bonds, angles, etc., PPPM, Verlet & rRESPA)
  • Best for a small number of threads (2-4)
  • When running with MPI across multi-core nodes, MPI often suffers from communication bottlenecks and using MPI+OpenMP per node can be faster
  • The more nodes per job and the more cores per node, the larger the benefit from MPI+OpenMP

You can find more information here.

To run this tutorial using this package, follow these steps:

  1. The user needs to know if the OMP package is compatible with their simulation setting and then add the following line in the very beginning of the script.
package omp 2 (# of OpenMP threads to associate with each MPI process)
  1. You can find more details here
  2. In the Software Settings:
  • Next, the Analysis options must be set.
    • The drop down selector allows you to choose your preferred version of the software.
    • The input file in this tutorial has been tested with LAMMPS (29Sepr2021), so select that option.
    •  This is open source software, there is no need to select any type of license.
    • Next you need to add the analysis execution command for your project. This command is specific for each software package and each input file being used. For this input file you will need to add the following:
mpirun -np 16 lmp -sf omp -pk omp 2 -in LJ.in
  1. For the Hardware setting: Choose 16 as the number of cores and 6 hours for the walltime. SterliteMax is selected as a core type for this tutorial.

  1. Rescale offers On-Demand Economy and On-Demand Priority  core type options. You can find more information on these options here.
  2. There is no need to specify any Post Processing options for this tutorial. To continue to Review, click Next from the Post Processing screen. After reviewing your selections, your case should now be ready for batch submission at this point.
  3. You monitor the status of your simulation and the results as it is mentioned above
  4. A guide on Managing your Job Results on Rescale is found here