<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: mkl_sparse_sypr for symmetric (Non-Hermitian) complex matrices in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-sypr-for-symmetric-Non-Hermitian-complex-matrices/m-p/1308207#M31899</link>
    <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;I'm pretty sure the reason for what you see is a misleading wording in documentation. Routine mkl_sparse_sypr supports symmetric matrices A for real data types and hermitian (only) A for complex case [while the docs say "&lt;SPAN class="sub_section_element_selectors"&gt;B and C are&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="sub_section_element_selectors"&gt;symmetric or Hermitian matrices&lt;/SPAN&gt;" as if symmetric works for complex matrices].&lt;/P&gt;
&lt;P&gt;E.g., a quick implicit proof: if you change&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;descrA &lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;%&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;TYPE&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; SPARSE_MATRIX_TYPE_SYMMETRIC&lt;/SPAN&gt;&lt;BR /&gt;to&lt;BR /&gt;&lt;SPAN&gt;descrA &lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;%&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;TYPE&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; SPARSE_MATRIX_TYPE_HERMITIAN&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;you'll get same result. I haven't checked but I believe that is the correct result if matrix A is treated as Hermitian [let me know if you think this is incorrect].&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you need this functionality, our TCE can help you submit a FR, so that we can extend mkl-sparse_sypr to work for your case (should be straightforward).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best,&lt;BR /&gt;Kirill&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Aug 2021 21:47:02 GMT</pubDate>
    <dc:creator>Kirill_V_Intel</dc:creator>
    <dc:date>2021-08-19T21:47:02Z</dc:date>
    <item>
      <title>mkl_sparse_sypr for symmetric (Non-Hermitian) complex matrices</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-sypr-for-symmetric-Non-Hermitian-complex-matrices/m-p/1307855#M31893</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to&amp;nbsp;&lt;SPAN&gt;compute the symmetric product of three sparse matrices (D=P'AP) using the&amp;nbsp;mkl_sparse_sypr routine, however I am not able to get the correct results. In my case, the P matrix is a general type real matrix, and the matrix A is a symmetric complex matrix. For example, consider the below matrices and their&amp;nbsp;corresponding 3-array CSR format (for matrix A only the upper triangle is stored):&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Razmo86_0-1629308047024.png" style="width: 508px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/18882iC10D048ABB98FBFA/image-dimensions/508x251/is-moderation-mode/true?v=v2&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" width="508" height="251" role="button" title="Razmo86_0-1629308047024.png" alt="Razmo86_0-1629308047024.png" /&gt;&lt;/span&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;For matrix A, I created the CSR matrix and its descriptor as shown below:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Razmo86_1-1629311055364.png" style="width: 548px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/18883i215761C0DA9763AC/image-dimensions/548x124/is-moderation-mode/true?v=v2&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" width="548" height="124" role="button" title="Razmo86_1-1629311055364.png" alt="Razmo86_1-1629311055364.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Similarly, for matrix P, it is defined as a general type matrix. Here I declared the REAL matrix P as a complex matrix ( the imaginary part of all the nonzero entries are set to zero):&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Razmo86_2-1629311146284.png" style="width: 527px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/18884iAD5B21525D736C2B/image-dimensions/527x98/is-moderation-mode/true?v=v2&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" width="527" height="98" role="button" title="Razmo86_2-1629311146284.png" alt="Razmo86_2-1629311146284.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Finally, the below code is used to perform the symmetric product in a single computation stage. I also export the CSR results in order to validate the entries of the resultant symmetric matrix D.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Razmo86_3-1629311625731.png" style="width: 577px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/18885iE9B28816D59A2974/image-dimensions/577x132/is-moderation-mode/true?v=v2&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" width="577" height="132" role="button" title="Razmo86_3-1629311625731.png" alt="Razmo86_3-1629311625731.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The resultant matrix D has a correct sparsity pattern, however, in this example, two entries doesn't have a correct value (see highlighted below). The correct values are -4+12i and 2+12i, respectively.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Razmo86_4-1629311991021.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/18886iDABECA8707BCD9ED/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="Razmo86_4-1629311991021.png" alt="Razmo86_4-1629311991021.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I observed the same issue once I tried to compute the PAP' using the&amp;nbsp;&lt;SPAN&gt;SPARSE_OPERATION_NON_TRANSPOSE operation.&amp;nbsp;&lt;/SPAN&gt;The results appear to be correct for the cases where both A and P matrices are real.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is &lt;SPAN&gt;mkl_sparse_sypr routine only applicable to Hermitian complex&amp;nbsp; matrix A ?&amp;nbsp; Can it be applied to symmetric complex matrix A?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Thanks&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 19:59:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-sypr-for-symmetric-Non-Hermitian-complex-matrices/m-p/1307855#M31893</guid>
      <dc:creator>Razmo86</dc:creator>
      <dc:date>2021-08-18T19:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: mkl_sparse_sypr for symmetric (Non-Hermitian) complex matrices</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-sypr-for-symmetric-Non-Hermitian-complex-matrices/m-p/1307970#M31894</link>
      <description>&lt;P&gt;This routine (&lt;VAR&gt;C&lt;/VAR&gt;:=&lt;VAR&gt;A&lt;/VAR&gt;*&lt;VAR&gt;B&lt;/VAR&gt;*op&lt;VAR&gt;A&lt;/VAR&gt;(&lt;VAR&gt;A&lt;/VAR&gt;) ) is&amp;nbsp;&lt;SPAN&gt;applicable if A has a general structure, B and C are&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;symmetric or Hermitian matrices.&amp;nbsp; We don't know the issue wrt this routine in the current version of MKL. if you observe some problem - I would recommend give us the reproducer which we could compile and run on our end.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 04:12:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-sypr-for-symmetric-Non-Hermitian-complex-matrices/m-p/1307970#M31894</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2021-08-19T04:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: mkl_sparse_sypr for symmetric (Non-Hermitian) complex matrices</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-sypr-for-symmetric-Non-Hermitian-complex-matrices/m-p/1308074#M31896</link>
      <description>&lt;P&gt;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/41889"&gt;@Gennady_F_Intel&lt;/a&gt;&amp;nbsp; Thank you for looking into this issue.&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="fortran"&gt;
    

