<?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: Help with C call of dgesv in Visual Studio 2005 in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Help-with-C-call-of-dgesv-in-Visual-Studio-2005/m-p/868032#M8155</link>
    <description>The libraries you link are not dependent on the routines called so much as on a few other factors like compiler, interface, and threading model. The exceptions with the current release (10.0 update 3) are the sparse solvers, ScaLAPACK, and the cluster FFTs. But, its best not to guess on any of this based on filenames. Better to check out the User Guide (in the doc directory or &lt;A href="http://www3.intel.com/cd/software/products/asmo-na/eng/345631.htm"&gt;online&lt;/A&gt;) where all the libraries are described, linking is discussed, and example provided.&lt;BR /&gt;-Todd&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 26 Jun 2008 22:01:32 GMT</pubDate>
    <dc:creator>Todd_R_Intel</dc:creator>
    <dc:date>2008-06-26T22:01:32Z</dc:date>
    <item>
      <title>Help with C call of dgesv in Visual Studio 2005</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Help-with-C-call-of-dgesv-in-Visual-Studio-2005/m-p/868029#M8152</link>
      <description>&lt;P&gt;I am a fortran guy and I'm trying to learn how to use C, so I can use Nvidia's CUDA.&lt;/P&gt;
&lt;P&gt;So, I have been trying to write a code in C that will solve Ax=b.&lt;/P&gt;
&lt;P&gt;When I try to compile the file, everything is OK, but when I try to build the solution, it gives me all sorts of unresolved externals. For example, here are a couple of the errors:&lt;/P&gt;
&lt;P&gt;Error8error LNK2019: unresolved external symbol ___kmpc_global_thread_num referenced in function _mkl_lapack_dgetrfmkl_intel_thread.lib&lt;BR /&gt;Error9error LNK2001: unresolved external symbol ___kmpc_global_thread_nummkl_intel_thread.lib&lt;BR /&gt;Error10error LNK2001: unresolved external symbol ___kmpc_global_thread_nummkl_intel_thread.lib&lt;BR /&gt;Error11error LNK2001: unresolved external symbol ___kmpc_global_thread_nummkl_intel_thread.lib&lt;BR /&gt;Error12error LNK2019: unresolved external symbol ___kmpc_dispatch_init_4 referenced in function L__mkl_lapack_dgetrf_306__par_loop1mkl_intel_thread.lib&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;The file is mkl_thread_lib&lt;/P&gt;
&lt;P&gt;I don't know where my problem is, but I know I must not be doing something correct.&lt;/P&gt;
&lt;P&gt;Here is essentially part of my matrix equation showing column major format and my call to dgesv:&lt;/P&gt;
&lt;P&gt;matfor[ ((j-1)*(numnode)) + (i-1)] = n * 4. * (n - 1.) * (r1 * r1 + r2 * r2) * pow(d1, d2) / (r6 * r6) + n * 4. * pow(d3, d4) / (r10 * r10);&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;dgesv (&amp;amp;numnode, &amp;amp;nrhs, matfor, &amp;amp;numnode, ipvt, rhs, &amp;amp;numnode, &amp;amp;info); // ipvt, matfor, andrhs are already pointers, I don't need the &amp;amp; when I call it.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;up at the header section I've included:&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;
&lt;P&gt;#include&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT color="#a31515" size="2"&gt;&lt;FONT color="#a31515" size="2"&gt;"mkl.h"&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#008000" size="2"&gt;&lt;FONT color="#008000" size="2"&gt;
&lt;P&gt;//void DGESV( MKL_INT *n, MKL_INT *nrhs, double *a, MKL_INT *lda, MKL_INT *ipiv, double *b, MKL_INT *ldb, MKL_INT *info ); &lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT size="2"&gt;In Project Property -&amp;gt; Linker -&amp;gt; Input -&amp;gt; AdditionalDependancies I've put mkl_s.lib mkl_lapack.lib&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;In Project Property -&amp;gt; Linker -&amp;gt; General -&amp;gt; Additional Library Directories I've put C:Program FilesIntelMKL10.0.3.021ia32lib&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;I think I've added the directories for the include files, the library files and the executable files too. &lt;/P&gt;&lt;FONT color="#008000" size="2"&gt;&lt;FONT color="#000000" size="3"&gt;
&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;I think my program is OK, and I think it is able to see dgesv and make the appropriate connection from my program to dgesv, but somewhere in dgesv I think it is having trouble finding all the kmpc stuff. &lt;/FONT&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;EDIT: I should have said I'm using Windows Vista as the OS in case that makes any difference.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;Any ideas on how to fix this problem. Thanks very much. Sincerely,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;Elliott&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jun 2008 16:51:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Help-with-C-call-of-dgesv-in-Visual-Studio-2005/m-p/868029#M8152</guid>
      <dc:creator>eeweh</dc:creator>
      <dc:date>2008-06-25T16:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help with C call of dgesv in Visual Studio 2005</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Help-with-C-call-of-dgesv-in-Visual-Studio-2005/m-p/868030#M8153</link>
      <description>Thanks Ben. I expect that to solve the problem as the unresolved references are threading functions and libguide.lib one of the OpenMP threading runtime library options available.&lt;BR /&gt;&lt;BR /&gt;Using libiomp5mt.libmight be a better option though. It will support use of OpenMP threading in your app compiled with VS2005 whereas libguide.lib will not. Check out the user guide (docs online) for more information.&lt;BR /&gt;&lt;BR /&gt;-Todd&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Jun 2008 19:06:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Help-with-C-call-of-dgesv-in-Visual-Studio-2005/m-p/868030#M8153</guid>
      <dc:creator>Todd_R_Intel</dc:creator>
      <dc:date>2008-06-25T19:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: Help with C call of dgesv in Visual Studio 2005</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Help-with-C-call-of-dgesv-in-Visual-Studio-2005/m-p/868031#M8154</link>
      <description>&lt;P&gt;Thanks very much guys. I haven't seen yet if I got the expected results, but it compiled and built and didn't give me any linking problems. Thanks so much. &lt;/P&gt;
