- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all
I copied the TR Solver Fortran-77 example: "ex_nlsqp_f.f" to my home directory and tried to compile it but I get a lot of errors as is shown below. I would appreciate any help. I add the option "-logo" to provide information about the installed product in the output.
Thanks you all!
Jorge
[...]$ ifort -logo -I/opt/intel/mkl/include -o ex_nlsqp_ f ex_nlsqp_f.f -L/opt/intel/mkl/lib/ia32 /opt/intel/mkl/lib/ia32/libmkl_intel.a /opt/intel/mkl/lib/ia32/libmkl_core.a /opt/intel/mkl/lib/ia32/libmkl_solver_sequ ential.a
Intel(R) Fortran 12.0-1311
GNU ld version 2.20.51.0.2-20.fc13 20091009
Copyright (C) 1985-2011 Intel Corporation. All rights reserved.
FOR NON-COMMERCIAL USE ONLY
/opt/intel/mkl/lib/ia32/libmkl_intel.a(_djacobi.o): In function `DJACOBI_': _djacobi.c:(.text+0x29): undefined reference to `mkl_trs_djacobi'
/opt/intel/mkl/lib/ia32/libmkl_core.a(dnlsqp.o): In function `mkl_trs_dmintrpd_r ci_f':
../../../../solvers_tr/kernel/default/dnlsqp.f:(.text+0x3cb): undefined referenc e to `mkl_blas_dgemv'
/opt/intel/mkl/lib/ia32/libmkl_core.a(dnlsqpbc.o): In function `mkl_trs_dmintrns elc_rci_f':
../../../../solvers_tr/kernel/default/dnlsqpbc.f:(.text+0x448): undefined refere nce to `mkl_blas_dgemv'
/opt/intel/mkl/lib/ia32/libmkl_core.a(dtsnlsqpbc.o): In function `mkl_trs_dmintr _ls_lc':
../../../../solvers_tr/kernel/default/dtsnlsqpbc.f:(.text+0x546): undefined refe rence to `mkl_blas_dgemv'
../../../../solvers_tr/kernel/default/dtsnlsqpbc.f:(.text+0x98e): undefined refe rence to `mkl_blas_dgemv'
../../../../solvers_tr/kernel/default/dtsnlsqpbc.f:(.text+0x9ca): undefined refe rence to `mkl_blas_dgemv'
/opt/intel/mkl/lib/ia32/libmkl_core.a(dtsnlsqpbc.o):
../../../../solvers_tr/kerne l/default/dtsnlsqpbc.f:(.text+0xb39): more undefined references to `mkl_blas_dge mv' follow /opt/intel/mkl/lib/ia32/libmkl_core.a(dtsnlsqpbc.o): In function `mkl_trs_dmintr _ls_lc': ../../../../solvers_tr/kernel/default/dtsnlsqpbc.f:(.text+0xd0c): undefined refe rence to `mkl_blas_dgemm' ../../../../solvers_tr/kernel/default/dtsnlsqpbc.f:(.text+0xd76): undefined refe rence to `mkl_blas_dgemm' ../../../../solvers_tr/kernel/default/dtsnlsqpbc.f:(.text+0xdbc): undefined refe rence to `mkl_blas_dgemm' ../../../../solvers_tr/kernel/default/dtsnlsqpbc.f:(.text+0xe26): undefined refe rence to `mkl_blas_dgemm' ../../../../solvers_tr/kernel/default/dtsnlsqpbc.f:(.text+0xe6c): undefined refe rence to `mkl_blas_dgemm' ../../../../solvers_tr/kernel/default/dtsnlsqpbc.f:(.text+0x120f): undefined ref erence to `mkl_blas_dgemv' ../../../../solvers_tr/kernel/default/dtsnlsqpbc.f:(.text+0x124b): undefined ref erence to `mkl_blas_dgemv' ../../../../solvers_tr/kernel/default/dtsnlsqpbc.f:(.text+0x1371): undefined ref erence to `mkl_blas_dgemv' ../../../../solvers_tr/kernel/default/dtsnlsqpbc.f:(.text+0x13ad): undefined ref erence to `mkl_blas_dgemv' /opt/intel/mkl/lib/ia32/libmkl_core.a(dtsnlsqp.o): In function `mkl_trs_dmintr_l s_pd': ../../../../solvers_tr/kernel/default/dtsnlsqp.f:(.text+0x89): undefined referen ce to `mkl_blas_dgemm' ../../../../solvers_tr/kernel/default/dtsnlsqp.f:(.text+0xbe): undefined referen ce to `mkl_blas_dgemv' ../../../../solvers_tr/kernel/default/dtsnlsqp.f:(.text+0x262): undefined refere nce to `mkl_lapack_dpotrf' ../../../../solvers_tr/kernel/default/dtsnlsqp.f:(.text+0x5ce): undefined refere nce to `mkl_lapack_dpotrf' ../../../../solvers_tr/kernel/default/dtsnlsqp.f:(.text+0xb63): undefined refere nce to `mkl_blas_dgemv' ../../../../solvers_tr/kernel/default/dtsnlsqp.f:(.text+0xc6f): undefined refere nce to `mkl_blas_dgemv' /opt/intel/mkl/lib/ia32/libmkl_core.a(dtsnlsqpbc_sub.o): In function `mkl_trs_dm intr_ls_npd': ../../../../solvers_tr/kernel/default/dtsnlsqpbc_sub.f:(.text+0x92): undefined r eference to `mkl_blas_dgemm' ../../../../solvers_tr/kernel/default/dtsnlsqpbc_sub.f:(.text+0xcc): undefined r eference to `mkl_blas_dgemv' ../../../../solvers_tr/kernel/default/dtsnlsqpbc_sub.f:(.text+0x28a): undefined reference to `mkl_lapack_dpotrf' ../../../../solvers_tr/kernel/default/dtsnlsqpbc_sub.f:(.text+0xadc): undefined reference to `mkl_blas_dgemv' ../../../../solvers_tr/kernel/default/dtsnlsqpbc_sub.f:(.text+0xc14): undefined reference to `mkl_blas_dgemv' ../../../../solvers_tr/kernel/default/dtsnlsqpbc_sub.f:(.text+0xdf7): undefined reference to `mkl_lapack_dpotrf' /opt/intel/mkl/lib/ia32/libmkl_core.a(dtrtrs.o): In function `mkl_lapack_dtrtrs' : __tmp_dtrtrs.f:(.text+0x1da): undefined reference to `mkl_serv_xerbla' __tmp_dtrtrs.f:(.text+0x27d): undefined reference to `mkl_blas_dtrsm' /opt/intel/mkl/lib/ia32/libmkl_core.a(dpotrs.o): In function `mkl_lapack_dpotrs' : __tmp_dpotrs.f:(.text+0xd4): undefined reference to `mkl_serv_xerbla' __tmp_dpotrs.f:(.text+0x142): undefined reference to `mkl_blas_dtrsm' __tmp_dpotrs.f:(.text+0x188): undefined reference to `mkl_blas_dtrsm' __tmp_dpotrs.f:(.text+0x1d2): undefined reference to `mkl_blas_dtrsm' __tmp_dpotrs.f:(.text+0x218): undefined reference to `mkl_blas_dtrsm'
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are some extraneous spaces in your command line as shown above; for example, you have "libmkl_solver_sequ ential.a", with a space between "sequ" and "ential". Secondly, your specify the -L path option but then list the full paths to the library files, so the -L option has no real effect on what follows.
Considering that you are working on a simple example, you could try the much simpler compile/link command:
[bash]$ ifort -mkl ex_nlsqp_f.f -o ex_nlsqp[/bash]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are problems in your command line. You should try this:
ifort -I/opt/intel/mkl/include -o ex_nlsqp_ f ex_nlsqp_f.f -Wl,--start-group /opt/intel/mkl/lib/ia32/libmkl_intel.a /opt/intel/mkl/lib/ia32/libmkl_sequential.a /opt/intel/mkl/lib/ia32/libmkl_core.a -Wl,--end-group -lpthread -lm
There is an online tool to help you sort out the link line arguments: http://software.intel.com/sites/products/mkl/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your helpful and quick replay!!! The extraneous spaces in my command line emerged during the process of copy and paste. Sorry about that! I´ll be more careful next time. The compile/link command you proposed work perfectly at compilation time but at run time it gave me the error:
./ex_nlsqp: error while loading shared libraries: libmkl_intel.so: cannot open shared object file: No such file or directory
I avoided the error modifying the compile/link command linking all libraries statically:
$ ifort -mkl -static-intel ex_nlsqp_f.f -o ex_nlsqp
It would be interesting to find a solution linking all libraries dynamically.
mecej4 wrote:
There are some extraneous spaces in your command line as shown above; for example, you have "libmkl_solver_sequ ential.a", with a space between "sequ" and "ential". Secondly, your specify the -L path option but then list the full paths to the library files, so the -L option has no real effect on what follows.
Considering that you are working on a simple example, you could try the much simpler compile/link command:
$ ifort -mkl ex_nlsqp_f.f -o ex_nlsqp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
./ex_nlsqp: error while loading shared libraries: libmkl_intel.so: cannot open shared object file: No such file or directoryThe solution is simple. If $LD_LIBRARY_PATH is not set, set it to the directory containing libmkl_intel_so. If the variable is set, add the directory to it by using the command: [bash]export LD_LIBRARY_PATH={path to Intel MKL lib directory}:$LD_LIBRARY_PATH[/bash]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sourcing either the compilervars or mklvars script supplied with Intel compilers would set LD_LIBRARY_PATH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everyone,
I'm giving up! my goal was to compile and run some fortran codes using dfti. At this point I succed compiling and linking but I do ha a run time error.
Heredown details:
Platform mac os x lion
software: composer_xe_2013.1.119
compiling script:
ifort -o exec $1 $2 $3 -L/opt/intel/composer_xe_2013/mkl/lib /opt/intel/composer_xe_2013/mkl/lib/libmkl_intel_ilp64.dylib -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -I/opt/intel/composer_xe_2013/include -i8
run time error:
dyld: Library not loaded: libmkl_intel_ilp64.dylib
Referenced from: /Users/erwin/calculos/Maxwell_calc/./exec
Reason: image not found
Trace/BPT trap: 5
That it is! Can you help me please guys?
Thanks,
Erwin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
man dyldProbably, the environmental variable DYLD_LIBRARY_PATH is not set or is not set to include the flagged shared library's path.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page