<?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 A random distribution ? in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-random-distribution/m-p/812389#M4045</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I am trying to use the routine vdrnggaussian to obtain a random vector. Here is the code I am using:&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt; &lt;B&gt;include&lt;/B&gt; 'mkl_vsl.fi'&lt;/P&gt;&lt;P&gt; &lt;B&gt;include&lt;/B&gt; 'ERRCHECK.INC'&lt;/P&gt;&lt;P&gt; &lt;B&gt;SUBROUTINE&lt;/B&gt; RandomNumber(ranval)&lt;/P&gt;&lt;P&gt; &lt;B&gt;USE&lt;/B&gt; MKL_VSL_TYPE&lt;/P&gt;&lt;P&gt; &lt;B&gt;USE&lt;/B&gt; MKL_VSL &lt;/P&gt;&lt;P&gt; &lt;B&gt;!DEC$ ATTRIBUTES DLLEXPORT :: RandomNumber &lt;/B&gt;&lt;/P&gt;&lt;P&gt; &lt;B&gt;!DEC$ ATTRIBUTES STDCALL :: RandomNumber &lt;/B&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;B&gt;INTEGER&lt;/B&gt; METHOD,i, brng, seed &lt;/P&gt;&lt;P&gt; &lt;B&gt;integer&lt;/B&gt;(kind=4) errcode&lt;/P&gt;&lt;P&gt; &lt;B&gt;integer&lt;/B&gt; n&lt;/P&gt;&lt;P&gt; &lt;B&gt;parameter&lt;/B&gt;(n=1000)&lt;/P&gt;&lt;P&gt; real(kind=8) ranval(n)&lt;/P&gt;&lt;P&gt; real(kind=8) r(n), sigma&lt;/P&gt;&lt;P&gt; real(kind=8) a&lt;/P&gt;&lt;P&gt; &lt;B&gt;TYPE&lt;/B&gt; (VSL_STREAM_STATE) :: stream&lt;/P&gt;&lt;P&gt; &lt;B&gt;do&lt;/B&gt; 20 i=1,n&lt;/P&gt;&lt;P&gt; r(i)=0&lt;/P&gt;&lt;P&gt;20 &lt;B&gt;continue&lt;/B&gt; &lt;/P&gt;&lt;P&gt; brng=VSL_BRNG_MCG31&lt;/P&gt;&lt;P&gt; method=0&lt;/P&gt;&lt;P&gt; seed=777&lt;/P&gt;&lt;P&gt; a=0.5&lt;/P&gt;&lt;P&gt; sigma=0.166D+0&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; errcode=vslnewstream(stream,brng,seed)&lt;/P&gt;&lt;P&gt; &lt;B&gt;call&lt;/B&gt; CheckVslError(errcode)&lt;/P&gt;&lt;P&gt; errcode = vdrnggaussian(method,stream,n,r,a,sigma)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;B&gt;do&lt;/B&gt; 10 i=1,n &lt;/P&gt;&lt;P&gt; ranval(i)=r(i)&lt;/P&gt;&lt;P&gt;10 &lt;B&gt;continue&lt;/B&gt;&lt;/P&gt;&lt;P&gt; errcode=vslDeleteStream( stream );&lt;/P&gt;&lt;P&gt; &lt;B&gt;call&lt;/B&gt; CheckVslError(errcode)&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;end&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;The problem is the following, I am &lt;STRONG&gt;always&lt;/STRONG&gt; receivingfrom my fortran DLL the same random vector "r" ... I read the Intel MKL VSL notes pdf but could not figure out whatwas the problem. &lt;/P&gt;</description>
    <pubDate>Mon, 24 May 2010 21:42:01 GMT</pubDate>
    <dc:creator>jpharvey1981</dc:creator>
    <dc:date>2010-05-24T21:42:01Z</dc:date>
    <item>
      <title>A random distribution ?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-random-distribution/m-p/812389#M4045</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I am trying to use the routine vdrnggaussian to obtain a random vector. Here is the code I am using:&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt; &lt;B&gt;include&lt;/B&gt; 'mkl_vsl.fi'&lt;/P&gt;&lt;P&gt; &lt;B&gt;include&lt;/B&gt; 'ERRCHECK.INC'&lt;/P&gt;&lt;P&gt; &lt;B&gt;SUBROUTINE&lt;/B&gt; RandomNumber(ranval)&lt;/P&gt;&lt;P&gt; &lt;B&gt;USE&lt;/B&gt; MKL_VSL_TYPE&lt;/P&gt;&lt;P&gt; &lt;B&gt;USE&lt;/B&gt; MKL_VSL &lt;/P&gt;&lt;P&gt; &lt;B&gt;!DEC$ ATTRIBUTES DLLEXPORT :: RandomNumber &lt;/B&gt;&lt;/P&gt;&lt;P&gt; &lt;B&gt;!DEC$ ATTRIBUTES STDCALL :: RandomNumber &lt;/B&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;B&gt;INTEGER&lt;/B&gt; METHOD,i, brng, seed &lt;/P&gt;&lt;P&gt; &lt;B&gt;integer&lt;/B&gt;(kind=4) errcode&lt;/P&gt;&lt;P&gt; &lt;B&gt;integer&lt;/B&gt; n&lt;/P&gt;&lt;P&gt; &lt;B&gt;parameter&lt;/B&gt;(n=1000)&lt;/P&gt;&lt;P&gt; real(kind=8) ranval(n)&lt;/P&gt;&lt;P&gt; real(kind=8) r(n), sigma&lt;/P&gt;&lt;P&gt; real(kind=8) a&lt;/P&gt;&lt;P&gt; &lt;B&gt;TYPE&lt;/B&gt; (VSL_STREAM_STATE) :: stream&lt;/P&gt;&lt;P&gt; &lt;B&gt;do&lt;/B&gt; 20 i=1,n&lt;/P&gt;&lt;P&gt; r(i)=0&lt;/P&gt;&lt;P&gt;20 &lt;B&gt;continue&lt;/B&gt; &lt;/P&gt;&lt;P&gt; brng=VSL_BRNG_MCG31&lt;/P&gt;&lt;P&gt; method=0&lt;/P&gt;&lt;P&gt; seed=777&lt;/P&gt;&lt;P&gt; a=0.5&lt;/P&gt;&lt;P&gt; sigma=0.166D+0&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; errcode=vslnewstream(stream,brng,seed)&lt;/P&gt;&lt;P&gt; &lt;B&gt;call&lt;/B&gt; CheckVslError(errcode)&lt;/P&gt;&lt;P&gt; errcode = vdrnggaussian(method,stream,n,r,a,sigma)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;B&gt;do&lt;/B&gt; 10 i=1,n &lt;/P&gt;&lt;P&gt; ranval(i)=r(i)&lt;/P&gt;&lt;P&gt;10 &lt;B&gt;continue&lt;/B&gt;&lt;/P&gt;&lt;P&gt; errcode=vslDeleteStream( stream );&lt;/P&gt;&lt;P&gt; &lt;B&gt;call&lt;/B&gt; CheckVslError(errcode)&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;end&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;The problem is the following, I am &lt;STRONG&gt;always&lt;/STRONG&gt; receivingfrom my fortran DLL the same random vector "r" ... I read the Intel MKL VSL notes pdf but could not figure out whatwas the problem. &lt;/P&gt;</description>
      <pubDate>Mon, 24 May 2010 21:42:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-random-distribution/m-p/812389#M4045</guid>
      <dc:creator>jpharvey1981</dc:creator>
      <dc:date>2010-05-24T21:42:01Z</dc:date>
    </item>
    <item>
      <title>A random distribution ?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-random-distribution/m-p/812390#M4046</link>
      <description>please look &lt;A href="http://software.intel.com/en-us/forums/showthread.php?t=73932&amp;amp;o=a&amp;amp;s=lr"&gt;at this thread&lt;/A&gt;, it might help you..&lt;DIV&gt;--Gennady&lt;/DIV&gt;</description>
      <pubDate>Tue, 25 May 2010 03:36:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-random-distribution/m-p/812390#M4046</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2010-05-25T03:36:24Z</dc:date>
    </item>
    <item>
      <title>A random distribution ?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-random-distribution/m-p/812391#M4047</link>
      <description>Thank you, I am now using the function DCLOCK() to obtain a random seed and it is working like I wanted!</description>
      <pubDate>Tue, 25 May 2010 14:32:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/A-random-distribution/m-p/812391#M4047</guid>
      <dc:creator>jpharvey1981</dc:creator>
      <dc:date>2010-05-25T14:32:58Z</dc:date>
    </item>
  </channel>
</rss>

