parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

--round-robin and --keep-order with --pipe


From: Ole Tange
Subject: --round-robin and --keep-order with --pipe
Date: Sat, 10 Aug 2013 23:50:21 +0200

It is pretty clear what the output wanted is from this:

  seq 10 | parallel --pipe -L1 --block 3 --keep-order cat

But how about this:

  seq 10 | parallel --round-robin --pipe -L1 --block 3 --keep-order cat

--round-robin will start a job for each cpu and pass a block to each
job - starting over if there are still more blocks to pass.  That
means the output will depend on which job got which block:

  seq 10 | parallel --round-robin --pipe -L1 --block 3 --keep-order
--tagstring {#} cat

1       1
1       4
1       7
1       10
2       2
2       3
2       5
2       6
2       8
2       9

As you can see the input is mixed up heavily and therefore I do not
see it makes much sense to run --keep-order and --round-robin
together. Can you find a situation in which it would make sense?

I am considering letting --round-robin become default for --pipe, and
let --keep-order mean --not-round-robin.

That will mean that the default will not start one job per block, but
instead on job per CPU. Only when running --keep-order a job per block
will be started - and the order of the output will be fixed.

Can you find situations where this change of default will cause problems?


/Ole



reply via email to

[Prev in Thread] Current Thread [Next in Thread]