diff --git a/README.md b/README.md index fc07abb..03e76a1 100644 --- a/README.md +++ b/README.md @@ -119,3 +119,28 @@ Completed SLURM job 2339009 in 00:00:04 Started SLURM job 2339010 Completed SLURM job 2339010 in 00:00:00 ``` + +### Example 3: Parameter Sweep + +A parameter sweep is running the same program with combinations of +input parameters. + +This example is nearly the same as the previous example, but instead +of using the the task ID as the input, it uses a long list of record +IDs. The record ID is read by the program to find the corresponding +input parameters, and saves the result. + +Results are saved into a directory and, once all records are +completed, the results are aggregated into a single results file. + +GNU Parallel automatically feeds record IDs to task workers as the +task workers complete records and become available. + +```sh +# From the command-line +cd ~/parallel-slurm/examples +rm -f joblog submit.out +for i in {1..5}; do sbatch 03-submit-param-sweep.slurm; done +touch submit.out && tail -f submit.out +# Hit Ctrl+C to exit +```