<?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: Parallel Processing with rsubmit in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Parallel-Processing-with-rsubmit/m-p/73705#M15873</link>
    <description>Hello Patrick.&lt;BR /&gt;
&lt;BR /&gt;
Set the autosignon option at the beginning:&lt;BR /&gt;
&lt;BR /&gt;
option autosignon=yes;&lt;BR /&gt;
&lt;BR /&gt;
Cheers from Portugal.&lt;BR /&gt;
&lt;BR /&gt;
Daniel Santos @ &lt;A href="http://www.cgd.pt" target="_blank"&gt;www.cgd.pt&lt;/A&gt;.</description>
    <pubDate>Wed, 30 Sep 2009 08:33:43 GMT</pubDate>
    <dc:creator>DanielSantos</dc:creator>
    <dc:date>2009-09-30T08:33:43Z</dc:date>
    <item>
      <title>Parallel Processing with rsubmit</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parallel-Processing-with-rsubmit/m-p/73704#M15872</link>
      <description>Hi all &lt;BR /&gt;
&lt;BR /&gt;
I'm running the following script in a vmware Windows2003 image with PC &lt;BR /&gt;
SAS 9.1.3 on a single intel processor laptop.&lt;BR /&gt;
The script should "spawn" 3 sessions on the same machine where the main program runs.&lt;BR /&gt;
The 3 sessions should run in parallel (asynchronous).&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
options sascmd='C:\Program Files\SAS\SAS 9.1\sas.exe - &lt;BR /&gt;
nosyntaxcheck'   ; &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
%macro testit; &lt;BR /&gt;
  %do i=1 %to 3; &lt;BR /&gt;
    signon t&amp;amp;i; &lt;BR /&gt;
    %syslput ri=&amp;amp;i; &lt;BR /&gt;
      rsubmit wait=no log="C:\temp\testNew2_&amp;amp;i..log" output="C:\temp &lt;BR /&gt;
\testNew2_&amp;amp;i..lst"  ; &lt;BR /&gt;
      filename test "C:\temp\testNew2_&amp;amp;ri..txt"; &lt;BR /&gt;
      data _null_; &lt;BR /&gt;
        file test; &lt;BR /&gt;
        put "Test &amp;amp;ri"; &lt;BR /&gt;
        call sleep(10,1); &lt;BR /&gt;
      run; &lt;BR /&gt;
      filename test clear; &lt;BR /&gt;
    endrsubmit; &lt;BR /&gt;
    signoff t&amp;amp;i; &lt;BR /&gt;
  %end; &lt;BR /&gt;
%mend; &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
%testit &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
I have the following 2 questions/issues: &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
1. It looks to me as if the tasks run synchronous instead of &lt;BR /&gt;
asynchronous - why? &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
2. If I run the code more than once I get the following error: &lt;BR /&gt;
ERROR: File is in use, C:\temp\testNew2_1.log. &lt;BR /&gt;
ERROR: Remote submit cancelled. &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Why is the log file still locked after signing off from the "spawned"&lt;BR /&gt;
session? What am I missing? &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Cheers, Patrick</description>
      <pubDate>Tue, 29 Sep 2009 23:03:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parallel-Processing-with-rsubmit/m-p/73704#M15872</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2009-09-29T23:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel Processing with rsubmit</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parallel-Processing-with-rsubmit/m-p/73705#M15873</link>
      <description>Hello Patrick.&lt;BR /&gt;
&lt;BR /&gt;
Set the autosignon option at the beginning:&lt;BR /&gt;
&lt;BR /&gt;
option autosignon=yes;&lt;BR /&gt;
&lt;BR /&gt;
Cheers from Portugal.&lt;BR /&gt;
&lt;BR /&gt;
Daniel Santos @ &lt;A href="http://www.cgd.pt" target="_blank"&gt;www.cgd.pt&lt;/A&gt;.</description>
      <pubDate>Wed, 30 Sep 2009 08:33:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parallel-Processing-with-rsubmit/m-p/73705#M15873</guid>
      <dc:creator>DanielSantos</dc:creator>
      <dc:date>2009-09-30T08:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel Processing with rsubmit</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parallel-Processing-with-rsubmit/m-p/73706#M15874</link>
      <description>Hi Daniel&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your answer. Someone replied! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
I tried autosignon=yes; but still encounter the same issues.&lt;BR /&gt;
&lt;BR /&gt;
There is an explicit signon in the code I provided so I don't really understand the point of adding the autosignon option.&lt;BR /&gt;
&lt;BR /&gt;
I could imagine that multithreading doesn't really work as there is only one processor - and even though it's a dual-core processor it could be that the VM ware image runs on only one core. Just theory - but it's at least some kind of explanation.... Running very similar code in a multi-processor Unix environment works fine and the tasks run in parallel.&lt;BR /&gt;
&lt;BR /&gt;
I still don't understand why the files stay locked even after an explicit signoff.&lt;BR /&gt;
&lt;BR /&gt;
Cheers, Patrick</description>
      <pubDate>Wed, 30 Sep 2009 08:50:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parallel-Processing-with-rsubmit/m-p/73706#M15874</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2009-09-30T08:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel Processing with rsubmit</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parallel-Processing-with-rsubmit/m-p/73707#M15875</link>
      <description>autosignon must be set if you wish to use multithreading feature (MP Connect).&lt;BR /&gt;
&lt;BR /&gt;
Something may be wrong with your setup.&lt;BR /&gt;
&lt;BR /&gt;
MP Connect will run on a single CPU (although internally, it should clearly be round robin processing).&lt;BR /&gt;
&lt;BR /&gt;
I have ran the exact same code (with the autosignon=yes) asynchronously on my workstation (WinXP P4 with single CPU) with no problem at all.&lt;BR /&gt;
&lt;BR /&gt;
Could you try the following code, to see if it works on your installation:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/connref/61908/HTML/default/a001249955.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/connref/61908/HTML/default/a001249955.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Cheers from Portugal.&lt;BR /&gt;
&lt;BR /&gt;
Daniel Santos @ &lt;A href="http://www.cgd.pt" target="_blank"&gt;www.cgd.pt&lt;/A&gt;</description>
      <pubDate>Wed, 30 Sep 2009 10:10:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parallel-Processing-with-rsubmit/m-p/73707#M15875</guid>
      <dc:creator>DanielSantos</dc:creator>
      <dc:date>2009-09-30T10:10:52Z</dc:date>
    </item>
  </channel>
</rss>

