SCR caches checkpoint data in storage on the compute nodes of a Linux cluster to provide a fast, scalable checkpoint / restart capability for MPI codes.
In our original implementation of the python SCR job scripts, our goal was to directly convert from bash/perl to python. This allowed for the quickest workable conversion, and it also enables one to swap in the new python scripts in a piecemeal fashion if needed. Now that this is complete, the next step is to refresh the scripts to be more pythonic.
For example, since the earlier scripts combined bash and perl, the commands often communicated via output strings and return codes. There are many spots where we compress a list of hosts into a string, only to expand it back from a string to a list of nodes. With everything being python, we can simplify and just keep this as a python list, until it is really needed as a string. Similarly, we could raise python exceptions when things go wrong, instead of having the caller check whether the return code is 0 or 1.
In other cases, we might convert for loops into list comprehensions. It may be useful to convert comments to docstrings, etc.
In our original implementation of the python SCR job scripts, our goal was to directly convert from bash/perl to python. This allowed for the quickest workable conversion, and it also enables one to swap in the new python scripts in a piecemeal fashion if needed. Now that this is complete, the next step is to refresh the scripts to be more pythonic.
For example, since the earlier scripts combined bash and perl, the commands often communicated via output strings and return codes. There are many spots where we compress a list of hosts into a string, only to expand it back from a string to a list of nodes. With everything being python, we can simplify and just keep this as a python list, until it is really needed as a string. Similarly, we could raise python exceptions when things go wrong, instead of having the caller check whether the return code is 0 or 1.
In other cases, we might convert for loops into list comprehensions. It may be useful to convert comments to docstrings, etc.