Bureaucrats, cc_docs_admin, cc_staff
2,306
edits
No edit summary |
No edit summary |
||
Line 56: | Line 56: | ||
==Keeping Track of Completed and Failed Commands, and Restart Capabilities== <!--T:11--> | ==Keeping Track of Completed and Failed Commands, and Restart Capabilities== <!--T:11--> | ||
You can tell Gnu Parallel to keep track of which commands have completed by using the <tt>--joblog JOBLOGFILE</tt> argument. The file JOBLOGFILE will contain the list of completed commands, their start times, durations, hosts, and exit values. | You can tell Gnu Parallel to keep track of which commands have completed by using the <tt>--joblog JOBLOGFILE</tt> argument. The file JOBLOGFILE will contain the list of completed commands, their start times, durations, hosts, and exit values. For example, | ||
{{Command|ls *.txt {{!}} parallel --joblog gzip.log gzip {{(}}{{)}} }} | {{Command|ls *.txt {{!}} parallel --joblog gzip.log gzip {{(}}{{)}} }} | ||
<!--T:12--> | <!--T:12--> | ||
The job log functionality opens the door to a number of possible restart options. If the <tt>parallel</tt> command was interrupted (e.g. your job ran longer than the requested walltime of a job), you can make it pick up where it left off using the <tt>--resume</tt> option, | The job log functionality opens the door to a number of possible restart options. If the <tt>parallel</tt> command was interrupted (e.g. your job ran longer than the requested walltime of a job), you can make it pick up where it left off using the <tt>--resume</tt> option, for instance | ||
{{Command|ls *.txt {{!}} parallel --resume --joblog gzip.log gzip {{(}}{{)}} }} | {{Command|ls *.txt {{!}} parallel --resume --joblog gzip.log gzip {{(}}{{)}} }} | ||
The new jobs will be appended to the old log file. | The new jobs will be appended to the old log file. | ||
<!--T:13--> | <!--T:13--> | ||
If some of the subcommands failed (i.e. | If some of the subcommands failed (i.e. they produced a non-zero exit code), and you have think that you have eliminated the source of the error, you can re-run the failed ones, using the <tt>--resume-failed</tt>, e.g. | ||
{{Command|ls *.txt {{!}} parallel --resume-failed --joblog gzip.log gzip {{(}}{{)}} }} | {{Command|ls *.txt {{!}} parallel --resume-failed --joblog gzip.log gzip {{(}}{{)}} }} | ||
Note that this will also start subjobs that were not considered before. | |||
</translate> | </translate> |