<?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: Lost in MKL in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Lost-in-MKL/m-p/880613#M9502</link>
    <description>&lt;DIV style="margin: 0px; height: auto;"&gt;&lt;/DIV&gt;
Hi,&lt;BR /&gt;&lt;BR /&gt;if you were using imsl you were also using mkl, as it internally calls it. If you have problems with replacing imsl functions with mkl, post a bit more specific question, and I'm more than sure somebody will provide help on that. Many imsl functions you can get at netlib as well.&lt;BR /&gt;&lt;BR /&gt;For any issues related to linking, link advisor is your friend.&lt;BR /&gt;&lt;BR /&gt;A.&lt;BR /&gt;</description>
    <pubDate>Fri, 20 Nov 2009 02:13:46 GMT</pubDate>
    <dc:creator>ArturGuzik</dc:creator>
    <dc:date>2009-11-20T02:13:46Z</dc:date>
    <item>
      <title>Lost in MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Lost-in-MKL/m-p/880611#M9500</link>
      <description>Hi all&lt;BR /&gt;I used to use IMSL for fortran in Windows OS. Now I transfered to Linux and tried to use MKL instead. After I have read the MKL usermanual and library reference for a while, I am still lost. I just could not find an example to walk me through how I can use MKL functions. For example, I found an example as following. I could not even understand these codes. &lt;BR /&gt;Could anyone help me out? Great thanks.&lt;BR /&gt;&lt;BR /&gt;program DASUM_MAIN&lt;BR /&gt;&lt;BR /&gt; use mkl95_precision, only: wp =&amp;gt; dp&lt;BR /&gt; use mkl95_blas, only: asum&lt;BR /&gt;&lt;BR /&gt; implicit none&lt;BR /&gt;&lt;BR /&gt; integer :: n&lt;BR /&gt; integer :: incx&lt;BR /&gt; integer :: nx, nx1, nx2&lt;BR /&gt; real(wp), allocatable :: x(:)&lt;BR /&gt; real(wp) :: sum&lt;BR /&gt; integer :: i&lt;BR /&gt;&lt;BR /&gt;!     Intrinsic Functions&lt;BR /&gt; intrinsic abs&lt;BR /&gt;!     External Subroutines&lt;BR /&gt; external PrintVectorD&lt;BR /&gt;&lt;BR /&gt;!     Executable Statements&lt;BR /&gt;&lt;BR /&gt; print*&lt;BR /&gt; print*,'   D A S U M  EXAMPLE PROGRAM'&lt;BR /&gt;!     Read input data from input file&lt;BR /&gt; read*&lt;BR /&gt; read*, n, incx&lt;BR /&gt;&lt;BR /&gt; nx = 1+(n-1)*abs(incx)&lt;BR /&gt;&lt;BR /&gt; allocate(x(n))&lt;BR /&gt; read*, (x(i),i=1,nx)&lt;BR /&gt;&lt;BR /&gt;!     Print input data&lt;BR /&gt; print*&lt;BR /&gt; print*, '     INPUT DATA'&lt;BR /&gt; print 100, n&lt;BR /&gt; call PrintVectorD(0,n,x,incx,'X ')&lt;BR /&gt;&lt;BR /&gt;!     Call DASUM subroutine&lt;BR /&gt; if (incx &amp;gt; 0) then&lt;BR /&gt; nx1 = 1&lt;BR /&gt; nx2 = nx&lt;BR /&gt; else&lt;BR /&gt; nx1 = nx          &lt;BR /&gt;nx2 = 1&lt;BR /&gt; end if&lt;BR /&gt; sum = ASUM(x(nx1:nx2:incx))&lt;BR /&gt;&lt;BR /&gt; print*&lt;BR /&gt; print*, '     OUTPUT DATA'&lt;BR /&gt; print 101, sum&lt;BR /&gt;&lt;BR /&gt; deallocate(x)&lt;BR /&gt;&lt;BR /&gt; 100  format(7x,'N=',i2)&lt;BR /&gt; 101  format(10x,'DASUM = ',f8.3)&lt;BR /&gt; stop&lt;BR /&gt; end&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Nov 2009 23:24:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Lost-in-MKL/m-p/880611#M9500</guid>
      <dc:creator>yjyincj</dc:creator>
      <dc:date>2009-11-19T23:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: Lost in MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Lost-in-MKL/m-p/880612#M9501</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
