Wed 10 Aug 2016 02:59:00 AM UTC, original submission:
This is a late bug submission based on this email thread:
https://lists.gnu.org/archive/html/parallel/2014-09/msg00002.html
Docs imply it should work as I expect, right? I might be misunderstanding and need to use "--semaphore".
https://www.gnu.org/software/parallel/man.html
There will never be 2 jobs running at the same time with the same job slot number.
But the jobs (A,x) and (A,y) start at the same time in the same job slot:
# parallel -j 2 'foo {1} {2} {%}' ::: A B C ::: x y
START: on server 1 at 2016-08-10T02:53:35Z (A,x)
FINISH: on server 1 at 2016-08-10T02:53:45Z (A,x)
START: on server 1 at 2016-08-10T02:53:35Z (A,y)
FINISH: on server 1 at 2016-08-10T02:53:45Z (A,y)
START: on server 1 at 2016-08-10T02:53:45Z (B,x)
FINISH: on server 1 at 2016-08-10T02:53:55Z (B,x)
START: on server 1 at 2016-08-10T02:53:45Z (B,y)
FINISH: on server 1 at 2016-08-10T02:53:55Z (B,y)
START: on server 2 at 2016-08-10T02:53:55Z (C,x)
FINISH: on server 2 at 2016-08-10T02:54:05Z (C,x)
START: on server 2 at 2016-08-10T02:53:55Z (C,y)
FINISH: on server 2 at 2016-08-10T02:54:05Z (C,y)
The foo bash function just outputs the "variables", job slot number, and sleeps for 10 seconds.
# foo() { echo "START: on server $3 at $(date -u +'%Y-%m-%dT%H:%M:%SZ') ($1,$2)" ; sleep 10 ; echo "FINISH: on server $3 at $(date -u +'%Y-%m-%dT%H:%M:%SZ') ($1,$2)" ; }
# export -f
Sorry I am using an older version, but I'm having other problems with latest, and I don't think this has ever worked right.
# parallel --version
GNU parallel 20150522
|