!============================================================================

!
! Consider the matrix A 
!
!                 |   1       -1+3i   0   -3+6i  0   |
!                 |  -1+3i     5      0    0     8   |
!   A    =        |   0        0      4    6     4   |,
!                 |  -3+6i     0      6    7     0   |
!                 |   0        8      4    0    -5   |
!
!  The matrix A is represented in a one-based compressed sparse row (CSR) storage
!  scheme with three arrays: Only the upper triangular part is stored
!
!         values  = ( 1 -1+3i -3+6i 5 8 4 6 4 7 -5 )
!         columns = ( 1 2 4 2 5 3 4 5 4 5 )
!         rowIndex = ( 1 4 6 9 10 11 )
!
!                 |   1        0      0       1      0   |
!                 |   0        0      4       0      0   |
!   P    =        |   0.5      0      0       0      0   |,
!                 |   0        0      0       1      0   |
!                 |   0     -6.5      0       0      1   |
!        
!         values  = ( 1 1 4 0.5 1 -6.5 1 )
!         columns = ( 1 4 3 1 4 2 5 )
!         rowIndex = ( 1 3 4 5 6 8 )   

!  The test performs the following operations :

    
!  The test performs the following operation :
!
!  The code computes D = P'AP using mkl_sparse_sypr. P is a MXM General 
  sparse matrix
!       where A is a symmetric sparse matrix where only the upper triangular part is stored
!
    
!*******************************************************************************
PROGRAM TestSPBLASProgram

    USE MKL_SPBLAS
    USE ISO_C_BINDING
    IMPLICIT NONE

    INTEGER M, N, NNZ,NNZP, i, info,j
!   *****************************************************************************
!   Sparse representation of the matrix A and P
!   *****************************************************************************
    INTEGER, ALLOCATABLE :: csrColInd(:), csrRowPtr(:),csrPColInd(:), csrPRowPtr(:)
    COMPLEX*16, ALLOCATABLE :: csrVal(:),csrPVal(:)

!   Matrix descriptor
    TYPE(MATRIX_DESCR) descrA,descrP,descrD     ! Sparse matrix descriptor
