<?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 Yes. I used the following in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Random-Number-Generator/m-p/1144559#M26592</link>
    <description>&lt;P&gt;Yes. I used the following switches: -lmkl_intel_thread -lmkl_core -lmkl_intel_lp64 -liomp5 -O2&lt;/P&gt;&lt;P&gt;I am using Intel MKL 2019 in Linux environment. How about the second problem?&lt;/P&gt;</description>
    <pubDate>Fri, 01 Feb 2019 02:08:13 GMT</pubDate>
    <dc:creator>Ahmadi__Afshin</dc:creator>
    <dc:date>2019-02-01T02:08:13Z</dc:date>
    <item>
      <title>Random Number Generator</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Random-Number-Generator/m-p/1144557#M26590</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have developed a function to generate a vector of random numbers. However, there are two problems:&lt;/P&gt;&lt;P&gt;1. When the number of random numbers to be generated is too large (e.g. 50000^2), it will output: MKL ERROR: Parameter 3 was incorrect on entry to vdRngUniform.&lt;/P&gt;&lt;P&gt;2. When the left bound is a positive number (i.e. a = 300 b = 100), the function violates the left bound condition and returns minimum value of zero! However, if 'a' is a negative number, it works correctly!&lt;/P&gt;&lt;P&gt;Can you please help? Thank you.&lt;/P&gt;&lt;P&gt;Afshin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="brush:cpp;"&gt;int RNG_UNIF ( long int N, double a, double b, double *P )
{
    // N number of random values to be generated
    // a is the left bound
    // b is the right bound
	
    VSLStreamStatePtr stream;
    int errcode = 0;
    srand(time(0));    
    long seed = rand();
   	
    /***** Initialize *****/
    errcode = vslNewStream( &amp;amp;stream, VSL_BRNG_MT2203, seed ); 
    if (errcode != 0) goto err;
    /***** Call RNG *****/    	
    errcode = vdRngUniform( VSL_RNG_METHOD_UNIFORM_STD_ACCURATE, stream, N, P, a, b );
    if (errcode != 0) goto err;

    vslDeleteStream(&amp;amp;stream);
   
    err:
    return errcode; 	

}&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 17:32:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Random-Number-Generator/m-p/1144557#M26590</guid>
      <dc:creator>Ahmadi__Afshin</dc:creator>
      <dc:date>2019-01-31T17:32:32Z</dc:date>
    </item>
    <item>
      <title>did you link with ILP64</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Random-Number-Generator/m-p/1144558#M26591</link>
      <description>&lt;P&gt;did you link with ILP64 libraries?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Feb 2019 01:52:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Random-Number-Generator/m-p/1144558#M26591</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2019-02-01T01:52:17Z</dc:date>
    </item>
    <item>
      <title>Yes. I used the following</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Random-Number-Generator/m-p/1144559#M26592</link>
      <description>&lt;P&gt;Yes. I used the following switches: -lmkl_intel_thread -lmkl_core -lmkl_intel_lp64 -liomp5 -O2&lt;/P&gt;&lt;P&gt;I am using Intel MKL 2019 in Linux environment. How about the second problem?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Feb 2019 02:08:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Random-Number-Generator/m-p/1144559#M26592</guid>
      <dc:creator>Ahmadi__Afshin</dc:creator>
      <dc:date>2019-02-01T02:08:13Z</dc:date>
    </item>
    <item>
      <title>50000^2 &gt; int 32, therefore</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Random-Number-Generator/m-p/1144560#M26593</link>
      <description>&lt;P&gt;50000^2 &amp;gt; int 32, therefore you have to link with ILP64 libs instead of LP64 ones. Please check user's guide or mkl linker adviser how to link properly&lt;/P&gt;</description>
      <pubDate>Fri, 01 Feb 2019 02:17:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Random-Number-Generator/m-p/1144560#M26593</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2019-02-01T02:17:16Z</dc:date>
    </item>
  </channel>
</rss>

