<?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: problem with testing dss_sym_f.f ,need your help in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/problem-with-testing-dss-sym-f-f-need-your-help/m-p/889257#M10291</link>
    <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/439823"&gt;magrate&lt;/A&gt;&lt;/DIV&gt;
&lt;BR /&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
Magrate, &lt;BR /&gt;What MKL version you are using?&lt;BR /&gt;What architecture (IA32/x64) and what system (win/linux) are you on?&lt;BR /&gt;--Gennady&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 21 Aug 2009 14:40:05 GMT</pubDate>
    <dc:creator>Gennady_F_Intel</dc:creator>
    <dc:date>2009-08-21T14:40:05Z</dc:date>
    <item>
      <title>problem with testing dss_sym_f.f ,need your help</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/problem-with-testing-dss-sym-f-f-need-your-help/m-p/889256#M10290</link>
      <description>I am testing the Intel direct solver dss_sym_f.f using the code displayed belowthe testing matrix is  &lt;BR /&gt;Title: Boeing/crystm01; 1995; R. Grimes; ed: T. Davis&lt;BR /&gt;&lt;BR /&gt;It is symmetric positive definite .&lt;BR /&gt;The subroutine to read the matrix is ireadhb(fname,type,nRows,nCols,nzeros_l). the format of storage is csc.&lt;BR /&gt;Then we call dcsccsr(nRows, values_new, columns_new, rowIndex_new, values,columns, rowIndex) to turn the csc format to csr.&lt;BR /&gt; However ,there's something wrong with it ,and I have no idea about the reason of the faulse.So your advise is appreciated. Thanks.&lt;BR /&gt;&lt;BR /&gt;dawning:~/mkl-dss$ ./run.sh &lt;BR /&gt;&lt;BR /&gt;Matrix Information: 353  .rsa &lt;BR /&gt;Title: Boeing/crystm01; 1995; R. Grimes; ed: T. Davis            | &lt;BR /&gt;Size:   4875   4875   NonZeros:  55107 &lt;BR /&gt;&lt;BR /&gt;*** glibc detected *** double free or corruption (out): 0x0000000000a570a0 *** &lt;BR /&gt;&lt;BR /&gt;Example program for solving symmetric positive definite system of &lt;BR /&gt;C equations. &lt;BR /&gt;C--------------------------------------------------------------------------- &lt;BR /&gt;subroutine fmain(fname) &lt;BR /&gt;   IMPLICIT NONE &lt;BR /&gt;   INCLUDE 'mkl_dss.f77' &lt;BR /&gt;C--------------------------------------------------------------------------- &lt;BR /&gt;C Define the array and rhs vectors &lt;BR /&gt;C--------------------------------------------------------------------------- &lt;BR /&gt;   DOUBLE PRECISION,dimension(:),allocatable :: solution,rhs &lt;BR /&gt;   DOUBLE PRECISION,dimension(:),allocatable :: values,values_new &lt;BR /&gt;   INTEGER nRows,nCols,nzeros_l, nNonZeros, i,j,nRhs &lt;BR /&gt; INTEGER nd,bufLen,nmax,error,err0 &lt;BR /&gt;   integer,dimension(:),allocatable :: rowIndex, rowIndex_new,iwk     &lt;BR /&gt;   integer,dimension(:),allocatable :: columns, columns_new,indu &lt;BR /&gt;!  integer,dimension(:),allocatable ::ia_nn,ja_nn &lt;BR /&gt;!  DOUBLE PRECISION,dimension(:),allocatable ::a_nn &lt;BR /&gt;   integer count1,count2,count_rate,count_max,N &lt;BR /&gt; DOUBLE PRECISION t &lt;BR /&gt; INTEGER*8 handle &lt;BR /&gt;   CHARACTER*15 statIn &lt;BR /&gt;   DOUBLE PRECISION statOut(5) &lt;BR /&gt;   PARAMETER(bufLen = 20,nRhs=1) &lt;BR /&gt; INTEGER buff(bufLen) &lt;BR /&gt;   character fname*256,type*3 &lt;BR /&gt;!--------------------------------------------------------------------------- &lt;BR /&gt;! Read the dimension of the matrix &lt;BR /&gt;!--------------------------------------------------------------------------- &lt;BR /&gt; call ireadhb(fname,type,nRows,nCols,nzeros_l) &lt;BR /&gt;   if(nRows.ne.nCols) then &lt;BR /&gt;   write(*,*) 'error!The nRows must be equal to nCols' &lt;BR /&gt;   stop &lt;BR /&gt;   else &lt;BR /&gt;     nmax=nRows &lt;BR /&gt;   endif &lt;BR /&gt;C--------------------------------------------------------------------------- &lt;BR /&gt;C Allocate storage for the solver handle and the solution vector &lt;BR /&gt;C--------------------------------------------------------------------------- &lt;BR /&gt;!   DOUBLE PRECISION,dimension(:),allocatable :: solution &lt;BR /&gt;!   INTEGER*8 handle &lt;BR /&gt;!   INTEGER error &lt;BR /&gt;!   CHARACTER*15 statIn &lt;BR /&gt;!   DOUBLE PRECISION statOut(5) &lt;BR /&gt;!   INTEGER bufLen &lt;BR /&gt;!   PARAMETER(bufLen = 20) &lt;BR /&gt;!   INTEGER buff(bufLen) &lt;BR /&gt;!--------------------------------------------------------------------------- &lt;BR /&gt;! Allocate the storage of the matrix and the vector &lt;BR /&gt;!--------------------------------------------------------------------------- &lt;BR /&gt;   allocate(rhs(nmax)) &lt;BR /&gt;   allocate(rowIndex(nmax+1)) &lt;BR /&gt;   allocate(values(nzeros_l)) &lt;BR /&gt;   allocate(values_new(nzeros_l)) &lt;BR /&gt;   allocate(columns(nzeros_l)) &lt;BR /&gt;   allocate(columns_new(nzeros_l)) &lt;BR /&gt;   allocate(rowIndex_new(nmax+1)) &lt;BR /&gt;   allocate(solution(nmax)) &lt;BR /&gt;!  allocate(iwk(nmax+1)) &lt;BR /&gt;!  allocate(indu(nmax)) &lt;BR /&gt;!  allocate(ia_nn(nRows+1)) &lt;BR /&gt;!  allocate(a_nn(nzeros_l)) &lt;BR /&gt;!  allocate(ja_nn(nzeros_l)) &lt;BR /&gt;!----------------------------------------------------------------------------------  &lt;BR /&gt;! Read the matrix of hb format &lt;BR /&gt;! &lt;BR /&gt;!--------------------------------------------------------------------------- &lt;BR /&gt; if (type(1:1) .eq. 'r' .or. type(1:1).eq. 'R') then &lt;BR /&gt; call dreadhb( fname, nRows, nCols,nzeros_l, &lt;BR /&gt;  $    rowIndex_new, columns_new, values_new) &lt;BR /&gt;   else &lt;BR /&gt;   write(*,*) 'wrong format, only support real matrix in HB format!' &lt;BR /&gt;   stop &lt;BR /&gt;   endif &lt;BR /&gt; write(*,*)'the value_new is' &lt;BR /&gt; do i=1,20 &lt;BR /&gt;write(*,*) values_new(i) &lt;BR /&gt; enddo &lt;BR /&gt; &lt;BR /&gt; write(*,*)'the columns_new is' &lt;BR /&gt; do i=1,20 &lt;BR /&gt;   write(*,*) columns_new(i) &lt;BR /&gt;   enddo &lt;BR /&gt; write(*,*)'the rowIndex_new is' &lt;BR /&gt;   do i=1,10 &lt;BR /&gt;   write(*,*) rowIndex_new(i) &lt;BR /&gt; enddo &lt;BR /&gt;!----------------------------------------------------------------------------------  &lt;BR /&gt;! Transpose the matrix from csc to csr &lt;BR /&gt;!-------------------------------------------------------------------------- &lt;BR /&gt;!   call dcsccsr(nRows, a_nn, ja_nn, ia_nn, &lt;BR /&gt;!  $       values_new,columns_new, rowIndex_new) &lt;BR /&gt;   call dcsccsr(nRows, values_new, columns_new, rowIndex_new, &lt;BR /&gt;  $       values,columns, rowIndex) &lt;BR /&gt;!   write(*,*) 'nice guy' &lt;BR /&gt;!  if(type(2:2) .eq. 's' .or. type(2:2) .eq. 'S') then &lt;BR /&gt;!   nd=0 &lt;BR /&gt;!   do i=1,nRows &lt;BR /&gt;!  do j=rowIndex(i),rowIndex(i+1)-1 &lt;BR /&gt;!   if(columns(j).eq.i) nd=nd+1 &lt;BR /&gt;!  enddo &lt;BR /&gt;!  enddo &lt;BR /&gt;!  nNonZeros=2*nzeros_l-nd &lt;BR /&gt;!  allocate(values(nNonZeros)) &lt;BR /&gt;!  allocate(columns(nNonZeros)) &lt;BR /&gt;!  write(*,*) nRows,nCols,nNonZeros &lt;BR /&gt;!  write(*,*) 'Read hb file ok! hello' &lt;BR /&gt;!   call ssrcsr(1,1,nRows,values_new,columns_new,rowIndex_new, &lt;BR /&gt;!  &amp;amp;       nNonZeros,values,columns,rowIndex,indu,iwk,err0) &lt;BR /&gt;!   else &lt;BR /&gt;   nNonZeros=nzeros_l &lt;BR /&gt;!   allocate(values(nNonZeros)) &lt;BR /&gt;!   allocate(columns(nNonZeros)) &lt;BR /&gt;   write(*,*) nRows,nCols,nNonZeros &lt;BR /&gt;   write(*,*) 'Read hb file ok!' &lt;BR /&gt;!  rowIndex=rowIndex_new &lt;BR /&gt;!  columns=columns_new &lt;BR /&gt;!   values=values_new &lt;BR /&gt;!  endif &lt;BR /&gt;!   deallocate(rowIndex_new) &lt;BR /&gt;!   deallocate(columns_new) &lt;BR /&gt;!   deallocate(values_new) &lt;BR /&gt;!  deallocate(iwk) &lt;BR /&gt;!  deallocate(indu) &lt;BR /&gt; N=nRows &lt;BR /&gt; write(*,*)'the values_ are' &lt;BR /&gt; do i=1,20 &lt;BR /&gt; write(*,*) values(i) &lt;BR /&gt; enddo &lt;BR /&gt; write(*,*) 'rowIndex is:' &lt;BR /&gt; do j=1,10 &lt;BR /&gt;  write(*,*) rowIndex(j) &lt;BR /&gt; enddo &lt;BR /&gt; write(*,*) 'columns is :' &lt;BR /&gt; do i=1,20 &lt;BR /&gt; write(*,*) columns(i) &lt;BR /&gt; enddo &lt;BR /&gt;!--------------------------------------------------------------------------- &lt;BR /&gt;! Initialize the right hand side through matrix-vector product &lt;BR /&gt;!--------------------------------------------------------------------------- &lt;BR /&gt;   do i=1,N &lt;BR /&gt; solution(i)=i &lt;BR /&gt; enddo &lt;BR /&gt;!  PARAMETER(nRhs=1) &lt;BR /&gt; CALL MKL_DCSRSYMV('U', N, values, rowIndex, &lt;BR /&gt;  &amp;amp;         columns, solution, rhs) &lt;BR /&gt;&lt;BR /&gt;C--------------------------------------------------------------------------- &lt;BR /&gt;C Initialize the solver &lt;BR /&gt;C-------------------------------------------------------------------------- &lt;BR /&gt; call system_clock(count1,count_rate,count_max) &lt;BR /&gt; error = dss_create( handle, MKL_DSS_DEFAULTS) &lt;BR /&gt;   IF (error .NE. MKL_DSS_SUCCESS ) GOTO 999 &lt;BR /&gt;C--------------------------------------------------------------------------- &lt;BR /&gt;C Define the non-zero structure of the matrix &lt;BR /&gt;C--------------------------------------------------------------------------- &lt;BR /&gt;!   write(*,*) nRows,nCols &lt;BR /&gt;!  write(*,*) 'rowIndex is:' &lt;BR /&gt;!  write(*,*) rowIndex &lt;BR /&gt;!  write(*,*) 'columns is:' &lt;BR /&gt;!  write(*,*) columns &lt;BR /&gt;   error = dss_define_structure( handle, MKL_DSS_SYMMETRIC, &lt;BR /&gt;  &amp;amp; rowIndex, nRows, nCols, columns, nNonZeros ) &lt;BR /&gt;   IF (error .NE. MKL_DSS_SUCCESS ) GOTO 999 &lt;BR /&gt;   write(*,*)'good' &lt;BR /&gt;C--------------------------------------------------------------------------- &lt;BR /&gt;C Reorder the matrix &lt;BR /&gt;C--------------------------------------------------------------------------- &lt;BR /&gt; error = dss_reorder(handle, MKL_DSS_DEFAULTS,0) &lt;BR /&gt;   write(*,*)'reorder god' &lt;BR /&gt; IF (error .NE. MKL_DSS_SUCCESS ) GOTO 999 &lt;BR /&gt; write(*,*)'error god' &lt;BR /&gt;C--------------------------------------------------------------------------- &lt;BR /&gt;C Factor the matrix &lt;BR /&gt;C--------------------------------------------------------------------------- &lt;BR /&gt;   write(*,*)'right' &lt;BR /&gt; error = dss_factor_real( handle, MKL_DSS_DEFAULTS, values) &lt;BR /&gt;   IF (error .NE. MKL_DSS_SUCCESS ) GOTO 999 &lt;BR /&gt;C--------------------------------------------------------------------------- &lt;BR /&gt;C Get the solution vector &lt;BR /&gt;C--------------------------------------------------------------------------- &lt;BR /&gt;   write(*,*)'haha' &lt;BR /&gt; error = dss_solve_real( handle, MKL_DSS_DEFAULTS, &lt;BR /&gt;  &amp;amp; rhs, nRhs, solution) &lt;BR /&gt;   IF (error .NE. MKL_DSS_SUCCESS ) GOTO 999 &lt;BR /&gt;C--------------------------------------------------------------------------- &lt;BR /&gt;C Print Determinant of the matrix (no statistics for a diagonal matrix) &lt;BR /&gt;C--------------------------------------------------------------------------- &lt;BR /&gt;   write(*,*) 'ho!' &lt;BR /&gt;  IF( nRows .LT. nNonZeros ) THEN &lt;BR /&gt;    statIn = 'determinant' &lt;BR /&gt;    call mkl_cvt_to_null_terminated_str(buff,bufLen,statIn) &lt;BR /&gt;    error = dss_statistics(handle, MKL_DSS_DEFAULTS, &lt;BR /&gt;  &amp;amp;             buff,statOut) &lt;BR /&gt;    WRITE(*,"(' pow of determinant is ', 5(F10.3))") statOut(1) &lt;BR /&gt;    WRITE(*,"(' base of determinant is ', 5(F10.3))") statOut(2) &lt;BR /&gt;    WRITE(*,"(' Determinant is ', 5(F10.3))")(10**statOut(1))* &lt;BR /&gt;  &amp;amp;    statOut(2) &lt;BR /&gt;   END IF &lt;BR /&gt;!--------------------------------------------------------------------------- &lt;BR /&gt;! Reverse Communication ends here &lt;BR /&gt;! Get the current iteration number &lt;BR /&gt;!--------------------------------------------------------------------------- &lt;BR /&gt; call system_clock(count2,count_rate,count_max) &lt;BR /&gt; if(count2&amp;gt;count1) then &lt;BR /&gt;  t=(count2-count1)/float(count_rate) &lt;BR /&gt; else &lt;BR /&gt;  t=(count_max-count1+count2)/float(count_rate) &lt;BR /&gt;   endif &lt;BR /&gt;   write(*,105) t &lt;BR /&gt;105 format('the time :',E21.14) &lt;BR /&gt;C--------------------------------------------------------------------------- &lt;BR /&gt;C Deallocate solver storage &lt;BR /&gt;C--------------------------------------------------------------------------- &lt;BR /&gt;   error = dss_delete( handle, MKL_DSS_DEFAULTS ) &lt;BR /&gt;   IF (error .NE. MKL_DSS_SUCCESS ) GOTO 999 &lt;BR /&gt;C--------------------------------------------------------------------------- &lt;BR /&gt;C Print solution vector &lt;BR /&gt;C--------------------------------------------------------------------------- &lt;BR /&gt;   OPEN (10,file='bcsstk17.txt') &lt;BR /&gt; WRITE(10,900) (solution(i), i = 1, nRows) &lt;BR /&gt;900 FORMAT(' Solution Array: ',5(F10.3)) &lt;BR /&gt;   GOTO 1000 &lt;BR /&gt;999 WRITE(*,*) "Solver returned error code ", error &lt;BR /&gt;1000 END &lt;BR /&gt;</description>
      <pubDate>Fri, 21 Aug 2009 02:36:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/problem-with-testing-dss-sym-f-f-need-your-help/m-p/889256#M10290</guid>
      <dc:creator>magrate</dc:creator>
      <dc:date>2009-08-21T02:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: problem with testing dss_sym_f.f ,need your help</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/problem-with-testing-dss-sym-f-f-need-your-help/m-p/889257#M10291</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/439823"&gt;magrate&lt;/A&gt;&lt;/DIV&gt;
&lt;BR /&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
Magrate, &lt;BR /&gt;What MKL version you are using?&lt;BR /&gt;What architecture (IA32/x64) and what system (win/linux) are you on?&lt;BR /&gt;--Gennady&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 21 Aug 2009 14:40:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/problem-with-testing-dss-sym-f-f-need-your-help/m-p/889257#M10291</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2009-08-21T14:40:05Z</dc:date>
    </item>
  </channel>
</rss>

