<?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 Thanks, but it's really just in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-using-DSS/m-p/978272#M17254</link>
    <description>&lt;P&gt;Thanks, but it's really just a misprint in my post, of course I used&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;&lt;CODE class="functions"&gt;source&lt;/CODE&gt; &lt;CODE class="plain"&gt;$MKLROOT/bin/mklvars.sh intel64&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is strange: usually errors concerning 'logf', 'sin', 'cos', etc appear when -lm is missed. So this problem remains unsolved, but the error which occured during reordering was fixed: I didn't pass the last element to rowIndex, and now it works until dss_solve_real. Here memory crashes:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://software.intel.com/en-us/forums/topic/509259"&gt;https://software.intel.com/en-us/forums/topic/509259&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 12 Apr 2014 19:53:26 GMT</pubDate>
    <dc:creator>Max_T_</dc:creator>
    <dc:date>2014-04-12T19:53:26Z</dc:date>
    <item>
      <title>Problem using DSS</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-using-DSS/m-p/978268#M17250</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;

&lt;P&gt;I'm taking my first steps at MKL and after installation and linking libraries (I have Ubuntu 12.04, 64-bit) I tried to modify the direct solver dss_sym_c.c so that I could solve my sparse symmetric system which is stored in a binary file (1 based index). I changed CSR system but after that an unclassifiable error uccured at the "reorder step" of the program. What can be the reason of it?&lt;/P&gt;

&lt;P&gt;Here's the code:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;#include&amp;lt;stdio.h&amp;gt;
#include&amp;lt;stdlib.h&amp;gt;
#include&amp;lt;math.h&amp;gt;
#include "mkl_dss.h"
#include "mkl_types.h"

MKL_INT
main ()
{
  MKL_INT i;
  _MKL_DSS_HANDLE_t handle;
  _INTEGER_t error;
  _CHARACTER_t statIn[] = "determinant";
  _DOUBLE_PRECISION_t statOut[5];
  MKL_INT opt = MKL_DSS_DEFAULTS;
  MKL_INT sym = MKL_DSS_SYMMETRIC;
  MKL_INT type = MKL_DSS_POSITIVE_DEFINITE;
  MKL_INT nRows;
  MKL_INT nCols;
  MKL_INT nNonZeros;
  MKL_INT nRhs;
  _INTEGER_t *rowIndex;
  _INTEGER_t *columns;
  _DOUBLE_PRECISION_t *values;
  _DOUBLE_PRECISION_t *rhs;
  _DOUBLE_PRECISION_t *solValues;

  FILE *In;
  MKL_INT n, nz;
  MKL_INT *I = NULL, *J = NULL;
  _DOUBLE_PRECISION_t *val = NULL, *sol = NULL, *RHS = NULL;

  if ( ( In = fopen ("matr_rhs_binary", "rb" ) ) == NULL ) {
    fprintf (stderr, "Error opening file\n");		
    return (-1);
  }

  fread ( &amp;amp;n, sizeof(MKL_INT), 1, In );
  printf ("n = %d\n", n);	

  fread ( &amp;amp;nz, sizeof(MKL_INT), 1, In );
  printf ("nz = %d\n", nz);

  I = (MKL_INT *) malloc ( sizeof (I[0]) * (n + 1));                             // csr row pointers for matrix A
  J = (MKL_INT *) malloc ( sizeof (J[0]) * nz);                                  // csr column indices for matrix A
  val = (_DOUBLE_PRECISION_t *) malloc ( sizeof (val[0]) * nz);                  // csr values for matrix A	
  sol = (_DOUBLE_PRECISION_t *) malloc ( sizeof (sol[0]) * n);
  RHS = (_DOUBLE_PRECISION_t *) malloc ( sizeof (RHS[0]) * n);

  for (i = 0; i &amp;lt; n + 1; i++)
    fread ( &amp;amp;(I&lt;I&gt;), sizeof(I[0]), 1, In );
  for (i = 0; i &amp;lt; nz; i++)
    fread ( &amp;amp;(val&lt;I&gt;), sizeof(val[0]), 1, In );
  for (i = 0; i &amp;lt; nz; i++)
    fread ( &amp;amp;(J&lt;I&gt;), sizeof(J[0]), 1, In );
  for (i = 0; i &amp;lt; n; i++)
    fread ( &amp;amp;(RHS&lt;I&gt;), sizeof(RHS[0]), 1, In);	
	
  fclose (In);

  nRows = n;
  nCols = n;
  nNonZeros = nz;
  nRhs = n;

  rowIndex = (_INTEGER_t *) malloc ( sizeof (rowIndex[0]) * (nRows + 1) );
  columns = (_INTEGER_t *) malloc ( sizeof (columns[0]) * nNonZeros );
  values = (_DOUBLE_PRECISION_t *) malloc ( sizeof (values[0]) * nNonZeros );
  rhs = (_DOUBLE_PRECISION_t *) malloc ( sizeof (rhs[0]) * nCols );
  solValues = (_DOUBLE_PRECISION_t *) malloc ( sizeof (solValues[0]) * nCols );

  for (i = 0; i &amp;lt; n; i++) {
    rowIndex&lt;I&gt; = I&lt;I&gt;;
    rhs&lt;I&gt; = RHS&lt;I&gt;;
  }
  for (i = 0; i &amp;lt; nz; i++) {
    columns&lt;I&gt; = J&lt;I&gt;;
    values&lt;I&gt; = val&lt;I&gt;;
  }

  error = dss_create (handle, opt);
  if (error != MKL_DSS_SUCCESS)
    goto printError;

  error = dss_define_structure (handle, sym, rowIndex, nRows, nCols,
				columns, nNonZeros);
  if (error != MKL_DSS_SUCCESS)
    goto printError;

  error = dss_reorder (handle, opt, 0);
  if (error != MKL_DSS_SUCCESS)
    goto printError;

  error = dss_factor_real (handle, type, values);
  if (error != MKL_DSS_SUCCESS)
    goto printError;

  error = dss_solve_real (handle, opt, rhs, nRhs, solValues);
  if (error != MKL_DSS_SUCCESS)
    goto printError;
printf ("check\n");

  if (nRows &amp;lt; nNonZeros)
    {
      error = dss_statistics (handle, opt, statIn, statOut);
      if (error != MKL_DSS_SUCCESS)
	goto printError;

      printf (" determinant power is %g \n", statOut[0]);
      printf (" determinant base is %g \n", statOut[1]);
      printf (" Determinant is %g \n", (pow (10.0, statOut[0])) * statOut[1]);
    }

  error = dss_delete (handle, opt);
  if (error != MKL_DSS_SUCCESS)
    goto printError;

  printf (" Solution array: ");
  for (i = 0; i &amp;lt; nCols; i++)
    printf (" %g", solValues&lt;I&gt;);
  printf ("\n");
  exit (0);
printError:
  printf ("Solver returned error code %d\n", error);
  exit (1);
}&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;

