<?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 Hi Fiona, in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/icpc-16-0-170-warning-10315-and-malloc-message/m-p/1080769#M22793</link>
    <description>&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Hi Fiona,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Thanks a lot for looking into the issue.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;I should have isolated the memory aspect before I uploaded my code: I get the same message even when I only allocate once three tiny arrays (4 elements each). Moreover, it seems strange to me that the warning appears before any other statement in main() is executed. For example, the code I am attaching results in the same warning.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;In any case, thank you very much for looking at my code and for the references to the memory management functions. I will read about them.&lt;/P&gt;

&lt;P&gt;I will also try compiling with the latest version (2017) of Parallel Studio.&lt;/P&gt;

&lt;P&gt;Best regards,&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Pantelis&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 24 Sep 2016 09:37:31 GMT</pubDate>
    <dc:creator>Pantelis_I_</dc:creator>
    <dc:date>2016-09-24T09:37:31Z</dc:date>
    <item>
      <title>icpc-16_0_170: warning #10315 and malloc message</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/icpc-16-0-170-warning-10315-and-malloc-message/m-p/1080763#M22787</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Hi all,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I would really appreciate any insights regarding the issue I describe below. Even high-level pointers in the right direction can be helpful. Given the level of expertise in this forum, please bear with my naive question.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Being new to Intel MKL, I am going through the examples that are available online and, specifically, I was looking at "Measuring Effect of Threading on dgemm", which is available here&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &lt;A href="https://software.intel.com/en-us/node/529737" target="_blank"&gt;https://software.intel.com/en-us/node/529737&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;The problem, I think, is that I do not &lt;STRONG&gt;really&lt;/STRONG&gt; understand the linker flags---I just copied them from the online step-by-step instructions for using Intel MKL with Xcode (v. 7.3.1 on OS X 10.11.6, for what is worth). Hence, when I compile the example, above, I get the following warning&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /icpc-16_0_170: warning #10315: specifying -lm before files may supersede the Intel(R) math library and affect performance&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;The linker flags are set as follows&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lpthread -lm&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;When compiling with Apple LLVM, no warnings are emitted, however, given that I do not have in depth knowledge of the compilers, I do not find the lack of warning reassuring. It may very well be the case that only of the two compilers detects the issue.&lt;/P&gt;

&lt;P&gt;Also, another disconcerting symptom (with both compilers) is that the first line of the output generated during execution is&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-variant-ligatures: no-common-ligatures"&gt;&lt;B&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MKL_Cpp(38877,0x11880d000) malloc: Attempted to register zone more than once: 0x104cf0140&lt;/B&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;However, the program runs and gives correct results. At least for matrices small enough so that I could check the results by inspection (e.g., permutation matrices, matrices that sum columns, etc).&lt;/P&gt;

&lt;P&gt;Any ideas or suggestions will be highly appreciated.&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Sep 2016 02:56:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/icpc-16-0-170-warning-10315-and-malloc-message/m-p/1080763#M22787</guid>
      <dc:creator>Pantelis_I_</dc:creator>
      <dc:date>2016-09-18T02:56:36Z</dc:date>
    </item>
    <item>
      <title>Hi Pantelis,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/icpc-16-0-170-warning-10315-and-malloc-message/m-p/1080764#M22788</link>
      <description>&lt;P&gt;Hi Pantelis,&lt;/P&gt;

&lt;P&gt;What's the version of your mkl &amp;amp; icc compiler? I tried to reproduce your problem, when I use different version of compiler &amp;amp; mkl, and do not select to use MKL under same version of ICC, link with runpath &amp;amp; header path manually, you might meet this problem. The "libm.dylib" is defined in /usr/lib/, might be used for some of MKL function, but degmm function would not use libm.&lt;/P&gt;

&lt;P&gt;For your problem, please try to remove -lm option in Linker flag, this problem could be avoid. For instance,&lt;/P&gt;

&lt;P&gt;Mach-O-Type: Executable&lt;/P&gt;

&lt;P&gt;Other Linker flags:&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em;"&gt;-lmkl_core&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 13.008px;"&gt;-lmkl_intel_thread&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 13.008px;"&gt;-lmkl_intel_lp64&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 13.008px;"&gt;-liomp5&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;Seems your source code is using OMP, please also remember to link with&amp;nbsp;libiomp5.dylib in compiler lib folder.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Best regards,&lt;BR /&gt;
	Fiona&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 07:10:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/icpc-16-0-170-warning-10315-and-malloc-message/m-p/1080764#M22788</guid>
      <dc:creator>Zhen_Z_Intel</dc:creator>
      <dc:date>2016-09-19T07:10:51Z</dc:date>
    </item>
    <item>
      <title>Hi Fiona,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/icpc-16-0-170-warning-10315-and-malloc-message/m-p/1080765#M22789</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Hi Fiona,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Thanks a lot for your reply.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;I did what you suggested and, indeed, the warnings from the linker went away. &lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Maybe it is a separate problem, however I am still getting the malloc warning (I linked against &lt;/SPAN&gt;&lt;SPAN style="font-size: 12px;"&gt;libiomp5.dylib, as you suggested, which I hadn't before&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em;"&gt;).&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;As for versions, I am using MKL 11.3 (for which there are updates, I just realised) and the compiler's version is 16.0 (the folder name is compilers_and_libraries_2016.3.170).&lt;/P&gt;

