fftw3 error problem

483 views
Skip to first unread message

Donato Pera

unread,
Sep 26, 2013, 10:44:06 AM9/26/13
to cp...@googlegroups.com
Dear all,

I'm trying to install cp2k but when I run the make file
I have this error:


fftw3_lib.F:(.text+0x10de): undefined reference to
`dfftw_plan_with_nthreads_'


Thanks Donato

Iain Bethune

unread,
Sep 26, 2013, 10:47:37 AM9/26/13
to cp...@googlegroups.com
Dear Donato,

You need to link with the libfftw3_threads or libfftw3_omp library if you are using threads with FFTW. This may not be installed by default as you need to build FFTW with the --enable-threads or --enable-openmp option.

Cheers

- Iain

--

Iain Bethune
Project Manager, EPCC

Email: ibet...@epcc.ed.ac.uk
Twitter: @IainBethune
Web: http://www2.epcc.ed.ac.uk/~ibethune
Tel/Fax: +44 (0)131 650 5201/6555
Mob: +44 (0)7598317015
Addr: 2404 JCMB, The King's Buildings, Mayfield Road, Edinburgh, EH9 3JZ
> --
> You received this message because you are subscribed to the Google Groups "cp2k" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns...@googlegroups.com.
> To post to this group, send email to cp...@googlegroups.com.
> Visit this group at http://groups.google.com/group/cp2k.
> For more options, visit https://groups.google.com/groups/opt_out.


--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

Donato Pera

unread,
Sep 27, 2013, 2:30:07 AM9/27/13
to cp...@googlegroups.com
Dear Iain,

using --enable-threads and --enable-openmp I get this result:


make LDFLAGS= -C /home/SWcbbc/SOFTWARE/CP2K_RELEASE/cp2k-2.4_trunk/cp2k/obj/Linux-x86-64-gfortran-ACML/tools -f /home/SWcbbc/SOFTWARE/CP2K_RELEASE/cp2k-2.4_trunk/cp2k/makefiles/Makefile makedepf90
make[1]: Entering directory `/home/SWcbbc/SOFTWARE/CP2K_RELEASE/cp2k-2.4_trunk/cp2k/obj/Linux-x86-64-gfortran-ACML/tools'
make[1]: `makedepf90' is up to date.
make[1]: Leaving directory `/home/SWcbbc/SOFTWARE/CP2K_RELEASE/cp2k-2.4_trunk/cp2k/obj/Linux-x86-64-gfortran-ACML/tools'
make -C /home/SWcbbc/SOFTWARE/CP2K_RELEASE/cp2k-2.4_trunk/cp2k/src -f /home/SWcbbc/SOFTWARE/CP2K_RELEASE/cp2k-2.4_trunk/cp2k/makefiles/Makefile all.dep
make[1]: Entering directory `/home/SWcbbc/SOFTWARE/CP2K_RELEASE/cp2k-2.4_trunk/cp2k/src'
make[1]: `/home/SWcbbc/SOFTWARE/CP2K_RELEASE/cp2k-2.4_trunk/cp2k/obj/Linux-x86-64-gfortran-ACML/psmp/all.dep' is up to date.
make[1]: Leaving directory `/home/SWcbbc/SOFTWARE/CP2K_RELEASE/cp2k-2.4_trunk/cp2k/src'
cp /home/SWcbbc/SOFTWARE/CP2K_RELEASE/cp2k-2.4_trunk/cp2k/cuda_tools/LIBCUDA_DEPENDENCIES /home/SWcbbc/SOFTWARE/CP2K_RELEASE/cp2k-2.4_trunk/cp2k/obj/Linux-x86-64-gfortran-ACML/psmp/libc_cuda.dep
cp /home/SWcbbc/SOFTWARE/CP2K_RELEASE/cp2k-2.4_trunk/cp2k/machine/LIBMA_DEPENDENCIES /home/SWcbbc/SOFTWARE/CP2K_RELEASE/cp2k-2.4_trunk/cp2k/obj/Linux-x86-64-gfortran-ACML/psmp/libc_ma.dep
make -C /home/SWcbbc/SOFTWARE/CP2K_RELEASE/cp2k-2.4_trunk/cp2k/obj/Linux-x86-64-gfortran-ACML/psmp -f /home/SWcbbc/SOFTWARE/CP2K_RELEASE/cp2k-2.4_trunk/cp2k/makefiles/Makefile _progr
make[1]: Entering directory `/home/SWcbbc/SOFTWARE/CP2K_RELEASE/cp2k-2.4_trunk/cp2k/obj/Linux-x86-64-gfortran-ACML/psmp'
/home/SWcbbc/SOFTWARE/SYSTEM/openmpi-1.4.3/GNU44/bin/mpif90 -m64 -fopenmp -D__GFORTRAN  -D__FFTW3 -D__LIBINT -D__parallel -D__BLACS -D__SCALAPACK -I/home/SWcbbc/SOFTWARE/SYSTEM/fftw-3.3/GNU44-double/include/ -I/home/SWcbbc/SOFTWARE/SYSTEM/ACML-4-4-0/ACML/gfortran64_mp//include/ -ffree-form -O2 -msse2 -ffast-math -march=opteron -cpp -D__COMPILE_ARCH="\"Linux-x86-64-gfortran-ACML\"" -D__COMPILE_DATE="\"Fri Sep 27 08:25:43 CEST 2013\"" -D__COMPILE_HOST="\"caliban.dm.univaq.it\"" -D__COMPILE_REVISION="\"svn:13039\"" -o /home/SWcbbc/SOFTWARE/CP2K_RELEASE/cp2k-2.4_trunk/cp2k/exe/Linux-x86-64-gfortran-ACML/cp2k.psmp cp2k.o /home/SWcbbc/SOFTWARE/CP2K_RELEASE/cp2k-2.4_trunk/cp2k/lib/Linux-x86-64-gfortran-ACML/psmp/libcp2k_lib.a /home/SWcbbc/SOFTWARE/CP2K_RELEASE/cp2k-2.4_trunk/cp2k/lib/Linux-x86-64-gfortran-ACML/psmp/libcp2k_dbcsr_lib.a /home/SWcbbc/SOFTWARE/CP2K_RELEASE/cp2k-2.4_trunk/cp2k/lib/Linux-x86-64-gfortran-ACML/psmp/libcp2k_fft_lib.a /home/SWcbbc/SOFTWARE/CP2K_RELEASE/cp2k-2.4_trunk/cp2k/lib/Linux-x86-64-gfortran-ACML/psmp/libcp2k_base_lib.a /home/SWcbbc/SOFTWARE/CP2K_RELEASE/cp2k-2.4_trunk/cp2k/lib/Linux-x86-64-gfortran-ACML/psmp/libcp2k_ma_lib.a /home/SWcbbc/SOFTWARE/CP2K_RELEASE/cp2k-2.4_trunk/cp2k/lib/Linux-x86-64-gfortran-ACML/psmp/libcp2k_elpa_lib.a    /home/SWcbbc/SOFTWARE/SYSTEM/scalapack-1.8.0/libscalapack_mp_ib.a /home/SWcbbc/SOFTWARE/SYSTEM/BLACS/LIB_MP/blacsF77init_MPI-LINUX-0.a /home/SWcbbc/SOFTWARE/SYSTEM/BLACS/LIB_MP/blacs_MPI-LINUX-0.a /home/SWcbbc/SOFTWARE/SYSTEM/BLACS/LIB_MP/blacsF77init_MPI-LINUX-0.a  /home/SWcbbc/SOFTWARE/SYSTEM/ACML-4-4-0/ACML/gfortran64_mp//lib/libacml_mp.a /home/SWcbbc/SOFTWARE/SYSTEM/fftw-3.3/GNU44-double/lib//libfftw3.a /home/SWcbbc/SOFTWARE/SYSTEM/libint/GNU44/lib//libderiv.a /home/SWcbbc/SOFTWARE/SYSTEM/libint/GNU44/lib//libint.a -lstdc++
/home/SWcbbc/SOFTWARE/CP2K_RELEASE/cp2k-2.4_trunk/cp2k/lib/Linux-x86-64-gfortran-ACML/psmp/libcp2k_fft_lib.a(fftw3_lib.o): In function `fftw3_create_plan_3d_':
fftw3_lib.F:(.text+0x10de): undefined reference to `dfftw_plan_with_nthreads_'
collect2: ld returned 1 exit status
make[1]: *** [/home/SWcbbc/SOFTWARE/CP2K_RELEASE/cp2k-2.4_trunk/cp2k/exe/Linux-x86-64-gfortran-ACML/cp2k.psmp] Error 1
make[1]: Leaving directory `/home/SWcbbc/SOFTWARE/CP2K_RELEASE/cp2k-2.4_trunk/cp2k/obj/Linux-x86-64-gfortran-ACML/psmp'
make: *** [build] Error 2


Thanks Donato

Iain Bethune

unread,
Sep 27, 2013, 3:39:31 AM9/27/13
to cp...@googlegroups.com
Hi Donato, you are still not linking CP2K with the fftw3_threads library. Where you currently have in your LDFLAGS:

/home/SWcbbc/SOFTWARE/SYSTEM/fftw-3.3/GNU44-double/lib//libfftw3.a

You should also link to libfftw3_thread.a (or _omp.a) which should be in the same directory (if you built it with --enable-threads or --enable-openmp respectively).
Reply all
Reply to author
Forward
0 new messages