bug-parallel
[Top][All Lists]
Advanced

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

Re: GNU Parallel Bug Reports Distribution of args skewed on input run wi


From: Ole Tange
Subject: Re: GNU Parallel Bug Reports Distribution of args skewed on input run with -X -j 4.
Date: Wed, 28 Jun 2017 03:28:17 +0200

On Tue, Jun 27, 2017 at 9:51 PM, Henrik Mühe <address@hidden> wrote:
> This was observed both in
>
> GNU parallel 20130922
>
> as well as
>
> GNU parallel 20170622
>
> Repro is for the latter (2017 version), the only difference is the
> count given in tail that triggers the behavior between the two
> versions.

We can minimize your examples to:

$ seq 12000 | parallel-20170622 -X -j 4 "echo {} |wc -w"
3000
3000
3000
3000
$ seq 13000 | parallel-20170622 -X -j 4 "echo {} |wc -w"
12769
58
58
58
57

This is exactly the behaviour that is shown in:
https://www.gnu.org/software/parallel/parallel_tutorial.html#More-than-one-argument

"""
For better parallelism GNU parallel can distribute the arguments
between all the parallel jobs when end of file is met.

Below GNU parallel reads the last argument when generating the second
job. When GNU parallel reads the last argument, it spreads all the
arguments for the second job over 4 jobs instead, as 4 parallel jobs
are requested.

The first job will be the same as the --xargs example above, but the
second job will be split into 4 evenly sized jobs, resulting in a
total of 5 jobs:

  cat num30000 | parallel --jobs 4 -m echo | wc -l
  5
"""

/Ole



reply via email to

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