<?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: MKL_GET_MAX_THREADS() in Fortran 90/95 in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-GET-MAX-THREADS-in-Fortran-90-95/m-p/880385#M9453</link>
    <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/452406"&gt;dbacchus&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;STRONG&gt;I firgured out MKL_MEM_STAT problem.&lt;/STRONG&gt; Apparently, it was only defined in MKL 10.2, in previous versions (10.1) it was called MKL_MEMSTAT. Now, MKL 10.2.2.025 has a bug that makes ARPACK's dseupd return incorrect eigenvectors. Therefore, I had to use MKL 10.1, for which MKL_MEM_STAT was not (yet) defined. MKL_MEMSTAT works fine though for MKL 10.1... &lt;BR /&gt;Of course, MKL_FREE_BUFFERS has the same problem: in MKL 10.1 it is called MKL_FREEBUFFERS...&lt;/DIV&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;MKL_MemStat is an obsolete name for the MKL_Mem_Stat function that is referenced in the library for back compatibility purposes but is deprecated and subject to removal in subsequent releases.&lt;BR /&gt;The similar situation happens with some others service routines.&lt;BR /&gt;But it's not clear why the linker produces the error when you use obsolete name from 10.1 while linked with 10.2 .&lt;BR /&gt;We will check it. Thanks for the report.&lt;BR /&gt;--Gennady&lt;BR /&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 24 Nov 2009 12:11:57 GMT</pubDate>
    <dc:creator>Gennady_F_Intel</dc:creator>
    <dc:date>2009-11-24T12:11:57Z</dc:date>
    <item>
      <title>MKL_GET_MAX_THREADS() in Fortran 90/95</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-GET-MAX-THREADS-in-Fortran-90-95/m-p/880381#M9449</link>
      <description>&lt;P&gt;MKL version: 10.1.1.022&lt;BR /&gt;IFC version: 11.1.051&lt;BR /&gt;Platforms: linux x64, win7 x64&lt;BR /&gt;&lt;BR /&gt;The compiler complains about MKL_GET_MAX_THREADS() when being called &lt;BR /&gt;MKL_MT=MKL_GET_MAX_THREADS()&lt;BR /&gt;("This name does not have a type, and must have an explicit type. [MKL_GET_MAX_THREADS]"&lt;BR /&gt;&lt;BR /&gt;In the same code the subroutines, e.g. call MKL_SET_NUM_THREADS(N), are being executed just fine.&lt;BR /&gt;&lt;BR /&gt;What's the proper F95 interface to MKL_GET_MAX_THREADS() function? Is there a way &lt;STRONG&gt;not&lt;/STRONG&gt; to provide the include path (which isan artifact of F77)?&lt;BR /&gt;I just think it would be much more convenient to make a module like omp_lib for MKL functions.&lt;BR /&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2009 16:41:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-GET-MAX-THREADS-in-Fortran-90-95/m-p/880381#M9449</guid>
      <dc:creator>dbacchus</dc:creator>
      <dc:date>2009-11-20T16:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: MKL_GET_MAX_THREADS() in Fortran 90/95</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-GET-MAX-THREADS-in-Fortran-90-95/m-p/880382#M9450</link>
      <description>&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Fortran95 standard requires an explicit interface in most cases. You can find the full list in the Intel Fortran document "Intel Fortran Compiler User and Reference Guides" =&amp;gt; "Language Reference" =&amp;gt; "Program Units and Procedures" =&amp;gt; "Procedure Interfaces" =&amp;gt; "Determining When Procedures Require Explicit Interfaces".&lt;/P&gt;
&lt;P&gt;I believe your main program includes "implicit none" statement. Without this statement a program should be compiled:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;!implicit none&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;integer&lt;/STRONG&gt; nth&lt;/P&gt;
&lt;P&gt;nth = mkl_foo()&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;print&lt;/STRONG&gt; *,nth, mkl_foo()&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;end&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;integer&lt;/STRONG&gt; &lt;STRONG&gt;function&lt;/STRONG&gt; mkl_foo&lt;/P&gt;
&lt;P&gt;mkl_foo = 7&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;end function&lt;/STRONG&gt; mkl_foo&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;$ ifort explicit.f90 &amp;amp;&amp;amp; ./explicit&lt;/P&gt;
&lt;P&gt; 7 7&lt;/P&gt;
&lt;P&gt;Note: in this case mkl_foo is interpreted according to the (Fortran77) implicit rules. So, if name of the function is dmkl_foo, then:&lt;/P&gt;
&lt;P&gt;$ ifort explicit.f90 &amp;amp;&amp;amp; ./explicit&lt;/P&gt;
&lt;P&gt; 7 7.000000&lt;/P&gt;
&lt;P&gt;MKL really does not provide interfaces for the service functions. So you may either omit "implicit none" statement or add interface for required functions, like:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;implicit none&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;interface&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;integer&lt;/STRONG&gt; &lt;STRONG&gt;function&lt;/STRONG&gt; mkl_foo()&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;end function&lt;/STRONG&gt; mkl_foo&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;end interface&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;integer&lt;/STRONG&gt; nth&lt;/P&gt;
&lt;P&gt;nth = mkl_foo()&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;print&lt;/STRONG&gt; *,nth, mkl_foo()&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;end&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;integer&lt;/STRONG&gt; &lt;STRONG&gt;function&lt;/STRONG&gt; mkl_foo&lt;/P&gt;
&lt;P&gt;mkl_foo = 7&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;end function&lt;/STRONG&gt; mkl_foo&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;$ ifort explicit.f90 &amp;amp;&amp;amp; ./explicit&lt;/P&gt;
&lt;P&gt; 7 7&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Vladimir&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2009 08:52:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-GET-MAX-THREADS-in-Fortran-90-95/m-p/880382#M9450</guid>
      <dc:creator>Vladimir_Koldakov__I</dc:creator>
      <dc:date>2009-11-23T08:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: MKL_GET_MAX_THREADS() in Fortran 90/95</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-GET-MAX-THREADS-in-Fortran-90-95/m-p/880383#M9451</link>
      <description>&lt;DIV style="margin: 0px; height: auto;"&gt;&lt;/DIV&gt;
&lt;DIV style="margin: 0px; height: auto;"&gt;Thanks, Vladimir!&lt;BR /&gt;I'm curious though, in which category below does MKL_GET_MAX_THREADS() fall and MKL_SET_NUM_THREADS does not?I don't quite understand why the former needs theinterface, while the latter doesn't.Also, I have a similar question regarding MKL_FREE_BUFFERS which has no arguments.&lt;BR /&gt;&lt;BR /&gt;Quote (Intel Fortran Compiler User and Reference Guide):&lt;BR /&gt;&lt;BR /&gt;
&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;A procedure must have an explicit interface in the following cases:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL type="disc"&gt;
&lt;LI&gt;
&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;If the procedure has any of the following:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL type="disc"&gt;
&lt;LI&gt;
&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;A dummy argument that has the ALLOCATABLE, ASYNCHRONOUS, OPTIONAL, POINTER, TARGET, VALUE, or VOLATILE attribute&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;A dummy argument that is an assumed-shape array&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;A result that is an array, or a pointer, or is allocatable (functions only)&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;A result whose length is neither assumed nor a constant (character functions only)&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;If a reference to the procedure appears as follows:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL type="disc"&gt;
&lt;LI&gt;
&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;With an argument keyword&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;As a reference by its generic name&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;As a defined assignment (subroutines only)&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;In an expression as a defined operator (functions only)&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;In a context that requires it to be pure&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;If the procedure is elemental&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;BR /&gt;P.S. I'm totally lost. I've implemented the interface for MKL_GET_MAX_THREADS() &lt;BR /&gt;
&lt;PRE&gt;[plain]implicit none

interface
 integer function mkl_get_max_threads()
 end function mkl_get_max_threads
end interface
[/plain]&lt;/PRE&gt;
&lt;BR /&gt;
&lt;P&gt;and the code compiles and works fine. &lt;BR /&gt;Now, I'm trying to do the samewith MKL_MEM_STAT()&lt;/P&gt;
&lt;PRE&gt;[cpp]INTERFACE
integer*8 function MKL_MEM_STAT(AllocatedBuffers )
integer*4 AllocatedBuffers 
END
END INTERFACE[/cpp]&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;and the linker produces an error (unresolved...). Why?&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 23 Nov 2009 17:04:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-GET-MAX-THREADS-in-Fortran-90-95/m-p/880383#M9451</guid>
      <dc:creator>dbacchus</dc:creator>
      <dc:date>2009-11-23T17:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: MKL_GET_MAX_THREADS() in Fortran 90/95</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-GET-MAX-THREADS-in-Fortran-90-95/m-p/880384#M9452</link>
      <description>&lt;DIV style="margin: 0px; height: auto;"&gt;&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;I firgured out MKL_MEM_STAT problem. Apparently, it was only defined in MKL 10.2, in previous versions (10.1) it was called MKL_MEMSTAT. Now, MKL 10.2.2.025 has a bug that makes ARPACK's dseupd return incorrect eigenvectors. Therefore, I had to use MKL 10.1, for which MKL_MEM_STAT was not (yet) defined. MKL_MEMSTAT works fine though for MKL 10.1... &lt;BR /&gt;Of course, MKL_FREE_BUFFERS has the same problem: in MKL 10.1 it is called MKL_FREEBUFFERS...&lt;/DIV&gt;</description>
      <pubDate>Mon, 23 Nov 2009 19:16:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-GET-MAX-THREADS-in-Fortran-90-95/m-p/880384#M9452</guid>
      <dc:creator>dbacchus</dc:creator>
      <dc:date>2009-11-23T19:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: MKL_GET_MAX_THREADS() in Fortran 90/95</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-GET-MAX-THREADS-in-Fortran-90-95/m-p/880385#M9453</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/452406"&gt;dbacchus&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;STRONG&gt;I firgured out MKL_MEM_STAT problem.&lt;/STRONG&gt; Apparently, it was only defined in MKL 10.2, in previous versions (10.1) it was called MKL_MEMSTAT. Now, MKL 10.2.2.025 has a bug that makes ARPACK's dseupd return incorrect eigenvectors. Therefore, I had to use MKL 10.1, for which MKL_MEM_STAT was not (yet) defined. MKL_MEMSTAT works fine though for MKL 10.1... &lt;BR /&gt;Of course, MKL_FREE_BUFFERS has the same problem: in MKL 10.1 it is called MKL_FREEBUFFERS...&lt;/DIV&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;MKL_MemStat is an obsolete name for the MKL_Mem_Stat function that is referenced in the library for back compatibility purposes but is deprecated and subject to removal in subsequent releases.&lt;BR /&gt;The similar situation happens with some others service routines.&lt;BR /&gt;But it's not clear why the linker produces the error when you use obsolete name from 10.1 while linked with 10.2 .&lt;BR /&gt;We will check it. Thanks for the report.&lt;BR /&gt;--Gennady&lt;BR /&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 24 Nov 2009 12:11:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-GET-MAX-THREADS-in-Fortran-90-95/m-p/880385#M9453</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2009-11-24T12:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: MKL_GET_MAX_THREADS() in Fortran 90/95</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-GET-MAX-THREADS-in-Fortran-90-95/m-p/880386#M9454</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/334681"&gt;Gennady Fedorov (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;BR /&gt;MKL_MemStat is an obsolete name for the MKL_Mem_Stat function that is referenced in the library for back compatibility purposes but is deprecated and subject to removal in subsequent releases.&lt;BR /&gt;The similar situation happens with some others service routines.&lt;BR /&gt;But it's not clear why the linker produces the error when you use obsolete name from 10.1 while linked with 10.2 .&lt;BR /&gt;We will check it. Thanks for the report.&lt;BR /&gt;--Gennady&lt;BR /&gt;&lt;/DIV&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Actually, I was linking with 10.1 (I couldn't use 10.2 due to the reason described above). &lt;BR /&gt;I will make sure to update the code to new naming conventions (MKL_MEMSTAT =&amp;gt; MKL_MEM_STAT, etc) once the eigenvector problem with 10.2 is fixed. Thanks!</description>
      <pubDate>Tue, 24 Nov 2009 17:44:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-GET-MAX-THREADS-in-Fortran-90-95/m-p/880386#M9454</guid>
      <dc:creator>dbacchus</dc:creator>
      <dc:date>2009-11-24T17:44:39Z</dc:date>
    </item>
  </channel>
</rss>

