2014-07-15 00:40:38 +00:00
|
|
|
|
echo "### --line-buffer"
|
2014-02-17 21:25:42 +00:00
|
|
|
|
### --line-buffer
|
2015-02-01 15:57:31 +00:00
|
|
|
|
seq 10 | parallel -j20 --line-buffer 'seq {} 10 | pv -qL 10' > /tmp/parallel_l$$; seq 10 | parallel -j20 'seq {} 10 | pv -qL 10' > /tmp/parallel_$$; cat /tmp/parallel_l$$ | wc; diff /tmp/parallel_$$ /tmp/parallel_l$$ >/dev/null ; echo These must diff: $?; rm /tmp/parallel_l$$ /tmp/parallel_$$
|
2014-02-17 21:25:42 +00:00
|
|
|
|
55 55 120
|
|
|
|
|
These must diff: 1
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo "### --pipe --line-buffer"
|
2014-02-16 20:53:15 +00:00
|
|
|
|
### --pipe --line-buffer
|
2015-02-01 15:57:31 +00:00
|
|
|
|
seq 200| parallel -N10 -L1 --pipe -j20 --line-buffer --tagstring {#} pv -qL 10 > /tmp/parallel_pl$$; seq 200| parallel -N10 -L1 --pipe -j20 --tagstring {#} pv -qL 10 > /tmp/parallel_p$$; cat /tmp/parallel_pl$$ | wc; diff /tmp/parallel_p$$ /tmp/parallel_pl$$ >/dev/null ; echo These must diff: $?; rm /tmp/parallel_pl$$ /tmp/parallel_p$$
|
2014-02-16 20:53:15 +00:00
|
|
|
|
200 400 1202
|
|
|
|
|
These must diff: 1
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo "### --pipe --line-buffer --compress"
|
2014-02-22 10:05:59 +00:00
|
|
|
|
### --pipe --line-buffer --compress
|
2014-07-15 00:40:38 +00:00
|
|
|
|
seq 200| parallel -N10 -L1 --pipe -j20 --line-buffer --compress --tagstring {#} pv -qL 10 | wc
|
2014-02-22 10:05:59 +00:00
|
|
|
|
200 400 1202
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo "### bug #41482: --pipe --compress blocks at different -j/seq combinations"
|
2014-02-17 21:25:42 +00:00
|
|
|
|
### bug #41482: --pipe --compress blocks at different -j/seq combinations
|
2014-07-15 00:40:38 +00:00
|
|
|
|
seq 1 | parallel -k -j2 --compress -N1 -L1 --pipe cat; echo echo 1-4 + 1-4
|
2014-02-17 21:25:42 +00:00
|
|
|
|
1
|
|
|
|
|
echo 1-4 + 1-4
|
2014-07-15 00:40:38 +00:00
|
|
|
|
seq 4 | parallel -k -j3 --compress -N1 -L1 -vv echo; echo 4 times wc to stderr to stdout
|
2014-02-17 21:25:42 +00:00
|
|
|
|
echo 1
|
|
|
|
|
1
|
|
|
|
|
echo 2
|
|
|
|
|
2
|
|
|
|
|
echo 3
|
|
|
|
|
3
|
|
|
|
|
echo 4
|
|
|
|
|
4
|
|
|
|
|
4 times wc to stderr to stdout
|
2014-07-15 00:40:38 +00:00
|
|
|
|
(seq 4 | parallel -k -j3 --compress -N1 -L1 --pipe wc '>&2') 2>&1 >/dev/null
|
2014-02-17 21:25:42 +00:00
|
|
|
|
1 1 2
|
|
|
|
|
1 1 2
|
|
|
|
|
1 1 2
|
|
|
|
|
1 1 2
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo 1 2 3 4
|
2014-02-17 21:25:42 +00:00
|
|
|
|
1 2 3 4
|
2014-07-15 00:40:38 +00:00
|
|
|
|
seq 4 | parallel -k -j3 --compress echo; echo 1 2 3 4
|
2014-02-17 21:25:42 +00:00
|
|
|
|
1
|
|
|
|
|
2
|
|
|
|
|
3
|
|
|
|
|
4
|
|
|
|
|
1 2 3 4
|
2014-07-15 00:40:38 +00:00
|
|
|
|
seq 4 | parallel -k -j1 --compress echo; echo 1 2
|
2014-02-17 21:25:42 +00:00
|
|
|
|
1
|
|
|
|
|
2
|
|
|
|
|
3
|
|
|
|
|
4
|
|
|
|
|
1 2
|
2014-07-15 00:40:38 +00:00
|
|
|
|
seq 2 | parallel -k -j1 --compress echo; echo 1 2 3
|
2014-02-17 21:25:42 +00:00
|
|
|
|
1
|
|
|
|
|
2
|
|
|
|
|
1 2 3
|
2014-07-15 00:40:38 +00:00
|
|
|
|
seq 3 | parallel -k -j2 --compress -N1 -L1 --pipe cat; echo "### bug #41609: --compress fails"
|
2014-02-17 21:25:42 +00:00
|
|
|
|
1
|
|
|
|
|
2
|
|
|
|
|
3
|
2014-02-16 20:53:15 +00:00
|
|
|
|
### bug #41609: --compress fails
|
2014-07-15 00:40:38 +00:00
|
|
|
|
seq 12 | parallel --compress --compress-program bzip2 -k seq {} 1000000 | md5sum
|
2014-02-16 17:57:57 +00:00
|
|
|
|
24812dd0f24a26d08a780f988b9d5ad2 -
|
2014-07-15 00:40:38 +00:00
|
|
|
|
seq 12 | parallel --compress -k seq {} 1000000 | md5sum
|
2014-02-16 17:57:57 +00:00
|
|
|
|
24812dd0f24a26d08a780f988b9d5ad2 -
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo "### --compress race condition (use nice): Fewer than 400 would run"
|
2014-02-21 03:07:56 +00:00
|
|
|
|
### --compress race condition (use nice): Fewer than 400 would run
|
2014-07-15 00:40:38 +00:00
|
|
|
|
seq 400| nice parallel -j200 --compress echo | wc
|
2014-02-21 03:07:56 +00:00
|
|
|
|
400 400 1492
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo "### -v --pipe: Dont spawn too many - 1 is enough"
|
2014-02-21 03:07:56 +00:00
|
|
|
|
### -v --pipe: Dont spawn too many - 1 is enough
|
2014-07-15 00:40:38 +00:00
|
|
|
|
seq 1 | parallel -j10 -v --pipe cat
|
2014-02-21 03:07:56 +00:00
|
|
|
|
cat
|
|
|
|
|
1
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo "### Test -N0 and --tagstring (fails)"
|
2014-02-22 10:05:59 +00:00
|
|
|
|
### Test -N0 and --tagstring (fails)
|
2014-07-15 00:40:38 +00:00
|
|
|
|
echo tagstring arg | parallel --tag -N0 echo foo
|
2015-05-25 00:27:30 +00:00
|
|
|
|
|