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

intel math kernel library

bekar__bahadır1
Beginner
565 Views

I want to calculate the eigenvalue eigenvector fortranda.
I have a few questions here.
1- Select dynamic or static linking: what is dynamic static, single dynamic library
2- Select interface layer: 32 or 64
3- Select threading layer: open mpı squental ...?
4- Select OpenMP library: What is intel libiomp5md.lib
5- Select MPI library: What if I choose paralleling even if my program is not parallel?
6- Select the Fortran 95 interfaces: when should I check this
7- Use this link line: where do we use the links here?
8- Compiler options: where do we write this part?

0 Kudos
4 Replies
Steve_Lionel
Honored Contributor III
565 Views

I suggest that you ask these questions in https://software.intel.com/en-us/forums/intel-math-kernel-library

0 Kudos
Gennady_F_Intel
Moderator
565 Views

The answers on all of these questions you may find out into MKL Developer Guide :  https://software.intel.com/en-us/mkl-linux-developer-guide

 

0 Kudos
bekar__bahadır1
Beginner
565 Views

i couldn't run the following sample code somehow

 

 

     .. Parameters ..
      INTEGER          N, NSELECT
      PARAMETER        ( N = 5, NSELECT = 3 )
      INTEGER          LDA, LDZ
      PARAMETER        ( LDA = N, LDZ = N )
      INTEGER          LWMAX
      PARAMETER        ( LWMAX = 1000 )
*
*     .. Local Scalars ..
      INTEGER          INFO, LWORK, IL, IU, M
      DOUBLE PRECISION ABSTOL, VL, VU
*
*     .. Local Arrays ..
*     IWORK dimension should be at least 5*N
      INTEGER          IFAIL( N ), IWORK( 5*N )
      DOUBLE PRECISION A( LDA, N ), W( N ), Z( LDZ, NSELECT ),
     $                 WORK( LWMAX )
      DATA             A/
     $  6.29, 0.00, 0.00, 0.00, 0.00,
     $ -0.39, 7.19, 0.00, 0.00, 0.00,
     $  0.61, 0.81, 5.48, 0.00, 0.00,
     $  1.18, 1.19,-3.13, 3.79, 0.00,
     $ -0.08,-0.08, 0.22,-0.26, 0.83
     $                  /
*
*     .. External Subroutines ..
      EXTERNAL         DSYEVX
      EXTERNAL         PRINT_MATRIX
*
*     .. Intrinsic Functions ..
      INTRINSIC        INT, MIN
*
*     .. Executable Statements ..
      WRITE(*,*)'DSYEVX Example Program Results'
*     Negative ABSTOL means using the default value
      ABSTOL = -1.0
*     Set IL, IU to compute NSELECT smallest eigenvalues
      IL = 1
      IU = NSELECT
*
*     Query the optimal workspace.
*
      LWORK = -1
      CALL DSYEVX( 'Vectors', 'Indices', 'Upper', N, A, LDA, VL, VU, IL,
     $             IU, ABSTOL, M, W, Z, LDZ, WORK, LWORK, IWORK, IFAIL,
     $             INFO )
      LWORK = MIN( LWMAX, INT( WORK( 1 ) ) )
*
*     Solve eigenproblem.
*
      CALL DSYEVX( 'Vectors', 'Indices', 'Upper', N, A, LDA, VL, VU, IL,
     $             IU, ABSTOL, M, W, Z, LDZ, WORK, LWORK, IWORK, IFAIL,
     $             INFO )
*
*     Check for convergence.
*
      IF( INFO.GT.0 ) THEN
         WRITE(*,*)'The algorithm failed to compute eigenvalues.'
         STOP
      END IF
*
*     Print the number of eigenvalues found.
*
      WRITE(*,'(/A,I2)')' The total number of eigenvalues found:', M
*
*     Print eigenvalues.
*
      CALL PRINT_MATRIX( 'Selected eigenvalues', 1, M, W, 1 )
*
*     Print eigenvectors.
*
      CALL PRINT_MATRIX( 'Selected eigenvectors (stored columnwise)',
     $                   N, M, Z, LDZ )
      STOP
      END
*
*     End of DSYEVX Example.
*
*  =============================================================================
*
*     Auxiliary routine: printing a matrix.
*
      SUBROUTINE PRINT_MATRIX( DESC, M, N, A, LDA )
      CHARACTER*(*)    DESC
      INTEGER          M, N, LDA
      DOUBLE PRECISION A( LDA, * )
*
      INTEGER          I, J
*
      WRITE(*,*)
      WRITE(*,*) DESC
      DO I = 1, M
         WRITE(*,9998) ( A( I, J ), J = 1, N )
      END DO
*
 9998 FORMAT( 11(:,1X,F6.2) )
      RETURN
      END

0 Kudos
Gennady_F_Intel
Moderator
565 Views

This is exaclty the same example MKL provides in the form of examples. You need to check mklroot\examples\lapackf directory.

Check the makefile and learn how to build this example.

0 Kudos
Reply