generating static library causes fftw3 error when using kspace package

Hello Axel,

thanks for your reply.

I switched to the current stable version, but still get the same problem:

a)

make yes-KSPACE

(this is the one that causes the error)

make mpi

make mode=lib Ubuntu

building the static library fails with the following errors:

b)

~/LAMMPS/lammps-5Jun19/src$ make mode=lib ubuntu
make[1]: Verzeichnis „/home/hacfoam/LAMMPS/lammps-5Jun19/src“ wird betreten
make[1]: „lmpinstalledpkgs.h“ ist bereits aktuell.
Gathering git version information
make[1]: Verzeichnis „/home/hacfoam/LAMMPS/lammps-5Jun19/src“ wird verlassen
Compiling LAMMPS for machine ubuntu
make[1]: Verzeichnis „/home/hacfoam/LAMMPS/lammps-5Jun19/src/Obj_ubuntu“ wird betreten
make[1]: Verzeichnis „/home/hacfoam/LAMMPS/lammps-5Jun19/src/Obj_ubuntu“ wird verlassen
make[1]: Verzeichnis „/home/hacfoam/LAMMPS/lammps-5Jun19/src/Obj_ubuntu“ wird betreten
mpic++ -g -O3 -DLAMMPS_GZIP -DLAMMPS_JPEG -DLAMMPS_PNG -DLAMMPS_FFMPEG -DLMP_KOKKOS -DLMP_USER_OMP -DLMP_USER_INTEL -DFFT_FFTW3 -I./ -I…/…/lib/kokkos/core/src -I…/…/lib/kokkos/containers/src -I…/…/lib/kokkos/algorithms/src -I…/…/lib/kokkos/core/src/eti --std=c++11 -fopenmp -c …/dihedral_opls_intel.cpp
mpic++ -g -O3 -DLAMMPS_GZIP -DLAMMPS_JPEG -DLAMMPS_PNG -DLAMMPS_FFMPEG -DLMP_KOKKOS -DLMP_USER_OMP -DLMP_USER_INTEL -DFFT_FFTW3 -I./ -I…/…/lib/kokkos/core/src -I…/…/lib/kokkos/containers/src -I…/…/lib/kokkos/algorithms/src -I…/…/lib/kokkos/core/src/eti --std=c++11 -fopenmp -c …/pppm_disp_intel.cpp
In file included from …/fft3d_wrap.h:18:0,
from …/pppm_disp_intel.cpp:27:
…/fft3d.h:94:10: fatal error: fftw3.h: Datei oder Verzeichnis nicht gefunden
#include “fftw3.h”
^~~~~~~~~
compilation terminated.
Makefile:108: recipe for target ‘pppm_disp_intel.o’ failed
make[1]: *** [pppm_disp_intel.o] Error 1
make[1]: Verzeichnis „/home/hacfoam/LAMMPS/lammps-5Jun19/src/Obj_ubuntu“ wird verlassen
Makefile:202: recipe for target ‘ubuntu’ failed
make: *** [ubuntu] Error 2

c) done.

I read that it is necessary to build fftw as static library too. Is this automaticly doen with the KISS fftw by lammps?

d) I will try to use cmake now.

Henrik

a) there is not enough information here to give any specific advice. please
report the exact commands you executed and what makefiles with what
settings you have used (for the conventional build) or what settings you
were passing to cmake.
b) please provide error messages with their surrounding context and based
on what command they happened.
c) please try the latest stable version, 5 Jun 2019. you may be running
into a problem that was already corrected.
d) try using cmake to configure/build LAMMPS
 
axel.
 
 
> Hello,
> 
> I'm using stable version 12Dez18 and try to use kspace package. When
> generating the static library it causes an error: fftw3.h not found
> 
> If I got the documentation right, it shoud have build the KISS fftw, since
> the 3 lines in makefile.mpi regarding fftw are empty.
> 
> Why is it looking for fftw3.h?
> 
> What do I have to look for, to fix that?
> 
> 
> Thank's a lot
> 
> Henrik
> _______________________________________________
> lammps-users mailing list
> [email protected]...
> [https://lists.sourceforge.net/lists/listinfo/lammps-users](https://lists.sourceforge.net/lists/listinfo/lammps-users)
> 
 
 

Hello Axel,

thanks for your reply.

I switched to the current stable version, but still get the same problem:

a)

make yes-KSPACE

(this is the one that causes the error)

make mpi

make mode=lib Ubuntu

building the static library fails with the following errors:

the problem is that you are using the “ubuntu” configuration makefile, which defines -DFFT_FFTW3, but you have not installed the prerequisites needed for this. please see the comments in src/MAKE/MACHINES/Makefile.ubuntu

you have to install the packages g++, mpi-default-bin, mpi-default-dev,

libfftw3-dev, libjpeg-dev and libpng12-dev to compile LAMMPS with this

makefile

[…]

I read that it is necessary to build fftw as static library too. Is this automaticly doen with the KISS fftw by lammps?

no, it is not necessary. also the corresponding development package for ubuntu should include it anway.

KISS is not FFTW. when configuring for KISS_FFT, then the fft library is directly compiled into LAMMPS and no external FFT library needed.

d) I will try to use cmake now.

a CMake configuration run should detect, that you don’t have the necessary FFTW development package installed and will fall back to using the internal FFT library instead.

axel.