[lammps-users] compiling lammps

Hello, dear users!
I got a problem compiling lammps.
Here is Makefile:
Thank you for your attention.

linux = RedHat Linux box, Intel icc, MPICH2, FFTW

SHELL = /bin/sh

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

compiler/linker settings

specify flags and libraries needed for your compiler

CC = mpiCC
CCFLAGS = -O2
DEPFLAGS = -M
LINK = mpiCC
LINKFLAGS = -O2
LIB = -lstdc++ -L/home/tmog/lammps-15Dec10/lib/meam
ARCHIVE = ar
ARFLAGS = -rc
SIZE = size

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

LAMMPS-specific settings

specify settings for LAMMPS features you will use

LAMMPS ifdef options, see doc/Section_start.html

LMP_INC = -DLAMMPS_GZIP

MPI library, can be src/STUBS dummy lib

INC = path for mpi.h, MPI compiler settings

PATH = path for MPI library

LIB = name of MPI library

MPI_INC = -L/opt/hpmpi/include
MPI_PATH = -L/opt/hpmpi/lib
MPI_LIB = -lmpich -lpthread

FFT library, can be -DFFT_NONE if not using PPPM from KSPACE package

INC = -DFFT_FFTW, -DFFT_INTEL, -DFFT_NONE, etc, FFT compiler settings

PATH = path for FFT library

LIB = name of FFT library

FFT_INC = -DFFT_FFTW -I/home/tmog/fftw/include
FFT_PATH = -L/home/tmog/fftw/lib
FFT_LIB = -lfftw

additional system libraries needed by LAMMPS package libraries

these settings are IGNORED if the corresponding LAMMPS package

(e.g. gpu, meam) is NOT included in the LAMMPS build

SYSLIB = names of libraries

SYSPATH = paths of libraries

gpu_SYSLIB =
meam_SYSLIB = -lifcore -lsvml -lompstub -limf
reax_SYSLIB = -lifcore -lsvml -lompstub -limf
user-atc_SYSLIB = -lblas -llapack

gpu_SYSPATH =
meam_SYSPATH = -L/opt/intel/fc/10.1.015/lib
reax_SYSPATH = -L/opt/intel/fc/10.1.015/lib
user-atc_SYSPATH =

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

build rules and dependencies

no need to edit this section

include Makefile.package

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

Link target

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

Library target

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

Compilation rules

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

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

Individual dependencies

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

Here is error log:

mpirun Makefile.linux
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 3: SHELL: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 9: CC: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 10: CCFLAGS: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 11: DEPFLAGS: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 12: LINK: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 13: LINKFLAGS: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 14: LIB: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 15: ARCHIVE: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 16: ARFLAGS: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 17: SIZE: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 25: LMP_INC: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 32: MPI_INC: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 33: MPI_PATH: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 34: MPI_LIB: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 41: FFT_INC: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 42: FFT_PATH: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 43: FFT_LIB: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 51: gpu_SYSLIB: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 52: meam_SYSLIB: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 53: reax_SYSLIB: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 54: user-atc_SYSLIB: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 56: gpu_SYSPATH: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 57: meam_SYSPATH: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 58: reax_SYSPATH: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 59: user-atc_SYSPATH: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 65: include: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 67: LMP_INC: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 67: PKG_INC: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 67: MPI_INC: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 67: FFT_INC: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 67: EXTRA_INC: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 68: PKG_PATH: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 68: MPI_PATH: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 68: FFT_PATH: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 68: PKG_SYSPATH: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 68: EXTRA_PATH: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 69: PKG_LIB: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 69: MPI_LIB: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 69: FFT_LIB: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 69: PKG_SYSLIB: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 69: EXTRA_LIB: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 73: EXE: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 73: OBJ: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 74: LINK: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 74: LINKFLAGS: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 74: EXTRA_PATH: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 74: OBJ: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 74: EXTRA_LIB: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 74: LIB: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 74: EXE: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 74: -o: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 75: SIZE: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 75: EXE: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 79: OBJ: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 79: lib:: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 80: ARCHIVE: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 80: ARFLAGS: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 80: EXE: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 80: OBJ: command not found
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 84: fg: no job control
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 85: syntax error near unexpected token newline' /home/tmog/lammps-15Dec10/src/Makefile.linux: line 85: (CC) (CCFLAGS) (EXTRA_INC) -c <’

Here is error log:

mpirun Makefile.linux
/home/tmog/lammps-15Dec10/src/Makefile.linux: line 3: SHELL: command not
found

Uhm does that mean you typed "mpirun Makefile.linux" in the src/MAKE folder in order to build LAMMPS?

Did you ever try "make linux" in the src/ folder?

This is what the documentation (which you should read first) tells you about building lammps see: http://lammps.sandia.gov/doc/Section_start.html#2_2_2

Cheers
Christian