Previous Thread
Next Thread
Print Thread
Install with cmake, error:undefined reference to `sfftw_dest
#37486 05/05/19 07:20 AM
Joined: Feb 2019
Posts: 2
Jinfeng Offline OP
Forum Member
OP Offline
Forum Member
Joined: Feb 2019
Posts: 2
Hi,
I am using cmake to install the CHARMM version 42b2
make error after 99%:
[100%] Linking Fortran executable charmm
libcharmm_fortran.a(colfft_util.F90.o): In function `__colfft_util_MOD_delete_plan':
/home/hj/program/charmm_build/colfft_util.F90:3219: undefined reference to `sfftw_destroy_plan_'
/home/hj/program/charmm_build/colfft_util.F90:3216: undefined reference to `dfftw_destroy_plan_'
libcharmm_fortran.a(colfft_util.F90.o): In function `__colfft_util_MOD_z_fft_pd':
/home/hj/program/charmm_build/colfft_util.F90:1446: undefined reference to `dfftw_plan_many_dft_'
/home/hj/program/charmm_build/colfft_util.F90:1469: undefined reference to `dfftw_execute_dft_'
/home/hj/program/charmm_build/colfft_util.F90:1378: undefined reference to `dfftw_plan_many_dft_'
/home/hj/program/charmm_build/colfft_util.F90:1401: undefined reference to `dfftw_execute_dft_'
/home/hj/program/charmm_build/colfft_util.F90:1446: undefined reference to `dfftw_plan_many_dft_'
/home/hj/program/charmm_build/colfft_util.F90:1378: undefined reference to `dfftw_plan_many_dft_'
libcharmm_fortran.a(colfft_util.F90.o): In function `__colfft_util_MOD_y_fft_pd':
/home/hj/program/charmm_build/colfft_util.F90:1242: undefined reference to `dfftw_plan_many_dft_'
/home/hj/program/charmm_build/colfft_util.F90:1266: undefined reference to `dfftw_execute_dft_'
/home/hj/program/charmm_build/colfft_util.F90:1173: undefined reference to `dfftw_plan_many_dft_'
/home/hj/program/charmm_build/colfft_util.F90:1197: undefined reference to `dfftw_execute_dft_'
/home/hj/program/charmm_build/colfft_util.F90:1242: undefined reference to `dfftw_plan_many_dft_'
/home/hj/program/charmm_build/colfft_util.F90:1173: undefined reference to `dfftw_plan_many_dft_'
libcharmm_fortran.a(colfft_util.F90.o): In function `__colfft_util_MOD_x_fft_pd':
/home/hj/program/charmm_build/colfft_util.F90:1037: undefined reference to `dfftw_plan_many_dft_c2r_'
/home/hj/program/charmm_build/colfft_util.F90:1060: undefined reference to `dfftw_execute_dft_c2r_'
/home/hj/program/charmm_build/colfft_util.F90:966: undefined reference to `dfftw_plan_many_dft_r2c_'
/home/hj/program/charmm_build/colfft_util.F90:990: undefined reference to `dfftw_execute_dft_r2c_'
/home/hj/program/charmm_build/colfft_util.F90:1037: undefined reference to `dfftw_plan_many_dft_c2r_'
/home/hj/program/charmm_build/colfft_util.F90:966: undefined reference to `dfftw_plan_many_dft_r2c_'
libcharmm_fortran.a(colfft_util.F90.o): In function `__colfft_util_MOD_z_fft_ps':
/home/hj/program/charmm_build/colfft_util.F90:1451: undefined reference to `sfftw_plan_many_dft_'
/home/hj/program/charmm_build/colfft_util.F90:1472: undefined reference to `sfftw_execute_dft_'
/home/hj/program/charmm_build/colfft_util.F90:1383: undefined reference to `sfftw_plan_many_dft_'
/home/hj/program/charmm_build/colfft_util.F90:1404: undefined reference to `sfftw_execute_dft_'
/home/hj/program/charmm_build/colfft_util.F90:1451: undefined reference to `sfftw_plan_many_dft_'
/home/hj/program/charmm_build/colfft_util.F90:1383: undefined reference to `sfftw_plan_many_dft_'
libcharmm_fortran.a(colfft_util.F90.o): In function `__colfft_util_MOD_y_fft_ps':
/home/hj/program/charmm_build/colfft_util.F90:1247: undefined reference to `sfftw_plan_many_dft_'
/home/hj/program/charmm_build/colfft_util.F90:1269: undefined reference to `sfftw_execute_dft_'
/home/hj/program/charmm_build/colfft_util.F90:1178: undefined reference to `sfftw_plan_many_dft_'
/home/hj/program/charmm_build/colfft_util.F90:1200: undefined reference to `sfftw_execute_dft_'
/home/hj/program/charmm_build/colfft_util.F90:1247: undefined reference to `sfftw_plan_many_dft_'
/home/hj/program/charmm_build/colfft_util.F90:1178: undefined reference to `sfftw_plan_many_dft_'
libcharmm_fortran.a(colfft_util.F90.o): In function `__colfft_util_MOD_x_fft_ps':
/home/hj/program/charmm_build/colfft_util.F90:1041: undefined reference to `sfftw_plan_many_dft_c2r_'
/home/hj/program/charmm_build/colfft_util.F90:1063: undefined reference to `sfftw_execute_dft_c2r_'
/home/hj/program/charmm_build/colfft_util.F90:970: undefined reference to `sfftw_plan_many_dft_r2c_'
/home/hj/program/charmm_build/colfft_util.F90:993: undefined reference to `sfftw_execute_dft_r2c_'
/home/hj/program/charmm_build/colfft_util.F90:1041: undefined reference to `sfftw_plan_many_dft_c2r_'
/home/hj/program/charmm_build/colfft_util.F90:970: undefined reference to `sfftw_plan_many_dft_r2c_'
collect2: error: ld returned 1 exit status
CMakeFiles/charmm.dir/build.make:99: recipe for target 'charmm' failed
make[2]: *** [charmm] Error 1
CMakeFiles/Makefile2:187: recipe for target 'CMakeFiles/charmm.dir/all' failed
make[1]: *** [CMakeFiles/charmm.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

So what's wrong, and how to solve the problem?
Thank you in advance

Re: Install with cmake, error:undefined reference to `sfftw_dest
Jinfeng #37488 05/06/19 03:18 PM
Joined: Sep 2003
Posts: 8,498
rmv Online Content
Forum Member
Online Content
Forum Member
Joined: Sep 2003
Posts: 8,498
The messages suggest an issue with how the location of the FFTW libraries was specified.


Rick Venable
computational chemist

Re: Install with cmake, error:undefined reference to `sfftw_dest
Jinfeng #38055 08/18/20 03:07 PM
Joined: Aug 2020
Posts: 2
P
Forum Member
Offline
Forum Member
P
Joined: Aug 2020
Posts: 2
I have met the same problem when installing charmm 44b2 with cmake. Sorry that I do not understand the meaning of 'how the location of the FFTW libraries was specified'. Should I specify the environment variables or should I do something else? Details are as below.

Linking Fortran executable charmm
libcharmm_fortran.a(colfft_util.F90.o): In function `__colfft_util_MOD_delete_plan':
colfft_util.F90:(.text+0xcb): undefined reference to `sfftw_destroy_plan_'
colfft_util.F90:(.text+0xe3): undefined reference to `dfftw_destroy_plan_'
libcharmm_fortran.a(colfft_util.F90.o): In function `__colfft_util_MOD_z_fft_pd._omp_fn.0':
colfft_util.F90:(.text+0x2390): undefined reference to `dfftw_execute_dft_'
libcharmm_fortran.a(colfft_util.F90.o): In function `__colfft_util_MOD_z_fft_pd._omp_fn.1':
colfft_util.F90:(.text+0x2420): undefined reference to `dfftw_execute_dft_'
libcharmm_fortran.a(colfft_util.F90.o): In function `__colfft_util_MOD_y_fft_pd._omp_fn.2':
colfft_util.F90:(.text+0x24a5): undefined reference to `dfftw_execute_dft_'
libcharmm_fortran.a(colfft_util.F90.o): In function `__colfft_util_MOD_y_fft_pd._omp_fn.3':
colfft_util.F90:(.text+0x2525): undefined reference to `dfftw_execute_dft_'
libcharmm_fortran.a(colfft_util.F90.o): In function `__colfft_util_MOD_x_fft_pd._omp_fn.7':
colfft_util.F90:(.text+0x28d0): undefined reference to `dfftw_execute_dft_r2c_'
libcharmm_fortran.a(colfft_util.F90.o): In function `__colfft_util_MOD_x_fft_pd._omp_fn.8':
colfft_util.F90:(.text+0x2960): undefined reference to `dfftw_execute_dft_c2r_'
libcharmm_fortran.a(colfft_util.F90.o): In function `__colfft_util_MOD_z_fft_ps._omp_fn.12':
colfft_util.F90:(.text+0x2fb0): undefined reference to `sfftw_execute_dft_'
libcharmm_fortran.a(colfft_util.F90.o): In function `__colfft_util_MOD_z_fft_ps._omp_fn.13':
colfft_util.F90:(.text+0x3040): undefined reference to `sfftw_execute_dft_'
libcharmm_fortran.a(colfft_util.F90.o): In function `__colfft_util_MOD_y_fft_ps._omp_fn.14':
colfft_util.F90:(.text+0x30c5): undefined reference to `sfftw_execute_dft_'
libcharmm_fortran.a(colfft_util.F90.o): In function `__colfft_util_MOD_y_fft_ps._omp_fn.15':
colfft_util.F90:(.text+0x3145): undefined reference to `sfftw_execute_dft_'
libcharmm_fortran.a(colfft_util.F90.o): In function `__colfft_util_MOD_x_fft_ps._omp_fn.19':
colfft_util.F90:(.text+0x34f0): undefined reference to `sfftw_execute_dft_r2c_'
libcharmm_fortran.a(colfft_util.F90.o): In function `__colfft_util_MOD_x_fft_ps._omp_fn.20':
colfft_util.F90:(.text+0x3580): undefined reference to `sfftw_execute_dft_c2r_'
libcharmm_fortran.a(colfft_util.F90.o): In function `__colfft_util_MOD_z_fft_pd':
colfft_util.F90:(.text+0x3f46): undefined reference to `dfftw_plan_many_dft_'
colfft_util.F90:(.text+0x448e): undefined reference to `dfftw_plan_many_dft_'
colfft_util.F90:(.text+0x472f): undefined reference to `dfftw_plan_many_dft_'
colfft_util.F90:(.text+0x47ba): undefined reference to `dfftw_plan_many_dft_'
libcharmm_fortran.a(colfft_util.F90.o): In function `__colfft_util_MOD_y_fft_pd':
colfft_util.F90:(.text+0x4bb6): undefined reference to `dfftw_plan_many_dft_'
libcharmm_fortran.a(colfft_util.F90.o):colfft_util.F90:(.text+0x50fe): more undefined references to `dfftw_plan_many_dft_' follow
libcharmm_fortran.a(colfft_util.F90.o): In function `__colfft_util_MOD_x_fft_pd':
colfft_util.F90:(.text+0x6506): undefined reference to `dfftw_plan_many_dft_c2r_'
colfft_util.F90:(.text+0x6ad6): undefined reference to `dfftw_plan_many_dft_r2c_'
colfft_util.F90:(.text+0x6dad): undefined reference to `dfftw_plan_many_dft_c2r_'
colfft_util.F90:(.text+0x6e30): undefined reference to `dfftw_plan_many_dft_r2c_'
libcharmm_fortran.a(colfft_util.F90.o): In function `__colfft_util_MOD_z_fft_ps':
colfft_util.F90:(.text+0x7e6e): undefined reference to `sfftw_plan_many_dft_'
colfft_util.F90:(.text+0x83b6): undefined reference to `sfftw_plan_many_dft_'
colfft_util.F90:(.text+0x8653): undefined reference to `sfftw_plan_many_dft_'
colfft_util.F90:(.text+0x86de): undefined reference to `sfftw_plan_many_dft_'
libcharmm_fortran.a(colfft_util.F90.o): In function `__colfft_util_MOD_y_fft_ps':
colfft_util.F90:(.text+0x8ace): undefined reference to `sfftw_plan_many_dft_'
libcharmm_fortran.a(colfft_util.F90.o):colfft_util.F90:(.text+0x9016): more undefined references to `sfftw_plan_many_dft_' follow
libcharmm_fortran.a(colfft_util.F90.o): In function `__colfft_util_MOD_x_fft_ps':
colfft_util.F90:(.text+0xa40e): undefined reference to `sfftw_plan_many_dft_c2r_'
colfft_util.F90:(.text+0xa9d6): undefined reference to `sfftw_plan_many_dft_r2c_'
colfft_util.F90:(.text+0xacac): undefined reference to `sfftw_plan_many_dft_c2r_'
colfft_util.F90:(.text+0xad2f): undefined reference to `sfftw_plan_many_dft_r2c_'
collect2: error: ld returned 1 exit status
make[2]: *** [charmm] Error 1
make[1]: *** [CMakeFiles/charmm.dir/all] Error 2
make: *** [all] Error 2

Re: Install with cmake, error:undefined reference to `sfftw_dest
Jinfeng #38056 08/18/20 05:53 PM
Joined: Sep 2003
Posts: 8,498
rmv Online Content
Forum Member
Online Content
Forum Member
Joined: Sep 2003
Posts: 8,498
From the output of "./configure -h"

Code
Helpful environment variables

    Setting these variables is usually unnecessary.
    It is usually enough to have the feature or
    a related binary first in your path.

Feature     Environment variable(s)

Compiler....CC, CXX, FC
CUDA........CUDA_TOOLKIT_ROOT_DIR, CUDA_BIN_PATH
OpenMM......OPENMM_PLUGIN_DIR, OPENMM_DIR, OPENMM_HOME
FFTW........FFTW_DIR, FFTW_HOME
MKL.........MKLROOT, MKL_HOME

Note that CHARMM requires both single and double precision versions of FFTW libraries to be available in the relevant lib directory.

I should also note that I ran into an OpenMP issue with c44b2, and found that the simplest workaround was to build with install.com instead of configure/cmake; this problem was fixed in the just released c45b1 version.


Rick Venable
computational chemist


Moderated by  lennart, rmv 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 5.6.33-0+deb8u1 Page Time: 0.008s Queries: 22 (0.003s) Memory: 0.9221 MB (Peak: 1.0032 MB) Data Comp: Off Server Time: 2020-09-25 00:39:38 UTC
Valid HTML 5 and Valid CSS