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

can't figure out mkl_zcsrcoo

$
0
0

I have been able to use mkl_dscrcoo, but I can't figure out mkl_zcsrcoo.

        PROGRAM zcsrcoo_test
        IMPLICIT NONE
        include 'mkl_pardiso.f77'

   integer nx, ne
       parameter(nx=5, ne=3)
  complex*16 val(ne), a(ne)
      integer :: rows(ne), cols(ne), ia(nx+1), ja(ne)
      integer ierr
      rows = 1
      cols = [3,2,1]
 val = [(1,2),(3,4),(5,6)]
     
      call mkl_zcsrcoo((/2,1,1,0,size(a),0,0,0/), nx, a, ja, ia,
     &    ne, val, rows, cols, ierr)

      STOP
      END

Here's what I get (from the visual studio Locals window).  The contents of ia and ja look good, but the A array looks all wrong!!

  IERR 0 INTEGER(4)
-  A {...} COMPLEX(8)
  A(1) (3.00000000000000,2.00000000000000) COMPLEX(8)
  A(2) (1.00000000000000,4.00000000000000) COMPLEX(8)
  A(3) (5.00000000000000,6.00000000000000) COMPLEX(8)
-  JA {...} INTEGER(4)
  JA(1) 1 INTEGER(4)
  JA(2) 2 INTEGER(4)
  JA(3) 3 INTEGER(4)
-  COLS {...} INTEGER(4)
  COLS(1) 3 INTEGER(4)
  COLS(2) 2 INTEGER(4)
  COLS(3) 1 INTEGER(4)
-  ROWS {...} INTEGER(4)
  ROWS(1) 1 INTEGER(4)
  ROWS(2) 1 INTEGER(4)
  ROWS(3) 1 INTEGER(4)
-  IA {...} INTEGER(4)
  IA(1) 1 INTEGER(4)
  IA(2) 4 INTEGER(4)
  IA(3) 4 INTEGER(4)
  IA(4) 4 INTEGER(4)
  IA(5) 4 INTEGER(4)
  IA(6) 4 INTEGER(4)
-  VAL {...} COMPLEX(8)
  VAL(1) (1.00000000000000,2.00000000000000) COMPLEX(8)
  VAL(2) (3.00000000000000,4.00000000000000) COMPLEX(8)
  VAL(3) (5.00000000000000,6.00000000000000) COMPLEX(8)

 


Viewing all articles
Browse latest Browse all 2652

Trending Articles



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