<?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 Greg, it might be the real in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Trunst-Region-optimization-dtrnlsp-solve-aborts-intermittently/m-p/1157921#M27712</link>
    <description>&lt;P&gt;Greg, it might be the real issue. Could you give the compatible case to start investigation on our side? Right now, I see several&amp;nbsp;undefined variables while compiling this case.... nn, sz2...&lt;/P&gt;</description>
    <pubDate>Wed, 27 Feb 2019 09:21:00 GMT</pubDate>
    <dc:creator>Gennady_F_Intel</dc:creator>
    <dc:date>2019-02-27T09:21:00Z</dc:date>
    <item>
      <title>Trunst Region optimization dtrnlsp_solve aborts intermittently returning 1502</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Trunst-Region-optimization-dtrnlsp-solve-aborts-intermittently/m-p/1157920#M27711</link>
      <description>&lt;P&gt;I'm calling dtrnlsp_solve from C++.&amp;nbsp; &amp;nbsp;Depending on changes to the surrounding code, compile options (debug vs optimized) etc,&amp;nbsp;Sometimes it works, sometimes it fails on the first call, returning code 1502.&amp;nbsp; What does the code mean?&amp;nbsp; &amp;nbsp;Any suggestions on how to fix it? I can't find anything wrong in my code.&lt;/P&gt;&lt;P&gt;CENTRAL_MKL_LIB = /depot/intel/math_kernel_library_2018.1.163/mkl&lt;/P&gt;&lt;P&gt;MATH_LIBS_linux64 &amp;nbsp; &amp;nbsp; &amp;nbsp;= -Wl,--start-group $(CENTRAL_MKL_LIB)/intel64/libmkl_intel_lp64.a $(CENTRAL_MKL_LIB)/intel64/libmkl_sequential.a $(CENTRAL_MKL_LIB)/intel64/libmkl_core.&lt;BR /&gt;a -Wl,--end-group -lpthread -lm&lt;/P&gt;&lt;P&gt;For a while it was working if compiled optimized but aborting if compiled debug.&amp;nbsp; Then I included&amp;nbsp;the call to&amp;nbsp;dtrnlsp_check (see below) and then it would work compiled debug but not optimized.&amp;nbsp; Then I change some code an another file and now it always fails???&amp;nbsp;&lt;/P&gt;&lt;P&gt;double *xx = (double*) malloc (sizeof (double)*nn);&lt;BR /&gt;&amp;nbsp; double *fjac = (double*) malloc (sizeof (double)*nn*sz2);&lt;BR /&gt;&amp;nbsp; double *fvec= (double*) malloc (sizeof (double)*sz2);&lt;BR /&gt;&amp;nbsp; for(int i=0; i&amp;lt;nn; i++) xx&lt;I&gt;=0.0;&lt;BR /&gt;&amp;nbsp; for(int i=0; i&amp;lt;sz2*nn; i++) fjac&lt;I&gt;=0.0;&lt;BR /&gt;&amp;nbsp; for(int i=0; i&amp;lt;sz2; i++) fvec&lt;I&gt;=0.0;&lt;BR /&gt;&amp;nbsp; double eps[6]={.00001, 0.00001, 0.00001, 0.00001, 0.00001, 0.00001};&lt;BR /&gt;&amp;nbsp; MKL_INT iter1=100;&lt;BR /&gt;&amp;nbsp; MKL_INT iter2=10;&lt;BR /&gt;&amp;nbsp; double rs=0.0;&lt;BR /&gt;&amp;nbsp; int res = dtrnlsp_init(&amp;amp;handle, &amp;amp;nn, &amp;amp;sz2, xx, eps, &amp;amp;iter1, &amp;amp;iter2, &amp;amp;rs);&lt;BR /&gt;&amp;nbsp; if(res != TR_SUCCESS) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; printf("ERROR SCE dtrnlsp_init failed\n");&lt;BR /&gt;&amp;nbsp; &amp;nbsp; exit(1);&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;#if 0&amp;nbsp;&lt;BR /&gt;&amp;nbsp; MKL_INT info[6];&lt;BR /&gt;&amp;nbsp; res = dtrnlsp_check(&amp;amp;handle, &amp;amp;nn, &amp;amp;sz2, fjac, fvec, eps, info);&lt;BR /&gt;&amp;nbsp; if(res != TR_SUCCESS) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; printf("ERROR SCE dtrnlsp_check failed &amp;nbsp;code=%d\n", res);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; exit(1);&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;#endif&lt;BR /&gt;&amp;nbsp; MKL_INT &amp;nbsp;RCI_Request;&lt;BR /&gt;&amp;nbsp; int success=0;&lt;BR /&gt;&amp;nbsp; while(success == 0){&lt;BR /&gt;&amp;nbsp; &amp;nbsp; res = dtrnlsp_solve(&amp;amp;handle, fvec, fjac, &amp;amp;RCI_Request);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; if(res != TR_SUCCESS) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; printf("ERROR SCE dtrnlsp_solve failed code=%d\n", res);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; exit(1);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2019 22:03:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Trunst-Region-optimization-dtrnlsp-solve-aborts-intermittently/m-p/1157920#M27711</guid>
      <dc:creator>Rollins__Greg</dc:creator>
      <dc:date>2019-02-22T22:03:15Z</dc:date>
    </item>
    <item>
      <title>Greg, it might be the real</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Trunst-Region-optimization-dtrnlsp-solve-aborts-intermittently/m-p/1157921#M27712</link>
      <description>&lt;P&gt;Greg, it might be the real issue. Could you give the compatible case to start investigation on our side? Right now, I see several&amp;nbsp;undefined variables while compiling this case.... nn, sz2...&lt;/P&gt;</description>
      <pubDate>Wed, 27 Feb 2019 09:21:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Trunst-Region-optimization-dtrnlsp-solve-aborts-intermittently/m-p/1157921#M27712</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2019-02-27T09:21:00Z</dc:date>
    </item>
  </channel>
</rss>

