[ncl-talk] Limiting the number of CPUs when running NCL scripts

Herb, Jason jherb at albany.edu
Sat Jun 27 11:26:56 MDT 2020


Hello,

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...

#!/bin/bash
#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
ncl_filedump MCD19A2.A2002001.h12v04.006.2018016140659.pscs_000501413482.hdf > ncldump2002001.txt
ncl_filedump MCD19A2.A2002002.h12v04.006.2018016140659.pscs_000501413482.hdf > ncldump2002002.txt
ncl_filedump MCD19A2.A2002003.h12v04.006.2018016140700.pscs_000501413482.hdf > ncldump2002003.txt
ncl_filedump MCD19A2.A2002004.h12v04.006.2018016140701.pscs_000501413482.hdf > ncldump2002004.txt
ncl_filedump MCD19A2.A2002005.h12v04.006.2018016140702.pscs_000501413482.hdf > ncldump2002005.txt
ncl_filedump MCD19A2.A2002006.h12v04.006.2018016140702.pscs_000501413482.hdf > ncldump2002006.txt
.
.
ncl_filedump MCD19A2.A2002365.h12v04.006.2018018154414.pscs_000501413482.hdf > ncldump2002365.txt

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.

Thanks,
Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200627/17075f95/attachment.html>


More information about the ncl-talk mailing list