Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make error #11

Open
kmoats90 opened this issue May 24, 2017 · 1 comment
Open

make error #11

kmoats90 opened this issue May 24, 2017 · 1 comment

Comments

@kmoats90
Copy link

First, I see a couple of things that seem weird:

When I run cmake, I get a warning that BUILD_STEPS and CXX_FLAGS were not used by the project. Here are the flags I used: cmake -DFFTW_ROOT=${HOME}/usr/fftw-3.3.6-pl2 -DFFTW_USE_STATIC_LIBS=true -DCUDA_ROOT=/public/apps/cuda/8.0 -DBUILD_GPU=true -DBUILD_STEPS=true -DCXX_FLAGS="-O3" -DBUILD_SHARED=false ..

When I try to make, it detects C and CXX compiler as GNU 4.4.7 but I have loaded the gcc 5.1.0 module.
It continues fine until this happens:

Scanning dependencies of target step1_gpu [ 92%] Building CXX object steps/step1/CMakeFiles/step1_gpu.dir/step1_gpu.cpp.o Scanning dependencies of target step1_gpuf [ 94%] Building CXX object steps/step1/CMakeFiles/step1_gpuf.dir/step1_gpuf.cpp.o [ 97%] Linking CXX executable step1_gpu [100%] Linking CXX executable step1_gpuf /home/kmoats/usr/fftw-3.3.6-pl2/lib/libfftw3_threads.a(libfftw3_threads_la-threads.o): In function fftw_threads_register_planner_hooks':
threads.c:(.text+0x5d4): undefined reference to fftw_set_planner_hooks' collect2: error: ld returned 1 exit status make[2]: *** [steps/step1/step1_gpu] Error 1 make[1]: *** [steps/step1/CMakeFiles/step1_gpu.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... /home/kmoats/usr/fftw-3.3.6-pl2/lib/libfftw3_threads.a(libfftw3_threads_la-threads.o): In function fftw_threads_register_planner_hooks':
threads.c:(.text+0x5d4): undefined reference to fftw_set_planner_hooks' collect2: error: ld returned 1 exit status make[2]: *** [steps/step1/step1_gpuf] Error 1 make[1]: *** [steps/step1/CMakeFiles/step1_gpuf.dir/all] Error 2 make: *** [all] Error 2

I attached the output from "make VERBOSE=2". Thanks for the help.
verbose.txt

@frobnitzem
Copy link

frobnitzem commented Jun 21, 2019

I believe the issue here is because the FindFFTW.cmake produces the wrong link order in the line:

/public/apps/openmpi/1.8.6/gcc.4.4.7/bin/mpicxx -O3 -fopenmp -I/home/kmoats/usr/fftw-3.3.6-pl2/include -fopenmp -rdynamic CMakeFiles/step1_gpu.dir/step1_gpu.cpp.o CMakeFiles/step1_gpu.dir/step1_gpu_generated_kernels.cu.o -o step1_gpu -Wl,-rpath,/public/apps/cuda/8.0/lib64 /public/apps/cuda/8.0/lib64/libcudart_static.a -lpthread -ldl -lrt ../../libaccfft_gpu.a ../../libaccfft_utils.a /home/kmoats/usr/fftw-3.3.6-pl2/lib/libfftw3.a /home/kmoats/usr/fftw-3.3.6-pl2/lib/libfftw3_threads.a /public/apps/cuda/8.0/lib64/libcudart_static.a -lpthread -ldl -lrt /public/apps/cuda/8.0/lib64/libcufft.so

Switching libfftw3.a libfftw3_threads.a to libfftw3_threads.a libfftw3.a should resolve the fftw_set_planner_hooks function used by fftw_threads_register_planner_hooks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants