Compiling LAMMPS with the USER-INTEL package

In your Makefile you need to put the path to -ltbbmalloc in the LIB variable, something like this below. It should be included in your intel compiler install. You may also need to add "-tbb" to CCFLAGS.

Stan

CC = CC
OPTFLAGS = -xHost -O2 -fp-model fast=2 -no-prec-div -qoverride-limits
CCFLAGS = -g -qopenmp -DLAMMPS_MEMALIGN=64 -no-offload \
                             -fno-alias -ansi-alias -restrict -tbb $(OPTFLAGS)
SHFLAGS = -fPIC
DEPFLAGS = -M

LINK = CC
LINKFLAGS = -g -qopenmp $(OPTFLAGS)
LIB = -L/home/projects/x86-64-knl/intel/compilers/2017/compilers_and_libraries_2017.0.042/linux/tbb/lib/intel64/gcc4.4 -ltbbmalloc
SIZE = size

ARCHIVE = ar
ARFLAGS = -rc
SHLIBFLAGS = -shared

What sort of problems? While doing the same (compiling on cray xc 40)
I faced 2 problems: 1) It failed to compile without env variable
CRAYPE_LINK_TYPE set to 'dynamic', 2) It cannot work in 'native mode'
due to permission issues on execution nodes (jobs are submitted on
different node but executed as default user on execution nodes, that
default user, resource manager, did not have privilege to ssh into
xeon phi cards)
But am not sure if this applies to all XC 40 or just our one specifically.

Also please use intel compiler 16.0 onwards because 15.0 were giving
wrong results for us.
Xeon PHI card: KNC

Thanks for the comments. It was the dynamic part what I was forgetting.
-dynamic or export CRAYPE_LINK_TYPE=dynamic solved the problem.

Thanks!
Lui