kspace package installation

Dear all,

I am interested in running lammps using the kspace package however I have been unable to build it. There is an error message displayed when I try to make lammps with the package but I can’t point out what the specific configuration error is. Can any body provide me any insight on the installation of kspace?

The error reads:
collect2: ld returned 1 exit status
make[1]: *** […/lmp_ubuntu] Error 1
make[1]: Leaving directory `/home/jsr/lammps/src/Obj_ubuntu’
make: *** [ubuntu] Error 2

And it comes after series of messages related to the fft3d.cpp file. The messages are of the type:
fft3d.cpp:(.text+0xc5): undefined reference to `fftw_execute_dft’

(several similar messages like this are displayed)

Thank you very much.

PS: I have copied below the header of my Makefile.ubuntu file for you to see the parameters I’m using.

MAKEFILE HEADER

ubuntu = Ubuntu, mpicc, MPICH3, FFTW3

SHELL = /bin/bash

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

compiler/linker settings

specify flags and libraries needed for your compiler

CC = mpicc
CCFLAGS = -O2
-funroll-loops -fstrict-aliasing -Wall -W -Wno-uninitialized
SHFLAGS = -fPIC
DEPFLAGS = -M
LINK = mpicc
LINKFLAGS = -O
LIB = -lstdc++
SIZE = size
ARCHIVE = ar
ARFLAGS = -rcsv
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

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 =
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_FFTW3
FFT_PATH =
FFT_LIB =

JPEG library, OPTIONAL

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

only needed if -DLAMMPS_JPEG listed with LMP_INC

INC = path for jpeglib.h

PATH = path for JPEG library

LIB = name of JPEG library

JPG_INC =
JPG_PATH =
JPG_LIB =

This appears to be a problem with your FFTW installation, not with LAMMPS. Have you tried to install it with the KISSFFT library that comes with LAMMPS, instead of the FFTW library? Or specified where to find the FFTW library, if it’s not installed in the usual location?

—AEI

Dear all,

I am interested in running lammps using the kspace package however I have
been unable to build it. There is an error message displayed when I try to
make lammps with the package but I can't point out what the specific
configuration error is. Can any body provide me any insight on the
installation of kspace?

the documentation is very specific about this. please have a closer look.
it looks like you didn't set up the FFT related makefile variables
correctly. there is no mentioning of the FFT library, hence the
undefined reference. please note that you can *always* build the
KSPACE package with the internal FFT using -DFFT_NONE and on a desktop
or small cluster machine you will be hard pressed to see any
difference in speed.

axel.

Thank you all for your help. I’m running lammps in a small system, hence the option -DFFT_NONE should work. Just for the record I have to add that my initial thought was that the system would look directly for the FFTW3 in the default location at /usr/local/.

Thank you very much.