- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to compile a code written in fortran90/95 and I'm getting this error:
user:~> make
ifort -O3 -lmpi -L/opt/local/intel/fftw/lib -I/opt/local/intel/fftw/include - I/opt/sgi/mpt/mpt-2.03/include -L/opt/sgi/mpt/mpt-2.03/lib -o /test module_param.o incompact3d.o mesure.o schemas.o derive.o spectral.o tools.o filtre.o parametre.o forcage.o navier.o convdiff.o viv.o slfft3d_shift.o poisson.o
slfft3d_shift.o: In function 'slfft3d_shift_':
slfft3d_shift.f90:(.text+0x587e): undefined reference to 'rfftw3d_f77_mpi_create_plan_'
slfft3d_shift.f90:(.text+0x58a3): undefined reference to 'rfftwnd_f77_mpi_local_sizes_'
slfft3d_shift.f90:(.text+0x58cd): undefined reference to 'rfftwnd_f77_mpi_'
slfft3d_shift.f90:(.text+0x58d9): undefined reference to 'rfftwnd_f77_mpi_destroy_plan_'
slfft3d_shift.f90:(.text+0x91ca): undefined reference to 'rfftw3d_f77_mpi_create_plan_'
slfft3d_shift.f90:(.text+0x91ef): undefined reference to 'rfftwnd_f77_mpi_local_sizes_'
slfft3d_shift.f90:(.text+0x9219): undefined reference to 'rfftwnd_f77_mpi_'
slfft3d_shift.f90:(.text+0x9225): undefined reference to 'rfftwnd_f77_mpi_destroy_plan_'
slfft3d_shift.f90:(.text+0x111e7): undefined reference to 'rfftwnd_f77_one_real_to_complex_'
make: *** [/test] Error 1
Here's the Makefile:
FC = ifort
OPTFC = -O3 -lmpi -L/opt/local/intel/fftw/lib -I/opt/local/intel/fftw/include - I/opt/sgi/mpt/mpt-2.03/include -L/opt/sgi/mpt/mpt-2.03/lib/test : module_param.o incompact3d.o mesure.o schemas.o derive.o spectral.o tools.o poisson.o filtre.o parametre.o slfft3d_shift.o forcage.o navier.o convdiff.o viv.o
$(FC) $(OPTFC) -o /test module_param.o incompact3d.o mesure.o schemas.o derive.o spectral.o tools.o filtre.o parametre.o forcage.o navier.o convdiff.o viv.o slfft3d_shift.o poisson.o
module_param.o : module_param.f90
$(FC) $(OPTFC) -c module_param.f90 incompact3d.o : incompact3d.f90
$(FC) $(OPTFC) -c incompact3d.f90 mesure.o : mesure.f90
$(FC) $(OPTFC) -c mesure.f90 spectral.o : spectral.f90
$(FC) $(OPTFC) -c spectral.f90 schemas.o : schemas.f90
$(FC) $(OPTFC) -c schemas.f90 derive.o : derive.f90
$(FC) $(OPTFC) -c derive.f90 tools.o : tools.f90
$(FC) $(OPTFC) -c tools.f90 forcage.o : forcage.f90
$(FC) $(OPTFC) -c forcage.f90 navier.o : navier.f90
$(FC) $(OPTFC) -c navier.f90 filtre.o : filtre.f90
$(FC) $(OPTFC) -c filtre.f90 parametre.o : parametre.f90
$(FC) $(OPTFC) -c parametre.f90 convdiff.o : convdiff.f90
$(FC) $(OPTFC) -c convdiff.f90 poisson.o : poisson.f90
$(FC) $(OPTFC) -c poisson.f90 slfft3d_shift.o : slfft3d_shift.f90
$(FC) $(OPTFC) -c slfft3d_shift.f90 viv.o : viv.f90
$(FC) $(OPTFC) -c viv.f90
When I include the libraries required in the Makefile I get the following message:
user:~/test> make
ifort -O3 -lmpi -I/opt/local/intel/fftw/include -L/opt/local/gnu/fftw - I/opt/sgi/mpt/mpt-2.03/include -L/opt/sgi/mpt/mpt-2.03/lib -I/opt/fftw/2.1.5.1/cnos/include -L/opt/intel/composerxe-2011.0.084/mkl/include/fftw/fftw_f77.i -L/opt/fftw/2.1.5.1/cnos/lib -I/opt/local/intel/fftw -I/opt/fftw/3.1.1/cnos/include -L/opt/fftw/3.1.1/cnos/lib - I/usr/local/packages/nag/p3dfft-single/2.3/include -L/usr/local/packages/nag/p3dfft- single/2.3/lib -o /home/u/guitar88/bin/teste module_param.o incompact3d.o mesure.o schemas.o derive.o spectral.o tools.o filtre.o \
parametre.o forcage.o navier.o convdiff.o viv.o slfft3d_shift.o poisson.o -lm -L/opt/local/intel/fftw/lib -lsrfftw_mpi \
-lsrfftw -lsfftw_mpi -lsfftw
ld: cannot find -lsrfftw_mpi
make: *** [/test] Error 1
I'm using ifort compiler and I'm on a supercomputer environment working with MPI. Please, any clue of what is going on? Cheers.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Leonardo,
could you please make sure the libraries like libsrfftw_mpi.a are in the directory like /opt/intel/fftw/lib?
On the other hand, as i recalled, we add prebuild fftw library in intel fotran compiler. please see http://software.intel.com/en-us/articles/intel-mkl-main-libraries-contain-fftw3-interfaces
And if you build the wrapper library yourself, the libray 's name is like libffw3xf_gnu.a libfftw2xf_intel.a etc. please see some related documetation: http://software.intel.com/en-us/articles/fft-interfaces-in-intelr-mkl
not sure if you are using MKL pre-build FFTW library. Please see the MKL userguide for more information.
http://software.intel.com/sites/products/documentation/doclib/mkl_sa/11/mkl_userguide_lnx/index.htm
Best Regards
Ying
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Leonardo,
Add some information for your reference.
There are another similiar question in the forum http://software.intel.com/en-us/forums/topic/301790, the functions are from fftw2xf,
they are not in prebuild mkl library, so if you want to use MKL MPI FFTW2 libarary, you need
first, buid the mpi FFTW wrapper library.
the source code for the wrapper, makefile are located in <mkl dir>\interfacers\fftw2x_cdft, afte enter command like make libia32, you will get library which name is like libfftw2x_cdft_DOUBLE.a . For the build details, please read the mkl manual appendix E.
Then. link mkl library and the wrapper library into your code
the mkl library can be gotten by choose on http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/
for example, the comand line shoud be like
> ifort -L/opt/intel/mkl/lib/ia32 -lfftw2x_cdft_double -mkl=cluster
Hope it helps,
Best Regards,
Ying
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page