Project

General

Profile

Bug #971

Build fails with cmake double fftw

Added by Sebastian Fritsch almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Category:
build system
Target version:
Affected version - extra info:
0aba76613a390e952fd0481fe6b5ba7155b2412b
Affected version:
Difficulty:
uncategorized
Close

Description

Recently I cannot build in double precision anymore, everything builds for single precision.
This is the make output:

[ 71%] Building C object src/kernel/CMakeFiles/g_luck.dir/g_luck.c.o
Linking C executable g_luck_d
../mdlib/libmd_d.so.6: undefined reference to `fftw_plan_guru_dft'
../mdlib/libmd_d.so.6: undefined reference to `fftw_plan_many_dft_r2c'
../mdlib/libmd_d.so.6: undefined reference to `fftw_plan_dft_r2c_3d'
../mdlib/libmd_d.so.6: undefined reference to `fftw_plan_dft_r2c_2d'
../mdlib/libmd_d.so.6: undefined reference to `fftw_plan_dft_c2r_3d'
../mdlib/libmd_d.so.6: undefined reference to `fftw_execute'
../mdlib/libmd_d.so.6: undefined reference to `fftw_plan_guru_dft_c2r'
../mdlib/libmd_d.so.6: undefined reference to `fftw_plan_dft_2d'
../mdlib/libmd_d.so.6: undefined reference to `fftw_execute_dft_c2r'
../mdlib/libmd_d.so.6: undefined reference to `fftw_plan_dft_c2r_2d'
../mdlib/libmd_d.so.6: undefined reference to `fftw_execute_dft_r2c'
../mdlib/libmd_d.so.6: undefined reference to `fftw_execute_dft'
../mdlib/libmd_d.so.6: undefined reference to `fftw_destroy_plan'
../mdlib/libmd_d.so.6: undefined reference to `fftw_plan_dft_3d'
../mdlib/libmd_d.so.6: undefined reference to `fftw_free'
../mdlib/libmd_d.so.6: undefined reference to `fftw_plan_many_dft_c2r'
../mdlib/libmd_d.so.6: undefined reference to `fftw_plan_many_dft'
../mdlib/libmd_d.so.6: undefined reference to `fftw_plan_guru_dft_r2c'
../mdlib/libmd_d.so.6: undefined reference to `fftw_malloc'

CMakeCache has the following part about fftw:
//Path to a file.
FFTW3F_INCLUDE_DIR:PATH=/usr/include

//Path to a library.
FFTW3F_LIBRARIES:FILEPATH=/usr/lib64/libfftw3f.so

//Path to a file.
FFTW3_INCLUDE_DIR:PATH=/usr/include

//Path to a library.
FFTW3_LIBRARIES:FILEPATH=/usr/lib64/libfftw3.so

Associated revisions

Revision cc0c5b37 (diff)
Added by Christoph Junghans almost 7 years ago

cmake: allow switch between single and double

  • only use FFTW_INCLUDE_DIR and FFTW_LIBRARY if user set them
  • otherwise do not initialize them
  • description will still show up in ccmake as advanced
  • fixes #971 (linking error when switching without "make rebuild_cache")

Change-Id: Idfce7d912c3d432f48fd3a7021c8c04d6311569b

History

#1 Updated by Christoph Junghans almost 7 years ago

Can you run "cmake -DGMX_DOUBLE=ON" on a fresh checkout?

#3 Updated by Roland Schulz almost 7 years ago

  • Status changed from New to Closed

Fixed by cc0c5b37f7adfbc4df2464dd43da8b3f10f2c712 (commit message didn't have correct redmine reference so issue wasn't auto-closed).

Also available in: Atom PDF