<?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  mecej4 and Spencer in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/The-ordinal-242-could-not-be-located-in-the-dynamic-link-library/m-p/1132514#M25735</link>
    <description>&lt;P&gt;Hi&amp;nbsp; mecej4 and&amp;nbsp;Spencer&lt;/P&gt;&lt;P&gt;Thank you for&amp;nbsp;your kind replies, which&amp;nbsp;inspired me to check&amp;nbsp;all DLLs that exe file depended on. Finally I found that an old version of&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;STRONG&gt;libiomp5md.dll&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;located in my System32 and&amp;nbsp;SysWOW64 folder, which are&amp;nbsp;incompatible with my intel compiler. I replaced this file with lastest one, and the code ran fine. So next time the&amp;nbsp;ordinal issue come up, I think every depended dll requires double check.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Apr 2019 12:24:00 GMT</pubDate>
    <dc:creator>Shi_J_</dc:creator>
    <dc:date>2019-04-23T12:24:00Z</dc:date>
    <item>
      <title>The ordinal 242 could not be located in the dynamic link library mkl_intel_thread.dll</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/The-ordinal-242-could-not-be-located-in-the-dynamic-link-library/m-p/1132507#M25728</link>
      <description>&lt;P&gt;Hi everyone&lt;/P&gt;&lt;P&gt;I have been doing fortran programs&amp;nbsp;with intel mkl for several years, but this time I faced a runtime error as:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;The ordinal 242 could not be located in the dynamic link library C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019\windows\redist\intel64\mkl\mkl_intel_thread.dll&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;when I was trying to test sparse matrix function&amp;nbsp;&lt;STRONG&gt;MKL_SPARSE_D_MV &lt;/STRONG&gt;, and&amp;nbsp;the test code is exactly the one I download from Intel official site. For convenience I paste the code here, and Line 66 is the function of&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;MKL_SPARSE_D_MV &lt;/STRONG&gt;, if I comment this function it runs well.&lt;/P&gt;&lt;P&gt;My environment is listed as follows&lt;/P&gt;&lt;P&gt;Windows 10 x64, Visual Studio 2017 +&amp;nbsp;Intel® Parallel Studio XE 2019 Update 3, and compiled with x64 Release version.&lt;/P&gt;
&lt;PRE class="brush:fortran;"&gt;PROGRAM SPMV
!   *****************************************************************************
!   Declaration and initialization of parameters for sparse representation of
!   the matrix A in CSR format:
!   *****************************************************************************
    USE MKL_SPBLAS
    IMPLICIT NONE

    INTEGER M, N, NNZ, i, info
!   *****************************************************************************
!   Sparse representation of the matrix A
!   *****************************************************************************
    INTEGER, ALLOCATABLE :: csrColInd(:), csrRowPtr(:)
    DOUBLE PRECISION, ALLOCATABLE :: csrVal(:)
!   Matrix descriptor
    TYPE(MATRIX_DESCR) descrA     ! Sparse matrix descriptor
!   CSR matrix representation 
    TYPE(SPARSE_MATRIX_T) csrA    ! Structure with sparse matrix
!   *****************************************************************************
!   Declaration of local variables:
!   *****************************************************************************
    DOUBLE PRECISION, ALLOCATABLE :: x(:), y(:)
    DOUBLE PRECISION alpha, beta

    M = 5
    N = 5
    NNZ = 13
    ALLOCATE(csrColInd(NNZ))
    ALLOCATE(csrRowPtr(M+1))
    ALLOCATE(csrVal(NNZ))
    ALLOCATE(x(M))
    ALLOCATE(y(M))
    csrVal = (/ 1.0,-1.0,-3.0,-2.0,5.0,4.0,6.0,4.0,-4.0,2.0,7.0,8.0,-5.0 /)
    csrColInd = (/ 0,1,3,0,1,2,3,4,0,2,3,1,4 /)
    csrRowPtr = (/ 0, 3, 5, 8, 11, 13 /)
    x = (/ 1.0, 5.0, 1.0, 4.0, 1.0 /)
    y = (/ 0.0, 0.0, 0.0, 0.0, 0.0 /)
    alpha = 1.0
    beta  = 0.0

    print*,'EXAMPLE PROGRAM FOR MKL_SPARSE_D_MV'
    print*,'---------------------------------------------------'
    print*,''
    print*,'INPUT DATA FOR MKL_SPARSE_D_MV'
    print*,'WITH GENERAL SPARSE MATRIX'
    print*,'ALPHA =',alpha,'BETA =',beta
    print*,'SPARSE_OPERATION_NON_TRANSPOSE'
    print*,'Input vector'
    do i = 1, M
        print*,x(i)
    enddo

