Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Linking problems with -fast

velvia
Beginner
597 Views
Hi,
My program compiles without any problem with the -O3 option, but when I change it to -fast, I have the following error message at link time. Note that the problem shows up on our Linux box withcomposer_xe_2011_sp1.7.256, but does not show up on a mac withcomposer_xe_2011_sp1.9.289. Here is the message on Linux:
[bash]ifort -fast -assume realloc_lhs -openmp -g -o ../program/fire.ifort/bin/fast \ ../program/fire.ifort/objects/utilities/kindsAndConstants.o ../program/fire.ifort/objects/utilities/timer.o (other object files) ../program/fire.ifort/objects/main/main.o \ -L/home/intel/composer_xe_2011_sp1.7.256/mkl/lib -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -openmp -lpthread -lxml2 -lz -lm ipo: warning #11021: unresolved mkl_pds_lp64_get_proc_pardiso Referenced in libmkl_core.a(pardiso_lp64.o) Referenced in libmkl_core.a(permutetips_lp64.o) Referenced in libmkl_core.a(statistics_fc_lp64.o) Referenced in libmkl_core.a(sp_statistics_fc_lp64.o) Referenced in libmkl_core.a(ssnslv_lp64.o) Referenced in libmkl_core.a(sssslv_lp64.o) Referenced in libmkl_core.a(sp_ssnslv_lp64.o) Referenced in libmkl_core.a(sp_sssslv_lp64.o) ipo: warning #11021: unresolved mkl_pds_lp64_get_dynamic_pardiso Referenced in libmkl_core.a(pardiso_lp64.o) ipo: warning #11021: unresolved mkl_pds_lp64_diag_pardiso[/bash]
And then there are pages of error messages. They end up with
[bash]/home/intel/composer_xe_2011_sp1.7.256/mkl/lib/intel64/libmkl_core.a(_mc3_cpotrf_l_small.o): In function `mkl_lapack_ps_mc3_cpotrf_l_small': ../../../../lapack_ps/kernel/mc3/32e/cpotrf_l_small.f:(.text+0x8ab): undefined reference to `mkl_blas_cdotc' ../../../../lapack_ps/kernel/mc3/32e/cpotrf_l_small.f:(.text+0x92f): undefined reference to `mkl_blas_cgemv' /home/intel/composer_xe_2011_sp1.7.256/mkl/lib/intel64/libmkl_core.a(_p4n_zgeru.o): In function `mkl_blas_p4n_zgeru': ../../../../blas/kernel/p4n/level2/32e/zgeru.f:(.text+0x3b4): undefined reference to `mkl_blas_zaxpy' ../../../../blas/kernel/p4n/level2/32e/zgeru.f:(.text+0x439): undefined reference to `mkl_blas_zaxpy' ../../../../blas/kernel/p4n/level2/32e/zgeru.f:(.text+0x500): undefined reference to `mkl_blas_zaxpy' make: *** [../program/fire.ifort/bin/fast] Error 1[/bash]
Any idea on what's wrong?
Franois
0 Kudos
4 Replies
mecej4
Honored Contributor III
597 Views
That libmkl_core.a is being linked, instead of the corresponding shared library, appears to me to be a possible cause of the problem.

Did you specify -Bstatic when compiling any sources?
0 Kudos
velvia
Beginner
597 Views
Sources are all compiled with the same options as
[bash]ifort -fast -assume realloc_lhs -openmp -g -fpp -DIFORT -module ../program/fire.ifort/mod -c utilities/kindsAndConstants.f90 -o ../program/fire.ifort/objects/utilities/kindsAndConstants.o[/bash]
0 Kudos
Steven_L_Intel1
Employee
597 Views
-fast on Linux translates to -ipo, -O3, -no-prec-div, -static, and -xHost. Note that -static is in there. If you don't want all of those, then specify the individual options you want.
0 Kudos
velvia
Beginner
597 Views
Thanks for the help Steve. It solved my problem.
0 Kudos
Reply