parallel
[Top][All Lists]
Advanced

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

Re: Avoiding cross product of lists


From: Rob Sargent
Subject: Re: Avoiding cross product of lists
Date: Wed, 25 Jun 2014 19:58:54 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

On 06/25/2014 07:33 PM, Ole Tange wrote:
On Wed, Jun 25, 2014 at 8:20 PM, Rob Sargent <robjsargent@gmail.com> wrote:
I cannot find an example of supplying two arguments from lists which does
not result in the cross product of the two lists.
p1 uses c1 c2 c3
p2 uses c4 c7
p3 uses c1 c5 c9

I cannot construct a parallel command which accomplishes the task of running
my programme J 8 times as:
J p1 c1
J p1 c2
J p1 c3
J p2 c4
J p2 c7
J p3 c1
J p3 c5
j p3 c9

Is there such a construct?
Either use --xapply or --colsep:

parallel --xapply --dryrun J ::: p1 p1 p1 p2 p2 p3 p3 p3 ::: c1 c2 c3
c4 c7 c1 c5 c9

input.tsv:
p1 c1
p1 c2
p1 c3
p2 c4
p2 c7
p3 c1
p3 c5
p3 c9

parallel --colsep ' ' -a input.tsv --dryrun J


/Ole
Thank you

reply via email to

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