<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">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><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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_-5735885267463024187gmail-p1"><span class="m_-5735885267463024187gmail-s1">0)<span class="m_-5735885267463024187gmail-Apple-tab-span">        </span>i_dir = 6</span></p>
<p class="m_-5735885267463024187gmail-p1"><span class="m_-5735885267463024187gmail-s1">fatal:systemfunc: cannot create child process:[errno=12]</span></p>
<p class="m_-5735885267463024187gmail-p1"><span class="m_-5735885267463024187gmail-s1">fatal:[&quot;Execute.c&quot;:8640]:<wbr>Execute: Error occurred at or near line 84 in file ./plot_loop_700mb.ncl</span></p><p class="m_-5735885267463024187gmail-p1"><span class="m_-5735885267463024187gmail-s1"><br></span></p><p class="m_-5735885267463024187gmail-p1"><span class="m_-5735885267463024187gmail-s1">This occurred when reading the file from the sixth directory of 20.</span></p><p class="m_-5735885267463024187gmail-p1"><span class="m_-5735885267463024187gmail-s1"><br></span></p><p class="m_-5735885267463024187gmail-p1"><span class="m_-5735885267463024187gmail-s1">Here was the read from the 5th directory:</span></p><p class="m_-5735885267463024187gmail-p1"><span class="m_-5735885267463024187gmail-s1">(0)<span class="m_-5735885267463024187gmail-Apple-tab-span">        </span>i_dir = 5</span></p><p class="m_-5735885267463024187gmail-p1"><span class="m_-5735885267463024187gmail-s1">(0)<span class="m_-5735885267463024187gmail-Apple-tab-span">        </span>all_files(n) = /home/cust100021_vol1/barry/<wbr>cust100021_vol2/GEFS/GEFS_05/<wbr>gep05.t00z.pgrb2b.0p50.f084.<wbr>grb</span></p><p class="m_-5735885267463024187gmail-p1"><span class="m_-5735885267463024187gmail-s1">









</span></p><p class="m_-5735885267463024187gmail-p1">Here is a listing of both files:</p><p class="m_-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_-5735885267463024187gmail-p1"><br></p><p class="m_-5735885267463024187gmail-p1"><span class="m_-5735885267463024187gmail-s1">[barry@cust100021-login1 GEFS]$ ls -ltr /home/cust100021_vol1/barry/<wbr>cust100021_vol2/GEFS/GEFS_05/<wbr>gep05.t00z.pgrb2b.0p50.f084.<wbr>grb</span></p><p class="m_-5735885267463024187gmail-p1"><span class="m_-5735885267463024187gmail-s1">-rw-r--r-- 1 barry cust100021 78985320 Jul 16 04:58 /home/cust100021_vol1/barry/<wbr>cust100021_vol2/GEFS/GEFS_05/<wbr>gep05.t00z.pgrb2b.0p50.f084.<wbr>grb</span></p><p class="m_-5735885267463024187gmail-p1"><span class="m_-5735885267463024187gmail-s1">[barry@cust100021-login1 GEFS]$ ls -ltr /home/cust100021_vol1/barry/<wbr>cust100021_vol2/GEFS/GEFS_06/<wbr>gep06.t00z.pgrb2b.0p50.f084.<wbr>grb</span></p><p class="m_-5735885267463024187gmail-p1">










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












</p><p class="m_-5735885267463024187gmail-p1"><span class="m_-5735885267463024187gmail-s1"><span class="m_-5735885267463024187gmail-Apple-converted-space">  </span>filename = all_files(n)</span></p><p class="m_-5735885267463024187gmail-p1"><span class="m_-5735885267463024187gmail-s1"><br></span></p><p class="m_-5735885267463024187gmail-p1"><span class="m_-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_-5735885267463024187gmail-p1"><span class="m_-5735885267463024187gmail-s1"><br></span></p><p class="m_-5735885267463024187gmail-p1"><span class="m_-5735885267463024187gmail-s1">Thanks</span></p><p class="m_-5735885267463024187gmail-p1"><span class="m_-5735885267463024187gmail-s1"><br></span></p><div><br></div>-- <br><div class="m_-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>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">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/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>