Compiler issue

Hi, all, I encounter a problem:
while I compile the lammps package on Redhat-6 Linux system, I use the makefile generated by my own. The modules in the makefile are

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

MPI = /usr/local/packages/mvapich2/2.0rc1/intel-14.0.2
FFT = /usr/local/packages/fftw/3.3.4/intel-14.0.2

However, while I try to use fftw/3.3 or newer version, the error exist during compilation:

I /usr/local/packages/fftw/3.3.4/intel-14.0.2/include -DFFT_FFTW -M pppm_disp.cpp > pppm_disp.d
In file included from fft3d_wrap.h(18),
                 from pppm_disp.cpp(35):
fft3d.h(212): catastrophic error: cannot open source file "fftw.h"
  #include "fftw.h"
                   ^

make[1]: *** [pppm_disp.d] Error 4
make[1]: Leaving directory `/nv/hp1/hhuang67/lammps-15May15/lammps-15May15/src/Obj_ary6'

I am trying to figure this out. But does anyone have clue for that or find this situation previously? Thanks.

Best,
Haoxiang

Hi, all, I encounter a problem:
while I compile the lammps package on Redhat-6 Linux system, I use the makefile generated by my own. The modules in the makefile are

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

MPI = /usr/local/packages/mvapich2/2.0rc1/intel-14.0.2
FFT = /usr/local/packages/fftw/3.3.4/intel-14.0.2

However, while I try to use fftw/3.3 or newer version, the error exist during compilation:

I /usr/local/packages/fftw/3.3.4/intel-14.0.2/include -DFFT_FFTW -M pppm_disp.cpp > pppm_disp.d
In file included from fft3d_wrap.h(18),
                 from pppm_disp.cpp(35):
fft3d.h(212): catastrophic error: cannot open source file "fftw.h"
  #include "fftw.h"
                   ^

make[1]: *** [pppm_disp.d] Error 4
make[1]: Leaving directory `/nv/hp1/hhuang67/lammps-15May15/lammps-15May15/src/Obj_ary6'

I am trying to figure this out. But does anyone have clue for that or find this situation previously? Thanks.

-DFFT_FFTW is aliased to -DFFT_FFTW2 and thus refers to FFTW-2, you
need to use -DFFT_FFTW3 to properly include the header for FFTW-3.x

axel.

Hi, Dr. Kohlmeyer, the modification for my makefile is below:

FFT_INC = -I \{FFT\}/include \-DFFT\_FFTW3 \#FFT\_PATH = /usr/local/packages/fftw\-2\.1\.5\-mvapich FFT\_LIB = \-L {FFT}/lib -lfftw3

there are still some errors for the library:

-L /usr/local/packages/mvapich2/2.0rc1/intel-14.0.2/lib -lmpich -lpthread
-L /usr/local/packages/fftw/3.3/intel-14.0.2/lib -lfftw3 -lstdc++ -o ../lmp_ary6

/usr/local/packages/mvapich2/2.0rc1/intel-14.0.2/lib/libmpich.so: undefined reference to `__intel_cpu_feature_indicator_x'
/usr/local/packages/mvapich2/2.0rc1/intel-14.0.2/lib/libmpich.so: undefined reference to `__intel_cpu_features_init_x'
/usr/local/packages/mvapich2/2.0rc1/intel-14.0.2/lib/libmpich.so: undefined reference to `_intel_fast_memmove'
make[1]: *** [../lmp_ary6] Error 1
make[1]: Leaving directory `/nv/hp1/hhuang67/lammps-15May15/lammps-15May15/src/Obj_ary6'
make: *** [ary6] Error 2

what else I need to modify?

Hi, Dr. Kohlmeyer, the modification for my makefile is below:

FFT_INC = -I \{FFT\}/include \-DFFT\_FFTW3 \#FFT\_PATH = /usr/local/packages/fftw\-2\.1\.5\-mvapich FFT\_LIB = \-L {FFT}/lib -lfftw3

there are still some errors for the library:

-L /usr/local/packages/mvapich2/2.0rc1/intel-14.0.2/lib -lmpich -lpthread
-L /usr/local/packages/fftw/3.3/intel-14.0.2/lib -lfftw3 -lstdc++ -o ../lmp_ary6

/usr/local/packages/mvapich2/2.0rc1/intel-14.0.2/lib/libmpich.so: undefined reference to `__intel_cpu_feature_indicator_x'
/usr/local/packages/mvapich2/2.0rc1/intel-14.0.2/lib/libmpich.so: undefined reference to `__intel_cpu_features_init_x'
/usr/local/packages/mvapich2/2.0rc1/intel-14.0.2/lib/libmpich.so: undefined reference to `_intel_fast_memmove'
make[1]: *** [../lmp_ary6] Error 1
make[1]: Leaving directory `/nv/hp1/hhuang67/lammps-15May15/lammps-15May15/src/Obj_ary6'
make: *** [ary6] Error 2

what else I need to modify?

i don't know. that has nothing to do with FFTW, that much is certain.
this that looks like an installation issue of the MPI library, i.e.
that the mpicxx compiler wrapper does not link with all necessary
ancillary libraries, or you are using a mismatched command to link.

try compiling a small MPI test/demo program in C++ to see how to
correctly compile such a program on your machine and then transfer
those settings to your makefile. or consult your local system support
staff, if available.

axel.