!   CSR matrix representation 
    TYPE(SPARSE_MATRIX_T) csrA,csrP,csrD        ! Structure with sparse matrix
!   *****************************************************************************
!   Declaration of local variables:
!   *****************************************************************************
 
    INTEGER :: nCol,nrowsD, ncolsD
    
    INTEGER(C_INT) :: indexing
    TYPE(C_PTR)    :: rowsD_start, rowsD_end, colD_indx, Dvalues
    
    INTEGER   , POINTER :: rowsD_start_f(:), rowsD_end_f(:), colD_indx_f(:)
    COMPLEX*16, POINTER :: Dvalues_f(:)
    
    

    NNZ = 10
    ALLOCATE(csrColInd(NNZ))
    ALLOCATE(csrRowPtr(M+1))
    ALLOCATE(csrVal(NNZ))
    
    csrVal = (/(1.0D0,0.0D0), (-1.0D0,3.0D0) ,(-3.0D0,6.0D0), (5.0D0,0.0D0) ,(8.0D0,0.0D0) ,(4.0D0,0.0D0) ,(6.0D0,0.0D0), (4.0D0,0.0D0), (7.0D0,0.0D0), (-5.0D0,0.0D0)/)
    csrColInd = (/ 1, 2, 4, 2, 5, 3, 4, 5, 4, 5 /)
    csrRowPtr = (/1, 4, 6, 9, 10, 11/)
    
    
    
    M = 5
    N = 5
    NNZP = 6
    ALLOCATE(csrPColInd(NNZP))
    ALLOCATE(csrPRowPtr(M+1))
    ALLOCATE(csrPVal(NNZP))
    
    csrPVal = (/(1.0D0,0.0D0),(1.0D0,0.0D0) ,(4.0D0,0.0D0) ,(0.5D0,0.0D0),(1.0D0,0.0D0) ,(-6.5D0,0.0D0) ,(1.0D0,0.0D0)/)
    csrPColInd = (/1 ,4 ,3 ,1 ,4 ,2 ,5 /)
    csrPRowPtr = (/1 ,3 ,4 ,5 ,6 ,8 /)  
    

    print*,'EXAMPLE PROGRAM FOR mkl_sparse_sypr'
    print*,'--------------------------------------------------------'


!   Create CSR matrix A
    i = MKL_SPARSE_Z_CREATE_CSR(csrA,SPARSE_INDEX_BASE_ONE,M,N,csrRowPtr,csrRowPtr(2),csrColInd,csrVal)

!   Create matrix descriptor
    !descrA % TYPE = SPARSE_MATRIX_TYPE_GENERAL
    descrA % TYPE = SPARSE_MATRIX_TYPE_SYMMETRIC
    descrA % MODE = SPARSE_FILL_MODE_UPPER
    descrA % DIAG = SPARSE_DIAG_NON_UNIT

!   Analyze sparse matrix; chose proper kernels and workload balancing strategy
    info = MKL_SPARSE_OPTIMIZE(csrA)
    
    
!   Create CSR matrix P
    i = MKL_SPARSE_Z_CREATE_CSR(csrP,SPARSE_INDEX_BASE_ONE,M,N,csrPRowPtr,csrPRowPtr(2),csrPColInd,csrPVal)

!   Create matrix descriptor
    descrP % TYPE = SPARSE_MATRIX_TYPE_GENERAL

!   Analyze sparse matrix; chose proper kernels and workload balancing strategy
    info = MKL_SPARSE_OPTIMIZE(csrP)
    
        
    ! Single Stage Computations 
    info = mkl_sparse_sypr (SPARSE_OPERATION_CONJUGATE_TRANSPOSE, csrP, csrA, descrA, csrD, SPARSE_STAGE_FULL_MULT)

! export the matrix D in CSR format matrix from the internal representation
    info = mkl_sparse_z_export_csr (csrD, indexing, nrowsD, ncolsD, rowsD_start, rowsD_end, colD_indx, Dvalues)
    
    info = mkl_sparse_order(csrD)
    
!   Converting C into Fortran pointers
    call C_F_POINTER(rowsD_start, rowsD_start_f, [nrowsD])
    call C_F_POINTER(rowsD_end  , rowsD_end_f  , [nrowsD]) 
    call C_F_POINTER(colD_indx  , colD_indx_f  , [rowsD_end_f(nrowsD)-indexing])
    call C_F_POINTER(Dvalues    , Dvalues_f    , [rowsD_end_f(nrowsD)-indexing])

  
