<?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 in SAS EG generates Libref is not assigned error in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Parallel-Processing-in-SAS-EG-generates-Libref-is-not-assigned/m-p/677003#M36751</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/65975"&gt;@fuatengin&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The parallel processing feature in EG causes multiple workspace sessions to be launched to perform the independent work in parallel.&amp;nbsp; This can be tricky when your downstream code relies on upstream code that&amp;nbsp;makes state changes (ex. assigns libraries, defines macro variables, sets system options, etc.) to a workspace session&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, the code you put in your process flow named "autoexec" causes the libraries to be assigned and the macro variable defined &lt;U&gt;on only one&lt;/U&gt; of the workspace sessions.&amp;nbsp; Any additional workspace sessions that are spun up to perform work in parallel will not have those libraries or macro variables defined.&amp;nbsp; If you don't explicitly define a dependency, there is no guarantee the upstream code you need will be run on the same workspace session as your downstream node.&amp;nbsp; So, to ensure your "setup code" is run on the respective workspace sessions before each of your independent programs, I recommend adding a separate code node before each or your programs (rather than using the autoexec process flow) and explicitly linking your "setup" program nodes to your actual programs.&amp;nbsp; (You'll want two "setup" code nodes to ensure the two branches remain independent/unconnected, so they'll run in parallel.&amp;nbsp; However, they could both %include the same .sas file (so you only have one to maintain) to assign your libraries and define your macro variables.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Casey&lt;/P&gt;</description>
    <pubDate>Sat, 15 Aug 2020 22:27:24 GMT</pubDate>
    <dc:creator>CaseySmith</dc:creator>
    <dc:date>2020-08-15T22:27:24Z</dc:date>
    <item>
      <title>Parallel Processing in SAS EG generates Libref is not assigned error</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Parallel-Processing-in-SAS-EG-generates-Libref-is-not-assigned/m-p/670096#M36458</link>
      <description>&lt;P&gt;I wanted to enable paralell processing in my SAS EG project to run two independent programs in the same process flow. I am assigning custom libnames and writing their location with macro variables in "Autoexec" process flow initially&amp;nbsp;&lt;SPAN style="font-family: inherit;"&gt;but when I give a parallel run,&amp;nbsp; the first one gets "libref is not assigned error."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;I don't understand the reason and how I can tackle it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;Help is very much appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;Fuat&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2020 11:42:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Parallel-Processing-in-SAS-EG-generates-Libref-is-not-assigned/m-p/670096#M36458</guid>
      <dc:creator>fuatengin</dc:creator>
      <dc:date>2020-07-17T11:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel Processing in SAS EG generates Libref is not assigned error</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Parallel-Processing-in-SAS-EG-generates-Libref-is-not-assigned/m-p/670098#M36459</link>
      <description>&lt;P&gt;Check the following SAS Global Forum paper, see if it gives any ideas/guides how to get around your issue&lt;/P&gt;
&lt;P&gt;&lt;A title="Improving Efficiency in SAS® Enterprise Guide®: Parallel Processing and Other Hidden Gems" href="https://support.sas.com/resources/papers/proceedings17/0927-2017.pdf" target="_self"&gt;Improving Efficiency in SAS® Enterprise Guide®: Parallel Processing and Other Hidden Gems&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Ahmed&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2020 12:15:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Parallel-Processing-in-SAS-EG-generates-Libref-is-not-assigned/m-p/670098#M36459</guid>
      <dc:creator>AhmedAl_Attar</dc:creator>
      <dc:date>2020-07-17T12:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel Processing in SAS EG generates Libref is not assigned error</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Parallel-Processing-in-SAS-EG-generates-Libref-is-not-assigned/m-p/677003#M36751</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/65975"&gt;@fuatengin&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The parallel processing feature in EG causes multiple workspace sessions to be launched to perform the independent work in parallel.&amp;nbsp; This can be tricky when your downstream code relies on upstream code that&amp;nbsp;makes state changes (ex. assigns libraries, defines macro variables, sets system options, etc.) to a workspace session&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, the code you put in your process flow named "autoexec" causes the libraries to be assigned and the macro variable defined &lt;U&gt;on only one&lt;/U&gt; of the workspace sessions.&amp;nbsp; Any additional workspace sessions that are spun up to perform work in parallel will not have those libraries or macro variables defined.&amp;nbsp; If you don't explicitly define a dependency, there is no guarantee the upstream code you need will be run on the same workspace session as your downstream node.&amp;nbsp; So, to ensure your "setup code" is run on the respective workspace sessions before each of your independent programs, I recommend adding a separate code node before each or your programs (rather than using the autoexec process flow) and explicitly linking your "setup" program nodes to your actual programs.&amp;nbsp; (You'll want two "setup" code nodes to ensure the two branches remain independent/unconnected, so they'll run in parallel.&amp;nbsp; However, they could both %include the same .sas file (so you only have one to maintain) to assign your libraries and define your macro variables.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Casey&lt;/P&gt;</description>
      <pubDate>Sat, 15 Aug 2020 22:27:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Parallel-Processing-in-SAS-EG-generates-Libref-is-not-assigned/m-p/677003#M36751</guid>
      <dc:creator>CaseySmith</dc:creator>
      <dc:date>2020-08-15T22:27:24Z</dc:date>
    </item>
  </channel>
</rss>

