[lammps-users] Installation in Ubuntu CC command not found

Hi,

I 'make" the files in the STUBS folder and an object file and libmpi.a is created.

Thereafter, I create a Makefile.foo inside the /src/MAKE directory and run it from src directory with “make foo”. I get the following errors. Could you please point out the problem?

Errors:

kepler:~/lammps/lammps-26Jun10/src> make foo
make[1]: Betrete Verzeichnis ‘/auto/ls1/swayamj/lammps/lammps-26Jun10/src/Obj_foo’
CC -g -O -DLAMMPS_GZIP -I…/STUBS -DFFT_NONE -c angle_charmm.cpp
make[1]: CC: Kommando nicht gefunden
make[1]: *** [angle_charmm.o] Fehler 127
make[1]: Verlasse Verzeichnis ‘/auto/ls1/swayamj/lammps/lammps-26Jun10/src/Obj_foo’
make: *** [foo] Fehler 2
kepler:~/lammps/lammps-26Jun10/src>

Translation of German to English:

kepler:~/lammps/lammps-26Jun10/src> make foo
make[1]: Entering directory '/auto/ls1/swayamj/lammps/lammps-26Jun10/src/Obj_foo’
CC -g -O -DLAMMPS_GZIP -I…/STUBS -DFFT_NONE -c angle_charmm.cpp
make[1]: CC: Command not found
make[1]: *** [angle_charmm.o] Error 127
make[1]: Exiting directory '/auto/ls1/swayamj/lammps/lammps-26Jun10/src/Obj_foo’
make: *** [foo] Error 2
kepler:~/lammps/lammps-26Jun10/src>

I have attached the Makefile.foo below. Please let me know how should I modify it:

# foo = Cray Red Storm XT3, Cray CC, native MPI, FFTW

SHELL = /bin/sh
.SUFFIXES: .cpp .d

# ---------------------------------------------------------------------
# compiler/linker settings
# specify flags and libraries needed for your compiler

CC = CC
CCFLAGS = -g -O
DEPFLAGS = -M
LINK = CC
LINKFLAGS = -g -O
LIB = -lstdc++
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 = -I…/STUBS
MPI_PATH = -L…/STUBS
MPI_LIB = -lmpi

# 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_NONE
FFT_PATH =
FFT_LIB =

# 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 = -lcudart
meam_SYSLIB = -lifcore -lsvml -lompstub -limf
reax_SYSLIB = -lifcore -lsvml -lompstub -limf
user-atc_SYSLIB = -lblas -llapack

gpu_SYSPATH = -L/usr/local/cuda/lib64
meam_SYSPATH = -L/opt/intel/fce/10.0.023/lib
reax_SYSPATH = -L/opt/intel/fce/10.0.023/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

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

# Individual dependencies

(OBJ): (INC)
81,1-8 Ende

Thanks and Regards,
sj

It tells you the error:

make[1]: CC: Command not found

If you don't have CC on your box, you can't specify
that as your compiler.

Steve

Hi,

I 'make" the files in the STUBS folder and an object file and libmpi.a is
created.

Thereafter, I create a Makefile.foo inside the /src/MAKE directory and run
it from src directory with "make foo". I get the following errors. Could you
please point out the problem?

the biggest problem is that you copied the Makefile from a cray xt
machine. this is a _very_ different beast than your ubuntu box.
what is wrong with adapting the make files that advertise linux??

other than that, if you don't know how to adapt makefiles to compile
software, please get the help of a _local_ expert, that will speed up
the process enormously.

cheers,
    axel.

p.s.: instead of manually translating stuff, why don't you just do
export LC_ALL=C
and thus turn off all that confusing locale text and formatting.
this should be good practice for all machines that are used
for scientific computing. particularly the differences between
how numbers are formatted in different locales has created
quite a few problems and wrong results.