<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
You might try using the “wait” command in the bash script to make it perform the commands sequentially.
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">
<div class=""><br class="">
Message: 3<br class="">
Date: Sat, 27 Jun 2020 17:26:56 +0000<br class="">
From: "Herb, Jason" <<a href="mailto:jherb@albany.edu" class="">jherb@albany.edu</a>><br class="">
To: "ncl-talk [ncl-talk]" <<a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a>><br class="">
Subject: [ncl-talk] Limiting the number of CPUs when running NCL<br class="">
       scripts<br class="">
Message-ID:<br class="">
       <<a href="mailto:DM6PR04MB4555FA9AD4425D79FDBCEF8DCE900@DM6PR04MB4555.namprd04.prod.outlook.com" class="">DM6PR04MB4555FA9AD4425D79FDBCEF8DCE900@DM6PR04MB4555.namprd04.prod.outlook.com</a>><br class="">
<br class="">
Content-Type: text/plain; charset="iso-8859-1"<br class="">
<br class="">
Hello,<br class="">
<br class="">
I was attempting to run a script that runs ncl_filedump on a series of hdf files and placing each file dump into a seperate file. The script is in a bash environment with the following sample command lines...<br class="">
<br class="">
#!/bin/bash<br class="">
#Script will run ncl_filedump for all data days this is the first step to the swath time periods for comparison of terra and aqua<br class="">
ncl_filedump MCD19A2.A2002001.h12v04.006.2018016140659.pscs_000501413482.hdf > ncldump2002001.txt<br class="">
ncl_filedump MCD19A2.A2002002.h12v04.006.2018016140659.pscs_000501413482.hdf > ncldump2002002.txt<br class="">
ncl_filedump MCD19A2.A2002003.h12v04.006.2018016140700.pscs_000501413482.hdf > ncldump2002003.txt<br class="">
ncl_filedump MCD19A2.A2002004.h12v04.006.2018016140701.pscs_000501413482.hdf > ncldump2002004.txt<br class="">
ncl_filedump MCD19A2.A2002005.h12v04.006.2018016140702.pscs_000501413482.hdf > ncldump2002005.txt<br class="">
ncl_filedump MCD19A2.A2002006.h12v04.006.2018016140702.pscs_000501413482.hdf > ncldump2002006.txt<br class="">
.<br class="">
.<br class="">
ncl_filedump MCD19A2.A2002365.h12v04.006.2018018154414.pscs_000501413482.hdf > ncldump2002365.txt<br class="">
<br class="">
Apparently, the system went and ran all commands at a single time, verses doing in list order. Is there a way to limit the number of CPUs and make it work in the list order to not over load the system? The existing script resulted in the error of unix fork
 retry no child processes appearing on the screen and locked the system up. I do no know what the exact specs of the computer system are, but i know there is a very large number of CPU cores and RAM.<br class="">
<br class="">
Thanks,<br class="">
Jason<br class="">
-------------- next part --------------<br class="">
An HTML attachment was scrubbed...<br class="">
URL: <<a href="https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200627/17075f95/attachment-0001.html" class="">https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200627/17075f95/attachment-0001.html</a>><br class="">
<br class="">
------------------------------<br class="">
<br class="">
Subject: Digest Footer<br class="">
<br class="">
_______________________________________________<br class="">
ncl-talk mailing list<br class="">
<a href="mailto:ncl-talk@mailman.ucar.edu" class="">ncl-talk@mailman.ucar.edu</a><br class="">
List instructions, subscriber options, unsubscribe:<br class="">
https://mailman.ucar.edu/mailman/listinfo/ncl-talk<br class="">
<br class="">
------------------------------<br class="">
<br class="">
End of ncl-talk Digest, Vol 199, Issue 34<br class="">
*****************************************<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
<div class="">
<div class="">
<div style="font-size: 12px;" class="">@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#<wbr class="">@#@#@#@#@#@</div>
<div style="font-size: 12px;" class="">Brian C. Thomas, PhD</div>
<div style="font-size: 12px;" class="">Professor, Physics and Astronomy, Washburn University</div>
<div style="font-size: 12px;" class=""><br class="m_5392318813447303527khtml-block-placeholder">
</div>
<div style="font-size: 12px;" class=""><a href="tel:(785)%20670-2144" value="+17856702144" target="_blank" class="">785-670-2144</a></div>
<div style="font-size: 12px;" class=""><a href="mailto:brian.thomas@washburn.edu" target="_blank" class="">brian.thomas@washburn.edu</a></div>
<div style="font-size: 12px;" class=""><br class="">
</div>
<div style="font-size: 12px;" class="">Web: <a href="http://www.washburn.edu/faculty/bthomas/" target="_blank" class="">http://www.washburn.edu/<wbr class="">faculty/bthomas/</a></div>
<div style="font-size: 12px;" class="">
<div style="font-size: 14px;" class=""><span style="font-size: 12px;" class="">ORCID profile: <span style="text-align: -webkit-auto;" class=""><a href="http://orcid.org/0000-0001-9091-0830" target="_blank" class="">http://orcid.org/<wbr class="">0000-0001-9091-0830</a></span></span></div>
<div class="">ResearchGate profile: <a href="https://www.researchgate.net/profile/Brian_Thomas" target="_blank" class="">https://www.<wbr class="">researchgate.net/profile/<wbr class="">Brian_Thomas</a></div>
</div>
<div style="font-size: 12px;" class=""><br class="">
</div>
<div style="font-size: 12px;" class="">Department of Physics and Astronomy</div>
<div style="font-size: 12px;" class="">Washburn University</div>
<div style="font-size: 12px;" class=""><a href="https://maps.google.com/?q=1700+SW+College+Ave.%0D+Topeka,+KS+66621&entry=gmail&source=g" class="">1700 SW College Ave.</a></div>
<div style="font-size: 12px;" class=""><a href="https://maps.google.com/?q=1700+SW+College+Ave.%0D+Topeka,+KS+66621&entry=gmail&source=g" class="">Topeka, KS 66621</a></div>
<div style="font-size: 12px;" class=""><br class="m_5392318813447303527khtml-block-placeholder">
</div>
<div style="font-size: 12px;" class="">@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#<wbr class="">@#@#@#@#@#@</div>
</div>
</div>
<br class="">
</div>
</body>
</html>