parallel: Avoid using Tie::RefHash. Passes test-suite.

This commit is contained in:
Ole Tange 2014-12-26 18:31:06 +01:00
parent 4e9170978a
commit fe08937ea9
12 changed files with 171 additions and 166 deletions

View file

@ -3,7 +3,7 @@
# Copyright (C) 2004,2005,2006,2006,2008,2009,2010 Ole Tange,
# http://ole.tange.dk
#
# Copyright (C) 2010,2011,2012,2013,2014 Ole Tange,
# Copyright (C) 2010,2011,2012,2013,2014,2015 Ole Tange,
# http://ole.tange.dk and Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify

View file

@ -1,7 +1,7 @@
#!/usr/bin/env perl
# Copyright (C) 2007,2008,2009,2010,2011,2012,2013,2014 Ole Tange and
# Free Software Foundation, Inc.
# Copyright (C) 2007,2008,2009,2010,2011,2012,2013,2014,2015 Ole Tange
# and Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -951,7 +951,7 @@ sub parse_options {
sub init_globals {
# Defaults:
$Global::version = 20141212;
$Global::version = 20141225;
$Global::progname = 'parallel';
$Global::infinity = 2**31;
$Global::debug = 0;
@ -3036,7 +3036,8 @@ sub version {
}
print join("\n",
"GNU $Global::progname $Global::version",
"Copyright (C) 2007,2008,2009,2010,2011,2012,2013,2014 Ole Tange and Free Software Foundation, Inc.",
"Copyright (C) 2007,2008,2009,2010,2011,2012,2013,2014,2015 Ole Tange",
"and Free Software Foundation, Inc.",
"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>",
"This is free software: you are free to change and redistribute it.",
"GNU $Global::progname comes with no warranty.",
@ -3341,13 +3342,15 @@ sub kill_youngster_if_not_enough_mem {
# If less than 50% enough free mem: kill off the youngest child
# Put the child back in the queue.
my %jobs_of;
use Tie::RefHash;
tie %jobs_of, 'Tie::RefHash';
my @sshlogins;
for my $job (values %Global::running) {
if(not $jobs_of{$job->sshlogin()}) {
push @sshlogins, $job->sshlogin();
}
push @{$jobs_of{$job->sshlogin()}}, $job;
}
for my $sshlogin (keys %jobs_of) {
for my $sshlogin (@sshlogins) {
for my $job (sort { $b->seq() <=> $a->seq() } @{$jobs_of{$sshlogin}}) {
if($sshlogin->memfree() < $opt::memfree * 0.5) {
::debug("mem","\n",map { $_->seq()." " } (sort { $b->seq() <=> $a->seq() } @{$jobs_of{$sshlogin}}));
@ -7211,7 +7214,6 @@ sub replaced {
sort { length $b <=> length $a } keys %replace);
for(@target) {
# ::debug("replace","Replace in ",::my_dump($_));
# TODO can this be /o ?
s/($regexp)/join(" ",@{$replace{$1}})/ge;
}
}

View file

@ -1,8 +1,8 @@
#!/bin/bash
cat <<'EOF' | parallel -vj0 -k
echo "bug #43654: --bar with command not using {}"
COLUMNS=80 stdout parallel --bar true {.} ::: 1
echo "bug #43654: --bar with command not using {} - only last output line "
COLUMNS=80 stdout parallel --bar true {.} ::: 1 | perl -pe 's/.*\r/\r/'
echo "### Test --basenamereplace"
parallel -j1 -k -X --basenamereplace FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b

View file

@ -19,9 +19,9 @@ echo '### Test --halt-on-error 1'; (echo "sleep 1;true"; echo "sleep 2;false";
127
parallel: Starting no more jobs. Waiting for 2 jobs to finish. This job failed:
sleep 2;false
/bin/bash: non_exist: command not found
parallel: Starting no more jobs. Waiting for 3 jobs to finish. This job failed:
sleep 2;false
/bin/bash: non_exist: command not found
parallel: Starting no more jobs. Waiting for 1 jobs to finish. This job failed:
sleep 4; non_exist
echo '**'
@ -41,31 +41,31 @@ echo '### Test last dying print --halt-on-error 1'; (seq 0 8;echo 0; echo 9) |
exit code 9
0
1
2
3
4
5
6
7
8
0
9
parallel: Starting no more jobs. Waiting for 9 jobs to finish. This job failed:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ shift 1
2
parallel: Starting no more jobs. Waiting for 8 jobs to finish. This job failed:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ shift 2
3
parallel: Starting no more jobs. Waiting for 7 jobs to finish. This job failed:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ shift 3
4
parallel: Starting no more jobs. Waiting for 6 jobs to finish. This job failed:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ shift 4
5
parallel: Starting no more jobs. Waiting for 5 jobs to finish. This job failed:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ shift 5
6
parallel: Starting no more jobs. Waiting for 4 jobs to finish. This job failed:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ shift 6
7
parallel: Starting no more jobs. Waiting for 3 jobs to finish. This job failed:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ shift 7
8
0
parallel: Starting no more jobs. Waiting for 2 jobs to finish. This job failed:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ shift 8
9
parallel: Starting no more jobs. Waiting for 1 jobs to finish. This job failed:
perl -e sleep\ \$ARGV\[0\]\;print\ STDERR\ @ARGV,\"\\n\"\;\ exit\ shift 9
echo '### Test last dying print --halt-on-error 2'; (seq 0 8;echo 0; echo 9) | parallel -j10 -kq --halt 2 perl -e 'sleep $ARGV[0];print STDERR @ARGV,"\n"; exit shift'; echo exit code $?

View file

@ -1,7 +1,7 @@
echo "bug #43654: --bar with command not using {}"
bug #43654: --bar with command not using {}
COLUMNS=80 stdout parallel --bar true {.} ::: 1
# 0 sec 1 0 0% 0:1=0s 1  # 0 sec 1 100 100% 1:0=0s 1 
echo "bug #43654: --bar with command not using {} - only last output line "
bug #43654: --bar with command not using {} - only last output line
COLUMNS=80 stdout parallel --bar true {.} ::: 1 | perl -pe 's/.*\r/\r/'
100% 1:0=0s 1 
echo "### Test --basenamereplace"
### Test --basenamereplace
parallel -j1 -k -X --basenamereplace FOO echo FOO ::: /a/b.c a/b.c b.c /a/b a/b b

View file

@ -1,8 +1,8 @@
33802d2d7671966df3c40ddd35c56c67 -
60d6db97611d90fd01e6b4db39db99fd -
There are 6246 dirs with 6246 files
Removing files
e364fd590106adc42f4d052d1cd64b37 -
efc48d4bbb99af2d4c4a76b08c2529bb -
There are 6246 dirs with files
Removing dirs
aaee94919a2efbcf9ef00bdbfb211dc5 -
e5f7d474805e628a5dfe299713000a6a -
There are 1 dirs with files

View file

@ -477,125 +477,125 @@ find . -type f | parallel -qv --group perl -ne '/^\S+\s+\S+$/ and print $ARGV,"\
./a/bar.diff
./b/bar.diff
./b/bar.diff
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./1-col.txt
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./1-col.txt.diff
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./2-col.txt
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./2-col.txt.diff
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./\ ab/c\"d/ef\ g
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./\ ab/c\"d/ef\ g.diff
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./\ ab/c\"d/efg
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./\ ab/c\"d/efg.diff
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./\ ab\ /c\'\ d/\ ef\"g
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./\ ab\ /c\'\ d/\ ef\"g.diff
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./a/bar
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./a/bar.diff
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./a/foo
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./a/foo.diff
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./a/foo2
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./a/foo2.diff
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./a\ b/cd\ /\ ef/efg
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./a\ b/cd\ /\ ef/efg.diff
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./b/bar
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./b/bar.diff
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./b/foo
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./b/foo.diff
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9901
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9902
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9903
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9904
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9905
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9906
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9907
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9908
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9909
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9910
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9911
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9912
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9913
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9914
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9915
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9916
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9917
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9918
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9919
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9920
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9921
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9922
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9923
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9924
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9925
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9926
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9927
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9928
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9929
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9930
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9931
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9932
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9933
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9934
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9935
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9936
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9937
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9938
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9939
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9940
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9941
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9942
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9943
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9944
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9945
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9946
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9947
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9948
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9949
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9950
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9951
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9952
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9953
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9954
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9955
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9956
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9957
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9958
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9959
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9960
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9961
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9962
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9963
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9964
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9965
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9966
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9967
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9968
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9969
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9970
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9971
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9972
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9973
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9974
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9975
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9976
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9977
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9978
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9979
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9980
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9981
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9982
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9983
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9984
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9985
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9986
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9987
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9988
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9989
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9990
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9991
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9992
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9993
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9994
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9995
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9996
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9997
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9998
perl -ne /^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9999
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./1-col.txt
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./1-col.txt.diff
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./2-col.txt
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./2-col.txt.diff
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./\ ab/c\"d/ef\ g
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./\ ab/c\"d/ef\ g.diff
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./\ ab/c\"d/efg
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./\ ab/c\"d/efg.diff
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./\ ab\ /c\'\ d/\ ef\"g
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./\ ab\ /c\'\ d/\ ef\"g.diff
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./a/bar
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./a/bar.diff
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./a/foo
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./a/foo.diff
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./a/foo2
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./a/foo2.diff
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./a\ b/cd\ /\ ef/efg
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./a\ b/cd\ /\ ef/efg.diff
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./b/bar
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./b/bar.diff
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./b/foo
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./b/foo.diff
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9901
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9902
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9903
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9904
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9905
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9906
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9907
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9908
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9909
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9910
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9911
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9912
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9913
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9914
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9915
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9916
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9917
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9918
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9919
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9920
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9921
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9922
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9923
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9924
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9925
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9926
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9927
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9928
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9929
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9930
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9931
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9932
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9933
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9934
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9935
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9936
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9937
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9938
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9939
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9940
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9941
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9942
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9943
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9944
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9945
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9946
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9947
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9948
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9949
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9950
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9951
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9952
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9953
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9954
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9955
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9956
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9957
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9958
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9959
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9960
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9961
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9962
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9963
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9964
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9965
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9966
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9967
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9968
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9969
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9970
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9971
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9972
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9973
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9974
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9975
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9976
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9977
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9978
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9979
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9980
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9981
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9982
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9983
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9984
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9985
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9986
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9987
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9988
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9989
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9990
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9991
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9992
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9993
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9994
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9995
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9996
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9997
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9998
perl -ne /\^\\S+\\s+\\S+\$/\ and\ print\ \$ARGV,\"\\n\" ./more_than_5000-9999
/home/tange/privat/parallel/testsuite

View file

@ -73,8 +73,8 @@ echo '### Check that 4 processes are really used'
echo '### --version must have higher priority than retired options'
### --version must have higher priority than retired options
$NICEPAR --version -g -Y -U -W -T | tail
GNU parallel 20141212
Copyright (C) 2007,2008,2009,2010,2011,2012,2013,2014 Ole Tange and Free Software Foundation, Inc.
Copyright (C) 2007,2008,2009,2010,2011,2012,2013,2014,2015 Ole Tange
and Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
GNU parallel comes with no warranty.

View file

@ -206,12 +206,14 @@ With --plus: {} = {+/}/{/} = {.}.{+.} = {+/}/{/.}.{+.} = {..}.{+..} =
See 'man parallel' for details
Academic tradition requires you to cite works you base your article on.
When using programs that use GNU Parallel to process data for publication please cite:
O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
;login: The USENIX Magazine, February 2011:42-47.
Or you can get GNU Parallel without this requirement by paying 10000 EUR.
If you pay 10000 EUR you should feel free to use GNU Parallel without citing.
parallel: Error: Parsing of --jobs/-j/--max-procs/-P failed.
echo '### Test of -j filename'; echo 3 >/tmp/jobs_to_run1; parallel -j /tmp/jobs_to_run1 -v sleep {} ::: 10 8 6 5 4; # Should give 6 8 10 5 4
### Test of -j filename

View file

@ -51,8 +51,6 @@ job2
14
15
16
17
18
2
3
4
@ -61,10 +59,10 @@ job2
7
8
9
Running 'parallel -j0 -N9 --pipe parallel -j0' or raising ulimit -n or /etc/security/limits.conf may help.
Running 'parallel -j0 -N8 --pipe parallel -j0' or raising ulimit -n or /etc/security/limits.conf may help.
parallel: SIGTERM received. No new jobs will be started.
parallel: Waiting for these 9 jobs to finish. Send SIGTERM again to stop now.
parallel: Warning: Only enough file handles to run 9 jobs in parallel.
parallel: Waiting for these 8 jobs to finish. Send SIGTERM again to stop now.
parallel: Warning: Only enough file handles to run 8 jobs in parallel.
parallel: sleep 3; echo 10
parallel: sleep 3; echo 11
parallel: sleep 3; echo 12
@ -72,8 +70,7 @@ parallel: sleep 3; echo 13
parallel: sleep 3; echo 14
parallel: sleep 3; echo 15
parallel: sleep 3; echo 16
parallel: sleep 3; echo 17
parallel: sleep 3; echo 18
parallel: sleep 3; echo 9
### Test bug: empty line for | sh with -k
a
b

View file

@ -1,12 +1,13 @@
### Test -p --interactive
spawn /tmp/parallel-script-for-expect
Academic tradition requires you to cite works you base your article on.
When using programs that use GNU Parallel to process data for publication please cite:
O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
;login: The USENIX Magazine, February 2011:42-47.
This helps funding further development; and it won't cost you a cent.
Or you can get GNU Parallel without this requirement by paying 10000 EUR.
If you pay 10000 EUR you should feel free to use GNU Parallel without citing.
To silence this citation notice run 'parallel --bibtex' once or use '--no-notice'.
@ -15,13 +16,14 @@ sleep 0.1; echo opt-p 2 ?...n
sleep 0.1; echo opt-p 3 ?...y
opt-p 1
opt-p 3
Academic tradition requires you to cite works you base your article on.
When using programs that use GNU Parallel to process data for publication please cite:
O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
;login: The USENIX Magazine, February 2011:42-47.
This helps funding further development; and it won't cost you a cent.
Or you can get GNU Parallel without this requirement by paying 10000 EUR.
If you pay 10000 EUR you should feel free to use GNU Parallel without citing.
To silence this citation notice run 'parallel --bibtex' once or use '--no-notice'.
@ -256,13 +258,14 @@ xargs Expect: 3 1 2
1
2
parallel Expect: 3 1 via psedotty 2
Academic tradition requires you to cite works you base your article on.
When using programs that use GNU Parallel to process data for publication please cite:
O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
;login: The USENIX Magazine, February 2011:42-47.
This helps funding further development; and it won't cost you a cent.
Or you can get GNU Parallel without this requirement by paying 10000 EUR.
If you pay 10000 EUR you should feel free to use GNU Parallel without citing.
To silence this citation notice run 'parallel --bibtex' once or use '--no-notice'.
@ -275,13 +278,14 @@ xargs Expect: 1 3 2
3
2
parallel Expect: 1 3 2 via pseudotty
Academic tradition requires you to cite works you base your article on.
When using programs that use GNU Parallel to process data for publication please cite:
O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
;login: The USENIX Magazine, February 2011:42-47.
This helps funding further development; and it won't cost you a cent.
Or you can get GNU Parallel without this requirement by paying 10000 EUR.
If you pay 10000 EUR you should feel free to use GNU Parallel without citing.
To silence this citation notice run 'parallel --bibtex' once or use '--no-notice'.
@ -387,10 +391,10 @@ line 2
### Test --no-run-if-empty and -r: This should give no output
### Test --help and -h: Help output (just check we get the same amount of lines)
Output from -h and --help
33
33
35
35
### Test --version: Version output (just check we get the same amount of lines)
14
11
### Test --verbose and -t
echo bar
echo car