Error with fftw-3.3.5

Submitted by Fabiof on Sat, 12/17/2016 - 09:06

Forums 

Installation

Hi all.

When i try to install BGW 1.2.0 with fftw-2.1.5 i have no errors.

But when i try to install with fftw-3.3.5 i have the following error after doing the command make epsilon


../Common/fftw.o: In function `__fftw_m_MOD_destroy_fftw_plans.part.0':
fftw.p.f:(.text+0x131): undefined reference to `fftwnd_f77_destroy_plan_'
../Common/fftw.o: In function `__fftw_m_MOD_do_fft':
fftw.p.f:(.text+0x22a5): undefined reference to `fftwnd_f77_create_plan_'
fftw.p.f:(.text+0x22c9): undefined reference to `fftwnd_f77_create_plan_'
fftw.p.f:(.text+0x23b0): undefined reference to `fftwnd_f77_one_'
fftw.p.f:(.text+0x2486): undefined reference to `fftwnd_f77_one_'
../Common/fftw.o: In function `__fftw_m_MOD_destroy_fftw_plans.part.0':
fftw.p.f:(.text+0x148): undefined reference to `fftwnd_f77_destroy_plan_'
collect2: error: ld returned 1 exit status
Makefile:44: recipe for target 'epsilon.cplx.x' failed
make[2]: *** [epsilon.cplx.x] Error 1
make[2]: Leaving directory '/home/fabiof/bin/BerkeleyGW-1.2.0/Epsilon'
Makefile:61: recipe for target 'make-Epsilon' failed
make[1]: *** [make-Epsilon] Error 2
make[1]: Leaving directory '/home/fabiof/bin/BerkeleyGW-1.2.0'
Makefile:75: recipe for target 'epsilon' failed
make: *** [epsilon] Error 2

my arch.mk is:

COMPFLAG = -DGNU
PARAFLAG = -DMPI
MATHFLAG = -DUSESCALAPACK

FCPP = cpp-4.8 -std=c89

F90free = mpif90 -ffree-form -ffree-line-length-none -fbounds-check -Wall -pedantic-errors -std=gnu

LINK = mpif90
FOPTS = -O3
#FOPTS = -g -C
FNOOPTS = $(FOPTS)
MOD_OPT = -J
INCFLAG = -I

C_PARAFLAG = -DPARA
CC_COMP = mpiCC -Wall -pedantic-errors -std=c++0x
C_COMP = mpicc -Wall -pedantic-errors -std=c99
C_LINK = mpiCC
C_OPTS = -O3
C_DEBUGFLAG =

REMOVE = /bin/rm -f

# Math Libraries
#
FFTWLIB = /home/fabiof/bin/fftw-3.3.5/install_folder/lib/libfftw3.a
FFTWINCLUDE = /home/fabiof/bin/fftw-3.3.5/install_folder/include
LAPACKLIB = -L/home/fabiof/bin/lapack-3.6.1 -ltmglib -llapack -lrefblas
BLACSDIR = /home/fabiof/bin/lapack-3.6.1/scalapack-2.0.2
BLACS = $(BLACSDIR)/blacs_MPI-LINUX-0.a $(BLACSDIR)/blacsF77init_MPI-LINUX-0.a $(BLACSDIR)/blacs_MPI-LINUX-0.a
SCALAPACKLIB = /home/fabiof/bin/scalapack-2.0.2/libscalapack.a

TESTSCRIPT = make check-parallel

I have included fftw_f77.i in the include directory as suggested in other topics.
But i still have the problem.

Do you have any suggestions?

Fabio

jdeslip's picture

Submitted by jdeslip on Sun, 12/18/2016 - 22:12

Hi Fabio,

To build/link with FFTW3 you need to add "-DUSEFFTW3" to your MATHFLAG in the arch.mk file. See fore example the cori arch.mk examples in the config folder.

Jack