LAMMPS MKL

Dear all,

I’ve successfully compiled lammps using an intel compiler and it runs very well on a single processor, but it won’t run on more than one. I get the following error when I “bsub -n 8 mpirun lmp_mkl -in in.auneck” :

lmp_mkl: error while loading shared libraries: libmkl_intel_lp64.so: cannot open shared object file: No such file or directory

I’ve made sure to “export LD_LIBRARY_PATH=/home/intel/composer_xe_2013.1.117/mkl/lib/intel64”

in my .bashrc file and I also source the compiler there:

source /home/intel/composer_xe_2013/bin/compilervars.sh intel64
source /home/intel/impi/4.1/intel64/bin/mpivars.sh

I would appreciate any suggestions. Thanks a million for always answering our questions.

Here’s the Makefile.mkl I used:

mkl = Intel Cluster Tools, mpiicc, MKL MPI, MKL FFT

Intel recommends Intel Cluster Tools Compiler Edition

to build libfftw2xc_intel.a:

> cd /opt/intel/mkl/10.0.011/interfaces/fftw2xc

> become root via su

> gmake libem64t

SHELL = /bin/sh

---------------------------------------------------------------------

compiler/linker settings

specify flags and libraries needed for your compiler

CC = mpiicc
CCFLAGS = -O2 -fno-exceptions -fno-rtti -ansi-alias -march=core2 -mtune=core2 -pc64 -no-prec-div -no-prec-sqrt -unroll
SHFLAGS = -fPIC
DEPFLAGS = -M

LINK = mpiicc
LINKFLAGS = -O -L/home/intel/composer_xe_2013.1.117/mkl/lib/intel64
LIB = -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lstdc++
SIZE = size

ARCHIVE = ar
ARFLAGS = -rc
SHLIBFLAGS = -shared

---------------------------------------------------------------------

LAMMPS-specific settings

specify settings for LAMMPS features you will use

if you change any -D setting, do full re-compile after “make clean”

LAMMPS ifdef settings, OPTIONAL

see possible settings in doc/Section_start.html#2_2 (step 4)

LMP_INC = -DLAMMPS_GZIP -DLAMMPS_PNG

MPI library, REQUIRED

see discussion in doc/Section_start.html#2_2 (step 5)

can point to dummy MPI library in src/STUBS as in Makefile.serial

INC = path for mpi.h, MPI compiler settings

PATH = path for MPI library

LIB = name of MPI library

MPI_INC = -DMPICH_SKIP_MPICXX
MPI_PATH =
MPI_LIB =

FFT library, OPTIONAL

see discussion in doc/Section_start.html#2_2 (step 6)

can be left blank to use provided KISS FFT library

INC = -DFFT setting, e.g. -DFFT_FFTW, FFT compiler settings

PATH = path for FFT library

LIB = name of FFT library

FFT_INC = -DFFT_MLK -I/home/intel/composer_xe_2013.1.117/mkl/include/fftw
FFT_PATH = -L/home/intel/composer_xe_2013.1.117/mkl/lib/intel64
FFT_LIB =

JPEG and/or PNG library, OPTIONAL

see discussion in doc/Section_start.html#2_2 (step 7)

only needed if -DLAMMPS_JPEG or -DLAMMPS_PNG listed with LMP_INC

INC = path(s) for jpeglib.h and/or png.h

PATH = path(s) for JPEG library and/or PNG library

LIB = name(s) of JPEG library and/or PNG library

JPG_INC = -I/usr/include
JPG_PATH = -L/usr/lib64
JPG_LIB = -lpng

---------------------------------------------------------------------

build rules and dependencies

no need to edit this section

include Makefile.package.settings
include Makefile.package

EXTRA_INC = (LMP_INC) (PKG_INC) (MPI_INC) (FFT_INC) (JPG_INC) (PKG_SYSINC)
EXTRA_PATH = (PKG_PATH) (MPI_PATH) (FFT_PATH) (JPG_PATH) (PKG_SYSPATH) EXTRA_LIB = (PKG_LIB) (MPI_LIB) (FFT_LIB) (JPG_LIB) (PKG_SYSLIB)

Path to src files

vpath .cpp .. vpath .h …

Link target

(EXE): (OBJ)
(LINK) (LINKFLAGS) (EXTRA_PATH) (OBJ) (EXTRA_LIB) (LIB) -o (EXE) (SIZE) $(EXE)

Library targets

lib: (OBJ) (ARCHIVE) (ARFLAGS) (EXE) $(OBJ)

shlib: (OBJ) (CC) (CCFLAGS) (SHFLAGS) (SHLIBFLAGS) (EXTRA_PATH) -o (EXE) \ (OBJ) (EXTRA_LIB) (LIB)

Compilation rules

.o:.cpp
(CC) (CCFLAGS) (SHFLAGS) (EXTRA_INC) -c $<

.d:.cpp
(CC) (CCFLAGS) (EXTRA_INC) (DEPFLAGS) < > @

Individual dependencies

DEPENDS = (OBJ:.o=.d) sinclude (DEPENDS)

Dear all,

I've successfully compiled lammps using an intel compiler and it runs very
well on a single processor, but it won't run on more than one. I get the
following error when I "bsub -n 8 mpirun lmp_mkl -in in.auneck" :

lmp_mkl: error while loading shared libraries: libmkl_intel_lp64.so: cannot
open shared object file: No such file or directory

this is not a LAMMPS problem, but a system environment problem. please
talk to your local user support or use gcc as the compiler.

axel.

Thanks, will do.

Wynand