Deployment of LAMMPS

From cpl-wiki
Jump to: navigation, search

Provided below is a minimal script to deploy LAMMPS on a linux like operating system by checking out from github, copying a makefile to include c++ std-11 and cpl library, patching the top level to allow MPMD mode (this can be skipped if you can Run CPL library with MPI_port) and building LAMMPS.

REMEMBER TO BUILD ALL CODES WITH THE SAME VERSION OF MPI TO ENSURE COUPLING IS POSSIBLE.

#Get LAMMPS first as this requires password
mkdir LAMMPS
cd ./LAMMPS
git clone https://github.com/lammps/lammps.git gitlammps

#Download CPL APP for LAMMPS and add package USER-CPL
LAMMPS_APP_DIR=./CPL_APP_LAMMPS-DEV
git clone https://github.com/Crompulence/CPL_APP_LAMMPS-DEV.git $LAMMPS_APP_DIR
cd gitlammps
pwd > ../$LAMMPS_APP_DIR/CODE_INST_DIR
cd ../$LAMMPS_APP_DIR
sed -i -e 's/mpicxx/CC/g' ./config/Makefile.cpl

# We need to patch main.cpp to allow MPMD mode as ARCHER mpich does not
# support using MPI_ports
make patch-lammps-Oct17
make -j 16
cd ../