Quantcast
Channel: Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
Viewing all articles
Browse latest Browse all 2652

Strangeness with DZGEMV

$
0
0

The following code produces different outputs for DZGEMV and GEMV. The code is built with default 64-bit integer and real numbers; The parallel version of the MKL library is used (using ILP64 interfaces).

The path to the module files is: C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.3.203\windows\mkl\include\intel64\ilp64

Using the link advisor, the libraries used are: mkl_blas95_ilp64.lib mkl_lapack95_ilp64.lib mkl_intel_ilp64_dll.lib mkl_intel_thread_dll.lib mkl_core_dll.lib libiomp5md.lib (library directory: C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.3.203\windows\mkl\lib\intel64_win).

GEMV and MATMUL produce the expected result. I can't explain what DZGEMV does here.

This is on a WIN 10 machine, with Intel Parallel Studio XE 2019 Update 3 Cluster Edition.

PROGRAM P
USE BLAS95
IMPLICIT NONE

COMPLEX :: PHI(2,1),V(2),W(1),ALPHA,BETA
INTEGER :: M,N,ONE

PHI = CMPLX(1.0)
V   = CMPLX(2.0)
ALPHA = CMPLX(1.0)
BETA = CMPLX(0.0)
W = CMPLX(0.0)

M   = 2
N   = 1
ONE = 1

CALL DZGEMV('C',M,N,ALPHA,PHI,M,V,ONE,BETA,W,ONE)
WRITE(*,*) W

CALL GEMV(PHI,V,W,ALPHA=ALPHA,BETA=BETA,TRANS='C')
WRITE(*,*) W

W = MATMUL(CONJG(TRANSPOSE(PHI)),V)
WRITE(*,*) W

END PROGRAM P

Output:

 (2.00000000000000,0.000000000000000E+000)
 (4.00000000000000,0.000000000000000E+000)
 (4.00000000000000,0.000000000000000E+000)
Press any key to continue . . .

 


Viewing all articles
Browse latest Browse all 2652

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>