!   Create CSR matrix
    i = MKL_SPARSE_D_CREATE_CSR(csrA,SPARSE_INDEX_BASE_ZERO,M,N,csrRowPtr,csrRowPtr(2),csrColInd,csrVal)

!   Create matrix descriptor
    descrA % TYPE = SPARSE_MATRIX_TYPE_GENERAL

!   Analyze sparse matrix; chose proper kernels and workload balancing strategy
    info = MKL_SPARSE_OPTIMIZE(csrA)

!   Compute y = alpha * A * x + beta * y
!! #############################################################

!! error from here, but when I comment following function, it runs well;
    info = MKL_SPARSE_D_MV(SPARSE_OPERATION_NON_TRANSPOSE,alpha,csrA,descrA,x,beta,y)
!! #############################################################

!   Release internal representation of CSR matrix
    info = MKL_SPARSE_DESTROY(csrA)

    print*,''
    print*,'OUTPUT DATA FOR sparseDcsrmv'
    do i = 1, M
        print*,y(i)
    enddo

    print*,'---------------------------------------------------'

END PROGRAM SPMV
&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2019 12:29:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/The-ordinal-242-could-not-be-located-in-the-dynamic-link-library/m-p/1132507#M25728</guid>
      <dc:creator>Shi_J_</dc:creator>
      <dc:date>2019-04-22T12:29:53Z</dc:date>
    </item>
    <item>
      <title>I tried the earlier release</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/The-ordinal-242-could-not-be-located-in-the-dynamic-link-library/m-p/1132508#M25729</link>
      <description>&lt;P&gt;I tried the earlier release&amp;nbsp;19.0.1 (Windows 10, 64 bit) on your example source, and the resulting program ran fine. I'll try to find a PC with 19.0.3 installed and try again.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2019 13:23:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/The-ordinal-242-could-not-be-located-in-the-dynamic-link-library/m-p/1132508#M25729</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2019-04-22T13:23:50Z</dc:date>
    </item>
    <item>
      <title>Thank you mecej4, happy to</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/The-ordinal-242-could-not-be-located-in-the-dynamic-link-library/m-p/1132509#M25730</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;mecej4, happy to hear that.&lt;/P&gt;&lt;P&gt;I also found that the sparse matrix -&amp;nbsp;vector multiply functions&amp;nbsp;&lt;STRONG&gt;mkl_dcsrgemv,&amp;nbsp;mkl_dcsrmv&lt;/STRONG&gt; lead to the same runtime error.&lt;/P&gt;
&lt;PRE class="brush:fortran; class-name:dark;"&gt;call mkl_dcsrgemv ( 'N' , M , csrVal , csrRowPtr , csrColInd , x , y )

matdescra(1) = 'G'
matdescra(4) = 'F'
call mkl_dcsrmv ( 'N' , M , M , alpha , matdescra , csrVal , csrColInd , csrRowPtr , csrRowPtr(2) , x , beta , y )&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 00:56:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/The-ordinal-242-could-not-be-located-in-the-dynamic-link-library/m-p/1132509#M25730</guid>
      <dc:creator>Shi_J_</dc:creator>
      <dc:date>2019-04-23T00:56:52Z</dc:date>
    </item>
    <item>
      <title>I found a PC with</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/The-ordinal-242-could-not-be-located-in-the-dynamic-link-library/m-p/1132510#M25731</link>
      <description>&lt;P&gt;I found a PC with&lt;/P&gt;
&lt;PRE class="brush:bash; class-name:dark;"&gt;Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.0.3.203 Build 20190206&lt;/PRE&gt;

&lt;P&gt;and your program ran and gave correct results.&lt;/P&gt;
&lt;P&gt;I suspect that some of your installed MKL files may have become corrupted. Please report what you get when you change to the directory containing mkl_intel_thread.dll and type the command&lt;/P&gt;

&lt;PRE class="brush:bash; class-name:dark;"&gt;certutil -hashfile mkl_intel_thread.dll MD5&lt;/PRE&gt;

&lt;P&gt;On my system, I see&lt;/P&gt;