This simply gives an example how to use the BLAS dasum with BLAS95 interface. Unless you are want this particular function (no reason you should), you should be looking at one you are interested in. There are basic examples for both f77 and f95 style in each case.&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Nov 2009 23:39:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Lost-in-MKL/m-p/880612#M9501</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2009-11-19T23:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: Lost in MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Lost-in-MKL/m-p/880613#M9502</link>
      <description>&lt;DIV style="margin: 0px; height: auto;"&gt;&lt;/DIV&gt;
Hi,&lt;BR /&gt;&lt;BR /&gt;if you were using imsl you were also using mkl, as it internally calls it. If you have problems with replacing imsl functions with mkl, post a bit more specific question, and I'm more than sure somebody will provide help on that. Many imsl functions you can get at netlib as well.&lt;BR /&gt;&lt;BR /&gt;For any issues related to linking, link advisor is your friend.&lt;BR /&gt;&lt;BR /&gt;A.&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Nov 2009 02:13:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Lost-in-MKL/m-p/880613#M9502</guid>
      <dc:creator>ArturGuzik</dc:creator>
      <dc:date>2009-11-20T02:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: Lost in MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Lost-in-MKL/m-p/880614#M9503</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/342379"&gt;ArturGuzik&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; Hi,&lt;BR /&gt;&lt;BR /&gt;if you were using imsl you were also using mkl, as it internally calls it. If you have problems with replacing imsl functions with mkl, post a bit more specific question, and I'm more than sure somebody will provide help on that. Many imsl functions you can get at netlib as well.&lt;BR /&gt;&lt;BR /&gt;For any issues related to linking, link advisor is your friend.&lt;BR /&gt;&lt;BR /&gt;A.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;&lt;BR /&gt;as well, many examples of mkl for Fortran 77 and 95 you can find into &lt;MKLROOT&gt;examples directory&lt;BR /&gt;--Gennady&lt;BR /&gt;&lt;/MKLROOT&gt;</description>
      <pubDate>Fri, 20 Nov 2009 06:46:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Lost-in-MKL/m-p/880614#M9503</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2009-11-20T06:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: Lost in MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Lost-in-MKL/m-p/880615#M9504</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&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;/DIV&gt;
&lt;BR /&gt;&lt;BR /&gt;as well, many examples of mkl for Fortran 77 and 95 you can find into &lt;MKLROOT&gt;examples directory&lt;BR /&gt;--Gennady&lt;BR /&gt;&lt;/MKLROOT&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
Ok. Here is an specific example. &lt;BR /&gt;program dot_main&lt;BR /&gt; use blas95&lt;BR /&gt; real x(10),y(10),res&lt;BR /&gt; integer i&lt;BR /&gt; !external sdot&lt;BR /&gt; n = 5&lt;BR /&gt; incx = 2&lt;BR /&gt; incy = 1&lt;BR /&gt; do i = 1,10&lt;BR /&gt; x(i) = 2.0e0&lt;BR /&gt; y(i) = 1.0e0&lt;BR /&gt; end do&lt;BR /&gt; res = sdot(x,y)&lt;BR /&gt; print*,'SDOT = ',res&lt;BR /&gt; end program dot_main&lt;BR /&gt;I compile it and get error#7002 as shown below.&lt;BR /&gt;[Juan@yuejun Fortran]$ ifort BLASsdotExample.f90 &lt;BR /&gt;BLASsdotExample.f90(2): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [BLAS95]&lt;BR /&gt; use blas95&lt;BR /&gt;----------^&lt;BR /&gt;compilation aborted for BLASsdotExample.f90 (code 1)&lt;BR /&gt;&lt;BR /&gt;Intel MKL is installed in the path /opt/intel/mkl/10.2.2.025/&lt;BR /&gt;&lt;BR /&gt;Environmental variable is set in ~/.bash_profile as following&lt;BR /&gt;source /opt/intel/Compiler/11.1/056/bin/ifortvars.sh ia32&lt;BR /&gt;. /opt/intel/mkl/10.2.2.025/tools/environment/mklvars32.sh&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Nov 2009 13:36:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Lost-in-MKL/m-p/880615#M9504</guid>
      <dc:creator>yjyincj</dc:creator>
      <dc:date>2009-11-20T13:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Lost in MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Lost-in-MKL/m-p/880616#M9505</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/301226"&gt;yjyincj&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;/DIV&gt;
