Tue 20 Nov 2012 07:44:28 AM UTC, original submission:
This report is related to #37779.
When called with both --header and --results, parallel stores job outputs in result files named according to the their corresponding input values. For example:
./parallel --results foo_ --header : myprog -b {b} -a {a} ::: b 2 ::: a 1
generates the result file:
foo_stdout?b?2?a?1
This example illustrates a fairly vanilla use of the --results option: calling a program with various combinations of command line options. Since many programs are insensitive to the order of their options, it would be nice to be able to tell parallel to generate the same result file name for each of these two commands*:
myprog -b {b} -a {a}
myprog -a {a} -b {b}
A natural choice would be to add an option (e.g., --sort-args) that would sort the arguments according to their header values prior to generating the result file name. If --header was not specified, --sort-args would have no effect.
Personally, I would find this useful because I sometimes rerun commands with the same command line options and expect the output to overwrite the previous result files. Under current behavior, I have to be careful to specify the arguments/input sources in the same order, otherwise I end up with multiple, differing result files containing the same information (relative to my program) in their file names.
- Note: under current behavior, it is the order of the input sources rather than the substitution strings in the command that determines the output file name (see #37779).
|