<?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 Number Generation in Parallelized data step in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Random-Number-Generation-in-Parallelized-data-step/m-p/136745#M261191</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;I am using this paper &lt;A href="http://support.sas.com/resources/papers/proceedings10/109-2010.pdf" title="http://support.sas.com/resources/papers/proceedings10/109-2010.pdf"&gt;http://support.sas.com/resources/papers/proceedings10/109-2010.pdf&lt;/A&gt; to parallelize a data step (which is essentially a do loop simulating something).&lt;/P&gt;&lt;P&gt;I wonder what the best approach is to generate random numbers for the multiple threads. Right now I am initizalizing with different seeds "CALL STREAMINIT(&amp;amp;seed.); " where seed is different for each thread/task.&lt;/P&gt;&lt;P&gt;However this is not optimal since the different paths of the Pseudo-RNG could "coincide" after some time (if I am unlucky). Is there any way to improve this situation? Is there any documentation available on the Mersenne Twister configuration in SAS? I am only relying on&amp;nbsp; RAND in my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Bernhard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Oct 2014 06:09:01 GMT</pubDate>
    <dc:creator>bernhard</dc:creator>
    <dc:date>2014-10-22T06:09:01Z</dc:date>
    <item>
      <title>Random Number Generation in Parallelized data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Random-Number-Generation-in-Parallelized-data-step/m-p/136745#M261191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;I am using this paper &lt;A href="http://support.sas.com/resources/papers/proceedings10/109-2010.pdf" title="http://support.sas.com/resources/papers/proceedings10/109-2010.pdf"&gt;http://support.sas.com/resources/papers/proceedings10/109-2010.pdf&lt;/A&gt; to parallelize a data step (which is essentially a do loop simulating something).&lt;/P&gt;&lt;P&gt;I wonder what the best approach is to generate random numbers for the multiple threads. Right now I am initizalizing with different seeds "CALL STREAMINIT(&amp;amp;seed.); " where seed is different for each thread/task.&lt;/P&gt;&lt;P&gt;However this is not optimal since the different paths of the Pseudo-RNG could "coincide" after some time (if I am unlucky). Is there any way to improve this situation? Is there any documentation available on the Mersenne Twister configuration in SAS? I am only relying on&amp;nbsp; RAND in my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Bernhard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 06:09:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Random-Number-Generation-in-Parallelized-data-step/m-p/136745#M261191</guid>
      <dc:creator>bernhard</dc:creator>
      <dc:date>2014-10-22T06:09:01Z</dc:date>
    </item>
    <item>
      <title>Re: Random Number Generation in Parallelized data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Random-Number-Generation-in-Parallelized-data-step/m-p/136746#M261192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lefunctionsref/67398/HTML/default/viewer.htm#p0fpeei0opypg8n1b06qe4r040lv.htm" title="http://support.sas.com/documentation/cdl/en/lefunctionsref/67398/HTML/default/viewer.htm#p0fpeei0opypg8n1b06qe4r040lv.htm"&gt;SAS(R) 9.4 Functions and CALL Routines: Reference, Third Edition&lt;/A&gt; The rand function is mentioning mersenne&lt;/P&gt;&lt;P&gt;Rick Wicklin did a blog on that topic &lt;A href="http://blogs.sas.com/content/iml/2013/07/10/stop-using-ranuni/" title="http://blogs.sas.com/content/iml/2013/07/10/stop-using-ranuni/"&gt; Six reasons you should stop using the RANUNI function to generate random numbers - The DO Loop&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 11:55:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Random-Number-Generation-in-Parallelized-data-step/m-p/136746#M261192</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-10-22T11:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: Random Number Generation in Parallelized data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Random-Number-Generation-in-Parallelized-data-step/m-p/136747#M261193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, in theory you could get unlucky.&amp;nbsp; In practice I suspect that the probability of getting two streams that are not independent are extremely small. I haven't run the analysis myself, but other people have done what you are proposing and have not reported any dependencies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to see the literature in this area, search for articles by Piere L'Ecuyer and colleagues on PRNGs that have&amp;nbsp; provably independent streams.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 14:45:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Random-Number-Generation-in-Parallelized-data-step/m-p/136747#M261193</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2014-10-22T14:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: Random Number Generation in Parallelized data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Random-Number-Generation-in-Parallelized-data-step/m-p/136748#M261194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Rick.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Nov 2014 11:02:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Random-Number-Generation-in-Parallelized-data-step/m-p/136748#M261194</guid>
      <dc:creator>bernhard</dc:creator>
      <dc:date>2014-11-02T11:02:29Z</dc:date>
    </item>
  </channel>
</rss>

