<?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 Problems with errno when mixing VSL and VML calls in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problems-with-errno-when-mixing-VSL-and-VML-calls/m-p/765772#M239</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I've just found that testing the value of errno to check for errors in VML calls is not reliable, because other MKL routines do return without errors yet leaving errno!=0.&lt;BR /&gt;&lt;BR /&gt;Some routines, like MKL_malloc or VSL calls, have a return value which can be tested. One can then implement a (cumbersome) workaround by adding something like:&lt;BR /&gt;if(return_code==0) errno=0;&lt;BR /&gt;after each call to a non-VML routine. However, this cannot be done with (e.g.) MKL_free (and I have some evidence that it does change errno sometimes, but I'm still running some tests to be sure).&lt;BR /&gt;&lt;BR /&gt;Did I miss something evident? Otherwise, is there a standard way to submit feature requests?&lt;BR /&gt;&lt;BR /&gt;Cheers.</description>
    <pubDate>Mon, 13 Dec 2010 12:57:21 GMT</pubDate>
    <dc:creator>llevrel</dc:creator>
    <dc:date>2010-12-13T12:57:21Z</dc:date>
    <item>
      <title>Problems with errno when mixing VSL and VML calls</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problems-with-errno-when-mixing-VSL-and-VML-calls/m-p/765772#M239</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I've just found that testing the value of errno to check for errors in VML calls is not reliable, because other MKL routines do return without errors yet leaving errno!=0.&lt;BR /&gt;&lt;BR /&gt;Some routines, like MKL_malloc or VSL calls, have a return value which can be tested. One can then implement a (cumbersome) workaround by adding something like:&lt;BR /&gt;if(return_code==0) errno=0;&lt;BR /&gt;after each call to a non-VML routine. However, this cannot be done with (e.g.) MKL_free (and I have some evidence that it does change errno sometimes, but I'm still running some tests to be sure).&lt;BR /&gt;&lt;BR /&gt;Did I miss something evident? Otherwise, is there a standard way to submit feature requests?&lt;BR /&gt;&lt;BR /&gt;Cheers.</description>
      <pubDate>Mon, 13 Dec 2010 12:57:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problems-with-errno-when-mixing-VSL-and-VML-calls/m-p/765772#M239</guid>
      <dc:creator>llevrel</dc:creator>
      <dc:date>2010-12-13T12:57:21Z</dc:date>
    </item>
    <item>
      <title>Problems with errno when mixing VSL and VML calls</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problems-with-errno-when-mixing-VSL-and-VML-calls/m-p/765773#M240</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;MKL functions (except VSL/...) are not set/change directly 'errno'. But 'erno'can beset indirectly.&lt;BR /&gt;For example, in caseof MKL_malloc failure, the return`errno' is setto `ENOMEM'.&lt;BR /&gt;You know, MKL_free must not change 'errno'.&lt;BR /&gt;&lt;BR /&gt;BTW, what feature do you need related to errno or error-handling in MKL?&lt;BR /&gt;&lt;BR /&gt;Please contact &lt;A href="http://premier.intel.com"&gt;http://premier.intel.com&lt;/A&gt; for your suggestions.</description>
      <pubDate>Mon, 13 Dec 2010 14:03:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problems-with-errno-when-mixing-VSL-and-VML-calls/m-p/765773#M240</guid>
      <dc:creator>barragan_villanueva_</dc:creator>
      <dc:date>2010-12-13T14:03:22Z</dc:date>
    </item>
    <item>
      <title>Problems with errno when mixing VSL and VML calls</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problems-with-errno-when-mixing-VSL-and-VML-calls/m-p/765774#M241</link>
      <description>In my current test I've got one call to MKL_malloc which returned correctly (non-NULL pointer) but set errno to 12. In previous tests I also got VSL routines returning status==0 but errno==12.&lt;BR /&gt;&lt;BR /&gt;I understand that I must not rely on errno to check errors in MKL_malloc or VSL routines. But a non-zero errno then goes through successful VML calls untouched. E.g.&lt;BR /&gt;status=vslcCorrExec1D(...);&lt;BR /&gt;// here status==0 and errno==12&lt;BR /&gt;vcAdd(...):&lt;BR /&gt;// vcAdd is successful but errno is still 12&lt;BR /&gt;&lt;BR /&gt;Since VML routines have no return code, I thought I'd use errno as a way to check for errors and abort:&lt;BR /&gt;if(errno) {perror("name of routine");abort();}&lt;BR /&gt;Finally I found the Ref Manual mentions a global variable vmlErrStatus. I'd rather use it, but is it thread-safe?&lt;BR /&gt;&lt;BR /&gt;Thanks for your help.&lt;BR /&gt;</description>
      <pubDate>Mon, 13 Dec 2010 15:09:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problems-with-errno-when-mixing-VSL-and-VML-calls/m-p/765774#M241</guid>
      <dc:creator>llevrel</dc:creator>
      <dc:date>2010-12-13T15:09:45Z</dc:date>
    </item>
    <item>
      <title>Problems with errno when mixing VSL and VML calls</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problems-with-errno-when-mixing-VSL-and-VML-calls/m-p/765775#M242</link>
      <description>&lt;P&gt;VML&amp;amp;VSL are not set errno to 0 in case of successful call (no errors happened), but set errno in case of error happened. So, you can use your errors checking method if you clean errno before calls to VML&amp;amp;VSL.&lt;BR /&gt;&lt;BR /&gt;Yes, all VML service functions, which are described in VML Error Diagnostics secrions, are thread safe.&lt;BR /&gt;&lt;BR /&gt;Andrey&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Dec 2010 15:41:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problems-with-errno-when-mixing-VSL-and-VML-calls/m-p/765775#M242</guid>
      <dc:creator>Andrey_G_Intel2</dc:creator>
      <dc:date>2010-12-13T15:41:09Z</dc:date>
    </item>
    <item>
      <title>Problems with errno when mixing VSL and VML calls</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problems-with-errno-when-mixing-VSL-and-VML-calls/m-p/765776#M243</link>
      <description>Thanks to you two.</description>
      <pubDate>Mon, 13 Dec 2010 15:57:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problems-with-errno-when-mixing-VSL-and-VML-calls/m-p/765776#M243</guid>
      <dc:creator>llevrel</dc:creator>
      <dc:date>2010-12-13T15:57:05Z</dc:date>
    </item>
  </channel>
</rss>

