Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

lapack95 project build error

wilcox__nigel
Beginner
848 Views
I have installed the math kernal and compiled the lapack95 library as per the get started manual and added mkl_lapack95.lib to the additional dependancies in project>properties>linker>input but when I build I get unresolved externals for the lapack95 routines. If I use the F77 routine names then the linker is happy. what have I not done?

thanks

Nigel Wilcox
0 Kudos
6 Replies
ArturGuzik
Valued Contributor I
848 Views
Quoting - Nigel Wilcox
I build I get unresolved externals for the lapack95 routines. If I use the F77 routine names then the linker is happy. what have I not done?

Nigel,

what's are those externals? all the libraries/interfaces are adjusted?

A.
0 Kudos
wilcox__nigel
Beginner
848 Views
Quoting - ArturGuzik

Nigel,

what's are those externals? all the libraries/interfaces are adjusted?

A.

all the lapack routines that I am calling

pbstf
sbgst
sbtrd
steqr

thanks you help

Nigel
0 Kudos
ArturGuzik
Valued Contributor I
848 Views
Quoting - Nigel Wilcox

all the lapack routines that I am calling

pbstf
sbgst
sbtrd
steqr

thanks you help

Nigel
Nigel,

did you change (adjust) number/type of arguments, I mean, between versions? (95 version has usually smaller number of arguments than F77 counterpart). If yes, please do show the exact error message and line(s) of code which calls the routines in question.

A.
0 Kudos
wilcox__nigel
Beginner
848 Views
Quoting - ArturGuzik
Nigel,

did you change (adjust) number/type of arguments, I mean, between versions? (95 version has usually smaller number of arguments than F77 counterpart). If yes, please do show the exact error message and line(s) of code which calls the routines in question.

A.

This is the region of code, (I am just testing it out right now)

:
:
:
call Get_Bandwidth(K, MDOF, Kl, Ku_K)

allocate (ab_K(Ku_K+1,MDOF))

call BandPack2(K,0,Ku_K,MDOF,ab_K,1)

call Get_Bandwidth(M, MDOF, Kl, Ku_M)

allocate (ab_M(ku_M+1,MDOF))

call BandPack2(M,0,Ku_M,MDOF,ab_M,1)

call pbstf(ab_M)

call sbgst(ab_K, ab_M)

allocate (d(MDOF))
allocate (e(MDOF-1))

call sbtrd(ab_K,,d,e)

call steqr(d, e)

End


The link errors


BHA_Dynamics error LNK2019: unresolved external symbol _PBSTF referenced in function _EIGEN_SOLVE3
BHA_Dynamics error LNK2019: unresolved external symbol _SBGST referenced in function _EIGEN_SOLVE3
BHA_Dynamics error LNK2019: unresolved external symbol _SBTRD referenced in function _EIGEN_SOLVE3
BHA_Dynamics error LNK2019: unresolved external symbol _STEQR referenced in function _EIGEN_SOLVE3
BHA_Dynamics fatal error LNK1120: 4 unresolved externals


Thanks again

Nigel
0 Kudos
ArturGuzik
Valued Contributor I
848 Views
Quoting - Nigel Wilcox
BHA_Dynamics error LNK2019: unresolved external symbol _PBSTF referenced in function _EIGEN_SOLVE3
BHA_Dynamics error LNK2019: unresolved external symbol _SBGST referenced in function _EIGEN_SOLVE3
BHA_Dynamics error LNK2019: unresolved external symbol _SBTRD referenced in function _EIGEN_SOLVE3
BHA_Dynamics error LNK2019: unresolved external symbol _STEQR referenced in function _EIGEN_SOLVE3
BHA_Dynamics fatal error LNK1120: 4 unresolved externals

Nigel,

linker can't find the libraries. What's your linking line? Do you have both mkl_lapack95.lib and mkl_core.lib there? (lapack95 gives you interfaces but you still need core.lib linked). Other possible reason: did you USE module (say, USE mkl95_LAPACK, ONLY: ...., ....) correctly?

A.
0 Kudos
wilcox__nigel
Beginner
848 Views
Quoting - ArturGuzik

Nigel,

linker can't find the libraries. What's your linking line? Do you have both mkl_lapack95.lib and mkl_core.lib there? (lapack95 gives you interfaces but you still need core.lib linked). Other possible reason: did you USE module (say, USE mkl95_LAPACK, ONLY: ...., ....) correctly?

A.

My link line was correct but I did not have aUSE statement.

That has sorted it now

many thanks for your help

Nigel
0 Kudos
Reply