-

This site is deprecated and will be decommissioned shortly. For current information regarding HPC visit our new site: hpc.njit.edu

Lammps

From NJIT-ARCS HPC Wiki
Revision as of 16:34, 5 October 2020 by Hpcwiki1 dept.admin (Talk | contribs) (Importing text file)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

In progress. don't rely on this yet for GPU - CPU should be OK.

LAMMPS is a classical molecular dynamics code, and an acronym for Large-scale Atomic/Molecular Massively Parallel Simulator[1]

LAMMPS was compiled using Intel 2013 compilers and the CUDA 6.5 libraries.

The following instructions are for running the LAMMPS in parallel on kong using cpu and gpu.


Create a directory for this run:

<pre=code>mkdir lammps_test cd lammps_test</pre>

Get an example lammps input file: <pre=code>cp /afs/cad/linux/lammps/30Jul16/lammps-30Jul16/bench/in.lj .</pre>

Edit the submit script as directed: <pre=code>

  1. !/bin/bash
  2. EXAMPLE LAMMPS PARALLEL SCRIPT FOR SGE
  3. lammps_submit.sh
  4. To use, change all of the following to real values:
  5. JOB_NAME, QUEUE, UCID, NUMBER_OF_CPUS
  6. Please see https://wiki.hpc.arcs.njit.edu/ for additional information.
  7. Modified by Basement Supercomputing 1/2/2006 DJE
  8. Modified for NJIT - AM 18Apr06
  9. Updated for modules, QRSH_PORT, additional documentation. 31-Aug-2015 /KJW
  10. Updated for LAMMPS 28-Sep-2016/GW
  11. Change JOB_NAME to a one-word alphanumeric description. This will be used for
  12. part of output file name and in status listings.
  13. $ -N JOB_NAME
  1. Change QUEUE to a valid queue. On kong this would be one of "short",
  2. "medium", "long, or gpu." See https://wiki.hpc.arcs.njit.edu/index.php/KongQueues
  3. To run on GPU you mus use the gpu queue
  4. or https://wiki.hpc.arcs.njit.edu/index.php/SthenoQueues for more info
  5. $ -q QUEUE
  1. Send email when jobs starts and again when it finishes or if it aborts.
  2. $ -M UCID@njit.edu
  3. $ -m abe
  1. Use current working directory where "qsub" was invoked.
  2. $ -cwd
  1. Join stdout and stderr
  2. $ -j y
  1. Set your number of processors here by changing NUMBER_OF_CPUS to an integer
  2. value.
  3. LAMMPS uses the intel mpich2 MPI
  4. Do not select more than 16 CPUS if using the GPU node
  5. $ -pe mpich2 NUMBER_OF_CPUS
  1. Uncomment to request one gpu (max two)
  2. Note that uncomment means to remove the first "#" and leave "#$."
    1. $ -l gpu=1


  1. Run job through bash shell
  2. $ -S /bin/bash
  1. Load the correct lammps module.
  2. Uncomment the one to use.
  3. module load lammps/cpu/30Jul16
  4. module load lammps/gpu/30Jul16


  1. The following are for reporting only and not really needed to run the job;
  2. their results will show up in your output file.

echo "Got $NSLOTS processors." echo "cwd=$(pwd)"

  1. For CPU uncomment the following.
  2. mpirun -np $NSLOTS lmp_intel_cpu_intelmpi -v x 16 -v y 16 -v z 16 -v t 100 < in.lj
  1. For GPU uncomment the following.
  2. mpirun -np $NSLOTS lmp_intel_cpu_intelmpi -sf gpu -v x 32 -v y 32 -v z 64 -v t 100 < in.lj

</pre>

Submit the script: <pre=code>qsub lammps_submit.sh</pre>

  1. http://lammps.sandia.gov