<div dir="ltr">Hi Rick:<div><br></div><div>Thank you for your suggestion.</div><div><br></div><div>Could you please give me some guidelines on how to delete resources.</div><div><br></div><div>I have included the script.  If you can provide an example, I can take it from there.</div><div><br></div><div>Thank you,</div><div><br></div><div>Barry</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 17, 2017 at 5:22 PM, Rick Brownrigg <span dir="ltr">&lt;<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi Barry,<br><br></div>On Linux, an errno=12 is an &quot;out of memory&quot; error.  I doubt that its related directly to the systemfunc() call, but rather due to memory being consumed by your script in previous iterations of the loop.  You might check if there are variables that can be freed (i.e., deleted()) after each iteration.<br><br></div>HTH...<br></div>Rick<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Sun, Jul 16, 2017 at 8:56 PM, Barry Lynn <span dir="ltr">&lt;<a href="mailto:barry.h.lynn@gmail.com" target="_blank">barry.h.lynn@gmail.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi:<div><br></div><div>I have a program that does multiple loops.</div><div><br></div><div>I had this error:</div><div><br></div><div>







<p class="m_-1244925744970829752m_-5735885267463024187gmail-p1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-s1">0)<span class="m_-1244925744970829752m_-5735885267463024187gmail-Apple-tab-span">        </span>i_dir = 6</span></p>
<p class="m_-1244925744970829752m_-5735885267463024187gmail-p1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-s1">fatal:systemfunc: cannot create child process:[errno=12]</span></p>
<p class="m_-1244925744970829752m_-5735885267463024187gmail-p1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-s1">fatal:[&quot;Execute.c&quot;:8640]:Execu<wbr>te: Error occurred at or near line 84 in file ./plot_loop_700mb.ncl</span></p><p class="m_-1244925744970829752m_-5735885267463024187gmail-p1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-s1"><br></span></p><p class="m_-1244925744970829752m_-5735885267463024187gmail-p1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-s1">This occurred when reading the file from the sixth directory of 20.</span></p><p class="m_-1244925744970829752m_-5735885267463024187gmail-p1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-s1"><br></span></p><p class="m_-1244925744970829752m_-5735885267463024187gmail-p1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-s1">Here was the read from the 5th directory:</span></p><p class="m_-1244925744970829752m_-5735885267463024187gmail-p1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-s1">(0)<span class="m_-1244925744970829752m_-5735885267463024187gmail-Apple-tab-span">        </span>i_dir = 5</span></p><p class="m_-1244925744970829752m_-5735885267463024187gmail-p1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-s1">(0)<span class="m_-1244925744970829752m_-5735885267463024187gmail-Apple-tab-span">        </span>all_files(n) = /home/cust100021_vol1/barry/cu<wbr>st100021_vol2/GEFS/GEFS_05/gep<wbr>05.t00z.pgrb2b.0p50.f084.grb</span></p><p class="m_-1244925744970829752m_-5735885267463024187gmail-p1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-s1">









</span></p><p class="m_-1244925744970829752m_-5735885267463024187gmail-p1">Here is a listing of both files:</p><p class="m_-1244925744970829752m_-5735885267463024187gmail-p1">They are both present, but the second attempted allocation/definition of the file fails with the read that follows:</p><p class="m_-1244925744970829752m_-5735885267463024187gmail-p1"><br></p><p class="m_-1244925744970829752m_-5735885267463024187gmail-p1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-s1">[barry@cust100021-login1 GEFS]$ ls -ltr /home/cust100021_vol1/barry/cu<wbr>st100021_vol2/GEFS/GEFS_05/gep<wbr>05.t00z.pgrb2b.0p50.f084.grb</span></p><p class="m_-1244925744970829752m_-5735885267463024187gmail-p1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-s1">-rw-r--r-- 1 barry cust100021 78985320 Jul 16 04:58 /home/cust100021_vol1/barry/cu<wbr>st100021_vol2/GEFS/GEFS_05/gep<wbr>05.t00z.pgrb2b.0p50.f084.grb</span></p><p class="m_-1244925744970829752m_-5735885267463024187gmail-p1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-s1">[barry@cust100021-login1 GEFS]$ ls -ltr /home/cust100021_vol1/barry/cu<wbr>st100021_vol2/GEFS/GEFS_06/gep<wbr>06.t00z.pgrb2b.0p50.f084.grb</span></p><p class="m_-1244925744970829752m_-5735885267463024187gmail-p1">










</p><p class="m_-1244925744970829752m_-5735885267463024187gmail-p1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-s1">-rw-r--r-- 1 barry cust100021 80466702 Jul 16 04:58 /home/cust100021_vol1/barry/cu<wbr>st100021_vol2/GEFS/GEFS_06/gep<wbr>06.t00z.pgrb2b.0p50.f084.grb</span></p><p class="m_-1244925744970829752m_-5735885267463024187gmail-p1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-s1">Here is the read:</span></p><p class="m_-1244925744970829752m_-5735885267463024187gmail-p1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-s1"><br></span></p><p class="m_-1244925744970829752m_-5735885267463024187gmail-p1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-s1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-Apple-converted-space">  </span>print(&quot;i_dir = &quot; + i_dir)</span></p><p class="m_-1244925744970829752m_-5735885267463024187gmail-p1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-s1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-Apple-converted-space">  </span>diri = dirWRF(i_dir) + &quot;/&quot;</span></p><p class="m_-1244925744970829752m_-5735885267463024187gmail-p1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-s1">; define individual file read</span></p><p class="m_-1244925744970829752m_-5735885267463024187gmail-p1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-s1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-Apple-converted-space">   </span>all_files = systemfunc(&quot;ls &quot; + diri + &quot;ge*pgrb2b*grb&quot;)</span></p><p class="m_-1244925744970829752m_-5735885267463024187gmail-p1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-s1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-Apple-converted-space">   </span>print(&quot;all_files(n) = &quot; + all_files(n))</span></p><p class="m_-1244925744970829752m_-5735885267463024187gmail-p1">












</p><p class="m_-1244925744970829752m_-5735885267463024187gmail-p1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-s1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-Apple-converted-space">  </span>filename = all_files(n)</span></p><p class="m_-1244925744970829752m_-5735885267463024187gmail-p1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-s1"><br></span></p><p class="m_-1244925744970829752m_-5735885267463024187gmail-p1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-s1">Is the problem that I make this allocation multiple times, each directory, each file? Perhaps I should read all files at once into a two dimensional filename array?</span></p><p class="m_-1244925744970829752m_-5735885267463024187gmail-p1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-s1"><br></span></p><p class="m_-1244925744970829752m_-5735885267463024187gmail-p1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-s1">Thanks</span></p><p class="m_-1244925744970829752m_-5735885267463024187gmail-p1"><span class="m_-1244925744970829752m_-5735885267463024187gmail-s1"><br></span></p><div><br></div>-- <br><div class="m_-1244925744970829752m_-5735885267463024187gmail_signature"><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br></span></div><div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br>US <a href="tel:(914)%20432-3108" value="+19144323108" target="_blank">914 432 3108</a><br></div></div></div>
</div></div>
<br></div></div>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br></span></div><div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br>US 914 432 3108<br></div></div></div>
</div>