[lammps-users] Installing Lammps+Reax on UBUNTU

I am trying to install Lammps+Reax on an UBUNTU system with quadcore cpu.
My makefile is :
# debian = Debian, g++, MPICH, FFTW

SHELL = /bin/sh

# System-specific settings

CC = g++
CCFLAGS = -g -O -I/usr/lib/mpich/include/ -DFFT_FFTW -DLAMMPS_GZIP -I../../lib/reax
LINK = g++
LINKFLAGS = -g -O -L/usr/lib/mpich/lib -L../../lib/reax -L/usr/lib/gcc/x86_64-linux-gnu/4.3
USRLIB = -lfftw -lmpich -lreax
SYSLIB = -lpthread
SIZE = size

and i get the following errors:

reax_connect.F:(.text+0x234): undefined reference to `for_write_seq_lis'
reax_connect.F:(.text+0x252): undefined reference to `for_write_seq_lis_xmit'
reax_connect.F:(.text+0x28d): undefined reference to `for_write_seq_lis'
reax_connect.F:(.text+0x2a8): undefined reference to `for_stop_core'

My guess is the errors come from missing interface library that helps g++ to use fortran codes. I tried lgfortran
and get the following type of errors:

reax_poten.F:(.text+0x74f9): undefined reference to `__libm_sse2_sincos'
../../lib/reax/libreax.a(reax_reac.o): In function `encalc_':

Thanks for your help..
Dundar Yilmaz
Postdoctoral Research Associate
Texas A&M University
Dept. Chemical Engineer.

For Ubuntu

Step 1, install MPICH and FFTW2
sudo apt-get install build-essential mpich-bin libmpich1.0-dev mpi-doc fftw2 fftw-dev libxaw7-dev

Step 2, run the following command in the src directory
make debian

2009/9/2 Dundar Yilmaz <dundar11@…24…>

If you use the most current LAMMPS (fully patched), then
Makefiles are simpler when packages like REAX are used.
You do need to list the correct Fortran libs. If you get
link errors about Fortran routine names not found from C++,
then you'll need to figure out what the conventions are for
your compiler.