<?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:True Random number in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/True-Random-number/m-p/1463129#M165452</link>
    <description>&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;Yes, you could access to this true generates from Fortran API of MKL.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;First check (lspu | grep rdrand) if thins instruction available on this particular system.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;Look at the MKL Developer Reference follow this link: &lt;/SPAN&gt;&lt;A href="https://www.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-c/top/statistical-functions/random-number-generators/basic-generators.html" rel="noopener noreferrer" target="_blank" style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;https://www.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-c/top/statistical-functions/random-number-generators/basic-generators.html&lt;/A&gt; w&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;here listed all mkl’s basic generators and rdrand as well.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;Unfortunately, MKL doesn’t provide an RNG examples show how to make the call for this particular Basic generators, but the calling pipeline would very similar with C code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;#define SEED&amp;nbsp;&amp;nbsp;&amp;nbsp;VSL_BRNG_RDRAND&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;#define BRNG&amp;nbsp;&amp;nbsp;&amp;nbsp;VSL_BRNG_NONDETERM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;//Create and Initialize stream:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;VSLStreamStatePtr stream;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;//Initialize stream&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;vslNewStream( &amp;amp;stream, BRNG,&amp;nbsp;SEED );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;//generate RNG &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;vsRngUniform( VSL_RNG_METHOD_UNIFORM_STD, stream, N_GEN_VALS, r, a, b ) // see reference for more details…&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;-Gennady&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 08 Mar 2023 06:00:06 GMT</pubDate>
    <dc:creator>Gennady_F_Intel</dc:creator>
    <dc:date>2023-03-08T06:00:06Z</dc:date>
    <item>
      <title>True Random number</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/True-Random-number/m-p/1462081#M165430</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do I access RDRAND from Fortran?&amp;nbsp; Will it work on Zen processors as well as Intel?&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Bruce&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 07:51:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/True-Random-number/m-p/1462081#M165430</guid>
      <dc:creator>Bruce_Weaver</dc:creator>
      <dc:date>2023-03-06T07:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: True Random number</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/True-Random-number/m-p/1462620#M165432</link>
      <description>&lt;P&gt;MKL has that I think. I also believe it&amp;nbsp; is the&amp;nbsp; VS C++ libraries so you you write and interface and wrapper function.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 08:46:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/True-Random-number/m-p/1462620#M165432</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2023-03-07T08:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: True Random number</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/True-Random-number/m-p/1462673#M165434</link>
      <description>&lt;P&gt;RDRAND and RDSEED are available on most X86/X64 processors, including Zen. They can be useful during seed generation, and in crypto- applications.&lt;/P&gt;
&lt;P&gt;However, a good RNG in the compiler RTL can be an order of magnitude faster, so there is little motivation for using RDRAND instead of an RNG in, say, Monte-Carlo simulations.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 11:24:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/True-Random-number/m-p/1462673#M165434</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2023-03-07T11:24:26Z</dc:date>
    </item>
    <item>
      <title>Re:True Random number</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/True-Random-number/m-p/1463129#M165452</link>
      <description>&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;Yes, you could access to this true generates from Fortran API of MKL.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;First check (lspu | grep rdrand) if thins instruction available on this particular system.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;Look at the MKL Developer Reference follow this link: &lt;/SPAN&gt;&lt;A href="https://www.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-c/top/statistical-functions/random-number-generators/basic-generators.html" rel="noopener noreferrer" target="_blank" style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;https://www.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-c/top/statistical-functions/random-number-generators/basic-generators.html&lt;/A&gt; w&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;here listed all mkl’s basic generators and rdrand as well.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;Unfortunately, MKL doesn’t provide an RNG examples show how to make the call for this particular Basic generators, but the calling pipeline would very similar with C code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;#define SEED&amp;nbsp;&amp;nbsp;&amp;nbsp;VSL_BRNG_RDRAND&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;#define BRNG&amp;nbsp;&amp;nbsp;&amp;nbsp;VSL_BRNG_NONDETERM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;//Create and Initialize stream:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;VSLStreamStatePtr stream;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;//Initialize stream&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;vslNewStream( &amp;amp;stream, BRNG,&amp;nbsp;SEED );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;//generate RNG &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;vsRngUniform( VSL_RNG_METHOD_UNIFORM_STD, stream, N_GEN_VALS, r, a, b ) // see reference for more details…&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif; font-size: 10pt;"&gt;-Gennady&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 08 Mar 2023 06:00:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/True-Random-number/m-p/1463129#M165452</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2023-03-08T06:00:06Z</dc:date>
    </item>
    <item>
      <title>Re:True Random number</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/True-Random-number/m-p/1464088#M165476</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 16px; font-family: intel-clear;"&gt;We have not heard back from you. This is to kindly inform you that this thread will no longer be monitored by Intel. If you need further assistance, please post a new question.&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 10 Mar 2023 07:04:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/True-Random-number/m-p/1464088#M165476</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2023-03-10T07:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: True Random number</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/True-Random-number/m-p/1464095#M165477</link>
      <description>&lt;P&gt;Thanks all.&amp;nbsp; Especially Gennady; I hope to try that out this weekend.&amp;nbsp; I use an inordinate number of random numbers: 90 threads running for a couple weeks using about 3e6 random numbers/20 minutes each.&amp;nbsp; I'm starting to be concerned about the twister so I want to compare the results with true random numbers.&amp;nbsp; Hopefully, it will show that the Twister is good enough for what I'm trying to do.&amp;nbsp; If not, I'll have to figure out how to get around the time issue.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 07:18:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/True-Random-number/m-p/1464095#M165477</guid>
      <dc:creator>Bruce_Weaver</dc:creator>
      <dc:date>2023-03-10T07:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: True Random number</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/True-Random-number/m-p/1464201#M165486</link>
      <description>&lt;P&gt;Bruce,&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;gt;&lt;EM&gt;I use an inordinate number of random numbers: 90 threads running for a couple weeks using about 3e6 random numbers/20 minutes each.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Are you aware that the referenced random number generators can produce a harvest of random numbers in one call as opposed to a single random number per call?&lt;/P&gt;
&lt;P&gt;Some of the RNGs are independent per thread and do not internally use a critical section while other RNGs internally use a&amp;nbsp;critical section per call. By electing an RNG that uses a critical section, then in a multi-threaded application you can reduce the logjam at the critical section through the use of harvesting many random numbers for subsequent use by the calling thread.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 12:56:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/True-Random-number/m-p/1464201#M165486</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2023-03-10T12:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: True Random number</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/True-Random-number/m-p/1464279#M165489</link>
      <description>&lt;P&gt;Hi Jim,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do call a whole bucket full of random numbers at a time.&amp;nbsp; I seed my threads independently &amp;amp; they each have their own (identical) random number calling routine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 16:40:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/True-Random-number/m-p/1464279#M165489</guid>
      <dc:creator>Bruce_Weaver</dc:creator>
      <dc:date>2023-03-10T16:40:09Z</dc:date>
    </item>
  </channel>
</rss>