!   Release internal representation of CSR matrix
    info = MKL_SPARSE_DESTROY(csrA)
    info = MKL_SPARSE_DESTROY(csrP)
    info = MKL_SPARSE_DESTROY(csrD)
    
END PROGRAM TestSPBLASProgram
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 12:05:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-sypr-for-symmetric-Non-Hermitian-complex-matrices/m-p/1308074#M31896</guid>
      <dc:creator>Razmo86</dc:creator>
      <dc:date>2021-08-19T12:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: mkl_sparse_sypr for symmetric (Non-Hermitian) complex matrices</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-sypr-for-symmetric-Non-Hermitian-complex-matrices/m-p/1308175#M31898</link>
      <description>&lt;P&gt;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/41889"&gt;@Gennady_F_Intel&lt;/a&gt;&amp;nbsp;Thanks for looking into this issue. Here is the test program:&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="fortran"&gt;
    

!===============================================================================

!
! Consider the matrix A 
!
!                 |   1       -1+3i   0   -3+6i  0   |
!                 |  -1+3i     5      0    0     8   |
!   A    =        |   0        0      4    6     4   |,
!                 |  -3+6i     0      6    7     0   |
!                 |   0        8      4    0    -5   |
!
!  The matrix A is represented in a one-based compressed sparse row (CSR) storage
!  scheme with three arrays: Only the upper triangular part is stored
!
!         values  = ( 1 -1+3i -3+6i 5 8 4 6 4 7 -5 )
!         columns = ( 1 2 4 2 5 3 4 5 4 5 )
!         rowIndex = ( 1 4 6 9 10 11 )
!
!                 |   1        0      0       1      0   |
!                 |   0        0      4       0      0   |
!   P    =        |   0.5      0      0       0      0   |,
!                 |   0        0      0       1      0   |
!                 |   0     -6.5      0       0      1   |
!        
!         values  = ( 1 1 4 0.5 1 -6.5 1 )
!         columns = ( 1 4 3 1 4 2 5 )
!         rowIndex = ( 1 3 4 5 6 8 )   

!  The test performs the following operations :

!
    
!  The test performs the following operations :
!
!       The code computes D = P'AP using mkl_sparse_sypr. P is a MXM General sparse matrix
!       where A is a symmetric sparse matrix where only the upper triangular part is stored
!
    
!*******************************************************************************
PROGRAM TestSPBLASProgram

    USE MKL_SPBLAS
    USE ISO_C_BINDING
    IMPLICIT NONE

    INTEGER M, N, NNZ,NNZP, i, info,j
!   *****************************************************************************
!   Sparse representation of the matrix A and P
!   *****************************************************************************
    INTEGER, ALLOCATABLE :: csrColInd(:), csrRowPtr(:),csrPColInd(:), csrPRowPtr(:)
    COMPLEX*16, ALLOCATABLE :: csrVal(:),csrPVal(:)

!   Matrix descriptor
    TYPE(MATRIX_DESCR) descrA,descrP,descrD     ! Sparse matrix descriptor
!   CSR matrix representation 
    TYPE(SPARSE_MATRIX_T) csrA,csrP,csrD        ! Structure with sparse matrix