&lt;BR /&gt;BLASsdotExample.f90(2): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [BLAS95]&lt;BR /&gt; use blas95&lt;BR /&gt;----------^&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
I would guess that you may not have performed a blas95 setup step. There should be a Makefile in the installation to build the blas95 .mod file if it doesn't exist; I don't know whether that would move it automatically to the directory with the other .mod files.&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Nov 2009 14:50:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Lost-in-MKL/m-p/880616#M9505</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2009-11-20T14:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Lost in MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Lost-in-MKL/m-p/880617#M9506</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/367365"&gt;tim18&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; I would guess that you may not have performed a blas95 setup step. There should be a Makefile in the installation to build the blas95 .mod file if it doesn't exist; I don't know whether that would move it automatically to the directory with the other .mod files.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
Yes. There is a makefile in this path:&lt;BR /&gt;&lt;SPAN style="background-color: #888888;"&gt;/opt/intel/mkl/10.2.2.025/interfaces/blas95&lt;/SPAN&gt;&lt;BR /&gt;what should I do? &lt;BR /&gt;&lt;BR /&gt;There are examples in the MKL installation folder /opt/intel/mkl/10.2.2.025/examples&lt;BR /&gt;In each subfolder under that path, there is a makefile. for example a makefile in folder blas95 looks like this&lt;BR /&gt;&lt;BR /&gt;##&lt;BR /&gt;##examples of using:&lt;BR /&gt;##make lib32 function=dgemmx&lt;BR /&gt;##&lt;BR /&gt;##&lt;BR /&gt;include blas95.lst&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;I tried these examples as instructed by the makefile. the code is compiled successfuly and resutls are printed to&lt;BR /&gt;a file. The question is do I need to write a makefile for self-developed code? I don't think this is required. &lt;BR /&gt;</description>
      <pubDate>Fri, 20 Nov 2009 15:04:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Lost-in-MKL/m-p/880617#M9506</guid>
      <dc:creator>yjyincj</dc:creator>
      <dc:date>2009-11-20T15:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: Lost in MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Lost-in-MKL/m-p/880618#M9507</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/301226"&gt;yjyincj&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; Yes. There is a makefile in this path:&lt;BR /&gt;&lt;SPAN style="background-color: #888888;"&gt;/opt/intel/mkl/10.2.2.025/interfaces/blas95&lt;/SPAN&gt;&lt;BR /&gt;what should I do? &lt;BR /&gt;&lt;BR /&gt;There are examples in the MKL installation folder /opt/intel/mkl/10.2.2.025/examples&lt;BR /&gt;In each subfolder under that path, there is a makefile. for example a makefile in folder blas95 looks like this&lt;BR /&gt;&lt;BR /&gt;##&lt;BR /&gt;##examples of using:&lt;BR /&gt;##make lib32 function=dgemmx&lt;BR /&gt;##&lt;BR /&gt;##&lt;BR /&gt;include blas95.lst&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;I tried these examples as instructed by the makefile. the code is compiled successfuly and resutls are printed to&lt;BR /&gt;a file. The question is do I need to write a makefile for self-developed code? I don't think this is required. &lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
Finally, I figured out how to compile the codes.&lt;BR /&gt;ifort *.f90 -L$MKLROOT/lib/32 -I$MKLROOT/include -I$MKLROOT/include/32 -lmkl_blas95 -Wl,--start-group $MKLROOT/lib/32/libmkl_intel.a $MKLROOT/lib/32/libmkl_intel_thread.a $MKLROOT/lib/32/libmkl_core.a -Wl,--end-group -liomp5 -lpthread -o *.out&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Nov 2009 21:53:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Lost-in-MKL/m-p/880618#M9507</guid>
      <dc:creator>yjyincj</dc:creator>
      <dc:date>2009-11-20T21:53:24Z</dc:date>
    </item>
  </channel>
</rss>