&lt;P&gt;Does it say somewhere in the userguide what libs you need to add for the particular routines that you're going to call? &lt;/P&gt;
&lt;P&gt;Elliott&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jun 2008 01:30:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Help-with-C-call-of-dgesv-in-Visual-Studio-2005/m-p/868031#M8154</guid>
      <dc:creator>eeweh</dc:creator>
      <dc:date>2008-06-26T01:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: Help with C call of dgesv in Visual Studio 2005</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Help-with-C-call-of-dgesv-in-Visual-Studio-2005/m-p/868032#M8155</link>
      <description>The libraries you link are not dependent on the routines called so much as on a few other factors like compiler, interface, and threading model. The exceptions with the current release (10.0 update 3) are the sparse solvers, ScaLAPACK, and the cluster FFTs. But, its best not to guess on any of this based on filenames. Better to check out the User Guide (in the doc directory or &lt;A href="http://www3.intel.com/cd/software/products/asmo-na/eng/345631.htm"&gt;online&lt;/A&gt;) where all the libraries are described, linking is discussed, and example provided.&lt;BR /&gt;-Todd&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Jun 2008 22:01:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Help-with-C-call-of-dgesv-in-Visual-Studio-2005/m-p/868032#M8155</guid>
      <dc:creator>Todd_R_Intel</dc:creator>
      <dc:date>2008-06-26T22:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: Help with C call of dgesv in Visual Studio 2005</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Help-with-C-call-of-dgesv-in-Visual-Studio-2005/m-p/868033#M8156</link>
      <description>&lt;P&gt;About libiomp5:&lt;/P&gt;
&lt;P&gt;It's compatible with VC9 -openmp (VS2008), so you could have a combined build using any combination of VC9 OpenMP, Intel C or Fortran OpenMP, and mkl_thread. Apparently,libiomp5 wouldbecome the default OpenMP library for the next major release of Intel C++ and Fortran (using /Qopenmp). I don't know that VS2005includes any OpenMP, so you may as well start using libiomp5so as toavoid future changes.&lt;/P&gt;
&lt;P&gt;When MKL 10 was first introduced, there was a tendency to recommend libguide even when you didn't need"legacy" Intelcompatibility, but that recommendation seems to have changed.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jun 2008 23:03:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Help-with-C-call-of-dgesv-in-Visual-Studio-2005/m-p/868033#M8156</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2008-06-26T23:03:07Z</dc:date>
    </item>
  </channel>
</rss>