&lt;PRE class="brush:bash; class-name:dark;"&gt;3a31c220105784fb60edb3354dd147f5&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 01:38:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/The-ordinal-242-could-not-be-located-in-the-dynamic-link-library/m-p/1132510#M25731</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2019-04-23T01:38:06Z</dc:date>
    </item>
    <item>
      <title>Hi mecej4</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/The-ordinal-242-could-not-be-located-in-the-dynamic-link-library/m-p/1132511#M25732</link>
      <description>&lt;P&gt;Hi mecej4&lt;/P&gt;&lt;P&gt;I see my hash code is exactly identical to yours.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think the program linked to right DLL, because the popup error shows the DLL at the right location.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 01:59:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/The-ordinal-242-could-not-be-located-in-the-dynamic-link-library/m-p/1132511#M25732</guid>
      <dc:creator>Shi_J_</dc:creator>
      <dc:date>2019-04-23T01:59:26Z</dc:date>
    </item>
    <item>
      <title>Hi Shi, </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/The-ordinal-242-could-not-be-located-in-the-dynamic-link-library/m-p/1132512#M25733</link>
      <description>&lt;P&gt;Hi Shi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you show us how you are building, linking and then running the code sample?&amp;nbsp; Often when I have seen an ordinal issue like this in my own applications, it is because the export lib (ex: mkl_intel_thread_dll.lib) I linked against in my application and the runtime DLL (ex: mkl_intel_thread.dll) that is picked up are somehow incompatible, ie from different releases.&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Spencer&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 04:30:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/The-ordinal-242-could-not-be-located-in-the-dynamic-link-library/m-p/1132512#M25733</guid>
      <dc:creator>Spencer_P_Intel</dc:creator>
      <dc:date>2019-04-23T04:30:22Z</dc:date>
    </item>
    <item>
      <title>Hi Spencer</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/The-ordinal-242-could-not-be-located-in-the-dynamic-link-library/m-p/1132513#M25734</link>
      <description>&lt;P&gt;Hi Spencer&lt;/P&gt;&lt;P&gt;I 'm using VS2017 +&amp;nbsp;Intel® Parallel Studio XE 2019 Update 3, and this is my setting of this fortran project using x64 Release version&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;in Fortran\Libraries\Runtime Library, use&amp;nbsp;&lt;STRONG&gt;Multithread DLL (/libs:dll /threads)&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;in Fortran\Libraries\Use Intel Math Kernel Library, use&amp;nbsp;&lt;STRONG&gt;Parallel (/Qmkl:parallel)&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;In Linker\Input\Additional Dependencies, use&amp;nbsp;&lt;STRONG&gt;mkl_intel_thread_dll.lib&lt;/STRONG&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;The Command line of Compiling procedure:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;/nologo /O2 /standard-semantics /module:"x64\Release\\" /object:"x64\Release\\" /Fd"x64\Release\vc150.pdb" /libs:dll /threads /Qmkl:parallel /c&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The Command line of linking procedure:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;/OUT:"x64\Release\Console1.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTFILE:"x64\Release\Console1.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /SUBSYSTEM:CONSOLE /IMPLIB:"C:\Users\xxxx\Documents\Visual Studio 2017\Projects\Console1\Console1\x64\Release\Console1.lib" mkl_intel_thread_dll.lib&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;and the runtime library path is&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.3.203\windows\redist\intel64_win\mkl&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;where &lt;STRONG&gt;&amp;nbsp;mkl_intel_thread.dll &lt;/STRONG&gt;located, and this path is in the system Path variable.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 11:42:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/The-ordinal-242-could-not-be-located-in-the-dynamic-link-library/m-p/1132513#M25734</guid>
      <dc:creator>Shi_J_</dc:creator>
      <dc:date>2019-04-23T11:42:35Z</dc:date>
    </item>
    <item>
      <title>Hi  mecej4 and Spencer</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/The-ordinal-242-could-not-be-located-in-the-dynamic-link-library/m-p/1132514#M25735</link>
      <description>&lt;P&gt;Hi&amp;nbsp; mecej4 and&amp;nbsp;Spencer&lt;/P&gt;&lt;P&gt;Thank you for&amp;nbsp;your kind replies, which&amp;nbsp;inspired me to check&amp;nbsp;all DLLs that exe file depended on. Finally I found that an old version of&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;STRONG&gt;libiomp5md.dll&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;located in my System32 and&amp;nbsp;SysWOW64 folder, which are&amp;nbsp;incompatible with my intel compiler. I replaced this file with lastest one, and the code ran fine. So next time the&amp;nbsp;ordinal issue come up, I think every depended dll requires double check.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 12:24:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/The-ordinal-242-could-not-be-located-in-the-dynamic-link-library/m-p/1132514#M25735</guid>
      <dc:creator>Shi_J_</dc:creator>
      <dc:date>2019-04-23T12:24:00Z</dc:date>
    </item>
    <item>
      <title>Shi J., thanks for that</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/The-ordinal-242-could-not-be-located-in-the-dynamic-link-library/m-p/1132515#M25736</link>
      <description>&lt;P&gt;Shi J., thanks for that report -- I would not have guessed that the openMP DLL was the mismatched one.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In similar situations, I have found it useful to use the WHERE utility to locate and report a DLL whose name I specify. If it is not the one I expected to be used, I can look at the environment setup to see why, for example, an older DLL will be used instead of a newer version which is available in a different directory.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 16:43:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/The-ordinal-242-could-not-be-located-in-the-dynamic-link-library/m-p/1132515#M25736</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2019-04-23T16:43:09Z</dc:date>
    </item>
  </channel>
</rss>