&lt;P&gt;And another question: When I compile pardiso_sym_c.c, several errors occur: undefined references to functions like atan2, sin, cos, log10, etc though I compile with an -lm option. Is it because of:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;/usr/bin/ld: skipping incompatible /opt/intel/composer_xe_2013_sp1.0.080/mkl/lib/ia32/libmkl_intel_thread.so when searching for -lmkl_intel_thread
/usr/bin/ld: skipping incompatible /opt/intel/composer_xe_2013_sp1.0.080/mkl/lib/ia32/libmkl_intel_thread.a when searching for -lmkl_intel_thread
&lt;/PRE&gt;

&lt;PRE class="brush:bash;"&gt;/usr/bin/ld: skipping incompatible /opt/intel/composer_xe_2013_sp1.0.080/mkl/lib/ia32/libmkl_core.so when searching for -lmkl_core
/usr/bin/ld: skipping incompatible /opt/intel/composer_xe_2013_sp1.0.080/mkl/lib/ia32/libmkl_core.a when searching for -lmkl_core
&lt;/PRE&gt;

&lt;P&gt;How can I fix it?&lt;/P&gt;

&lt;P&gt;Thanks! Any help is appreciated!&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Apr 2014 11:09:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-using-DSS/m-p/978268#M17250</guid>
      <dc:creator>Max_T_</dc:creator>
      <dc:date>2014-04-11T11:09:11Z</dc:date>
    </item>
    <item>
      <title>- check if you fill the input</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-using-DSS/m-p/978269#M17251</link>
      <description>&lt;P&gt;-&amp;nbsp;check if you fill the input matrix be the right way in accordance with CSR. DSS interface dosn't provide &amp;nbsp;Matrix Checker functionality. see Pardiso ipatm(27).&lt;/P&gt;