!   *****************************************************************************
!   Declaration of local variables:
!   *****************************************************************************
 
    INTEGER :: nCol,nrowsD, ncolsD
    
    INTEGER(C_INT) :: indexing
    TYPE(C_PTR)    :: rowsD_start, rowsD_end, colD_indx, Dvalues
    
    INTEGER   , POINTER :: rowsD_start_f(:), rowsD_end_f(:), colD_indx_f(:)
    COMPLEX*16, POINTER :: Dvalues_f(:)
    
    

    NNZ = 10
    ALLOCATE(csrColInd(NNZ))
    ALLOCATE(csrRowPtr(M+1))
    ALLOCATE(csrVal(NNZ))
    
    csrVal = (/(1.0D0,0.0D0), (-1.0D0,3.0D0) ,(-3.0D0,6.0D0), (5.0D0,0.0D0) ,(8.0D0,0.0D0) ,(4.0D0,0.0D0) ,(6.0D0,0.0D0), (4.0D0,0.0D0), (7.0D0,0.0D0), (-5.0D0,0.0D0)/)
    csrColInd = (/ 1, 2, 4, 2, 5, 3, 4, 5, 4, 5 /)
    csrRowPtr = (/1, 4, 6, 9, 10, 11/)
    
    
    
    M = 5
    N = 5
    NNZP = 6
    ALLOCATE(csrPColInd(NNZP))
    ALLOCATE(csrPRowPtr(M+1))
    ALLOCATE(csrPVal(NNZP))
    
    csrPVal = (/(1.0D0,0.0D0),(1.0D0,0.0D0) ,(4.0D0,0.0D0) ,(0.5D0,0.0D0),(1.0D0,0.0D0) ,(-6.5D0,0.0D0) ,(1.0D0,0.0D0)/)
    csrPColInd = (/1 ,4 ,3 ,1 ,4 ,2 ,5 /)
    csrPRowPtr = (/1 ,3 ,4 ,5 ,6 ,8 /)  
    

    print*,'EXAMPLE PROGRAM FOR mkl_sparse_sypr'
    print*,'--------------------------------------------------------'


!   Create CSR matrix A
    i = MKL_SPARSE_Z_CREATE_CSR(csrA,SPARSE_INDEX_BASE_ONE,M,N,csrRowPtr,csrRowPtr(2),csrColInd,csrVal)

!   Create matrix descriptor
    !descrA % TYPE = SPARSE_MATRIX_TYPE_GENERAL
    descrA % TYPE = SPARSE_MATRIX_TYPE_SYMMETRIC
    descrA % MODE = SPARSE_FILL_MODE_UPPER
    descrA % DIAG = SPARSE_DIAG_NON_UNIT

!   Analyze sparse matrix; chose proper kernels and workload balancing strategy
    info = MKL_SPARSE_OPTIMIZE(csrA)
    
    
!   Create CSR matrix P
    i = MKL_SPARSE_Z_CREATE_CSR(csrP,SPARSE_INDEX_BASE_ONE,M,N,csrPRowPtr,csrPRowPtr(2),csrPColInd,csrPVal)

!   Create matrix descriptor
    descrP % TYPE = SPARSE_MATRIX_TYPE_GENERAL

!   Analyze sparse matrix; chose proper kernels and workload balancing strategy
    info = MKL_SPARSE_OPTIMIZE(csrP)
    
        
    ! Single Stage Computations 
    info = mkl_sparse_sypr (SPARSE_OPERATION_CONJUGATE_TRANSPOSE, csrP, csrA, descrA, csrD, SPARSE_STAGE_FULL_MULT)

! export the matrix D in CSR format matrix from the internal representation
    info = mkl_sparse_z_export_csr (csrD, indexing, nrowsD, ncolsD, rowsD_start, rowsD_end, colD_indx, Dvalues)
    
    info = mkl_sparse_order(csrD)
    
!   Converting C into Fortran pointers
    call C_F_POINTER(rowsD_start, rowsD_start_f, [nrowsD])
    call C_F_POINTER(rowsD_end  , rowsD_end_f  , [nrowsD]) 
    call C_F_POINTER(colD_indx  , colD_indx_f  , [rowsD_end_f(nrowsD)-indexing])
    call C_F_POINTER(Dvalues    , Dvalues_f    , [rowsD_end_f(nrowsD)-indexing])

  
!   Release internal representation of CSR matrix
    info = MKL_SPARSE_DESTROY(csrA)
    info = MKL_SPARSE_DESTROY(csrP)
    info = MKL_SPARSE_DESTROY(csrD)
    
END PROGRAM TestSPBLASProgram
&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 19 Aug 2021 18:57:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-sypr-for-symmetric-Non-Hermitian-complex-matrices/m-p/1308175#M31898</guid>
      <dc:creator>Razmo86</dc:creator>
      <dc:date>2021-08-19T18:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: mkl_sparse_sypr for symmetric (Non-Hermitian) complex matrices</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-sypr-for-symmetric-Non-Hermitian-complex-matrices/m-p/1308207#M31899</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;I'm pretty sure the reason for what you see is a misleading wording in documentation. Routine mkl_sparse_sypr supports symmetric matrices A for real data types and hermitian (only) A for complex case [while the docs say "&lt;SPAN class="sub_section_element_selectors"&gt;B and C are&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="sub_section_element_selectors"&gt;symmetric or Hermitian matrices&lt;/SPAN&gt;" as if symmetric works for complex matrices].&lt;/P&gt;
