Okay, I've tried numerous ways to get the MKL Fortran 95 BLAS Level routine "DOT" to link. Even though there are absolutely no instructions in MKL documentation how to "set up" source code to use MKL Fortran 95 interface, Intel was kind enough to supply files in the MKL installation include directory to sort of guide the way.

First, I think there's an error in the file includemkl_blas.f90. I get a compile error that "WP" must be a compile time known entity (parameter). So I abandoned trying to use include statement in my source pointing to mkl_blas.f90. I think Intel missed the fact that interfaces knock holes in the scoping unit (Fortran 2003 has rectified that with an "import" statement).

I then went into mkl_blas.f90, copied the interface for DOT, changed the occurrences of "WP" to KIND(1.0) and KIND(1.0D0) for single and double precision, respectively, and got rid of

USE MKL95_PRECISION, ONLY: WP => SP

USE MKL95_PRECISION, ONLY: WP => DP

in the interface definitions. I also gave "DOT" the attribute "PURE" since it shouldn't have any side effects (I use DOT in some FORALL statements).

When linking I still get the error

LoTekFEAfa.obj : error LNK2019: unresolved external symbol _DDOT_MKL95 referenced in function _MOD_DIRECT_SOLVERS_EX_mp_LIN_LU_SOLVE

I put the MKL DOT interface in a module called MODULE mod_BLAS_real_int and USEd MODULE mod_BLAS_real_int, ONLY : DOT in the module MOD_DIRECT_SOLVER_EXprocedure LIN_LU_SOLVE.

Please let me know how to source code so that the Fortran 95 interface to the MKL BLAS Level 1 procedures willhave symbolsresolved.

This is the only unresolved external symbol I get. I use other MKL BLAS Level 1 procedures, but have kept their interfaces unchanged (I only changed to the Fortran 95 MKL BLAS Level 1 DOT to experiment), and do not get the unresolved external symbol error.

Find below the module wherein I've placed the interface to DOT. Notice also that the commented out interface for "DDOT" was what I used prior to trying to use the MKL Fortran 95 interface version of DOT, and always it compiled with no errors.

MODULE mod_BLAS_real_int

!

PUBLIC

!

! import BLAS through Intel MKL ( IVF-specific )

! NOTE: updated to MKL Fortran 95 interface of DOT12/05/2005

!

INTERFACE DOT

PURE FUNCTION SDOT_MKL95(X,Y)

! MKL Fortran77 call:

! SDOT(N,X,INCX,Y,INCY)

REAL(KIND(1.0)) :: SDOT_MKL95

REAL(KIND(1.0)), INTENT(IN) :: X(:)

REAL(KIND(1.0)), INTENT(IN) :: Y(:)

END FUNCTION SDOT_MKL95

PURE FUNCTION DDOT_MKL95(X,Y)

! MKL Fortran77 call:

! DDOT(N,X,INCX,Y,INCY)

REAL(KIND(1.0D0)) :: DDOT_MKL95

REAL(KIND(1.0D0)), INTENT(IN) :: X(:)

REAL(KIND(1.0D0)), INTENT(IN) :: Y(:)

END FUNCTION DDOT_MKL95

END INTERFACE DOT

!

INTERFACE

!

! REAL(KIND(1.0D0)) PURE FUNCTION DDOT ( N, DX, INCX, DY, INCY )

! REAL(KIND(1.0D0)), INTENT(IN) :: DX(*), DY(*)

! INTEGER, INTENT(IN) :: INCX, INCY, N

! END FUNCTION DDOT

!

SUBROUTINE DGEMV ( TRANS, M, N, ALPHA, A, LDA, X, INCX, &

BETA, Y, INCY )

REAL(KIND(1.0D0)), INTENT(IN) :: ALPHA, BETA

INTEGER, INTENT(IN) :: INCX, INCY, LDA, M, N

CHARACTER(1), INTENT(IN) :: TRANS

REAL(KIND(1.0D0)), INTENT(IN) :: A( LDA, * ), X( * )

REAL(KIND(1.0D0)), INTENT(INOUT) :: Y( * )

END SUBROUTINE DGEMV

!

REAL(KIND(1.0D0)) PURE FUNCTION DNRM2 ( N, X, INCX )

INTEGER, INTENT(IN) :: INCX, N

REAL(KIND(1.0D0)), INTENT(IN) :: X( * )

END FUNCTION DNRM2

!

REAL(KIND(1.0)) PURE FUNCTION SNRM2 ( N, X, INCX )

REAL(KIND(1.0)), INTENT(IN) :: X(*)

INTEGER, INTENT(IN) :: N, INCX

END FUNCTION SNRM2

!

END INTERFACE

Brian Lamm

Addendum: Apparently identical behavior on Win XP SP2, IA-32,9.0.025,8.0.1,MSVS.NET2003,SDK 3790-1830. Dll build failed link, subsequent exe build succeeded(?),dll build log attached. BL-12/05/2005

Message Edited by blamm on 12-05-2005 07:10 PM

Message Edited by blamm on 12-05-2005 07:16 PM