<?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 random draw from normal distribution in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/random-draw-from-normal-distribution/m-p/808468#M3628</link>
    <description>MKL is not used with every Fortran program. Therefore, you need to specify that you want the MKL linked in. &lt;BR /&gt;&lt;BR /&gt;From the command line, use the -Qmkl (Windows) or -mkl (Linux/OSX) compiler option for a simple program such as the above.&lt;BR /&gt;&lt;BR /&gt;In an IDE, do whatever is needed to link in the MKL as an additional library. See the MKL Link Line Advisor link at the top of this forum for further guidance.&lt;BR /&gt;</description>
    <pubDate>Thu, 16 Feb 2012 11:19:03 GMT</pubDate>
    <dc:creator>mecej4</dc:creator>
    <dc:date>2012-02-16T11:19:03Z</dc:date>
    <item>
      <title>random draw from normal distribution</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/random-draw-from-normal-distribution/m-p/808467#M3627</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I want to draw random number from a normal distribution but my FORTRAN code does not work. Ireceive the following error: "unresolved external symbol vsrnggaussian referenced in function main".It is the first time that I am using the Math Kernel Library and I hope someone van help me with it. My code is as follows:&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;&lt;EM&gt;PROGRAM drawnormal&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;USE mkl_vsl&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;IMPLICIT NONE&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;integer status !Error / status &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;integer brng !Index of generator to initialize stream &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;integer method !Method = 0 in case of uniform distribution &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;integer dimen !Initial condition of the stream &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;TYPE (VSL_STREAM_STATE) stream !Random stream&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;integer, PARAMETER :: nr = 1000 !Number of values required (whatever you want)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;real gauss(nr)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;real mean, sigma&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;mean = 0.0&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;sigma = 1.0&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;!SOBEL&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;method = VSL_METHOD_SGAUSSIAN_ICDF !NB - are different alternatives, but I found this worked well&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;brng = VSL_BRNG_SOBOL &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;dimen = 1 ! &amp;lt;== different values may be needed depending on application&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;gauss = 0.0&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;status = vslnewstream( stream, brng, dimen ) !Create new stream (SOBOL in this case&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;status = vsrnggaussian( method, stream, nr, gauss, mean, sigma ) &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;status = vsldeletestream( stream ) !Delete the stream&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;end&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2012 10:52:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/random-draw-from-normal-distribution/m-p/808467#M3627</guid>
      <dc:creator>heini77</dc:creator>
      <dc:date>2012-02-16T10:52:47Z</dc:date>
    </item>
    <item>
      <title>random draw from normal distribution</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/random-draw-from-normal-distribution/m-p/808468#M3628</link>
      <description>MKL is not used with every Fortran program. Therefore, you need to specify that you want the MKL linked in. &lt;BR /&gt;&lt;BR /&gt;From the command line, use the -Qmkl (Windows) or -mkl (Linux/OSX) compiler option for a simple program such as the above.&lt;BR /&gt;&lt;BR /&gt;In an IDE, do whatever is needed to link in the MKL as an additional library. See the MKL Link Line Advisor link at the top of this forum for further guidance.&lt;BR /&gt;</description>
      <pubDate>Thu, 16 Feb 2012 11:19:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/random-draw-from-normal-distribution/m-p/808468#M3628</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2012-02-16T11:19:03Z</dc:date>
    </item>
    <item>
      <title>random draw from normal distribution</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/random-draw-from-normal-distribution/m-p/808469#M3629</link>
      <description>The similar problem has been discussed into &lt;A href="http://software.intel.com/en-us/forums/showthread.php?t=102267&amp;amp;o=a&amp;amp;s=lr"&gt;this thread&lt;/A&gt;. Please see the reply #8 from Andrey Nikolaev. I hope it helps you.&lt;DIV&gt;--Gennady&lt;/DIV&gt;</description>
      <pubDate>Thu, 16 Feb 2012 11:44:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/random-draw-from-normal-distribution/m-p/808469#M3629</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2012-02-16T11:44:44Z</dc:date>
    </item>
  </channel>
</rss>

