I’m having trouble using the linear operators defined in linear_operators.mod from the IMSL library. I’m working with PVF 11.0 on a Win7 OS. My project contains the file linear_operators.mod in the Include Files folder and, in Project Properties, Use IMSL is set to Yes. To try and get a handle on the problem, I’ve been experimenting with the following code, modified from the IMSL example subroutine operator_ex01.f90.
program OperatorEx01 use linear_operators implicit none integer :: i real(kind=4), dimension(4,4) :: A, b, x real(kind=4), dimension(4) :: c A=rand(A); b=rand(b); c=rand(c) x=A .ix. b !test linear operator .ix. A=eye(4) !test linear function eye() do i=1,4 print *, A(i,1:4) end do x=diag(c) !test linear function diag() do i=1,4 print *, x(i,1:4) end do end program OperatorEx01
When I try to compile it, I get the following error messages:
unresolved external symbol s_lin_sol_gen_ referenced in function operation_ix_zimzvp_
unresolved external symbol s_lin_sol_lsq_ referenced in function operation_ix_zimzvp_
unresolved external symbol d_lin_sol_gen_ referenced in function operation_ix_dimsmp_
unresolved external symbol d_lin_sol_lsq_ referenced in function operation_ix_dimsm_
unresolved external symbol c_lin_sol_gen_ referenced in function operation_ix_cimdmp_
unresolved external symbol c_lin_sol_lsq_ referenced in function operation_ix_cimdmp_
unresolved external symbol z_lin_sol_gen_ referenced in function operation_ix_zimcmp_
unresolved external symbol z_lin_sol_lsq_ referenced in function operation_ix_zimcmp_
I get comparable error messages if I try to use any of the other linear operators (e.g., .i., .t., .ix., …). Because all of the errors are tied to the IMSL modules lin_sol_gen_int.mod and lin_sol_lsq_int.mod, I tried adding these explicitly to the project, but this did not alter the result. If I comment out the line 'x=A .ix. b", the program compiles and runs fine. Note that the functions eye and diag both require linear_operators.mod, and that they compile and run correctly. So, I am able to use the functions defined in linear_operators.mod, but not the linear operators themselves. My question is, what should I be doing differently in order to use the linear operators? Many thanks for whatever insights you can provide.