Skip to content
Example LAMMPS compilation for ticket 31775
Branch: master
Clone or download
Latest commit 1a40b09 May 8, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore ENH: Initial commit May 8, 2017
README.md ENH: Initial commit May 8, 2017
compile.slurm ENH: Initial commit May 8, 2017
install.sh ENH: Initial commit May 8, 2017
with_phi.slurm ENH: Initial commit May 8, 2017
without_phi.slurm ENH: Initial commit May 8, 2017

README.md

LAMMPS with Intel MPI and Xeon Phi

Compile the latest LAMMPS. Use Intel Xeon Phi co-processor card if available, otherwise fall back to CPU version.

Setup

To build the lammps_intel_coprocessor executable, LAMMPS needs Intel's MPSS libraries (Manycore Platform Software Stack) which are only available on our Intel Xeon Phi nodes. Therefore instead of directly running install.sh, compile LAMMPS on the Intel Xeon Phi node using the provided SLURM script:

sbatch compile.slurm

This will create a lammps executable that wraps both the CPU and Phi offload versions of LAMMPS. Note that the executable loads the intel compiler dependency for MKL, Intel MPI, etc.

Usage

You probably want to add that lammps script to your PATH so that you can easily run it other directories without the ./:

# In your ~/.bashrc

export PATH=path/to/your/lammps:$PATH

For the CPU version, your SLURM script must subset to Haswell or newer nodes using:

#SBATCH --exclude cn[01-136]

mpirun lammps -i your_input_file.in

If you are using the Phi card for offload mode, we don't need the node exclusions as the phi nodes are Haswell. Make sure you have the following in your SLURM script:

#SBATCH --partition phi
#SBATCH --ntasks 1   # Offload mode deadlocks with > 1 CPU
#SBATCH --gres mic:1 # Offload mode deadlocks with > 1 Phi card

lammps -i your_input_file.in

Enjoy!

Comparison

To compare the speed with using the Phi co-processor and without, The with_phi.slurm and without_phi.slurm files run Intel's bundled test inputs. The Phi card completes in 8 minutes, while the CPU version times out after 30 minutes.

You can’t perform that action at this time.