[lammps-users] problem with compiling LAMMPS with REAX

Dear all:

I’m trying to compile LAMMPS with REAX on the Linux system. I have successfully compiled LAMMPS without REAX using the command “make serial” on the Linux system with the single processor. In order to compile REAX package into LAMMPS, first I built libmpi.a in the path : /src/STUBS. Then I built reax library in the /lib/reax/folder using the command: make –f Makefile.gfortran. It was completed successfully with a libreax.a file. Next I modified Makefile.serial file in /src/MAKE/folder. After that, I tried to make lammps in src folder by “make yes-reax”, and following “make serial”. Unfortunately, lots of errors happened. They can be classified 4 types.

The first type is that all general files in /src cannot be found, such as: makefile:40: angle_charmm.d: No such file or directory.

The second type of errors: fft3d.h:235: error: initialize expression list treated as compound expression

The third type of errors: fft3d.cpp:58: error: fft3d.h:242: error

The forth type: Make[1]: ***[fft3d.o] Error 1

For your reference, the modified Makefile.serial is also attached.

serial = RedHat Linux box, g++, no MPI, no FFTs

SHELL = /bin/sh

System-specific settings

CC = g++

CCFLAGS = -g -O -I…/STUBS -I/home/asulanhe/LAMMPS/lammps-6Apr09/lib/reax

DEPFLAGS = -M

LINK = g++

LINKFLAGS = -g -O -L…/STUBS -L/home/asulanhe/LAMMPS/lammps-6Apr09/lib/reax -L/packages/intel/fce/10.1.015/lib

USRLIB = -lmpi -lreax -lgfortran

SYSLIB = -lpthread

ARCHIVE = ar

ARFLAGS = -rc

SIZE = size

Link target

(EXE): (OBJ)

(LINK) (LINKFLAGS) (OBJ) (USRLIB) (SYSLIB) -o (EXE)

(SIZE) (EXE)

Library target

lib: $(OBJ)

(ARCHIVE) (ARFLAGS) (EXE) (OBJ)

Compilation rules

.o:.cpp

(CC) (CCFLAGS) -c $<

.d:.cpp

(CC) (CCFLAGS) (DEPFLAGS) < > $@

Individual dependencies

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

include $(DEPENDS)

would you kindly figure out what’s wrong with my compiling process? Thanks in advance.

Best regards,

Lan

2009-05-15

Dear all:

dear lan he,

[...]

Unfortunately, lots of errors happened. They can be classified 4
types.

The first type is that all general files in /src cannot be found, such
as: makefile:40: angle_charmm.d: No such file or directory.

this is not a problem and can be safely ignored.

The second type of errors: fft3d.h:235: error: initialize expression
list treated as compound expression

this will only be included if you request compilation of the KSPACE
module, which in turn needs an fft library, that you have not defined
in your makefile. try:

make no-kspace

and then compile again.

The third type of errors: fft3d.cpp:58: error: fft3d.h:242: error

The forth type: Make[1]: ***[fft3d.o] Error 1

these are just results of the first fft error.

[...]

LINKFLAGS = -g -O -L../STUBS
-L/home/asulanhe/LAMMPS/lammps-6Apr09/lib/reax
\-L/packages/intel/fce/10.1.015/lib

the last of LINKFLAGS is not needed and can be safely deleted.

[...]

would you kindly figure out what’s wrong with my compiling process?
Thanks in advance.

cheers,
   axel.

Dear Axel:

Thank you so much for the suggestions. I have modified the Makefile.serial file and used make no-kspace when compiling the LAMMPS. Unfortunately, there are still some errors.
They are listed as follows.

Fix_poems.cpp:24:23: error: workspace.h: no such file or directory
Make[1]: ***[fix_poems.d] Error 1
Make[1]: leaving directory '/home/asulanhe/LAMMPS/lamps-6Apr09/src/Obj_serial'
Make: ***[serial] Error 2

Do you have any suggestions on how to fix it? Thank you so much!

Lan