[英]GNU parallel not spawning jobs
After an upgrade to Debian 8.6 Jessie the GNU parallel script suddenly stopped parallelizing to more than 2 jobs with the --pipe and -L options. 在升级到Debian 8.6 Jessie之后,GNU并行脚本突然停止使用--pipe和-L选项并行处理两个以上的作业。
Before the upgrade the command: 在升级之前命令:
cat file_with_1064_lines.txt | parallel -L10 -j5 -k -v --pipe "wc -l"
spawned 5 processes, which output this: 产生5个进程,输出:
wc -l 10 wc -l 10 ...
The same command after the upgrade: 升级后的命令相同:
wc -l 1060 wc -l 4
(The two values above change with respect to the -L option value -- the first is L*floor(1064/L)
and the second is 1064 mod L
, but there always only two processes outputting.) (上面的两个值相对于-L选项值更改 - 第一个是L*floor(1064/L)
,第二个是1064 mod L
,但总是只有两个进程输出。)
The same is observed independently of the parallel version (tested the latest and one from 2013). 独立于并行版本观察到同样的情况(测试了最新的和2013年的一个)。
PS. PS。
$ uname -a Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64 GNU/Linux $ parallel --version GNU parallel 20161222
-L is the record size. -L是记录大小。 The bug was fixed around 20130122. What you want is to read 1 record of 10 lines: 该错误是在20130122左右修复的。你想要的是读取10行的1条记录:
parallel -L10 -N1 -j5 -k -v --pipe wc -l
or 10 records of 1 line: 或10行1行记录:
parallel -L1 -N10 -j5 -k -v --pipe wc -l
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.