<?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: Running SAS in HPC in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Running-SAS-in-HPC/m-p/512039#M137867</link>
    <description>&lt;P&gt;A few notes:&lt;/P&gt;
&lt;P&gt;- The network seems saturated. Are the disks local?&lt;/P&gt;
&lt;P&gt;- You access the same library with 48 processes. Unless the disks are really fast that is bound to cause contention.&lt;/P&gt;
&lt;P&gt;- If the same table is accessed again&amp;nbsp;and again for&amp;nbsp;the different simulations and is the data set is small enough,&amp;nbsp;you could try loading the table in memory with SASFILE after RSUBMIT. Maybe stagger the RSUBMITs a bit for this.&lt;/P&gt;
&lt;P&gt;- What I would do: start with fewer processes. 2 then 4 , etc to see if there is a pattern. Hopefully 4 will be faster than 2 , but 12 might be the fastest, and&amp;nbsp;beyond this you'll see that one resource is overloaded.&lt;/P&gt;</description>
    <pubDate>Sun, 11 Nov 2018 21:45:29 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2018-11-11T21:45:29Z</dc:date>
    <item>
      <title>Running SAS in HPC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-SAS-in-HPC/m-p/511979#M137830</link>
      <description>&lt;P&gt;I am trying to run SAS on a HPC with 48 cores but my code is only using about 5% of the available CPU's. I have set the CPUCOUNT to 48 in the config file so I'm not sure why it isn't working. Has anyone else run into this problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Nov 2018 23:39:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-SAS-in-HPC/m-p/511979#M137830</guid>
      <dc:creator>barb3126</dc:creator>
      <dc:date>2018-11-10T23:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: Running SAS in HPC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-SAS-in-HPC/m-p/511981#M137832</link>
      <description>&lt;P&gt;What OS is running on your HPC and what SAS products? My understanding is you need to use HPC-enabled SAS products like Visual Analytics for single SAS jobs to fully utilise HPC.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Nov 2018 00:16:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-SAS-in-HPC/m-p/511981#M137832</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-11-11T00:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: Running SAS in HPC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-SAS-in-HPC/m-p/511982#M137833</link>
      <description>&lt;P&gt;The OS is Linux and this is a super computer at my academic institution - unfortunately, they provide little to no support to SAS users. I am running a large simulation that is taking hours to run. I have implemented parallel processing but am not seeing any improvement in run time and CPU usage isn't going up. I am an experienced SAS programmer but haven't used parallel processing before. The code runs pretty quickly on my laptop when I run a small number of simulations but the same number of simulations is much slower on the HPC. I am wondering if I have not set the options up correctly or am missing something. Thanks for any help you can give!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Nov 2018 00:40:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-SAS-in-HPC/m-p/511982#M137833</guid>
      <dc:creator>barb3126</dc:creator>
      <dc:date>2018-11-11T00:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: Running SAS in HPC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-SAS-in-HPC/m-p/511983#M137834</link>
      <description>Do you have a SAS server license or just a desktop? Did you also change the memory options to increase size?</description>
      <pubDate>Sun, 11 Nov 2018 01:54:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-SAS-in-HPC/m-p/511983#M137834</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-11-11T01:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Running SAS in HPC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-SAS-in-HPC/m-p/511984#M137835</link>
      <description>&lt;P&gt;What SAS product are you using for the simulation? How are you doing your parallel processing? If you are using Base SAS then I guess you are using custom code for the parallel processing or are you using some other method?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does your simulation use IO much? If so then that could be what is slowing you down.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Nov 2018 03:08:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-SAS-in-HPC/m-p/511984#M137835</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-11-11T03:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: Running SAS in HPC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-SAS-in-HPC/m-p/512007#M137849</link>
      <description>&lt;P&gt;I am using Base SAS (server license) and have increased the CPUCOUNT to 48 and the MEMSIZE to 2147483648 in the config file. I am using the code below to simulate C levels (~7000) within B levels (~500) within A levels (~5000). I have been testing the code using 960 A levels and it is taking ~ 5 hrs to run. Our R version of the model runs in about 20 minutes for all 5000 A levels. We want to run the model in SAS so we can track each A-B-C combination through the system (i.e. run an agent-based model), which our R model doesn't do. We also want to compare the SAS and R results.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I start by randomly generating the A levels. I then split this dataset into sub-datasets that will be used in each thread. I originally didn't do this but tried it because I was concerned that each thread opening the original dataset was slowing things down. I then use parallel processing to simulate the B levels and the C levels using data steps, which do quite a number of calculations. From the log, it appears that the threads are running sequentially instead of asynchronously. I have attached the performance metrics during the run.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%do i=&lt;STRONG&gt;1&lt;/STRONG&gt; %to &amp;amp;numthreads;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let begin=%eval((&amp;amp;i-1)*(&amp;amp;num_sim_thread) + 1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let end=%eval(&amp;amp;begin + (&amp;amp;num_sim_thread) - 1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %if &amp;amp;end&amp;gt;&amp;amp;num_sim %then %let end=%eval(&amp;amp;num_sim);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data risk.level_a_sim_t&amp;amp;i;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set risk.level_a_sim (where=(&amp;amp;begin &amp;lt;= level_a_num &amp;lt;= &amp;amp;end));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt; parallel(thr);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;signon task&amp;amp;thr inheritlib=(risk);&lt;/P&gt;&lt;P&gt;%syslput _all_ /remote=task&amp;amp;thr;&lt;/P&gt;&lt;P&gt;rsubmit wait=no;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%put THREAD START TIME: %sysfunc(datetime(),datetime18.1);&lt;/P&gt;&lt;P&gt;%put _all_;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data step to simulate level b within each level a…&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data step to simulate level c within each level b…&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc datasets to create index for level a, b and c…&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data step to sample level c and calculate metrics…&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data step to merge metrics back onto overall dataset and finish simulation…&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%put THREAD END TIME: %sysfunc(datetime(),datetime18.1);&lt;/P&gt;&lt;P&gt;%put PROCESSING TIME:&amp;nbsp; %sysfunc(putn(%sysevalf(%sysfunc(TIME())-&amp;amp;datetime_start.),mmss.)) (mm:ss) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;endrsubmit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt; parallel_processing;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%do i=&lt;STRONG&gt;1&lt;/STRONG&gt; %to &amp;amp;numthreads;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %&lt;STRONG&gt;&lt;EM&gt;parallel&lt;/EM&gt;&lt;/STRONG&gt;(&amp;amp;i);&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;waitfor _ALL_ %do i=&lt;STRONG&gt;1&lt;/STRONG&gt; %to &amp;amp;numthreads; task&amp;amp;i %end; ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%do i=&lt;STRONG&gt;1&lt;/STRONG&gt; %to &amp;amp;numthreads;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; signoff task&amp;amp;i;&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Nov 2018 15:33:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-SAS-in-HPC/m-p/512007#M137849</guid>
      <dc:creator>barb3126</dc:creator>
      <dc:date>2018-11-11T15:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: Running SAS in HPC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-SAS-in-HPC/m-p/512039#M137867</link>
      <description>&lt;P&gt;A few notes:&lt;/P&gt;
&lt;P&gt;- The network seems saturated. Are the disks local?&lt;/P&gt;
&lt;P&gt;- You access the same library with 48 processes. Unless the disks are really fast that is bound to cause contention.&lt;/P&gt;
&lt;P&gt;- If the same table is accessed again&amp;nbsp;and again for&amp;nbsp;the different simulations and is the data set is small enough,&amp;nbsp;you could try loading the table in memory with SASFILE after RSUBMIT. Maybe stagger the RSUBMITs a bit for this.&lt;/P&gt;
&lt;P&gt;- What I would do: start with fewer processes. 2 then 4 , etc to see if there is a pattern. Hopefully 4 will be faster than 2 , but 12 might be the fastest, and&amp;nbsp;beyond this you'll see that one resource is overloaded.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Nov 2018 21:45:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-SAS-in-HPC/m-p/512039#M137867</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-11-11T21:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: Running SAS in HPC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-SAS-in-HPC/m-p/512178#M137916</link>
      <description>&lt;P&gt;This is a super computer and the server I am using has multiple nodes with 48 cores each. I'm fairly new to parallel processing and have read up quite a bit about it but am still struggling with how to code it right so I appreciate the help. So far, I have only been using one node and running 48 processes to take advantage of the 48 cores. I could request to use more nodes but am not sure how to call them from SAS. Any suggestions on how to do that? In the meantime, I will try scaling up as you suggest. Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 12 Nov 2018 13:26:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-SAS-in-HPC/m-p/512178#M137916</guid>
      <dc:creator>barb3126</dc:creator>
      <dc:date>2018-11-12T13:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: Running SAS in HPC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-SAS-in-HPC/m-p/512319#M137956</link>
      <description>&lt;P&gt;Your use of multiple SAS sessions for parallel processing is a good approach. I would focus on the steps in your simulation that are the slowest to understand where your bottlenecks are.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Nov 2018 20:03:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-SAS-in-HPC/m-p/512319#M137956</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-11-12T20:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: Running SAS in HPC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-SAS-in-HPC/m-p/512389#M137992</link>
      <description>&lt;P&gt;As&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&amp;nbsp;said, the structure of your program is fine.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have to look at &lt;EM&gt;how&lt;/EM&gt; it runs, and find the bottlenecks (SAS steps to be optimised and/or hardware contentions).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Nov 2018 22:07:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-SAS-in-HPC/m-p/512389#M137992</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-11-12T22:07:14Z</dc:date>
    </item>
  </channel>
</rss>