&lt;P&gt;Thanks again for your time.&lt;/P&gt;

&lt;P&gt;Pantelis&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2016 10:53:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/icpc-16-0-170-warning-10315-and-malloc-message/m-p/1080765#M22789</guid>
      <dc:creator>Pantelis_I_</dc:creator>
      <dc:date>2016-09-21T10:53:05Z</dc:date>
    </item>
    <item>
      <title>Hi Pantelis,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/icpc-16-0-170-warning-10315-and-malloc-message/m-p/1080766#M22790</link>
      <description>&lt;P&gt;Hi Pantelis,&lt;/P&gt;

&lt;P&gt;Glad to hear the linking warning has been solved, it is very unusual problem, I did't meet before when I choose to use MKL2017 and compiler 17.0.&lt;/P&gt;

&lt;P&gt;On the other hand, the meaning of malloc error message is that you might allocate memory space for same pointer twice, before you free it. It might not affect result, but may lead to memory leak or other memory problems when you process large amount of data. My advice is checking with your source code, or you could submit your code to me.&lt;/P&gt;

&lt;P&gt;Best regards,&lt;BR /&gt;
	Fiona&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2016 00:59:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/icpc-16-0-170-warning-10315-and-malloc-message/m-p/1080766#M22790</guid>
      <dc:creator>Zhen_Z_Intel</dc:creator>
      <dc:date>2016-09-22T00:59:03Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/icpc-16-0-170-warning-10315-and-malloc-message/m-p/1080767#M22791</link>
      <description>&lt;P style="word-wrap: break-word; margin-right: 10px;"&gt;Hi,&lt;/P&gt;

&lt;P style="word-wrap: break-word; margin-right: 10px;"&gt;If you could take a look at my code, that would be great.&lt;/P&gt;

&lt;P style="word-wrap: break-word; margin-right: 10px;"&gt;I am not sure what is the best way to share the code, so I put everything in a .zip file. It is just a toy example based on a tutorial example available online, however it would be really instructive for me to see how is properly done&amp;nbsp;what I am trying to do.&lt;/P&gt;

&lt;P style="word-wrap: break-word; margin-right: 10px;"&gt;Thanks so much for your patience and expert advice.&lt;/P&gt;

&lt;P style="word-wrap: break-word; margin-right: 10px;"&gt;Best,&lt;/P&gt;

&lt;P style="word-wrap: break-word; margin-right: 10px;"&gt;Pantelis&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2016 00:48:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/icpc-16-0-170-warning-10315-and-malloc-message/m-p/1080767#M22791</guid>
      <dc:creator>Pantelis_I_</dc:creator>
      <dc:date>2016-09-23T00:48:54Z</dc:date>
    </item>
    <item>
      <title>Hi Pantelis,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/icpc-16-0-170-warning-10315-and-malloc-message/m-p/1080768#M22792</link>
      <description>&lt;P&gt;Hi Pantelis,&lt;/P&gt;

&lt;P&gt;I tested your project with system environment listed below, however I could not reproduce your problem. There's no any problem with your code. Seems not the problem of MKL nor Intel compiler.&lt;/P&gt;

&lt;P&gt;Environment:&lt;BR /&gt;
	OS X EL Captian 10.11.5&lt;BR /&gt;
	Processor: 2GHz&lt;BR /&gt;
	Memory: 8GB&lt;/P&gt;

&lt;P&gt;While the program has been executed the memory raised around to 100M. I wonder while you run the program, could you make sure you have enough memory space? Some large size of heap objects may lead to this error "malloc: Attempted to register zone more than once: 0x7fff587b18b0" in some version of IOS, for instance ios9.1. Please check with your ios version and also try to test that just allocate large number of space and free them directly. If this problem still remains, try to use MKL function mkl_thread_free_buffer() within each thread and call mkl_free_buffer() to empty all space allocated for mkl functions at the end of program. Please view &lt;A href="https://software.intel.com/en-us/node/522136"&gt;link &lt;/A&gt;to learn more information about MKL memory management methods. Thank you.&lt;/P&gt;

&lt;P&gt;Best regards,&lt;BR /&gt;
	Fiona&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2016 03:58:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/icpc-16-0-170-warning-10315-and-malloc-message/m-p/1080768#M22792</guid>
      <dc:creator>Zhen_Z_Intel</dc:creator>
      <dc:date>2016-09-23T03:58:54Z</dc:date>
    </item>
    <item>
      <title>Hi Fiona,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/icpc-16-0-170-warning-10315-and-malloc-message/m-p/1080769#M22793</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Hi Fiona,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Thanks a lot for looking into the issue.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;I should have isolated the memory aspect before I uploaded my code: I get the same message even when I only allocate once three tiny arrays (4 elements each). Moreover, it seems strange to me that the warning appears before any other statement in main() is executed. For example, the code I am attaching results in the same warning.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;In any case, thank you very much for looking at my code and for the references to the memory management functions. I will read about them.&lt;/P&gt;

&lt;P&gt;I will also try compiling with the latest version (2017) of Parallel Studio.&lt;/P&gt;

&lt;P&gt;Best regards,&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Pantelis&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Sep 2016 09:37:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/icpc-16-0-170-warning-10315-and-malloc-message/m-p/1080769#M22793</guid>
      <dc:creator>Pantelis_I_</dc:creator>
      <dc:date>2016-09-24T09:37:31Z</dc:date>
    </item>
  </channel>
</rss>