&lt;P&gt;E.g., a quick implicit proof: if you change&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;descrA &lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;%&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;TYPE&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; SPARSE_MATRIX_TYPE_SYMMETRIC&lt;/SPAN&gt;&lt;BR /&gt;to&lt;BR /&gt;&lt;SPAN&gt;descrA &lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;%&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;TYPE&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; SPARSE_MATRIX_TYPE_HERMITIAN&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;you'll get same result. I haven't checked but I believe that is the correct result if matrix A is treated as Hermitian [let me know if you think this is incorrect].&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you need this functionality, our TCE can help you submit a FR, so that we can extend mkl-sparse_sypr to work for your case (should be straightforward).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best,&lt;BR /&gt;Kirill&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 21:47:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-sypr-for-symmetric-Non-Hermitian-complex-matrices/m-p/1308207#M31899</guid>
      <dc:creator>Kirill_V_Intel</dc:creator>
      <dc:date>2021-08-19T21:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: mkl_sparse_sypr for symmetric (Non-Hermitian) complex matrices</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-sypr-for-symmetric-Non-Hermitian-complex-matrices/m-p/1308391#M31903</link>
      <description>&lt;P&gt;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/111125"&gt;@Kirill_V_Intel&lt;/a&gt;&amp;nbsp;Thanks for your answer. Correct, I have already verified that the routine is working correctly for real symmetric and Hermitian complex matrices. It would be great if you could extend&amp;nbsp;&lt;SPAN&gt;mkl-sparse_sypr to symmetric complex matrices as well. Would you please let me know how I should process with the FR submission?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Aug 2021 13:01:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-sypr-for-symmetric-Non-Hermitian-complex-matrices/m-p/1308391#M31903</guid>
      <dc:creator>Razmo86</dc:creator>
      <dc:date>2021-08-20T13:01:12Z</dc:date>
    </item>
    <item>
      <title>Re:mkl_sparse_sypr doesn't return correct answer for complex matrices</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-sypr-for-symmetric-Non-Hermitian-complex-matrices/m-p/1308410#M31904</link>
      <description>&lt;P&gt;Razmo, the official channel to submit the Feature Request to the Intel Online Service Center - &lt;A href="https://supporttickets.intel.com/servicecenter?lang=en-US" target="_blank"&gt;https://supporttickets.intel.com/servicecenter?lang=en-US&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Aug 2021 14:27:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-sypr-for-symmetric-Non-Hermitian-complex-matrices/m-p/1308410#M31904</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2021-08-20T14:27:47Z</dc:date>
    </item>
    <item>
      <title>Re:mkl_sparse_sypr doesn't return correct answer for complex matrices</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-sypr-for-symmetric-Non-Hermitian-complex-matrices/m-p/1318432#M32125</link>
      <description>&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;Intel oneAPI Math Kernel Library (oneMKL) version 2021.4 is now available. The MKL Developer Reference has been updated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 01 Oct 2021 03:26:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-sypr-for-symmetric-Non-Hermitian-complex-matrices/m-p/1318432#M32125</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2021-10-01T03:26:08Z</dc:date>
    </item>
    <item>
      <title>Re:mkl_sparse_sypr doesn't return correct answer for complex matrices</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-sypr-for-symmetric-Non-Hermitian-complex-matrices/m-p/1318433#M32126</link>
      <description>&lt;P&gt;This issue has been resolved and we will no longer respond to this thread.&amp;nbsp;If you require additional assistance from Intel, please start a new thread.&amp;nbsp;Any further interaction in this thread will be considered community only.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 01 Oct 2021 03:26:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/mkl-sparse-sypr-for-symmetric-Non-Hermitian-complex-matrices/m-p/1318433#M32126</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2021-10-01T03:26:23Z</dc:date>
    </item>
  </channel>
</rss>