&lt;P&gt;- how did you link the example? please check with MKL Linker Adviser how to do that. &amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Here is the link to LA:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&lt;A href="http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor" target="_blank"&gt;http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Apr 2014 12:36:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-using-DSS/m-p/978269#M17251</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2014-04-11T12:36:43Z</dc:date>
    </item>
    <item>
      <title>Thanks for your quick</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-using-DSS/m-p/978270#M17252</link>
      <description>&lt;P&gt;Thanks for your quick response!&lt;/P&gt;

&lt;P&gt;To link the example I do the following steps:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;export MKLROOT=/opt/intel/mkl
export MKLPATH=$MKLROOT/lib/intel64
export MKLINCLUDE=$MKLROOT/include
source $MKLROOT/bin/mklvars.sh intel 64&lt;/PRE&gt;

&lt;P&gt;Then according to my specification:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;g++ pardiso_sym_c.c -o pardiso -L$MKLPATH -I$MKLINCLUDE -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl
&lt;/PRE&gt;

&lt;P&gt;It gives:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;/opt/intel/mkl/lib/intel64/libmkl_core.so: undefined reference to `logf'
/opt/intel/mkl/lib/intel64/libmkl_core.so: undefined reference to `atan2'
/opt/intel/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `sin'
/opt/intel/mkl/lib/intel64/libmkl_core.so: undefined reference to `fabs'
/opt/intel/mkl/lib/intel64/libmkl_core.so: undefined reference to `exp'
/opt/intel/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `cos'
/opt/intel/mkl/lib/intel64/libmkl_core.so: undefined reference to `sqrt'
/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.so: undefined reference to `log'
/opt/intel/mkl/lib/intel64/libmkl_core.so: undefined reference to `pow'
/opt/intel/mkl/lib/intel64/libmkl_core.so: undefined reference to `log10'
/opt/intel/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `floor'
/opt/intel/mkl/lib/intel64/libmkl_core.so: undefined reference to `ceil'
/opt/intel/mkl/lib/intel64/libmkl_core.so: undefined reference to `expf'
&lt;/PRE&gt;

&lt;P&gt;Link advisor aslo suggests this option:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt; -DMKL_ILP64 -m64 -I$(MKLROOT)/include&lt;/PRE&gt;

&lt;P&gt;But it doesn't solve the problem.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Is it possible to use iparm(27) in this program? Or should I compile pardiso_sym_c.c first and try my system there?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Apr 2014 22:47:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-using-DSS/m-p/978270#M17252</guid>
      <dc:creator>Max_T_</dc:creator>
      <dc:date>2014-04-11T22:47:36Z</dc:date>
    </item>
    <item>
      <title>Does the reported </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-using-DSS/m-p/978271#M17253</link>
      <description>&lt;P&gt;Does the reported&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;source $MKLROOT/bin/mklvars.sh intel 64&lt;/PRE&gt;

&lt;P&gt;&lt;CODE class="plain" style="font-size: 16px; background-color: rgb(248, 248, 248); line-height: 17.88599967956543px; color: rgb(0, 0, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; min-height: inherit !important;"&gt;contain just a typographical error, the real command being&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;source $MKLROOT/bin/mklvars.sh intel64&lt;/PRE&gt;

&lt;P&gt;&lt;CODE class="plain" style="font-size: 16px; background-color: rgb(248, 248, 248); line-height: 17.88599967956543px; color: rgb(0, 0, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; min-height: inherit !important;"&gt;?&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Apr 2014 01:05:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-using-DSS/m-p/978271#M17253</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2014-04-12T01:05:09Z</dc:date>
    </item>
    <item>
      <title>Thanks, but it's really just</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-using-DSS/m-p/978272#M17254</link>
      <description>&lt;P&gt;Thanks, but it's really just a misprint in my post, of course I used&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;&lt;CODE class="functions"&gt;source&lt;/CODE&gt; &lt;CODE class="plain"&gt;$MKLROOT/bin/mklvars.sh intel64&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is strange: usually errors concerning 'logf', 'sin', 'cos', etc appear when -lm is missed. So this problem remains unsolved, but the error which occured during reordering was fixed: I didn't pass the last element to rowIndex, and now it works until dss_solve_real. Here memory crashes:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://software.intel.com/en-us/forums/topic/509259"&gt;https://software.intel.com/en-us/forums/topic/509259&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Apr 2014 19:53:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-using-DSS/m-p/978272#M17254</guid>
      <dc:creator>Max_T_</dc:creator>
      <dc:date>2014-04-12T19:53:26Z</dc:date>
    </item>
  </channel>
</rss>

