Error with fftw compile frealign

Forums

Hi, Niko ,
I sole the mkl problem , but get a new error message. It looks like is involve with fftw .
I just have fftw-3.3.6 installed , Do you have any idea what cause this error?

gfortran merge_3d.o frealign_v9.a -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -o ../bin/merge_3d.exe
frealign_v9.a(fftw_plans.o): In function `fftw_plans_2d_':
fftw_plans.f:(.text+0x28): undefined reference to `fftwf_plan_dft_r2c_2d'
fftw_plans.f:(.text+0x42): undefined reference to `fftwf_plan_dft_c2r_2d'
frealign_v9.a(fftw_plans.o): In function `fftw_plans_3d_':
fftw_plans.f:(.text+0x7e): undefined reference to `fftwf_plan_dft_r2c_3d'
fftw_plans.f:(.text+0x9a): undefined reference to `fftwf_plan_dft_c2r_3d'
frealign_v9.a(fftw_plans.o): In function `fftw_fwd_':
fftw_plans.f:(.text+0xb9): undefined reference to `fftwf_execute_dft_r2c'
frealign_v9.a(fftw_plans.o): In function `fftw_bwd_':
fftw_plans.f:(.text+0xca): undefined reference to `fftwf_execute_dft_c2r'
collect2: error: ld returned 1 exit status
make: *** [merge_3d] Error 1

Best,
Zhao

It looks like you need to link with the fftw library. Why do you have to recompile Frealign? Did the included binaries not run on your system?

In reply to by niko

It is not able to run . if I use INSTALL script instal binaries

I got this error in mult_refine.log in scratch folder

@: Expression Syntax.
I checked the script , seems seems it is not able to call some commend correctly.

How to get a detailed log file ?

In reply to by wangzhao6127

This error has to do with the scripts, not the compiled program. I do not know what this error is due to. I am sorry but the support I can offer is limited and all I can do is recommend that you check the syntax of the command you used. Beyond this, I would suggest finding someone in your group or department you could have a look at the way you installed the software.

I have had the same problems with the MKL and FFTW library checks in Ubuntu and other Linux distros. I modified the corresponding Makefiles to be able to compile in these systems.
In summary,

ifeq ($(MKLROOT),"")
LF = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
else
LF = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wl,--start-group $(MKLROOT)/lib/intel64/libmkl_intel_lp64.a $(MKLROOT)/lib/intel64/libmkl_core.a $(MKLROOT)/lib/intel64/libmkl_sequential.a -Wl,--end-group
endif

becomes

# ifeq ($(MKLROOT),"")
LF = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -lfftw3f
# else
# LF = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wl,--start-group $(MKLROOT)/lib/intel64/libmkl_intel_lp64.a $(MKLROOT)/lib/intel64/libmkl_core.a $(MKLROOT)/lib/intel64/libmkl_sequential.a -Wl,--end-group
# endif

(add -static after -lfftw3f if static linking is desired)