MTP compilation recipes - skw32/skw32.github.io GitHub Wiki

mlip-v2 on summer

Note: Need source code for both lammps and mlip-v2. (Must request access to gitlab for the latter, send an email)

module load gcc/9.3.0 ompi/4.0.4 mkl/18
./configure --blas=mkl --lammps=path_to_lammps
make lammps
make mlp
make test

Example submission script:

#!/bin/bash
#PBS -S /bin/bash
#PBS -l walltime=04:59:59,nodes=1:ppn=32
#PBS -m n
#PBS -q csp
#PBS -N MTP_newBin

ulimit -s unlimited
module purge
module load gcc/9.3.0 ompi/4.0.4 mkl/18

cd $PBS_O_WORKDIR

# This calculates energy, forces and stresses (EFS) with fitted.mtp
# for all configurations from the database trainset.cfg, 
# and saves configurations with this data to out/testSet_EFSbyMTP.cfg

mkdir ./out
mpirun -np 32 path-to-MTP-src/mlip-v2-master/bin/mlp run mlip.ini --filename=structures_to_calc_with_MTP.cfg --log=stdout

mlip-v2 on irene

Note: Need source code for both lammps and mlip-v2. (Must request access to gitlab for the latter, send an email)

IMPORTANT: You must make some edits to the lammps source code.

  1. In 'lammps/src/MAKE/OPTIONS/Makefile.intel_cpu_intelmpi' change 'CC = mpicpc' to 'CC = mpicc'
  2. In 'lammps/src/' create a file called 'Makefile.package' which contains the following:
# Settings for libraries used by specific LAMMPS packages
# this file is auto-edited when those packages are included/excluded

PKG_INC =   -I../../lib/mlip -DLMP_USER_INTEL ${TBB_CXXFLAGS} ${MKL_CFLAGS} 
PKG_PATH =  -L../../lib/mlip 
PKG_LIB =   -l_mlip_lammps ${CCC_LDFLAGS} -L/opt/intel/ifort-17.0.6.256/system/default/lib/intel64/ -lifcore 
PKG_CPP_DEPENDS = 
PKG_LINK_DEPENDS = 

PKG_SYSINC =  $(mlip_SYSINC) 
PKG_SYSLIB =  $(mlip_SYSLIB) 
PKG_SYSPATH = $(mlip_SYSPATH)

Use the following but add the path to your mlip-v2 source code and modified lammps source code:

module purge
module load lammps tbb
./configure --compiler=intel --blas=mkl --lammps=ADD-YOUR-PATH-TO-MODIFIED-LAMMPS --prefix=ADD-YOUR-PATH-TO-mlip-v2-src

You must next make the following changes inside the file make/config.mk:

mpiicc => mpicc
mpicpc => mpicxx
mpiifort => mpifort
LDFLAGS += -L/opt/intel/ifort-17.0.6.256/system/default/lib/intel64/ -lifcore -L/${MKL_LIBDIR} -lmkl_rt

You're now ready to compile with:

make mlp
make lammps
make test

Example submission script:

#!/bin/bash
#MSUB -q skylake
#MSUB -n 48
#MSUB -T 43200
#MSUB -A gen10765
#MSUB -r mlp

module load intel/17.0.6.256 mpi/openmpi/2.0.4 tbb

cd ${BRIDGE_MSUB_PWD}
ccc_mprun /PATH-TO-SOURCE-CODE/mlip-v2-master/bin/mlp train TrainedA2B2.mtp_ train.cfg > train_output