mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-29 09:27:56 +00:00
testsuite: reorg. Passes testsuite.
This commit is contained in:
parent
17a50e3354
commit
58fc7e7c7c
|
@ -232,6 +232,10 @@ Haiku of the month:
|
||||||
|
|
||||||
New in this release:
|
New in this release:
|
||||||
|
|
||||||
|
* niceload --net
|
||||||
|
|
||||||
|
*
|
||||||
|
|
||||||
* Vote for GNU Parallel's community ad on https://meta.askubuntu.com/questions/14925/community-promotion-ads-2016/15046#15046
|
* Vote for GNU Parallel's community ad on https://meta.askubuntu.com/questions/14925/community-promotion-ads-2016/15046#15046
|
||||||
|
|
||||||
* << kontakt GNU Parallel was used (unfortunately without citation) in: Instrumentation and Trace Analysis for Ad-hoc Python Workflows in Cloud Environments http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=7214035>>
|
* << kontakt GNU Parallel was used (unfortunately without citation) in: Instrumentation and Trace Analysis for Ad-hoc Python Workflows in Cloud Environments http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=7214035>>
|
||||||
|
|
45
src/parallel
45
src/parallel
|
@ -5937,9 +5937,9 @@ sub cleanup_cmd {
|
||||||
$dir .= $_."/";
|
$dir .= $_."/";
|
||||||
unshift @rmdir, ::shell_quote_file($dir);
|
unshift @rmdir, ::shell_quote_file($dir);
|
||||||
}
|
}
|
||||||
my $rmdir = @rmdir ? "sh -c 'rmdir @rmdir 2>/dev/null';" : "";
|
my $rmdir = @rmdir ? "sh -c ".::shell_quote_scalar("rmdir @rmdir 2>/dev/null;") : "";
|
||||||
if(defined $opt::workdir and $opt::workdir eq "...") {
|
if(defined $opt::workdir and $opt::workdir eq "...") {
|
||||||
$rmdir .= "rm -rf " . ::shell_quote_file($workdir).';';
|
$rmdir .= ::shell_quote_scalar("rm -rf " . ::shell_quote_file($workdir).';');
|
||||||
}
|
}
|
||||||
|
|
||||||
$f = ::shell_quote_file($f);
|
$f = ::shell_quote_file($f);
|
||||||
|
@ -7565,24 +7565,6 @@ sub start {
|
||||||
my ($stdin_fh) = ::gensym();
|
my ($stdin_fh) = ::gensym();
|
||||||
$pid = open3_setpgrp($stdin_fh,$stdout_fh,$stderr_fh,$command);
|
$pid = open3_setpgrp($stdin_fh,$stdout_fh,$stderr_fh,$command);
|
||||||
$job->set_fh(0,"w",$stdin_fh);
|
$job->set_fh(0,"w",$stdin_fh);
|
||||||
} elsif ($opt::tty and not $Global::tty_taken and -c "/dev/tty" and
|
|
||||||
open(my $devtty_fh, "<", "/dev/tty")) {
|
|
||||||
# Give /dev/tty to the command if no one else is using it
|
|
||||||
# The eval is needed to catch exception from open3
|
|
||||||
eval {
|
|
||||||
no warnings;
|
|
||||||
local (*IN) = $devtty_fh;
|
|
||||||
local (*OUT,*ERR);
|
|
||||||
open OUT, '>&', $stdout_fh or ::die_bug("Can't dup STDOUT: $!");
|
|
||||||
open ERR, '>&', $stderr_fh or ::die_bug("Can't dup STDERR: $!");
|
|
||||||
$pid = ::open3("<&IN", ">&OUT", ">&ERR",
|
|
||||||
"exec $Global::shell -c ".
|
|
||||||
::shell_quote_scalar($command)) ||
|
|
||||||
::die_bug("open3-/dev/tty");
|
|
||||||
$Global::tty_taken = $pid;
|
|
||||||
close $devtty_fh;
|
|
||||||
1;
|
|
||||||
};
|
|
||||||
} elsif(@opt::a and not $Global::stdin_in_opt_a and $job->seq() == 1
|
} elsif(@opt::a and not $Global::stdin_in_opt_a and $job->seq() == 1
|
||||||
and $job->sshlogin()->string() eq ":") {
|
and $job->sshlogin()->string() eq ":") {
|
||||||
# Give STDIN to the first job if using -a (but only if running
|
# Give STDIN to the first job if using -a (but only if running
|
||||||
|
@ -7603,6 +7585,25 @@ sub start {
|
||||||
# Re-open to avoid complaining
|
# Re-open to avoid complaining
|
||||||
open(STDIN, "<&", $Global::original_stdin)
|
open(STDIN, "<&", $Global::original_stdin)
|
||||||
or ::die_bug("dup-\$Global::original_stdin: $!");
|
or ::die_bug("dup-\$Global::original_stdin: $!");
|
||||||
|
|
||||||
|
} elsif ($opt::tty and not $Global::tty_taken and -c "/dev/tty" and
|
||||||
|
open(my $devtty_fh, "<", "/dev/tty")) {
|
||||||
|
# Give /dev/tty to the command if no one else is using it
|
||||||
|
# The eval is needed to catch exception from open3
|
||||||
|
eval {
|
||||||
|
no warnings;
|
||||||
|
local (*IN) = $devtty_fh;
|
||||||
|
local (*OUT,*ERR);
|
||||||
|
open OUT, '>&', $stdout_fh or ::die_bug("Can't dup STDOUT: $!");
|
||||||
|
open ERR, '>&', $stderr_fh or ::die_bug("Can't dup STDERR: $!");
|
||||||
|
$pid = ::open3("<&IN", ">&OUT", ">&ERR",
|
||||||
|
"exec $Global::shell -c ".
|
||||||
|
::shell_quote_scalar($command)) ||
|
||||||
|
::die_bug("open3-/dev/tty");
|
||||||
|
$Global::tty_taken = $pid;
|
||||||
|
close $devtty_fh;
|
||||||
|
1;
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
$pid = open3_setpgrp(::gensym(),$stdout_fh,$stderr_fh,$command);
|
$pid = open3_setpgrp(::gensym(),$stdout_fh,$stderr_fh,$command);
|
||||||
}
|
}
|
||||||
|
@ -9160,7 +9161,9 @@ sub is_acceptable_command_line_length {
|
||||||
# 0 if the command line length is too long
|
# 0 if the command line length is too long
|
||||||
# 1 otherwise
|
# 1 otherwise
|
||||||
my $len = shift;
|
my $len = shift;
|
||||||
$len += length $ENV{PARALLEL_ENV} + (-s $ENV{PARALLEL_ENV})*2;
|
if($ENV{PARALLEL_ENV}) {
|
||||||
|
$len += length $ENV{PARALLEL_ENV} + (-s $ENV{PARALLEL_ENV})*2;
|
||||||
|
}
|
||||||
::qqx("true "."x"x$len);
|
::qqx("true "."x"x$len);
|
||||||
::debug("init", "$len=$? ");
|
::debug("init", "$len=$? ");
|
||||||
return not $?;
|
return not $?;
|
||||||
|
|
|
@ -1824,7 +1824,8 @@ An I<sshlogin> is of the form:
|
||||||
|
|
||||||
[sshcommand [options]] [username@]hostname
|
[sshcommand [options]] [username@]hostname
|
||||||
|
|
||||||
The sshlogin must not require a password.
|
The sshlogin must not require a password (B<ssh-agent>,
|
||||||
|
B<ssh-copy-id>, and B<sshpass> may help with that).
|
||||||
|
|
||||||
The sshlogin ':' is special, it means 'no ssh' and will therefore run
|
The sshlogin ':' is special, it means 'no ssh' and will therefore run
|
||||||
on the local computer.
|
on the local computer.
|
||||||
|
@ -2903,7 +2904,7 @@ If a line matches multiple regexps, the line may be duplicated.
|
||||||
|
|
||||||
To run commands on a remote computer SSH needs to be set up and you
|
To run commands on a remote computer SSH needs to be set up and you
|
||||||
must be able to login without entering a password (The commands
|
must be able to login without entering a password (The commands
|
||||||
B<ssh-copy-id> and B<ssh-agent> may help you do that).
|
B<ssh-copy-id>, B<ssh-agent>, and B<sshpass> may help you do that).
|
||||||
|
|
||||||
If you need to login to a whole cluster, you typically do not want to
|
If you need to login to a whole cluster, you typically do not want to
|
||||||
accept the host key for every host. You want to accept them the first
|
accept the host key for every host. You want to accept them the first
|
||||||
|
|
|
@ -10,7 +10,7 @@ export TIMEOUT=$MAX_SEC_PER_TEST
|
||||||
run_test() {
|
run_test() {
|
||||||
script="$1"
|
script="$1"
|
||||||
base=`basename "$script" .sh`
|
base=`basename "$script" .sh`
|
||||||
export TMPDIR=/tmp/"$base"
|
export TMPDIR=/tmp/"$base"-tmpdir
|
||||||
mkdir -p "$TMPDIR"
|
mkdir -p "$TMPDIR"
|
||||||
if [ "$TRIES" = "3" ] ; then
|
if [ "$TRIES" = "3" ] ; then
|
||||||
# Try 3 times
|
# Try 3 times
|
||||||
|
|
|
@ -15,9 +15,9 @@ export PID3=$!
|
||||||
echo '### multiple -p'
|
echo '### multiple -p'
|
||||||
stdout /usr/bin/time -f %e niceload -l 9 -H -p $PID1 -p $PID2 -p $PID3 | perl -ne '$_ > 5 and print "Multiple -p OK\n"' &
|
stdout /usr/bin/time -f %e niceload -l 9 -H -p $PID1 -p $PID2 -p $PID3 | perl -ne '$_ > 5 and print "Multiple -p OK\n"' &
|
||||||
|
|
||||||
/tmp/mysleep 2 &
|
/tmp/mysleep 4 &
|
||||||
/tmp/mysleep 2 &
|
/tmp/mysleep 4 &
|
||||||
/tmp/mysleep 2 &
|
/tmp/mysleep 4 &
|
||||||
echo '### --prg'
|
echo '### --prg'
|
||||||
stdout /usr/bin/time -f %e niceload -l 8 -H --prg /tmp/mysleep | perl -ne '$_ > 5 and print "--prg OK\n"'
|
stdout /usr/bin/time -f %e niceload -l 8 -H --prg /tmp/mysleep | perl -ne '$_ > 8 and print "--prg OK\n"'
|
||||||
rm /tmp/mysleep
|
rm /tmp/mysleep
|
||||||
|
|
|
@ -17,9 +17,10 @@ export SMALLDISK
|
||||||
) >/dev/null 2>/dev/null
|
) >/dev/null 2>/dev/null
|
||||||
|
|
||||||
|
|
||||||
|
# Test amount of parallelization
|
||||||
|
# parallel --shuf --jl /tmp/myjl -j1 'export JOBS={1};'bash tests-to-run/parallel-local-0.3s.sh ::: {1..16} ::: {1..5}
|
||||||
|
|
||||||
|
cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -vj13 -k --joblog /tmp/jl-`basename $0` -L1
|
||||||
cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -vj8 -k --joblog /tmp/jl-`basename $0` -L1
|
|
||||||
echo '### Test bug #45619: "--halt" erroneous error exit code (should give 0)';
|
echo '### Test bug #45619: "--halt" erroneous error exit code (should give 0)';
|
||||||
seq 10 | parallel --halt now,fail=1 true;
|
seq 10 | parallel --halt now,fail=1 true;
|
||||||
echo $?
|
echo $?
|
||||||
|
@ -104,64 +105,6 @@ cat /dev/zero >$SMALLDISK/out;
|
||||||
|
|
||||||
echo '**'
|
echo '**'
|
||||||
|
|
||||||
echo '### bug #44546: If --compress-program fails: fail'
|
|
||||||
parallel --line-buffer --compress-program false echo \;ls ::: /no-existing; echo $?
|
|
||||||
parallel --tag --line-buffer --compress-program false echo \;ls ::: /no-existing; echo $?
|
|
||||||
(parallel --files --tag --line-buffer --compress-program false echo \;sleep 1\;ls ::: /no-existing; echo $?) | tail -n1
|
|
||||||
parallel --tag --compress-program false echo \;ls ::: /no-existing; echo $?
|
|
||||||
parallel --line-buffer --compress-program false echo \;ls ::: /no-existing; echo $?
|
|
||||||
parallel --compress-program false echo \;ls ::: /no-existing; echo $?
|
|
||||||
|
|
||||||
echo 'bug #41613: --compress --line-buffer - no newline';
|
|
||||||
echo 'pipe compress tagstring'
|
|
||||||
perl -e 'print "O"'| parallel --compress --tagstring {#} --pipe --line-buffer cat; echo "K"
|
|
||||||
echo 'pipe compress notagstring'
|
|
||||||
perl -e 'print "O"'| parallel --compress --pipe --line-buffer cat; echo "K"
|
|
||||||
echo 'pipe nocompress tagstring'
|
|
||||||
perl -e 'print "O"'| parallel --tagstring {#} --pipe --line-buffer cat; echo "K"
|
|
||||||
echo 'pipe nocompress notagstring'
|
|
||||||
perl -e 'print "O"'| parallel --pipe --line-buffer cat; echo "K"
|
|
||||||
echo 'nopipe compress tagstring'
|
|
||||||
parallel --compress --tagstring {#} --line-buffer echo {} O ::: -n; echo "K"
|
|
||||||
echo 'nopipe compress notagstring'
|
|
||||||
parallel --compress --line-buffer echo {} O ::: -n; echo "K"
|
|
||||||
echo 'nopipe nocompress tagstring'
|
|
||||||
parallel --tagstring {#} --line-buffer echo {} O ::: -n; echo "K"
|
|
||||||
echo 'nopipe nocompress notagstring'
|
|
||||||
parallel --line-buffer echo {} O ::: -n; echo "K"
|
|
||||||
|
|
||||||
echo 'Compress with failing (de)compressor'
|
|
||||||
parallel -k --tag --compress --compress-program 'cat;true' --decompress-program 'cat;true' echo ::: tag true true
|
|
||||||
parallel -k --tag --compress --compress-program 'cat;false' --decompress-program 'cat;true' echo ::: tag false true
|
|
||||||
parallel -k --tag --compress --compress-program 'cat;false' --decompress-program 'cat;false' echo ::: tag false false
|
|
||||||
parallel -k --tag --compress --compress-program 'cat;true' --decompress-program 'cat;false' echo ::: tag true false
|
|
||||||
parallel -k --compress --compress-program 'cat;true' --decompress-program 'cat;true' echo ::: true true
|
|
||||||
parallel -k --compress --compress-program 'cat;false' --decompress-program 'cat;true' echo ::: false true
|
|
||||||
parallel -k --compress --compress-program 'cat;false' --decompress-program 'cat;false' echo ::: false false
|
|
||||||
parallel -k --compress --compress-program 'cat;true' --decompress-program 'cat;false' echo ::: true false
|
|
||||||
parallel -k --line-buffer --compress --compress-program 'cat;true' --decompress-program 'cat;true' echo ::: line-buffer true true
|
|
||||||
parallel -k --line-buffer --compress --compress-program 'cat;false' --decompress-program 'cat;true' echo ::: line-buffer false true
|
|
||||||
parallel -k --line-buffer --compress --compress-program 'cat;false' --decompress-program 'cat;false' echo ::: line-buffer false false
|
|
||||||
parallel -k --tag --line-buffer --compress --compress-program 'cat;true' --decompress-program 'cat;false' echo ::: tag line-buffer true false
|
|
||||||
parallel -k --tag --line-buffer --compress --compress-program 'cat;true' --decompress-program 'cat;true' echo ::: tag line-buffer true true
|
|
||||||
parallel -k --tag --line-buffer --compress --compress-program 'cat;false' --decompress-program 'cat;true' echo ::: tag line-buffer false true
|
|
||||||
parallel -k --tag --line-buffer --compress --compress-program 'cat;false' --decompress-program 'cat;false' echo ::: tag line-buffer false false
|
|
||||||
parallel -k --tag --line-buffer --compress --compress-program 'cat;true' --decompress-program 'cat;false' echo ::: tag line-buffer true false
|
|
||||||
parallel -k --files --compress --compress-program 'cat;true' --decompress-program 'cat;true' echo ::: files true true | parallel rm
|
|
||||||
parallel -k --files --compress --compress-program 'cat;false' --decompress-program 'cat;true' echo ::: files false true | parallel rm
|
|
||||||
parallel -k --files --compress --compress-program 'cat;false' --decompress-program 'cat;false' echo ::: files false false | parallel rm
|
|
||||||
parallel -k --files --compress --compress-program 'cat;true' --decompress-program 'cat;false' echo ::: files true false | parallel rm
|
|
||||||
|
|
||||||
echo 'bug #44250: pxz complains File format not recognized but decompresses anyway'
|
|
||||||
# The first line dumps core if run from make file. Why?!
|
|
||||||
stdout parallel --compress --compress-program pxz ls /{} ::: OK-if-missing-file
|
|
||||||
stdout parallel --compress --compress-program pixz --decompress-program 'pixz -d' ls /{} ::: OK-if-missing-file
|
|
||||||
stdout parallel --compress --compress-program pixz --decompress-program 'pixz -d' true ::: OK-if-no-output
|
|
||||||
stdout parallel --compress --compress-program pxz true ::: OK-if-no-output
|
|
||||||
|
|
||||||
echo 'bug #41613: --compress --line-buffer no newline';
|
|
||||||
perl -e 'print "It worked"'| parallel --pipe --compress --line-buffer cat; echo
|
|
||||||
|
|
||||||
echo '### bug #44614: --pipepart --header off by one'
|
echo '### bug #44614: --pipepart --header off by one'
|
||||||
seq 10 >/tmp/parallel_44616;
|
seq 10 >/tmp/parallel_44616;
|
||||||
parallel --pipepart -a /tmp/parallel_44616 -k --block 5 'echo foo; cat';
|
parallel --pipepart -a /tmp/parallel_44616 -k --block 5 'echo foo; cat';
|
||||||
|
@ -204,41 +147,47 @@ echo '**'
|
||||||
|
|
||||||
echo '### bug #45842: Do not evaluate {= =} twice'
|
echo '### bug #45842: Do not evaluate {= =} twice'
|
||||||
|
|
||||||
parallel -k echo '{= $_=++$::G =}' ::: {1001..1004}
|
parallel -k echo '{= $_=++$::G =}' ::: {1001..1004}
|
||||||
parallel -k echo '{=1 $_=++$::G =}' ::: {1001..1004}
|
parallel -k echo '{=1 $_=++$::G =}' ::: {1001..1004}
|
||||||
parallel -k echo '{= $_=++$::G =}' ::: {1001..1004} ::: {a..c}
|
parallel -k echo '{= $_=++$::G =}' ::: {1001..1004} ::: {a..c}
|
||||||
parallel -k echo '{=1 $_=++$::G =}' ::: {1001..1004} ::: {a..c}
|
parallel -k echo '{=1 $_=++$::G =}' ::: {1001..1004} ::: {a..c}
|
||||||
|
|
||||||
echo '**'
|
echo '**'
|
||||||
|
|
||||||
echo '### bug #45939: {2} in {= =} fails'
|
echo '### bug #45939: {2} in {= =} fails'
|
||||||
parallel echo '{= s/O{2}//=}' ::: OOOK
|
|
||||||
parallel echo '{2}-{=1 s/O{2}//=}' ::: OOOK ::: OK
|
parallel echo '{= s/O{2}//=}' ::: OOOK
|
||||||
|
parallel echo '{2}-{=1 s/O{2}//=}' ::: OOOK ::: OK
|
||||||
|
|
||||||
echo '**'
|
echo '**'
|
||||||
|
|
||||||
echo '### bug #45998: --pipe to function broken'
|
echo '### bug #45998: --pipe to function broken'
|
||||||
myfunc() { echo $1; cat; }; export -f myfunc; echo OK | parallel --pipe myfunc {#}
|
|
||||||
|
myfunc() { echo $1; cat; };
|
||||||
|
export -f myfunc;
|
||||||
|
echo OK | parallel --pipe myfunc {#}
|
||||||
|
|
||||||
echo '**'
|
echo '**'
|
||||||
|
|
||||||
echo 'bug #46016: --joblog should not log when --dryrun'
|
echo 'bug #46016: --joblog should not log when --dryrun'
|
||||||
parallel --dryrun --joblog - echo ::: Only_this
|
|
||||||
|
parallel --dryrun --joblog - echo ::: Only_this
|
||||||
|
|
||||||
echo '**'
|
echo '**'
|
||||||
|
|
||||||
echo 'bug #45993: --wd ... should also work when run locally'
|
echo 'bug #45993: --wd ... should also work when run locally'
|
||||||
parallel --wd /bi 'pwd; echo $OLDPWD; echo' ::: fail
|
|
||||||
parallel --wd /bin 'pwd; echo $OLDPWD; echo' ::: OK
|
|
||||||
parallel --wd / 'pwd; echo $OLDPWD; echo' ::: OK
|
|
||||||
parallel --wd /tmp 'pwd; echo $OLDPWD; echo' ::: OK
|
|
||||||
parallel --wd ... 'pwd; echo $OLDPWD; echo' ::: OK | perl -pe 's/\d+/0/g'
|
|
||||||
|
|
||||||
parallel --wd . 'pwd; echo $OLDPWD; echo' ::: OK
|
parallel --wd /bi 'pwd; echo $OLDPWD; echo' ::: fail
|
||||||
|
parallel --wd /bin 'pwd; echo $OLDPWD; echo' ::: OK
|
||||||
|
parallel --wd / 'pwd; echo $OLDPWD; echo' ::: OK
|
||||||
|
parallel --wd /tmp 'pwd; echo $OLDPWD; echo' ::: OK
|
||||||
|
parallel --wd ... 'pwd; echo $OLDPWD; echo' ::: OK | perl -pe 's/\d+/0/g'
|
||||||
|
parallel --wd . 'pwd; echo $OLDPWD; echo' ::: OK
|
||||||
|
|
||||||
echo '**'
|
echo '**'
|
||||||
|
|
||||||
echo 'bug #46232: {%} with --bar/--eta/--shuf or --halt xx% broken'
|
echo 'bug #46232: {%} with --bar/--eta/--shuf or --halt xx% broken'
|
||||||
|
|
||||||
parallel --bar -kj2 --delay 0.1 echo {%} ::: a b ::: c d e 2>/dev/null
|
parallel --bar -kj2 --delay 0.1 echo {%} ::: a b ::: c d e 2>/dev/null
|
||||||
parallel --halt now,fail=10% -kj2 --delay 0.1 echo {%} ::: a b ::: c d e
|
parallel --halt now,fail=10% -kj2 --delay 0.1 echo {%} ::: a b ::: c d e
|
||||||
parallel --eta -kj2 --delay 0.1 echo {%} ::: a b ::: c d e 2>/dev/null
|
parallel --eta -kj2 --delay 0.1 echo {%} ::: a b ::: c d e 2>/dev/null
|
||||||
|
@ -247,8 +196,9 @@ echo 'bug #46232: {%} with --bar/--eta/--shuf or --halt xx% broken'
|
||||||
echo '**'
|
echo '**'
|
||||||
|
|
||||||
echo 'bug #46231: {%} with --pipepart broken. Should give 1+2'
|
echo 'bug #46231: {%} with --pipepart broken. Should give 1+2'
|
||||||
|
|
||||||
seq 10000 > /tmp/num10000;
|
seq 10000 > /tmp/num10000;
|
||||||
parallel --pipepart -ka /tmp/num10000 --block 10k -j2 echo {%};
|
parallel -k --pipepart -ka /tmp/num10000 --block 10k -j2 --delay 0.05 echo {%};
|
||||||
rm /tmp/num10000
|
rm /tmp/num10000
|
||||||
|
|
||||||
echo '**'
|
echo '**'
|
||||||
|
@ -283,6 +233,370 @@ echo 'bug #47290: xargs: Warning: a NUL character occurred in the input'
|
||||||
|
|
||||||
echo '**'
|
echo '**'
|
||||||
|
|
||||||
|
echo '### Test --shellquote'
|
||||||
|
parallel --tag -q -k {} -c perl\ -e\ \'print\ pack\(\"c\*\",1..255\)\'\ \|\ parallel\ -0\ --shellquote ::: ash bash csh dash fish fizsh ksh ksh93 lksh mksh pdksh posh rzsh sash sh static-sh tcsh yash zsh csh tcsh
|
||||||
|
|
||||||
|
echo '**'
|
||||||
|
|
||||||
|
echo xargs compatibility
|
||||||
|
|
||||||
|
echo '### Test -L -l and --max-lines'
|
||||||
|
|
||||||
|
(echo a_b;echo c) | parallel -km -L2 echo
|
||||||
|
(echo a_b;echo c) | parallel -k -L2 echo
|
||||||
|
(echo a_b;echo c) | xargs -L2 echo
|
||||||
|
|
||||||
|
echo '### xargs -L1 echo'
|
||||||
|
|
||||||
|
(echo a_b;echo c) | parallel -km -L1 echo
|
||||||
|
(echo a_b;echo c) | parallel -k -L1 echo
|
||||||
|
(echo a_b;echo c) | xargs -L1 echo
|
||||||
|
echo 'Lines ending in space should continue on next line'
|
||||||
|
|
||||||
|
echo '### xargs -L1 echo'
|
||||||
|
|
||||||
|
(echo a_b' ';echo c;echo d) | parallel -km -L1 echo
|
||||||
|
(echo a_b' ';echo c;echo d) | parallel -k -L1 echo
|
||||||
|
(echo a_b' ';echo c;echo d) | xargs -L1 echo
|
||||||
|
|
||||||
|
echo '### xargs -L2 echo'
|
||||||
|
|
||||||
|
(echo a_b' ';echo c;echo d;echo e) | parallel -km -L2 echo
|
||||||
|
(echo a_b' ';echo c;echo d;echo e) | parallel -k -L2 echo
|
||||||
|
(echo a_b' ';echo c;echo d;echo e) | xargs -L2 echo
|
||||||
|
|
||||||
|
echo '### xargs -l echo'
|
||||||
|
|
||||||
|
(echo a_b' ';echo c;echo d;echo e) | parallel -l -km echo # This behaves wrong
|
||||||
|
(echo a_b' ';echo c;echo d;echo e) | parallel -l -k echo # This behaves wrong
|
||||||
|
(echo a_b' ';echo c;echo d;echo e) | xargs -l echo
|
||||||
|
|
||||||
|
echo '### xargs -l2 echo'
|
||||||
|
|
||||||
|
(echo a_b' ';echo c;echo d;echo e) | parallel -km -l2 echo
|
||||||
|
(echo a_b' ';echo c;echo d;echo e) | parallel -k -l2 echo
|
||||||
|
(echo a_b' ';echo c;echo d;echo e) | xargs -l2 echo
|
||||||
|
|
||||||
|
echo '### xargs -l1 echo'
|
||||||
|
|
||||||
|
(echo a_b' ';echo c;echo d;echo e) | parallel -km -l1 echo
|
||||||
|
(echo a_b' ';echo c;echo d;echo e) | parallel -k -l1 echo
|
||||||
|
(echo a_b' ';echo c;echo d;echo e) | xargs -l1 echo
|
||||||
|
|
||||||
|
echo '### xargs --max-lines=2 echo'
|
||||||
|
|
||||||
|
(echo a_b' ';echo c;echo d;echo e) | parallel -km --max-lines 2 echo
|
||||||
|
(echo a_b' ';echo c;echo d;echo e) | parallel -k --max-lines 2 echo
|
||||||
|
(echo a_b' ';echo c;echo d;echo e) | xargs --max-lines=2 echo
|
||||||
|
|
||||||
|
echo '### xargs --max-lines echo'
|
||||||
|
|
||||||
|
(echo a_b' ';echo c;echo d;echo e) | parallel --max-lines -km echo # This behaves wrong
|
||||||
|
(echo a_b' ';echo c;echo d;echo e) | parallel --max-lines -k echo # This behaves wrong
|
||||||
|
(echo a_b' ';echo c;echo d;echo e) | xargs --max-lines echo
|
||||||
|
|
||||||
|
echo '### test too long args'
|
||||||
|
|
||||||
|
perl -e 'print "z"x1000000' | parallel echo 2>&1
|
||||||
|
perl -e 'print "z"x1000000' | xargs echo 2>&1
|
||||||
|
(seq 1 10; perl -e 'print "z"x1000000'; seq 12 15) | stdout parallel -j1 -km -s 10 echo
|
||||||
|
(seq 1 10; perl -e 'print "z"x1000000'; seq 12 15) | stdout xargs -s 10 echo
|
||||||
|
(seq 1 10; perl -e 'print "z"x1000000'; seq 12 15) | stdout parallel -j1 -kX -s 10 echo
|
||||||
|
|
||||||
|
echo '### Test -x'
|
||||||
|
|
||||||
|
(seq 1 10; echo 12345; seq 12 15) | stdout parallel -j1 -km -s 10 -x echo
|
||||||
|
(seq 1 10; echo 12345; seq 12 15) | stdout parallel -j1 -kX -s 10 -x echo
|
||||||
|
(seq 1 10; echo 12345; seq 12 15) | stdout xargs -s 10 -x echo
|
||||||
|
(seq 1 10; echo 1234; seq 12 15) | stdout parallel -j1 -km -s 10 -x echo
|
||||||
|
(seq 1 10; echo 1234; seq 12 15) | stdout parallel -j1 -kX -s 10 -x echo
|
||||||
|
(seq 1 10; echo 1234; seq 12 15) | stdout xargs -s 10 -x echo
|
||||||
|
|
||||||
|
echo '### Test -a and --arg-file: Read input from file instead of stdin'
|
||||||
|
|
||||||
|
seq 1 10 >/tmp/parallel_$$-1; parallel -k -a /tmp/parallel_$$-1 echo; rm /tmp/parallel_$$-1
|
||||||
|
seq 1 10 >/tmp/parallel_$$-2; parallel -k --arg-file /tmp/parallel_$$-2 echo; rm /tmp/parallel_$$-2
|
||||||
|
|
||||||
|
echo '### Test -i and --replace: Replace with argument'
|
||||||
|
|
||||||
|
(echo a; echo END; echo b) | parallel -k -i -eEND echo repl{}ce
|
||||||
|
(echo a; echo END; echo b) | parallel -k --replace -eEND echo repl{}ce
|
||||||
|
(echo a; echo END; echo b) | parallel -k -i+ -eEND echo repl+ce
|
||||||
|
(echo e; echo END; echo b) | parallel -k -i'*' -eEND echo r'*'plac'*'
|
||||||
|
(echo a; echo END; echo b) | parallel -k --replace + -eEND echo repl+ce
|
||||||
|
(echo a; echo END; echo b) | parallel -k --replace== -eEND echo repl=ce
|
||||||
|
(echo a; echo END; echo b) | parallel -k --replace = -eEND echo repl=ce
|
||||||
|
(echo a; echo END; echo b) | parallel -k --replace=^ -eEND echo repl^ce
|
||||||
|
(echo a; echo END; echo b) | parallel -k -I^ -eEND echo repl^ce
|
||||||
|
|
||||||
|
echo '### Test -E: Artificial end-of-file'
|
||||||
|
|
||||||
|
(echo include this; echo END; echo not this) | parallel -k -E END echo
|
||||||
|
(echo include this; echo END; echo not this) | parallel -k -EEND echo
|
||||||
|
|
||||||
|
echo '### Test -e and --eof: Artificial end-of-file'
|
||||||
|
|
||||||
|
(echo include this; echo END; echo not this) | parallel -k -e END echo
|
||||||
|
(echo include this; echo END; echo not this) | parallel -k -eEND echo
|
||||||
|
(echo include this; echo END; echo not this) | parallel -k --eof=END echo
|
||||||
|
(echo include this; echo END; echo not this) | parallel -k --eof END echo
|
||||||
|
|
||||||
|
echo '### Test -n and --max-args: Max number of args per line (only with -X and -m)'
|
||||||
|
|
||||||
|
(echo line 1;echo line 2;echo line 3) | parallel -k -n1 -m echo
|
||||||
|
(echo line 1;echo line 1;echo line 2) | parallel -k -n2 -m echo
|
||||||
|
(echo line 1;echo line 2;echo line 3) | parallel -k -n1 -X echo
|
||||||
|
(echo line 1;echo line 1;echo line 2) | parallel -k -n2 -X echo
|
||||||
|
(echo line 1;echo line 2;echo line 3) | parallel -k -n1 echo
|
||||||
|
(echo line 1;echo line 1;echo line 2) | parallel -k -n2 echo
|
||||||
|
(echo line 1;echo line 2;echo line 3) | parallel -k --max-args=1 -X echo
|
||||||
|
(echo line 1;echo line 2;echo line 3) | parallel -k --max-args 1 -X echo
|
||||||
|
(echo line 1;echo line 1;echo line 2) | parallel -k --max-args=2 -X echo
|
||||||
|
(echo line 1;echo line 1;echo line 2) | parallel -k --max-args 2 -X echo
|
||||||
|
(echo line 1;echo line 2;echo line 3) | parallel -k --max-args 1 echo
|
||||||
|
(echo line 1;echo line 1;echo line 2) | parallel -k --max-args 2 echo
|
||||||
|
|
||||||
|
echo '### Test --max-procs and -P: Number of processes'
|
||||||
|
|
||||||
|
seq 1 10 | parallel -k --max-procs +0 echo max proc
|
||||||
|
seq 1 10 | parallel -k -P 200% echo 200% proc
|
||||||
|
|
||||||
|
echo '### Test --delimiter and -d: Delimiter instead of newline'
|
||||||
|
|
||||||
|
echo '# Yes there is supposed to be an extra newline for -d N'
|
||||||
|
echo line 1Nline 2Nline 3 | parallel -k -d N echo This is
|
||||||
|
echo line 1Nline 2Nline 3 | parallel -k --delimiter N echo This is
|
||||||
|
printf "delimiter NUL line 1\0line 2\0line 3" | parallel -k -d '\0' echo
|
||||||
|
printf "delimiter TAB line 1\tline 2\tline 3" | parallel -k --delimiter '\t' echo
|
||||||
|
|
||||||
|
echo '### Test --max-chars and -s: Max number of chars in a line'
|
||||||
|
|
||||||
|
(echo line 1;echo line 1;echo line 2) | parallel -k --max-chars 25 -X echo
|
||||||
|
(echo line 1;echo line 1;echo line 2) | parallel -k -s 25 -X echo
|
||||||
|
|
||||||
|
echo '### Test --no-run-if-empty and -r: This should give no output'
|
||||||
|
|
||||||
|
echo " " | parallel -r echo
|
||||||
|
echo " " | parallel --no-run-if-empty echo
|
||||||
|
|
||||||
|
echo '### Test --help and -h: Help output (just check we get the same amount of lines)'
|
||||||
|
|
||||||
|
echo Output from -h and --help
|
||||||
|
parallel -h | wc -l
|
||||||
|
parallel --help | wc -l
|
||||||
|
|
||||||
|
echo '### Test --version: Version output (just check we get the same amount of lines)'
|
||||||
|
|
||||||
|
parallel --version | wc -l
|
||||||
|
|
||||||
|
echo '### Test --verbose and -t'
|
||||||
|
|
||||||
|
(echo b; echo c; echo f) | parallel -k -t echo {}ar 2>&1 >/dev/null
|
||||||
|
(echo b; echo c; echo f) | parallel -k --verbose echo {}ar 2>&1 >/dev/null
|
||||||
|
|
||||||
|
echo '### Test --show-limits'
|
||||||
|
|
||||||
|
(echo b; echo c; echo f) | parallel -k --show-limits echo {}ar
|
||||||
|
(echo b; echo c; echo f) | parallel -j1 -kX --show-limits -s 100 echo {}ar
|
||||||
|
|
||||||
|
echo '### Test empty line as input'
|
||||||
|
|
||||||
|
echo | parallel echo empty input line
|
||||||
|
|
||||||
|
echo '### Tests if (cat | sh) works'
|
||||||
|
|
||||||
|
perl -e 'for(1..25) {print "echo a $_; echo b $_\n"}' | parallel 2>&1 | sort
|
||||||
|
|
||||||
|
echo '### Test if xargs-mode works'
|
||||||
|
|
||||||
|
perl -e 'for(1..25) {print "a $_\nb $_\n"}' | parallel echo 2>&1 | sort
|
||||||
|
|
||||||
|
echo '### Test -q'
|
||||||
|
|
||||||
|
parallel -kq perl -e '$ARGV[0]=~/^\S+\s+\S+$/ and print $ARGV[0],"\n"' ::: "a b" c "d e f" g "h i"
|
||||||
|
|
||||||
|
echo '### Test -q {#}'
|
||||||
|
|
||||||
|
parallel -kq echo {#} ::: a b
|
||||||
|
parallel -kq echo {\#} ::: a b
|
||||||
|
parallel -kq echo {\\#} ::: a b
|
||||||
|
|
||||||
|
echo '### Test long commands do not take up all memory'
|
||||||
|
|
||||||
|
seq 1 100 | parallel -j0 -qv perl -e '$r=rand(shift);for($f=0;$f<$r;$f++){$a="a"x100};print shift,"\n"' 10000 2>/dev/null | sort
|
||||||
|
|
||||||
|
echo '### Test 0-arguments'
|
||||||
|
|
||||||
|
seq 1 2 | parallel -k -n0 echo n0
|
||||||
|
seq 1 2 | parallel -k -L0 echo L0
|
||||||
|
seq 1 2 | parallel -k -N0 echo N0
|
||||||
|
|
||||||
|
echo '### Because of --tollef -l, then -l0 == -l1, sorry'
|
||||||
|
|
||||||
|
seq 1 2 | parallel -k -l0 echo l0
|
||||||
|
|
||||||
|
echo '### Test replace {}'
|
||||||
|
|
||||||
|
seq 1 2 | parallel -k -N0 echo replace {} curlies
|
||||||
|
|
||||||
|
echo '### Test arguments on commandline'
|
||||||
|
|
||||||
|
parallel -k -N0 echo args on cmdline ::: 1 2
|
||||||
|
|
||||||
|
echo '### Test --nice locally'
|
||||||
|
|
||||||
|
parallel --nice 1 -vv 'PAR=a bash -c "echo \$PAR {}"' ::: b
|
||||||
|
|
||||||
|
echo '### Test distribute arguments at EOF to 2 jobslots'
|
||||||
|
|
||||||
|
seq 1 92 | parallel -j+0 -kX -s 100 echo
|
||||||
|
|
||||||
|
echo '### Test distribute arguments at EOF to 5 jobslots'
|
||||||
|
|
||||||
|
seq 1 92 | parallel -j+3 -kX -s 100 echo
|
||||||
|
|
||||||
|
echo '### Test distribute arguments at EOF to infinity jobslots'
|
||||||
|
|
||||||
|
seq 1 92 | parallel -j0 -kX -s 100 echo 2>/dev/null
|
||||||
|
|
||||||
|
echo '### Test -N is not broken by distribution - single line'
|
||||||
|
|
||||||
|
seq 9 | parallel -N 10 echo
|
||||||
|
|
||||||
|
echo '### Test -N is not broken by distribution - two lines'
|
||||||
|
|
||||||
|
seq 19 | parallel -k -N 10 echo
|
||||||
|
|
||||||
|
echo '### Test -N context replace'
|
||||||
|
|
||||||
|
seq 19 | parallel -k -N 10 echo a{}b
|
||||||
|
|
||||||
|
echo '### Test -L context replace'
|
||||||
|
|
||||||
|
seq 19 | parallel -k -L 10 echo a{}b
|
||||||
|
|
||||||
|
echo '**'
|
||||||
|
|
||||||
|
echo '### Test {} multiple times in different commands'
|
||||||
|
|
||||||
|
seq 10 | parallel -v -Xj1 echo {} \; echo {}
|
||||||
|
|
||||||
|
echo '### Test of -X {1}-{2} with multiple input sources'
|
||||||
|
|
||||||
|
parallel -j1 -kX echo {1}-{2} ::: a ::: b
|
||||||
|
parallel -j2 -kX echo {1}-{2} ::: a b ::: c d
|
||||||
|
parallel -j2 -kX echo {1}-{2} ::: a b c ::: d e f
|
||||||
|
parallel -j0 -kX echo {1}-{2} ::: a b c ::: d e f
|
||||||
|
|
||||||
|
echo '### Test of -X {}-{.} with multiple input sources'
|
||||||
|
|
||||||
|
parallel -j1 -kX echo {}-{.} ::: a ::: b
|
||||||
|
parallel -j2 -kX echo {}-{.} ::: a b ::: c d
|
||||||
|
parallel -j2 -kX echo {}-{.} ::: a b c ::: d e f
|
||||||
|
parallel -j0 -kX echo {}-{.} ::: a b c ::: d e f
|
||||||
|
|
||||||
|
echo '### Test of -r with --pipe - the first should give an empty line. The second should not.'
|
||||||
|
|
||||||
|
echo | parallel -j2 -N1 --pipe cat | wc -l
|
||||||
|
echo | parallel -r -j2 -N1 --pipe cat | wc -l
|
||||||
|
|
||||||
|
echo '### Test --tty'
|
||||||
|
|
||||||
|
seq 0.1 0.1 0.5 | parallel -j1 --tty tty\;sleep
|
||||||
|
|
||||||
|
echo '**'
|
||||||
|
|
||||||
|
echo '### Test bugfix if no command given'
|
||||||
|
(echo echo; seq 1 5; perl -e 'print "z"x1000000'; seq 12 15) | stdout parallel -j1 -km -s 10
|
||||||
|
|
||||||
|
echo '**'
|
||||||
|
|
||||||
|
echo "### Test --results"
|
||||||
|
mkdir -p /tmp/parallel_results_test;
|
||||||
|
parallel -k --results /tmp/parallel_results_test/testA echo {1} {2} ::: I II ::: III IIII;
|
||||||
|
ls /tmp/parallel_results_test/testA/*/*/*/*/*; rm -rf /tmp/parallel_results_test/testA*
|
||||||
|
|
||||||
|
echo "### Test --res"
|
||||||
|
mkdir -p /tmp/parallel_results_test;
|
||||||
|
parallel -k --res /tmp/parallel_results_test/testD echo {1} {2} ::: I II ::: III IIII;
|
||||||
|
ls /tmp/parallel_results_test/testD/*/*/*/*/*; rm -rf /tmp/parallel_results_test/testD*
|
||||||
|
|
||||||
|
echo "### Test --result"
|
||||||
|
mkdir -p /tmp/parallel_results_test;
|
||||||
|
parallel -k --result /tmp/parallel_results_test/testE echo {1} {2} ::: I II ::: III IIII;
|
||||||
|
ls /tmp/parallel_results_test/testE/*/*/*/*/*; rm -rf /tmp/parallel_results_test/testE*
|
||||||
|
|
||||||
|
echo "### Test --results --header :"
|
||||||
|
mkdir -p /tmp/parallel_results_test;
|
||||||
|
parallel -k --header : --results /tmp/parallel_results_test/testB echo {1} {2} ::: a I II ::: b III IIII;
|
||||||
|
ls /tmp/parallel_results_test/testB/*/*/*/*/*; rm -rf /tmp/parallel_results_test/testB*
|
||||||
|
|
||||||
|
echo "### Test --results --header : named - a/b swapped"
|
||||||
|
mkdir -p /tmp/parallel_results_test;
|
||||||
|
parallel -k --header : --results /tmp/parallel_results_test/testC echo {a} {b} ::: b III IIII ::: a I II;
|
||||||
|
ls /tmp/parallel_results_test/testC/*/*/*/*/*; rm -rf /tmp/parallel_results_test/testC*
|
||||||
|
|
||||||
|
echo "### Test --results --header : piped"
|
||||||
|
mkdir -p /tmp/parallel_results_test;
|
||||||
|
(echo Col; perl -e 'print "backslash\\tab\tslash/null\0eof\n"') | parallel --header : --result /tmp/parallel_results_test/testF true;
|
||||||
|
find /tmp/parallel_results_test/testF/*/*/* | sort; rm -rf /tmp/parallel_results_test/testF*
|
||||||
|
|
||||||
|
echo "### Test --results --header : piped - non-existing column header"
|
||||||
|
mkdir -p /tmp/parallel_results_test;
|
||||||
|
(printf "Col1\t\n"; printf "v1\tv2\tv3\n"; perl -e 'print "backslash\\tab\tslash/null\0eof\n"') | parallel --header : --result /tmp/parallel_results_test/testG true; find /tmp/parallel_results_test/testG/ | sort; rm -rf /tmp/parallel_results_test/testG*
|
||||||
|
|
||||||
|
echo '**'
|
||||||
|
|
||||||
|
echo "bug #34958: --pipe with record size measured in lines"
|
||||||
|
seq 10 | parallel -k --pipe -l 4 cat\;echo bug 34958-2
|
||||||
|
|
||||||
|
echo '**'
|
||||||
|
|
||||||
|
echo "bug #37325: Inefficiency of --pipe -L"
|
||||||
|
seq 2000 | parallel -k --pipe --block 1k -L 4 wc\;echo FOO | uniq
|
||||||
|
|
||||||
|
echo '**'
|
||||||
|
|
||||||
|
echo "bug #34958: --pipe with record size measured in lines"
|
||||||
|
seq 10 | parallel -k --pipe -L 4 cat\;echo bug 34958-1
|
||||||
|
|
||||||
|
echo '**'
|
||||||
|
|
||||||
|
echo "### bug #41482: --pipe --compress blocks at different -j/seq combinations"
|
||||||
|
seq 1 | parallel -k -j2 --compress -N1 -L1 --pipe cat;
|
||||||
|
echo echo 1-4 + 1-4
|
||||||
|
seq 4 | parallel -k -j3 --compress -N1 -L1 -vv echo;
|
||||||
|
echo 4 times wc to stderr to stdout
|
||||||
|
(seq 4 | parallel -k -j3 --compress -N1 -L1 --pipe wc '>&2') 2>&1 >/dev/null
|
||||||
|
echo 1 2 3 4
|
||||||
|
seq 4 | parallel -k -j3 --compress echo;
|
||||||
|
echo 1 2 3 4
|
||||||
|
seq 4 | parallel -k -j1 --compress echo;
|
||||||
|
echo 1 2
|
||||||
|
seq 2 | parallel -k -j1 --compress echo;
|
||||||
|
echo 1 2 3
|
||||||
|
seq 3 | parallel -k -j2 --compress -N1 -L1 --pipe cat;
|
||||||
|
|
||||||
|
echo '**'
|
||||||
|
|
||||||
|
echo '### --pipe without command'
|
||||||
|
|
||||||
|
seq -w 10 | stdout parallel --pipe
|
||||||
|
|
||||||
|
echo '**'
|
||||||
|
|
||||||
|
echo '### bug #36260: {n} expansion in --colsep files fails for empty fields if all following fields are also empty'
|
||||||
|
|
||||||
|
echo A,B,, | parallel --colsep , echo {1}{3}{2}
|
||||||
|
|
||||||
|
echo '**'
|
||||||
|
|
||||||
|
echo '### bug #34422: parallel -X --eta crashes with div by zero'
|
||||||
|
|
||||||
|
# We do not care how long it took
|
||||||
|
seq 2 | stdout parallel -X --eta echo | grep -E -v 'ETA:.*AVG'
|
||||||
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
echo '### 1 .par file from --files expected'
|
echo '### 1 .par file from --files expected'
|
||||||
find /tmp{/*,}/*.{par,tms,tmx} 2>/dev/null -mmin -10 | wc -l
|
find /tmp{/*,}/*.{par,tms,tmx} 2>/dev/null -mmin -10 | wc -l
|
||||||
|
|
|
@ -8,9 +8,8 @@ TMP5G=${TMP5G:-/dev/shm}
|
||||||
export TMP5G
|
export TMP5G
|
||||||
|
|
||||||
cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -vj0 -k --joblog /tmp/jl-`basename $0` -L1
|
cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -vj0 -k --joblog /tmp/jl-`basename $0` -L1
|
||||||
echo '### Test if we can deal with output > 4 GB'
|
echo '### Test of --retries on unreachable host'
|
||||||
## echo | niceload --io 10 parallel -q perl -e '"\$a=\"x\"x1000000;for(0..4300){print \$a}"' | md5sum
|
seq 2 | stdout parallel -k --retries 2 -v -S 4.3.2.1,: echo
|
||||||
echo | parallel --tmpdir $TMP5G -q perl -e '$a="x"x1000000;for(0..4300){print $a}' | nice md5sum
|
|
||||||
|
|
||||||
echo '**'
|
echo '**'
|
||||||
|
|
||||||
|
@ -19,9 +18,34 @@ echo "### Test Force outside the file handle limit, 2009-02-17 Gave fork error"
|
||||||
|
|
||||||
echo '**'
|
echo '**'
|
||||||
|
|
||||||
echo '### Test of --retries on unreachable host'
|
echo '### Test if we can deal with output > 4 GB'
|
||||||
seq 2 | stdout parallel -k --retries 2 -v -S 4.3.2.1,: echo
|
echo | nice parallel --tmpdir $TMP5G -q perl -e '$a="x"x1000000;for(0..4300){print $a}' | nice md5sum
|
||||||
|
|
||||||
echo '**'
|
echo '**'
|
||||||
|
|
||||||
|
echo 'bug #41613: --compress --line-buffer no --tagstring';
|
||||||
|
diff
|
||||||
|
<(nice perl -e 'for("x011".."x110"){print "$_\t", ("\n", map { rand } (1..100000)) }'|
|
||||||
|
nice parallel -N10 -L1 --pipe -j6 --block 20M --compress
|
||||||
|
pv -qL 1000000 | perl -pe 's/(....).*/$1/')
|
||||||
|
<(nice perl -e 'for("x011".."x110"){print "$_\t", ("\n", map { rand } (1..100000)) }'|
|
||||||
|
nice parallel -N10 -L1 --pipe -j6 --block 20M --compress --line-buffer
|
||||||
|
pv -qL 1000000 | perl -pe 's/(....).*/$1/')
|
||||||
|
>/dev/null
|
||||||
|
|| (echo 'Good: --line-buffer matters'; false) && echo 'Bad: --line-buffer not working'
|
||||||
|
|
||||||
|
echo 'bug #41613: --compress --line-buffer with --tagstring';
|
||||||
|
diff
|
||||||
|
<(nice perl -e 'for("x011".."x110"){print "$_\t", ("\n", map { rand } (1..100000)) }'|
|
||||||
|
nice parallel -N10 -L1 --pipe -j6 --block 20M --compress --tagstring {#}
|
||||||
|
pv -qL 1000000 | perl -pe 's/(....).*/$1/')
|
||||||
|
<(nice perl -e 'for("x011".."x110"){print "$_\t", ("\n", map { rand } (1..100000)) }'|
|
||||||
|
nice parallel -N10 -L1 --pipe -j6 --block 20M --compress --tagstring {#} --line-buffer
|
||||||
|
pv -qL 1000000 | perl -pe 's/(....).*/$1/')
|
||||||
|
>/dev/null
|
||||||
|
|| (echo 'Good: --line-buffer matters'; false) && echo 'Bad: --line-buffer not working'
|
||||||
|
|
||||||
|
echo '**'
|
||||||
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -97,4 +97,42 @@ echo '### bug #47750: -k --line-buffer should give current job up to now'
|
||||||
parallel --line-buffer --tag -k 'seq {} | pv -qL 10' ::: {10..20}
|
parallel --line-buffer --tag -k 'seq {} | pv -qL 10' ::: {10..20}
|
||||||
parallel --line-buffer -k 'echo stdout top;sleep 1;echo stderr in the middle >&2; sleep 1;echo stdout' ::: end 2>&1
|
parallel --line-buffer -k 'echo stdout top;sleep 1;echo stderr in the middle >&2; sleep 1;echo stdout' ::: end 2>&1
|
||||||
|
|
||||||
|
echo '**'
|
||||||
|
|
||||||
|
echo "### Test memory consumption stays (almost) the same for 30 and 300 jobs"
|
||||||
|
echo "should give 1 == true"
|
||||||
|
|
||||||
|
mem30=$( stdout time -f %M parallel -j2 true :::: <(perl -e '$a="x"x60000;for(1..30){print $a,"\n"}') );
|
||||||
|
mem300=$( stdout time -f %M parallel -j2 true :::: <(perl -e '$a="x"x60000;for(1..300){print $a,"\n"}') );
|
||||||
|
echo "Memory use should not depend very much on the total number of jobs run\n";
|
||||||
|
echo "Test if memory consumption(300 jobs) < memory consumption(30 jobs) * 110% ";
|
||||||
|
echo $(($mem300*100 < $mem30 * 110))
|
||||||
|
|
||||||
|
echo '**'
|
||||||
|
|
||||||
|
echo "### Test max line length -m -I"
|
||||||
|
|
||||||
|
seq 1 60000 | parallel -I :: -m -j1 echo a::b::c | sort >/tmp/114-a$$;
|
||||||
|
md5sum </tmp/114-a$$;
|
||||||
|
export CHAR=$(cat /tmp/114-a$$ | wc -c);
|
||||||
|
export LINES=$(cat /tmp/114-a$$ | wc -l);
|
||||||
|
echo "Chars per line ($CHAR/$LINES): "$(echo "$CHAR/$LINES" | bc);
|
||||||
|
rm /tmp/114-a$$
|
||||||
|
|
||||||
|
echo "### Test max line length -X -I"
|
||||||
|
|
||||||
|
seq 1 60000 | parallel -I :: -X -j1 echo a::b::c | sort >/tmp/114-b$$;
|
||||||
|
md5sum </tmp/114-b$$;
|
||||||
|
export CHAR=$(cat /tmp/114-b$$ | wc -c);
|
||||||
|
export LINES=$(cat /tmp/114-b$$ | wc -l);
|
||||||
|
echo "Chars per line ($CHAR/$LINES): "$(echo "$CHAR/$LINES" | bc);
|
||||||
|
rm /tmp/114-b$$
|
||||||
|
|
||||||
|
echo '**'
|
||||||
|
|
||||||
|
echo "### bug #41609: --compress fails"
|
||||||
|
seq 12 | parallel --compress --compress-program bzip2 -k seq {} 1000000 | md5sum
|
||||||
|
seq 12 | parallel --compress -k seq {} 1000000 | md5sum
|
||||||
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -4,7 +4,97 @@
|
||||||
# Each should be taking 1-3s and be possible to run in parallel
|
# Each should be taking 1-3s and be possible to run in parallel
|
||||||
# I.e.: No race conditions, no logins
|
# I.e.: No race conditions, no logins
|
||||||
cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -vj0 -k --joblog /tmp/jl-`basename $0` -L1
|
cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -vj0 -k --joblog /tmp/jl-`basename $0` -L1
|
||||||
|
echo "### BUG: The length for -X is not close to max (131072)";
|
||||||
|
|
||||||
|
seq 1 60000 | parallel -X echo {.} aa {}{.} {}{}d{} {}dd{}d{.} |head -n 1 |wc
|
||||||
|
seq 1 60000 | parallel -X echo a{}b{}c |head -n 1 |wc
|
||||||
|
seq 1 60000 | parallel -X echo |head -n 1 |wc
|
||||||
|
seq 1 60000 | parallel -X echo a{}b{}c {} |head -n 1 |wc
|
||||||
|
seq 1 60000 | parallel -X echo {}aa{} |head -n 1 |wc
|
||||||
|
seq 1 60000 | parallel -X echo {} aa {} |head -n 1 |wc
|
||||||
|
|
||||||
echo '### Test --fifo under csh'
|
echo '### Test --fifo under csh'
|
||||||
|
|
||||||
csh -c "seq 3000000 | parallel -k --pipe --fifo 'sleep .{#};cat {}|wc -c ; false; echo \$status; false'"; echo exit $?
|
csh -c "seq 3000000 | parallel -k --pipe --fifo 'sleep .{#};cat {}|wc -c ; false; echo \$status; false'"; echo exit $?
|
||||||
|
|
||||||
|
echo '**'
|
||||||
|
|
||||||
|
echo '### bug #44546: If --compress-program fails: fail'
|
||||||
|
|
||||||
|
parallel --line-buffer --compress-program false echo \;ls ::: /no-existing; echo $?
|
||||||
|
parallel --tag --line-buffer --compress-program false echo \;ls ::: /no-existing; echo $?
|
||||||
|
(parallel --files --tag --line-buffer --compress-program false echo \;sleep 1\;ls ::: /no-existing; echo $?) | tail -n1
|
||||||
|
parallel --tag --compress-program false echo \;ls ::: /no-existing; echo $?
|
||||||
|
parallel --line-buffer --compress-program false echo \;ls ::: /no-existing; echo $?
|
||||||
|
parallel --compress-program false echo \;ls ::: /no-existing; echo $?
|
||||||
|
|
||||||
|
echo 'bug #41613: --compress --line-buffer - no newline';
|
||||||
|
|
||||||
|
echo 'pipe compress tagstring'
|
||||||
|
perl -e 'print "O"'| parallel --compress --tagstring {#} --pipe --line-buffer cat; echo "K"
|
||||||
|
echo 'pipe compress notagstring'
|
||||||
|
perl -e 'print "O"'| parallel --compress --pipe --line-buffer cat; echo "K"
|
||||||
|
echo 'pipe nocompress tagstring'
|
||||||
|
perl -e 'print "O"'| parallel --tagstring {#} --pipe --line-buffer cat; echo "K"
|
||||||
|
echo 'pipe nocompress notagstring'
|
||||||
|
perl -e 'print "O"'| parallel --pipe --line-buffer cat; echo "K"
|
||||||
|
echo 'nopipe compress tagstring'
|
||||||
|
parallel --compress --tagstring {#} --line-buffer echo {} O ::: -n; echo "K"
|
||||||
|
echo 'nopipe compress notagstring'
|
||||||
|
parallel --compress --line-buffer echo {} O ::: -n; echo "K"
|
||||||
|
echo 'nopipe nocompress tagstring'
|
||||||
|
parallel --tagstring {#} --line-buffer echo {} O ::: -n; echo "K"
|
||||||
|
echo 'nopipe nocompress notagstring'
|
||||||
|
parallel --line-buffer echo {} O ::: -n; echo "K"
|
||||||
|
|
||||||
|
echo 'Compress with failing (de)compressor'
|
||||||
|
|
||||||
|
parallel -k --tag --compress --compress-program 'cat;true' --decompress-program 'cat;true' echo ::: tag true true
|
||||||
|
parallel -k --tag --compress --compress-program 'cat;false' --decompress-program 'cat;true' echo ::: tag false true
|
||||||
|
parallel -k --tag --compress --compress-program 'cat;false' --decompress-program 'cat;false' echo ::: tag false false
|
||||||
|
parallel -k --tag --compress --compress-program 'cat;true' --decompress-program 'cat;false' echo ::: tag true false
|
||||||
|
parallel -k --compress --compress-program 'cat;true' --decompress-program 'cat;true' echo ::: true true
|
||||||
|
parallel -k --compress --compress-program 'cat;false' --decompress-program 'cat;true' echo ::: false true
|
||||||
|
parallel -k --compress --compress-program 'cat;false' --decompress-program 'cat;false' echo ::: false false
|
||||||
|
parallel -k --compress --compress-program 'cat;true' --decompress-program 'cat;false' echo ::: true false
|
||||||
|
parallel -k --line-buffer --compress --compress-program 'cat;true' --decompress-program 'cat;true' echo ::: line-buffer true true
|
||||||
|
parallel -k --line-buffer --compress --compress-program 'cat;false' --decompress-program 'cat;true' echo ::: line-buffer false true
|
||||||
|
parallel -k --line-buffer --compress --compress-program 'cat;false' --decompress-program 'cat;false' echo ::: line-buffer false false
|
||||||
|
parallel -k --tag --line-buffer --compress --compress-program 'cat;true' --decompress-program 'cat;false' echo ::: tag line-buffer true false
|
||||||
|
parallel -k --tag --line-buffer --compress --compress-program 'cat;true' --decompress-program 'cat;true' echo ::: tag line-buffer true true
|
||||||
|
parallel -k --tag --line-buffer --compress --compress-program 'cat;false' --decompress-program 'cat;true' echo ::: tag line-buffer false true
|
||||||
|
parallel -k --tag --line-buffer --compress --compress-program 'cat;false' --decompress-program 'cat;false' echo ::: tag line-buffer false false
|
||||||
|
parallel -k --tag --line-buffer --compress --compress-program 'cat;true' --decompress-program 'cat;false' echo ::: tag line-buffer true false
|
||||||
|
parallel -k --files --compress --compress-program 'cat;true' --decompress-program 'cat;true' echo ::: files true true | parallel rm
|
||||||
|
parallel -k --files --compress --compress-program 'cat;false' --decompress-program 'cat;true' echo ::: files false true | parallel rm
|
||||||
|
parallel -k --files --compress --compress-program 'cat;false' --decompress-program 'cat;false' echo ::: files false false | parallel rm
|
||||||
|
parallel -k --files --compress --compress-program 'cat;true' --decompress-program 'cat;false' echo ::: files true false | parallel rm
|
||||||
|
|
||||||
|
echo 'bug #44250: pxz complains File format not recognized but decompresses anyway'
|
||||||
|
|
||||||
|
# The first line dumps core if run from make file. Why?!
|
||||||
|
stdout parallel --compress --compress-program pxz ls /{} ::: OK-if-missing-file
|
||||||
|
stdout parallel --compress --compress-program pixz --decompress-program 'pixz -d' ls /{} ::: OK-if-missing-file
|
||||||
|
stdout parallel --compress --compress-program pixz --decompress-program 'pixz -d' true ::: OK-if-no-output
|
||||||
|
stdout parallel --compress --compress-program pxz true ::: OK-if-no-output
|
||||||
|
|
||||||
|
echo 'bug #41613: --compress --line-buffer no newline';
|
||||||
|
|
||||||
|
perl -e 'print "It worked"'| parallel --pipe --compress --line-buffer cat; echo
|
||||||
|
|
||||||
|
echo '**'
|
||||||
|
|
||||||
|
echo "### Test -I";
|
||||||
|
|
||||||
|
seq 1 10 | parallel -k 'seq 1 {} | parallel -k -I :: echo {} ::'
|
||||||
|
|
||||||
|
echo "### Test -X -I";
|
||||||
|
|
||||||
|
seq 1 10 | parallel -k 'seq 1 {} | parallel -j1 -X -k -I :: echo a{} b::'
|
||||||
|
|
||||||
|
echo "### Test -m -I";
|
||||||
|
|
||||||
|
seq 1 10 | parallel -k 'seq 1 {} | parallel -j1 -m -k -I :: echo a{} b::'
|
||||||
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -7,6 +7,13 @@ cd tmp
|
||||||
unset run_test
|
unset run_test
|
||||||
|
|
||||||
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | stdout parallel -vj300% -k --joblog /tmp/jl-`basename $0` -L1
|
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | stdout parallel -vj300% -k --joblog /tmp/jl-`basename $0` -L1
|
||||||
|
echo '### Test --load remote'
|
||||||
|
ssh parallel@lo 'seq 10 | parallel --nice 19 --timeout 15 -j0 -N0 burnP6' &
|
||||||
|
sleep 1;
|
||||||
|
stdout /usr/bin/time -f %e parallel -S parallel@lo --load 10 sleep ::: 1 | perl -ne '$_ > 10 and print "OK\n"'
|
||||||
|
|
||||||
|
echo '**'
|
||||||
|
|
||||||
echo '### Stop if all hosts are filtered and there are no hosts left to run on'
|
echo '### Stop if all hosts are filtered and there are no hosts left to run on'
|
||||||
stdout parallel --filter-hosts -S no-such.host echo ::: 1
|
stdout parallel --filter-hosts -S no-such.host echo ::: 1
|
||||||
|
|
||||||
|
@ -131,6 +138,11 @@ echo '### bug #46519: --onall ignores --transfer'
|
||||||
ls bug46519.?? bug46519.???;
|
ls bug46519.?? bug46519.???;
|
||||||
parallel --onall -S csh@lo,sh@lo ls bug46519.{}{} bug46519.{}{}{} ::: a b c && echo Cleanup failed
|
parallel --onall -S csh@lo,sh@lo ls bug46519.{}{} bug46519.{}{}{} ::: a b c && echo Cleanup failed
|
||||||
|
|
||||||
|
echo '### Test --nice remote'
|
||||||
|
stdout parallel --nice 1 -S lo -vv 'PAR=a bash -c "echo \$PAR {}"' ::: b |
|
||||||
|
perl -pe 's/\S*parallel-server\S*/one-server/;s:[a-z/\\+=0-9]{500,}:base64:i;'
|
||||||
|
|
||||||
|
echo '**'
|
||||||
|
|
||||||
echo TODO
|
echo TODO
|
||||||
|
|
||||||
|
|
|
@ -58,21 +58,6 @@ echo "### Test -X -I";
|
||||||
echo "### Test -m -I";
|
echo "### Test -m -I";
|
||||||
seq 1 10 | parallel -k 'seq 1 {} | parallel -j1 -m -k -I :: echo a{} b::'
|
seq 1 10 | parallel -k 'seq 1 {} | parallel -j1 -m -k -I :: echo a{} b::'
|
||||||
|
|
||||||
echo "### Test max line length -m -I"
|
|
||||||
seq 1 60000 | parallel -I :: -m -j1 echo a::b::c |
|
|
||||||
tee >(sort |md5sum) >/tmp/114-a$$;
|
|
||||||
export CHAR=$(cat /tmp/114-a$$ | wc -c);
|
|
||||||
export LINES=$(cat /tmp/114-a$$ | wc -l);
|
|
||||||
echo "Chars per line ($CHAR/$LINES): "$(echo "$CHAR/$LINES" | bc);
|
|
||||||
rm /tmp/114-a$$
|
|
||||||
|
|
||||||
echo "### Test max line length -X -I"
|
|
||||||
seq 1 60000 | parallel -I :: -X -j1 echo a::b::c |
|
|
||||||
tee >(sort |md5sum) >/tmp/114-b$$;
|
|
||||||
export CHAR=$(cat /tmp/114-b$$ | wc -c);
|
|
||||||
export LINES=$(cat /tmp/114-b$$ | wc -l);
|
|
||||||
echo "Chars per line ($CHAR/$LINES): "$(echo "$CHAR/$LINES" | bc);
|
|
||||||
rm /tmp/114-b$$
|
|
||||||
|
|
||||||
echo "### bug #36659: --sshlogin strips leading slash from ssh command"
|
echo "### bug #36659: --sshlogin strips leading slash from ssh command"
|
||||||
parallel --sshlogin '/usr/bin/ssh localhost' echo ::: OK
|
parallel --sshlogin '/usr/bin/ssh localhost' echo ::: OK
|
||||||
|
@ -90,47 +75,5 @@ echo "bug #36657: --load does not work with custom ssh"
|
||||||
export -f ssh;
|
export -f ssh;
|
||||||
parallel --load=1000% -S "/usr/bin/ssh localhost" echo ::: OK
|
parallel --load=1000% -S "/usr/bin/ssh localhost" echo ::: OK
|
||||||
|
|
||||||
echo "bug #34958: --pipe with record size measured in lines"
|
|
||||||
seq 10 | parallel -k --pipe -L 4 cat\;echo bug 34958-1
|
|
||||||
|
|
||||||
echo "bug #37325: Inefficiency of --pipe -L"
|
|
||||||
seq 2000 | parallel -k --pipe --block 1k -L 4 wc\;echo FOO | uniq
|
|
||||||
|
|
||||||
echo "bug #34958: --pipe with record size measured in lines"
|
|
||||||
seq 10 | parallel -k --pipe -l 4 cat\;echo bug 34958-2
|
|
||||||
|
|
||||||
echo "### Test --results"
|
|
||||||
mkdir -p /tmp/parallel_results_test;
|
|
||||||
parallel -k --results /tmp/parallel_results_test/testA echo {1} {2} ::: I II ::: III IIII;
|
|
||||||
ls /tmp/parallel_results_test/testA/*/*/*/*/*; rm -rf /tmp/parallel_results_test/testA*
|
|
||||||
|
|
||||||
echo "### Test --res"
|
|
||||||
mkdir -p /tmp/parallel_results_test;
|
|
||||||
parallel -k --res /tmp/parallel_results_test/testD echo {1} {2} ::: I II ::: III IIII;
|
|
||||||
ls /tmp/parallel_results_test/testD/*/*/*/*/*; rm -rf /tmp/parallel_results_test/testD*
|
|
||||||
|
|
||||||
echo "### Test --result"
|
|
||||||
mkdir -p /tmp/parallel_results_test;
|
|
||||||
parallel -k --result /tmp/parallel_results_test/testE echo {1} {2} ::: I II ::: III IIII;
|
|
||||||
ls /tmp/parallel_results_test/testE/*/*/*/*/*; rm -rf /tmp/parallel_results_test/testE*
|
|
||||||
|
|
||||||
echo "### Test --results --header :"
|
|
||||||
mkdir -p /tmp/parallel_results_test;
|
|
||||||
parallel -k --header : --results /tmp/parallel_results_test/testB echo {1} {2} ::: a I II ::: b III IIII;
|
|
||||||
ls /tmp/parallel_results_test/testB/*/*/*/*/*; rm -rf /tmp/parallel_results_test/testB*
|
|
||||||
|
|
||||||
echo "### Test --results --header : named - a/b swapped"
|
|
||||||
mkdir -p /tmp/parallel_results_test;
|
|
||||||
parallel -k --header : --results /tmp/parallel_results_test/testC echo {a} {b} ::: b III IIII ::: a I II;
|
|
||||||
ls /tmp/parallel_results_test/testC/*/*/*/*/*; rm -rf /tmp/parallel_results_test/testC*
|
|
||||||
|
|
||||||
echo "### Test --results --header : piped"
|
|
||||||
mkdir -p /tmp/parallel_results_test;
|
|
||||||
(echo Col; perl -e 'print "backslash\\tab\tslash/null\0eof\n"') | parallel --header : --result /tmp/parallel_results_test/testF true;
|
|
||||||
find /tmp/parallel_results_test/testF/*/*/* | sort; rm -rf /tmp/parallel_results_test/testF*
|
|
||||||
|
|
||||||
echo "### Test --results --header : piped - non-existing column header"
|
|
||||||
mkdir -p /tmp/parallel_results_test;
|
|
||||||
(printf "Col1\t\n"; printf "v1\tv2\tv3\n"; perl -e 'print "backslash\\tab\tslash/null\0eof\n"') | parallel --header : --result /tmp/parallel_results_test/testG true; find /tmp/parallel_results_test/testG/ | sort; rm -rf /tmp/parallel_results_test/testG*
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -5,22 +5,28 @@
|
||||||
rsync -Ha --delete input-files/testdir2/ tmp/
|
rsync -Ha --delete input-files/testdir2/ tmp/
|
||||||
cd tmp
|
cd tmp
|
||||||
|
|
||||||
|
|
||||||
echo '### Test {.} and {}'
|
echo '### Test {.} and {}'
|
||||||
find . -name '*.jpg' | parallel -j +0 convert -geometry 120 {} {.}_thumb.jpg
|
|
||||||
|
find . -name '*.jpg' | parallel -j +0 convert -geometry 120 {} {.}_thumb.jpg
|
||||||
|
|
||||||
echo '### Test {.} with files that have no . but dir does'
|
echo '### Test {.} with files that have no . but dir does'
|
||||||
mkdir -p /tmp/test-of-{.}-parallel/subdir
|
|
||||||
touch /tmp/test-of-{.}-parallel/subdir/file
|
mkdir -p /tmp/test-of-{.}-parallel/subdir;
|
||||||
touch /tmp/test-of-{.}-parallel/subdir/file{.}.funkyextension}}
|
touch /tmp/test-of-{.}-parallel/subdir/file;
|
||||||
find /tmp/test-of-{.}-parallel -type f | parallel echo {.} | sort
|
touch /tmp/test-of-{.}-parallel/subdir/file{.}.funkyextension}};
|
||||||
rm -rf /tmp/test-of-{.}-parallel/subdir
|
find /tmp/test-of-{.}-parallel -type f | parallel echo {.} | sort;
|
||||||
|
rm -rf /tmp/test-of-{.}-parallel/subdir
|
||||||
|
|
||||||
|
|
||||||
find -type f | parallel -k diff {} a/foo ">"{.}.diff
|
find -type f | parallel -k diff {} a/foo ">"{.}.diff
|
||||||
ls | parallel -kv --group "ls {}|wc;echo {}"
|
|
||||||
ls | parallel -kj500 'sleep 1; ls {} | perl -ne "END{print $..\" {}\n\"}"'
|
ls | parallel -kv --group "ls {}|wc;echo {}"
|
||||||
ls | parallel -kj500 --group 'sleep 1; ls {} | perl -ne "END{print $..\" {}\n\"}"'
|
ls | parallel -kj500 'sleep 1; ls {} | perl -ne "END{print $..\" {}\n\"}"'
|
||||||
|
ls | parallel -kj500 --group 'sleep 1; ls {} | perl -ne "END{print $..\" {}\n\"}"'
|
||||||
|
|
||||||
mkdir 1-col 2-col
|
mkdir 1-col 2-col
|
||||||
|
|
||||||
ls | parallel -kv touch -- {.}/abc-{.}-{} 2>&1
|
ls | parallel -kv touch -- {.}/abc-{.}-{} 2>&1
|
||||||
ls | parallel -kv rm -- {.}/abc-{.}-{} 2>&1
|
ls | parallel -kv rm -- {.}/abc-{.}-{} 2>&1
|
||||||
#test05.sh:find . -type d -print0 | perl -0 -pe 's:^./::' | parallel -0 -v touch -- {}/abc-{}-{} 2>&1 \
|
#test05.sh:find . -type d -print0 | perl -0 -pe 's:^./::' | parallel -0 -v touch -- {}/abc-{}-{} 2>&1 \
|
||||||
|
@ -28,7 +34,7 @@ ls | parallel -kv rm -- {.}/abc-{.}-{} 2>&1
|
||||||
#test05.sh:find . -type d -print0 | perl -0 -pe 's:^./::' | parallel -0 -v rmdir -- {} 2>&1 \
|
#test05.sh:find . -type d -print0 | perl -0 -pe 's:^./::' | parallel -0 -v rmdir -- {} 2>&1 \
|
||||||
|
|
||||||
# -L1 will join lines ending in ' '
|
# -L1 will join lines ending in ' '
|
||||||
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | nice parallel -vj0 -k -L1
|
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | parallel -vj0 -k -L1 --joblog /tmp/jl-`basename $0`
|
||||||
echo '### Test compress'
|
echo '### Test compress'
|
||||||
seq 5 | parallel -j2 --tag --compress 'seq {} | pv -q -L 10'
|
seq 5 | parallel -j2 --tag --compress 'seq {} | pv -q -L 10'
|
||||||
|
|
||||||
|
@ -39,10 +45,11 @@ echo '### Test weird regexp chars'
|
||||||
seq 1 6 | parallel -j1 -I :: -X echo a::b::^c::[.}c
|
seq 1 6 | parallel -j1 -I :: -X echo a::b::^c::[.}c
|
||||||
|
|
||||||
echo '### Test -m'
|
echo '### Test -m'
|
||||||
(echo foo;echo bar;echo joe.gif) | parallel -j1 -km echo 1{}2{.}3 A{.}B{.}C
|
|
||||||
(echo foo;echo bar;echo joe.gif) | parallel -j1 -kX echo 1{}2{.}3 A{.}B{.}C
|
(echo foo;echo bar;echo joe.gif) | parallel -j1 -km echo 1{}2{.}3 A{.}B{.}C
|
||||||
seq 1 6 | parallel -k printf '{}.gif\\n' | parallel -j1 -km echo a{}b{.}c{.}
|
(echo foo;echo bar;echo joe.gif) | parallel -j1 -kX echo 1{}2{.}3 A{.}B{.}C
|
||||||
seq 1 6 | parallel -k printf '{}.gif\\n' | parallel -j1 -kX echo a{}b{.}c{.}
|
seq 1 6 | parallel -k printf '{}.gif\\n' | parallel -j1 -km echo a{}b{.}c{.}
|
||||||
|
seq 1 6 | parallel -k printf '{}.gif\\n' | parallel -j1 -kX echo a{}b{.}c{.}
|
||||||
|
|
||||||
echo '### Test -m with 60000 args';
|
echo '### Test -m with 60000 args';
|
||||||
seq 1 60000 | perl -pe 's/$/.gif/' |
|
seq 1 60000 | perl -pe 's/$/.gif/' |
|
||||||
|
@ -59,37 +66,51 @@ echo '### Test -X with 60000 args';
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
echo '### Test -X with 60000 args and 5 expansions'
|
echo '### Test -X with 60000 args and 5 expansions'
|
||||||
seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.}{.}{} | wc -l
|
seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.}{.}{} | wc -l
|
||||||
seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.}{.} | wc -l
|
seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.}{.} | wc -l
|
||||||
seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.} | wc -l
|
seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.} | wc -l
|
||||||
seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c | wc -l
|
seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c | wc -l
|
||||||
seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b | wc -l
|
seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b | wc -l
|
||||||
|
|
||||||
echo '### Test {.} does not repeat more than {}'
|
echo '### Test {.} does not repeat more than {}'
|
||||||
seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -kX echo a{}b{.}c{.}
|
|
||||||
seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -km echo a{}b{.}c{.}
|
seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -kX echo a{}b{.}c{.}
|
||||||
seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -kX echo a{}b{.}c{.}
|
seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -km echo a{}b{.}c{.}
|
||||||
seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -km echo a{}b{.}c{.}
|
seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -kX echo a{}b{.}c{.}
|
||||||
|
seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -km echo a{}b{.}c{.}
|
||||||
|
|
||||||
echo '### Test -I with shell meta chars'
|
echo '### Test -I with shell meta chars'
|
||||||
seq 1 60000 | parallel -j1 -I :: -X echo a::b::c:: | wc -l
|
|
||||||
seq 1 60000 | parallel -j1 -I '<>' -X echo 'a<>b<>c<>' | wc -l
|
seq 1 60000 | parallel -j1 -I :: -X echo a::b::c:: | wc -l
|
||||||
seq 1 60000 | parallel -j1 -I '<' -X echo 'a<b<c<' | wc -l
|
seq 1 60000 | parallel -j1 -I '<>' -X echo 'a<>b<>c<>' | wc -l
|
||||||
seq 1 60000 | parallel -j1 -I '>' -X echo 'a>b>c>' | wc -l
|
seq 1 60000 | parallel -j1 -I '<' -X echo 'a<b<c<' | wc -l
|
||||||
|
seq 1 60000 | parallel -j1 -I '>' -X echo 'a>b>c>' | wc -l
|
||||||
|
|
||||||
echo '### Test {.}'
|
echo '### Test {.}'
|
||||||
echo a | parallel -qX echo "'"{.}"' "
|
|
||||||
echo a | parallel -qX echo "'{.}'"
|
echo a | parallel -qX echo "'"{.}"' "
|
||||||
(echo "sleep 3; echo begin"; seq 1 30 | parallel -kq echo "sleep 1; echo {.}"; echo "echo end") | parallel -k -j0
|
echo a | parallel -qX echo "'{.}'"
|
||||||
|
(echo "sleep 3; echo begin"; seq 1 30 | parallel -kq echo "sleep 1; echo {.}"; echo "echo end") | parallel -k -j0
|
||||||
|
|
||||||
echo '### Test -I with -X and -m'
|
echo '### Test -I with -X and -m'
|
||||||
seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -k -I :: echo {.} ::'
|
|
||||||
seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -j1 -X -k -I :: echo a{.} b::'
|
seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -k -I :: echo {.} ::'
|
||||||
seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -j1 -m -k -I :: echo a{.} b::'
|
seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -j1 -X -k -I :: echo a{.} b::'
|
||||||
|
seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -j1 -m -k -I :: echo a{.} b::'
|
||||||
|
|
||||||
echo '### Test -i'
|
echo '### Test -i'
|
||||||
(echo a; echo END; echo b) | parallel -k -i -eEND echo repl{.}ce
|
|
||||||
|
(echo a; echo END; echo b) | parallel -k -i -eEND echo repl{.}ce
|
||||||
|
|
||||||
echo '### Test --replace'
|
echo '### Test --replace'
|
||||||
(echo a; echo END; echo b) | parallel -k --replace -eEND echo repl{.}ce
|
|
||||||
|
(echo a; echo END; echo b) | parallel -k --replace -eEND echo repl{.}ce
|
||||||
|
|
||||||
echo '### Test -t'
|
echo '### Test -t'
|
||||||
(echo b; echo c; echo f) | parallel -k -t echo {.}ar 2>&1 >/dev/null
|
|
||||||
|
(echo b; echo c; echo f) | parallel -k -t echo {.}ar 2>&1 >/dev/null
|
||||||
|
|
||||||
echo '### Test --verbose'
|
echo '### Test --verbose'
|
||||||
(echo b; echo c; echo f) | parallel -k --verbose echo {.}ar 2>&1 >/dev/null
|
|
||||||
|
(echo b; echo c; echo f) | parallel -k --verbose echo {.}ar 2>&1 >/dev/null
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -8,28 +8,6 @@ NICEPAR="nice nice parallel"
|
||||||
export NICEPAR
|
export NICEPAR
|
||||||
|
|
||||||
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | stdout parallel -vj4 -k --joblog /tmp/jl-`basename $0` -L1
|
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | stdout parallel -vj4 -k --joblog /tmp/jl-`basename $0` -L1
|
||||||
echo 'bug #41613: --compress --line-buffer no --tagstring';
|
|
||||||
diff
|
|
||||||
<(nice perl -e 'for("x011".."x110"){print "$_\t", ("\n", map { rand } (1..100000)) }'|
|
|
||||||
$NICEPAR -N10 -L1 --pipe -j6 --block 20M --compress
|
|
||||||
pv -qL 1000000 | perl -pe 's/(....).*/$1/')
|
|
||||||
<(nice perl -e 'for("x011".."x110"){print "$_\t", ("\n", map { rand } (1..100000)) }'|
|
|
||||||
$NICEPAR -N10 -L1 --pipe -j6 --block 20M --compress --line-buffer
|
|
||||||
pv -qL 1000000 | perl -pe 's/(....).*/$1/')
|
|
||||||
>/dev/null
|
|
||||||
|| (echo 'Good: --line-buffer matters'; false) && echo 'Bad: --line-buffer not working'
|
|
||||||
|
|
||||||
echo 'bug #41613: --compress --line-buffer with --tagstring';
|
|
||||||
diff
|
|
||||||
<(nice perl -e 'for("x011".."x110"){print "$_\t", ("\n", map { rand } (1..100000)) }'|
|
|
||||||
$NICEPAR -N10 -L1 --pipe -j6 --block 20M --compress --tagstring {#}
|
|
||||||
pv -qL 1000000 | perl -pe 's/(....).*/$1/')
|
|
||||||
<(nice perl -e 'for("x011".."x110"){print "$_\t", ("\n", map { rand } (1..100000)) }'|
|
|
||||||
$NICEPAR -N10 -L1 --pipe -j6 --block 20M --compress --tagstring {#} --line-buffer
|
|
||||||
pv -qL 1000000 | perl -pe 's/(....).*/$1/')
|
|
||||||
>/dev/null
|
|
||||||
|| (echo 'Good: --line-buffer matters'; false) && echo 'Bad: --line-buffer not working'
|
|
||||||
|
|
||||||
echo 'bug #41412: --timeout + --delay causes deadlock';
|
echo 'bug #41412: --timeout + --delay causes deadlock';
|
||||||
seq 10 | parallel -j10 --timeout 1 --delay .3 echo;
|
seq 10 | parallel -j10 --timeout 1 --delay .3 echo;
|
||||||
parallel -j3 --timeout 1 --delay 2 echo ::: 1 2 3;
|
parallel -j3 --timeout 1 --delay 2 echo ::: 1 2 3;
|
||||||
|
|
|
@ -67,6 +67,11 @@ perl -ne '$/="\n\n"; /^Output/../^[^O]\S/ and next; /^ / and print;' ../../src/
|
||||||
s/echo \d; exit \d\n/echo X; exit X\n/;
|
s/echo \d; exit \d\n/echo X; exit X\n/;
|
||||||
# Race condition causes outdir to sometime exist
|
# Race condition causes outdir to sometime exist
|
||||||
s/(std(out|err)|seq): Permission denied/$1: No such file or directory/;
|
s/(std(out|err)|seq): Permission denied/$1: No such file or directory/;
|
||||||
|
# Race condition
|
||||||
|
s/^4-(middle|end)\n//;
|
||||||
|
# Timings are often off
|
||||||
|
s/^(\d)$/9/;
|
||||||
|
s/^(\d\d)$/99/;
|
||||||
'
|
'
|
||||||
# 3+3 .par files (from --files), 1 .tms-file from tmux attach
|
# 3+3 .par files (from --files), 1 .tms-file from tmux attach
|
||||||
find {$TMPDIR,/var/tmp,/tmp}/{fif,tms,par[^a]}* -mmin -10 2>/dev/null | wc -l
|
find {$TMPDIR,/var/tmp,/tmp}/{fif,tms,par[^a]}* -mmin -10 2>/dev/null | wc -l
|
||||||
|
|
|
@ -38,68 +38,8 @@ echo '### Test killing children with --timeout and exit value (failed if timed o
|
||||||
pstree $$ | grep sleep | grep -v anacron | grep -v screensave | wc;
|
pstree $$ | grep sleep | grep -v anacron | grep -v screensave | wc;
|
||||||
parallel --timeout 3 'true {} ; for i in `seq 100 120`; do bash -c "(sleep $i)" & sleep $i & done; wait; echo No good' ::: 1000000000 1000000001 ;
|
parallel --timeout 3 'true {} ; for i in `seq 100 120`; do bash -c "(sleep $i)" & sleep $i & done; wait; echo No good' ::: 1000000000 1000000001 ;
|
||||||
echo $?; sleep 2; pstree $$ | grep sleep | grep -v anacron | grep -v screensave | wc
|
echo $?; sleep 2; pstree $$ | grep sleep | grep -v anacron | grep -v screensave | wc
|
||||||
|
|
||||||
echo '### Test -L -l and --max-lines'
|
|
||||||
(echo a_b;echo c) | parallel -km -L2 echo
|
|
||||||
(echo a_b;echo c) | parallel -k -L2 echo
|
|
||||||
(echo a_b;echo c) | xargs -L2 echo
|
|
||||||
echo '### xargs -L1 echo'
|
|
||||||
(echo a_b;echo c) | parallel -km -L1 echo
|
|
||||||
(echo a_b;echo c) | parallel -k -L1 echo
|
|
||||||
(echo a_b;echo c) | xargs -L1 echo
|
|
||||||
echo 'Lines ending in space should continue on next line'
|
|
||||||
echo '### xargs -L1 echo'
|
|
||||||
(echo a_b' ';echo c;echo d) | parallel -km -L1 echo
|
|
||||||
(echo a_b' ';echo c;echo d) | parallel -k -L1 echo
|
|
||||||
(echo a_b' ';echo c;echo d) | xargs -L1 echo
|
|
||||||
echo '### xargs -L2 echo'
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | parallel -km -L2 echo
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | parallel -k -L2 echo
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | xargs -L2 echo
|
|
||||||
echo '### xargs -l echo'
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | parallel -l -km echo # This behaves wrong
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | parallel -l -k echo # This behaves wrong
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | xargs -l echo
|
|
||||||
echo '### xargs -l2 echo'
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | parallel -km -l2 echo
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | parallel -k -l2 echo
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | xargs -l2 echo
|
|
||||||
echo '### xargs -l1 echo'
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | parallel -km -l1 echo
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | parallel -k -l1 echo
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | xargs -l1 echo
|
|
||||||
echo '### xargs --max-lines=2 echo'
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | parallel -km --max-lines 2 echo
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | parallel -k --max-lines 2 echo
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | xargs --max-lines=2 echo
|
|
||||||
echo '### xargs --max-lines echo'
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | parallel --max-lines -km echo # This behaves wrong
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | parallel --max-lines -k echo # This behaves wrong
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | xargs --max-lines echo
|
|
||||||
|
|
||||||
echo '### test too long args'
|
|
||||||
perl -e 'print "z"x1000000' | parallel echo 2>&1
|
|
||||||
perl -e 'print "z"x1000000' | xargs echo 2>&1
|
|
||||||
(seq 1 10; perl -e 'print "z"x1000000'; seq 12 15) | stdout parallel -j1 -km -s 10 echo
|
|
||||||
(seq 1 10; perl -e 'print "z"x1000000'; seq 12 15) | stdout xargs -s 10 echo
|
|
||||||
(seq 1 10; perl -e 'print "z"x1000000'; seq 12 15) | stdout parallel -j1 -kX -s 10 echo
|
|
||||||
echo '### Test -x'
|
|
||||||
(seq 1 10; echo 12345; seq 12 15) | stdout parallel -j1 -km -s 10 -x echo
|
|
||||||
(seq 1 10; echo 12345; seq 12 15) | stdout parallel -j1 -kX -s 10 -x echo
|
|
||||||
(seq 1 10; echo 12345; seq 12 15) | stdout xargs -s 10 -x echo
|
|
||||||
(seq 1 10; echo 1234; seq 12 15) | stdout parallel -j1 -km -s 10 -x echo
|
|
||||||
(seq 1 10; echo 1234; seq 12 15) | stdout parallel -j1 -kX -s 10 -x echo
|
|
||||||
(seq 1 10; echo 1234; seq 12 15) | stdout xargs -s 10 -x echo
|
|
||||||
|
|
||||||
echo '### Test -a and --arg-file: Read input from file instead of stdin'
|
|
||||||
seq 1 10 >/tmp/parallel_$$-1; parallel -k -a /tmp/parallel_$$-1 echo; rm /tmp/parallel_$$-1
|
|
||||||
seq 1 10 >/tmp/parallel_$$-2; parallel -k --arg-file /tmp/parallel_$$-2 echo; rm /tmp/parallel_$$-2
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
#echo '### Test bugfix if no command given'
|
|
||||||
#(echo echo; seq 1 5; perl -e 'print "z"x1000000'; seq 12 15) | stdout parallel -j1 -km -s 10
|
|
||||||
|
|
||||||
cd input-files/test15
|
cd input-files/test15
|
||||||
|
|
||||||
echo 'xargs Expect: 3 1 2'
|
echo 'xargs Expect: 3 1 2'
|
||||||
|
@ -132,138 +72,4 @@ echo /tmp/parallel_f1 /tmp/parallel_f2 | stdout parallel -kv --delimiter ' ' gzi
|
||||||
rm /tmp/parallel_f*
|
rm /tmp/parallel_f*
|
||||||
|
|
||||||
|
|
||||||
cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -vj10 -k --joblog /tmp/jl-`basename $0` -L1
|
|
||||||
echo '### Test -i and --replace: Replace with argument'
|
|
||||||
(echo a; echo END; echo b) | parallel -k -i -eEND echo repl{}ce
|
|
||||||
(echo a; echo END; echo b) | parallel -k --replace -eEND echo repl{}ce
|
|
||||||
(echo a; echo END; echo b) | parallel -k -i+ -eEND echo repl+ce
|
|
||||||
(echo e; echo END; echo b) | parallel -k -i'*' -eEND echo r'*'plac'*'
|
|
||||||
(echo a; echo END; echo b) | parallel -k --replace + -eEND echo repl+ce
|
|
||||||
(echo a; echo END; echo b) | parallel -k --replace== -eEND echo repl=ce
|
|
||||||
(echo a; echo END; echo b) | parallel -k --replace = -eEND echo repl=ce
|
|
||||||
(echo a; echo END; echo b) | parallel -k --replace=^ -eEND echo repl^ce
|
|
||||||
(echo a; echo END; echo b) | parallel -k -I^ -eEND echo repl^ce
|
|
||||||
|
|
||||||
echo '### Test -E: Artificial end-of-file'
|
|
||||||
(echo include this; echo END; echo not this) | parallel -k -E END echo
|
|
||||||
(echo include this; echo END; echo not this) | parallel -k -EEND echo
|
|
||||||
|
|
||||||
echo '### Test -e and --eof: Artificial end-of-file'
|
|
||||||
(echo include this; echo END; echo not this) | parallel -k -e END echo
|
|
||||||
(echo include this; echo END; echo not this) | parallel -k -eEND echo
|
|
||||||
(echo include this; echo END; echo not this) | parallel -k --eof=END echo
|
|
||||||
(echo include this; echo END; echo not this) | parallel -k --eof END echo
|
|
||||||
|
|
||||||
echo '### Test -n and --max-args: Max number of args per line (only with -X and -m)'
|
|
||||||
(echo line 1;echo line 2;echo line 3) | parallel -k -n1 -m echo
|
|
||||||
(echo line 1;echo line 1;echo line 2) | parallel -k -n2 -m echo
|
|
||||||
(echo line 1;echo line 2;echo line 3) | parallel -k -n1 -X echo
|
|
||||||
(echo line 1;echo line 1;echo line 2) | parallel -k -n2 -X echo
|
|
||||||
(echo line 1;echo line 2;echo line 3) | parallel -k -n1 echo
|
|
||||||
(echo line 1;echo line 1;echo line 2) | parallel -k -n2 echo
|
|
||||||
(echo line 1;echo line 2;echo line 3) | parallel -k --max-args=1 -X echo
|
|
||||||
(echo line 1;echo line 2;echo line 3) | parallel -k --max-args 1 -X echo
|
|
||||||
(echo line 1;echo line 1;echo line 2) | parallel -k --max-args=2 -X echo
|
|
||||||
(echo line 1;echo line 1;echo line 2) | parallel -k --max-args 2 -X echo
|
|
||||||
(echo line 1;echo line 2;echo line 3) | parallel -k --max-args 1 echo
|
|
||||||
(echo line 1;echo line 1;echo line 2) | parallel -k --max-args 2 echo
|
|
||||||
|
|
||||||
echo '### Test --max-procs and -P: Number of processes'
|
|
||||||
seq 1 10 | parallel -k --max-procs +0 echo max proc
|
|
||||||
seq 1 10 | parallel -k -P 200% echo 200% proc
|
|
||||||
|
|
||||||
echo '### Test --delimiter and -d: Delimiter instead of newline'
|
|
||||||
echo '# Yes there is supposed to be an extra newline for -d N'
|
|
||||||
echo line 1Nline 2Nline 3 | parallel -k -d N echo This is
|
|
||||||
echo line 1Nline 2Nline 3 | parallel -k --delimiter N echo This is
|
|
||||||
printf "delimiter NUL line 1\0line 2\0line 3" | parallel -k -d '\0' echo
|
|
||||||
printf "delimiter TAB line 1\tline 2\tline 3" | parallel -k --delimiter '\t' echo
|
|
||||||
|
|
||||||
echo '### Test --max-chars and -s: Max number of chars in a line'
|
|
||||||
(echo line 1;echo line 1;echo line 2) | parallel -k --max-chars 25 -X echo
|
|
||||||
(echo line 1;echo line 1;echo line 2) | parallel -k -s 25 -X echo
|
|
||||||
|
|
||||||
echo '### Test --no-run-if-empty and -r: This should give no output'
|
|
||||||
echo " " | parallel -r echo
|
|
||||||
echo " " | parallel --no-run-if-empty echo
|
|
||||||
|
|
||||||
echo '### Test --help and -h: Help output (just check we get the same amount of lines)'
|
|
||||||
echo Output from -h and --help
|
|
||||||
parallel -h | wc -l
|
|
||||||
parallel --help | wc -l
|
|
||||||
|
|
||||||
echo '### Test --version: Version output (just check we get the same amount of lines)'
|
|
||||||
parallel --version | wc -l
|
|
||||||
|
|
||||||
echo '### Test --verbose and -t'
|
|
||||||
(echo b; echo c; echo f) | parallel -k -t echo {}ar 2>&1 >/dev/null
|
|
||||||
(echo b; echo c; echo f) | parallel -k --verbose echo {}ar 2>&1 >/dev/null
|
|
||||||
|
|
||||||
echo '### Test --show-limits'
|
|
||||||
(echo b; echo c; echo f) | parallel -k --show-limits echo {}ar
|
|
||||||
(echo b; echo c; echo f) | parallel -j1 -kX --show-limits -s 100 echo {}ar
|
|
||||||
|
|
||||||
echo '### Test empty line as input'
|
|
||||||
echo | parallel echo empty input line
|
|
||||||
|
|
||||||
echo '### Tests if (cat | sh) works'
|
|
||||||
perl -e 'for(1..25) {print "echo a $_; echo b $_\n"}' | parallel 2>&1 | sort
|
|
||||||
|
|
||||||
echo '### Test if xargs-mode works'
|
|
||||||
perl -e 'for(1..25) {print "a $_\nb $_\n"}' | parallel echo 2>&1 | sort
|
|
||||||
|
|
||||||
echo '### Test -q'
|
|
||||||
parallel -kq perl -e '$ARGV[0]=~/^\S+\s+\S+$/ and print $ARGV[0],"\n"' ::: "a b" c "d e f" g "h i"
|
|
||||||
|
|
||||||
echo '### Test -q {#}'
|
|
||||||
parallel -kq echo {#} ::: a b
|
|
||||||
parallel -kq echo {\#} ::: a b
|
|
||||||
parallel -kq echo {\\#} ::: a b
|
|
||||||
|
|
||||||
echo '### Test long commands do not take up all memory'
|
|
||||||
seq 1 100 | parallel -j0 -qv perl -e '$r=rand(shift);for($f=0;$f<$r;$f++){$a="a"x100};print shift,"\n"' 10000 2>/dev/null | sort
|
|
||||||
|
|
||||||
echo '### Test 0-arguments'
|
|
||||||
seq 1 2 | parallel -k -n0 echo n0
|
|
||||||
seq 1 2 | parallel -k -L0 echo L0
|
|
||||||
seq 1 2 | parallel -k -N0 echo N0
|
|
||||||
|
|
||||||
echo '### Because of --tollef -l, then -l0 == -l1, sorry'
|
|
||||||
seq 1 2 | parallel -k -l0 echo l0
|
|
||||||
|
|
||||||
echo '### Test replace {}'
|
|
||||||
seq 1 2 | parallel -k -N0 echo replace {} curlies
|
|
||||||
|
|
||||||
echo '### Test arguments on commandline'
|
|
||||||
parallel -k -N0 echo args on cmdline ::: 1 2
|
|
||||||
|
|
||||||
echo '### Test --nice locally'
|
|
||||||
parallel --nice 1 -vv 'PAR=a bash -c "echo \$PAR {}"' ::: b
|
|
||||||
|
|
||||||
echo '### Test --nice remote'
|
|
||||||
stdout parallel --nice 1 -S .. -vv 'PAR=a bash -c "echo \$PAR {}"' ::: b |
|
|
||||||
perl -pe 's/\S*parallel-server\S*/one-server/;s/[a-f0-9]{500,}/hex/;s/\d{5,8}/pId/g;'
|
|
||||||
|
|
||||||
echo '### Test distribute arguments at EOF to 2 jobslots'
|
|
||||||
seq 1 92 | parallel -j+0 -kX -s 100 echo
|
|
||||||
|
|
||||||
echo '### Test distribute arguments at EOF to 5 jobslots'
|
|
||||||
seq 1 92 | parallel -j+3 -kX -s 100 echo
|
|
||||||
|
|
||||||
echo '### Test distribute arguments at EOF to infinity jobslots'
|
|
||||||
seq 1 92 | parallel -j0 -kX -s 100 echo 2>/dev/null
|
|
||||||
|
|
||||||
echo '### Test -N is not broken by distribution - single line'
|
|
||||||
seq 9 | parallel -N 10 echo
|
|
||||||
|
|
||||||
echo '### Test -N is not broken by distribution - two lines'
|
|
||||||
seq 19 | parallel -k -N 10 echo
|
|
||||||
|
|
||||||
echo '### Test -N context replace'
|
|
||||||
seq 19 | parallel -k -N 10 echo a{}b
|
|
||||||
|
|
||||||
echo '### Test -L context replace'
|
|
||||||
seq 19 | parallel -k -L 10 echo a{}b
|
|
||||||
EOF
|
|
||||||
|
|
||||||
touch ~/.parallel/will-cite
|
touch ~/.parallel/will-cite
|
||||||
|
|
|
@ -192,7 +192,7 @@ stdout ssh $SSHLOGIN1 ls '/tmp/parallel.file*' || echo OK
|
||||||
stdout ssh $SSHLOGIN2 ls '/tmp/parallel.file*' || echo OK
|
stdout ssh $SSHLOGIN2 ls '/tmp/parallel.file*' || echo OK
|
||||||
|
|
||||||
echo '### --transfer --cleanup - multiple argument files'
|
echo '### --transfer --cleanup - multiple argument files'
|
||||||
parallel --xapply -kv --transfer --cleanup -S$SSHLOGIN2 cat {2} {1} :::: /tmp/test17rel <(sort -r /tmp/test17abs)
|
parallel --xapply -kv --transferfile {1} --transferfile {2} --cleanup -S$SSHLOGIN2 cat {2} {1} :::: /tmp/test17rel <(sort -r /tmp/test17abs)
|
||||||
# Should give: No such file or directory
|
# Should give: No such file or directory
|
||||||
stdout ssh $SSHLOGIN2 ls '/tmp/parallel.file*' || echo OK
|
stdout ssh $SSHLOGIN2 ls '/tmp/parallel.file*' || echo OK
|
||||||
|
|
||||||
|
|
|
@ -123,7 +123,7 @@ stdout ssh $SSHLOGIN1 ls 'tmp/parallel.file*' || echo OK
|
||||||
stdout ssh $SSHLOGIN2 ls 'tmp/parallel.file*' || echo OK
|
stdout ssh $SSHLOGIN2 ls 'tmp/parallel.file*' || echo OK
|
||||||
echo 'Input for ssh'
|
echo 'Input for ssh'
|
||||||
cat /tmp/myssh1-run /tmp/myssh2-run | perl -pe 's/(PID.)\d+/${1}00000/g;s/(SEQ[ =]|line)\d/$1X/g;' |
|
cat /tmp/myssh1-run /tmp/myssh2-run | perl -pe 's/(PID.)\d+/${1}00000/g;s/(SEQ[ =]|line)\d/$1X/g;' |
|
||||||
perl -pe 's/\S*parallel-server\S*/one-server/;s:[a-zA-Z0-9/+=]{500,}:base64:;'
|
perl -pe 's/\S*parallel-server\S*/one-server/;s:[a-zA-Z0-9/\\+=]{500,}:base64:;'
|
||||||
rm /tmp/myssh1-run /tmp/myssh2-run
|
rm /tmp/myssh1-run /tmp/myssh2-run
|
||||||
|
|
||||||
rm -rf /tmp/parallel.file*
|
rm -rf /tmp/parallel.file*
|
||||||
|
|
|
@ -13,16 +13,6 @@ echo '### Test of --progress'
|
||||||
echo '### Test of --progress with no jobs'
|
echo '### Test of --progress with no jobs'
|
||||||
stdout parallel --progress "sleep 1; echo {}" < /dev/null
|
stdout parallel --progress "sleep 1; echo {}" < /dev/null
|
||||||
|
|
||||||
echo '### bug #34422: parallel -X --eta crashes with div by zero'
|
|
||||||
# We do not care how long it took
|
|
||||||
seq 2 | stdout parallel -X --eta echo | grep -E -v 'ETA:.*AVG'
|
|
||||||
|
|
||||||
echo '### --timeout --onall on remote machines: 2*slept 1, 2 jobs failed'
|
echo '### --timeout --onall on remote machines: 2*slept 1, 2 jobs failed'
|
||||||
parallel -j0 --timeout 6 --onall -S localhost,parallel@parallel-server1 'sleep {}; echo slept {}' ::: 1 8 9 ; echo jobs failed: $?
|
parallel -j0 --timeout 6 --onall -S localhost,parallel@parallel-server1 'sleep {}; echo slept {}' ::: 1 8 9 ; echo jobs failed: $?
|
||||||
|
|
||||||
echo '### --pipe without command'
|
|
||||||
seq -w 10 | stdout parallel --pipe
|
|
||||||
|
|
||||||
echo '### bug #36260: {n} expansion in --colsep files fails for empty fields if all following fields are also empty'
|
|
||||||
echo A,B,, | parallel --colsep , echo {1}{3}{2}
|
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -5,14 +5,6 @@ SERVER2=parallel-server1
|
||||||
|
|
||||||
# -L1 will join lines ending in ' '
|
# -L1 will join lines ending in ' '
|
||||||
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | parallel -vj10 -k --joblog /tmp/jl-`basename $0` -L1
|
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | parallel -vj10 -k --joblog /tmp/jl-`basename $0` -L1
|
||||||
echo "### BUG: The length for -X is not close to max (131072)";
|
|
||||||
seq 1 60000 | nice parallel -X echo {.} aa {}{.} {}{}d{} {}dd{}d{.} |head -n 1 |wc
|
|
||||||
seq 1 60000 | nice parallel -X echo a{}b{}c |head -n 1 |wc
|
|
||||||
seq 1 60000 | nice parallel -X echo |head -n 1 |wc
|
|
||||||
seq 1 60000 | nice parallel -X echo a{}b{}c {} |head -n 1 |wc
|
|
||||||
seq 1 60000 | nice parallel -X echo {}aa{} |head -n 1 |wc
|
|
||||||
seq 1 60000 | nice parallel -X echo {} aa {} |head -n 1 |wc
|
|
||||||
|
|
||||||
echo '### bug #32191: Deep recursion on subroutine main::get_job_with_sshlogin'
|
echo '### bug #32191: Deep recursion on subroutine main::get_job_with_sshlogin'
|
||||||
seq 1 150 | stdout nice parallel -j9 --retries 2 -S localhost,: "/bin/non-existant 2>/dev/null"
|
seq 1 150 | stdout nice parallel -j9 --retries 2 -S localhost,: "/bin/non-existant 2>/dev/null"
|
||||||
|
|
||||||
|
@ -21,10 +13,6 @@ echo '### Test --load locally - should take >10s'
|
||||||
seq 10 | parallel --nice 19 --timeout 13 -j0 -N0 "gzip < /dev/zero > /dev/null" &
|
seq 10 | parallel --nice 19 --timeout 13 -j0 -N0 "gzip < /dev/zero > /dev/null" &
|
||||||
sleep 2; stdout /usr/bin/time -f %e parallel --load 10 sleep ::: 1 | perl -ne '$_ > 10 and print "OK\n"'
|
sleep 2; stdout /usr/bin/time -f %e parallel --load 10 sleep ::: 1 | perl -ne '$_ > 10 and print "OK\n"'
|
||||||
|
|
||||||
echo '### Test --load remote'
|
|
||||||
ssh parallel@$SERVER2 'seq 10 | parallel --nice 19 --timeout 10 -j0 -N0 "gzip < /dev/zero > /dev/null"' &
|
|
||||||
stdout /usr/bin/time -f %e parallel -S parallel@$SERVER2 --load 10 sleep ::: 1 | perl -ne '$_ > 10 and print "OK\n"'
|
|
||||||
|
|
||||||
echo '### Test --load read from a file - more than 3s'
|
echo '### Test --load read from a file - more than 3s'
|
||||||
echo '# This will run 10 processes in parallel for 10s';
|
echo '# This will run 10 processes in parallel for 10s';
|
||||||
seq 10 | parallel --nice 19 --timeout 10 -j0 -N0 "gzip < /dev/zero > /dev/null" &
|
seq 10 | parallel --nice 19 --timeout 10 -j0 -N0 "gzip < /dev/zero > /dev/null" &
|
||||||
|
|
|
@ -195,7 +195,7 @@ stdout ssh $SSHLOGIN1 ls '/tmp/parallel.file*' || echo OK
|
||||||
stdout ssh $SSHLOGIN2 ls '/tmp/parallel.file*' || echo OK
|
stdout ssh $SSHLOGIN2 ls '/tmp/parallel.file*' || echo OK
|
||||||
|
|
||||||
echo '### --transfer --cleanup - multiple argument files'
|
echo '### --transfer --cleanup - multiple argument files'
|
||||||
parallel -kv --xapply --transfer --cleanup -S$SSHLOGIN2 cat {2} {1} :::: /tmp/test17rel <(sort -r /tmp/test17abs)
|
parallel --xapply -kv --transferfile {1} --transferfile {2} --cleanup -S$SSHLOGIN2 cat {2} {1} :::: /tmp/test17rel <(sort -r /tmp/test17abs)
|
||||||
# Should give: No such file or directory
|
# Should give: No such file or directory
|
||||||
stdout ssh $SSHLOGIN2 ls '/tmp/parallel.file*' || echo OK
|
stdout ssh $SSHLOGIN2 ls '/tmp/parallel.file*' || echo OK
|
||||||
|
|
||||||
|
|
|
@ -6,32 +6,11 @@ SERVER2=parallel-server2
|
||||||
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | parallel -vj10 -k --joblog /tmp/jl-`basename $0` -L1
|
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | parallel -vj10 -k --joblog /tmp/jl-`basename $0` -L1
|
||||||
echo '### Test --return of weirdly named file'
|
echo '### Test --return of weirdly named file'
|
||||||
stdout parallel --return {} -vv -S parallel\@$SERVER1 echo '>'{} ::: 'aa<${#}" b' |
|
stdout parallel --return {} -vv -S parallel\@$SERVER1 echo '>'{} ::: 'aa<${#}" b' |
|
||||||
perl -pe 's/\S*parallel-server\S*/one-server/;s/[a-f0-9]{500,}/hex/;s/\d{5,8}/pId/g;'; rm 'aa<${#}" b'
|
perl -pe 's/\S*parallel-server\S*/one-server/;s:[a-z+=/\\0-9]{500,}:base64:i;'; rm 'aa<${#}" b'
|
||||||
|
|
||||||
echo '### Test if remote login shell is csh'
|
echo '### Test if remote login shell is csh'
|
||||||
stdout parallel -k -vv -S csh@localhost 'echo $PARALLEL_PID $PARALLEL_SEQ {}| wc -w' ::: a b c |
|
stdout parallel -k -vv -S csh@localhost 'echo $PARALLEL_PID $PARALLEL_SEQ {}| wc -w' ::: a b c |
|
||||||
perl -pe 's/\S*parallel-server\S*/one-server/;s/[a-f0-9]{500,}/hex/;s/\d{5,8}/pId/g;'
|
perl -pe 's/\S*parallel-server\S*/one-server/;s:[a-z+=/\\0-9]{500,}:base64:i;'
|
||||||
|
|
||||||
echo '### Test {} multiple times in different commands'
|
|
||||||
seq 10 | parallel -v -Xj1 echo {} \; echo {}
|
|
||||||
|
|
||||||
echo '### Test of -X {1}-{2} with multiple input sources'
|
|
||||||
parallel -j1 -kX echo {1}-{2} ::: a ::: b
|
|
||||||
parallel -j2 -kX echo {1}-{2} ::: a b ::: c d
|
|
||||||
parallel -j2 -kX echo {1}-{2} ::: a b c ::: d e f
|
|
||||||
parallel -j0 -kX echo {1}-{2} ::: a b c ::: d e f
|
|
||||||
|
|
||||||
echo '### Test of -X {}-{.} with multiple input sources'
|
|
||||||
parallel -j1 -kX echo {}-{.} ::: a ::: b
|
|
||||||
parallel -j2 -kX echo {}-{.} ::: a b ::: c d
|
|
||||||
parallel -j2 -kX echo {}-{.} ::: a b c ::: d e f
|
|
||||||
parallel -j0 -kX echo {}-{.} ::: a b c ::: d e f
|
|
||||||
|
|
||||||
echo '### Test of -r with --pipe - the first should give an empty line. The second should not.'
|
|
||||||
echo | parallel -j2 -N1 --pipe cat | wc -l
|
|
||||||
echo | parallel -r -j2 -N1 --pipe cat | wc -l
|
|
||||||
|
|
||||||
echo '### Test --tty'
|
|
||||||
seq 0.1 0.1 0.5 | parallel -j1 --tty tty\;sleep
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# -L1 will join lines ending in ' '
|
|
||||||
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | parallel -vj10 -k --joblog /tmp/jl-`basename $0` -L1
|
|
||||||
echo "### Test memory consumption stays (almost) the same for 30 and 300 jobs"
|
|
||||||
mem30=$( stdout time -f %M parallel -j2 true :::: <(perl -e '$a="x"x100000;for(1..30){print $a,"\n"}') );
|
|
||||||
mem300=$( stdout time -f %M parallel -j2 true :::: <(perl -e '$a="x"x100000;for(1..300){print $a,"\n"}') );
|
|
||||||
echo "Memory use should not depend very much on the total number of jobs run\n";
|
|
||||||
echo "Test if memory consumption(300 jobs) < memory consumption(30 jobs) * 110% ";
|
|
||||||
echo $(($mem300*100 < $mem30 * 110))
|
|
||||||
|
|
||||||
echo '### Test --shellquote'
|
|
||||||
perl -e 'print pack("c*",1..255)' | parallel -0 --shellquote
|
|
||||||
|
|
||||||
EOF
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,8 +1,11 @@
|
||||||
echo '### Test if we can deal with output > 4 GB'
|
echo '### Test of --retries on unreachable host'
|
||||||
### Test if we can deal with output > 4 GB
|
### Test of --retries on unreachable host
|
||||||
## echo | niceload --io 10 parallel -q perl -e '"\$a=\"x\"x1000000;for(0..4300){print \$a}"' | md5sum
|
seq 2 | stdout parallel -k --retries 2 -v -S 4.3.2.1,: echo
|
||||||
echo | parallel --tmpdir $TMP5G -q perl -e '$a="x"x1000000;for(0..4300){print $a}' | nice md5sum
|
parallel: Warning: Could not figure out number of cpus on 4.3.2.1 (). Using 1.
|
||||||
46a318993dfc8e2afd71ff2bc6f605f1 -
|
echo 1
|
||||||
|
1
|
||||||
|
echo 2
|
||||||
|
2
|
||||||
echo '**'
|
echo '**'
|
||||||
**
|
**
|
||||||
echo "### Test Force outside the file handle limit, 2009-02-17 Gave fork error"
|
echo "### Test Force outside the file handle limit, 2009-02-17 Gave fork error"
|
||||||
|
@ -15,13 +18,17 @@ Start
|
||||||
end
|
end
|
||||||
echo '**'
|
echo '**'
|
||||||
**
|
**
|
||||||
echo '### Test of --retries on unreachable host'
|
echo '### Test if we can deal with output > 4 GB'
|
||||||
### Test of --retries on unreachable host
|
### Test if we can deal with output > 4 GB
|
||||||
seq 2 | stdout parallel -k --retries 2 -v -S 4.3.2.1,: echo
|
echo | nice parallel --tmpdir $TMP5G -q perl -e '$a="x"x1000000;for(0..4300){print $a}' | nice md5sum
|
||||||
parallel: Warning: Could not figure out number of cpus on 4.3.2.1 (). Using 1.
|
46a318993dfc8e2afd71ff2bc6f605f1 -
|
||||||
echo 1
|
echo '**'
|
||||||
1
|
**
|
||||||
echo 2
|
echo 'bug #41613: --compress --line-buffer no --tagstring'; diff <(nice perl -e 'for("x011".."x110"){print "$_\t", ("\n", map { rand } (1..100000)) }'| nice parallel -N10 -L1 --pipe -j6 --block 20M --compress pv -qL 1000000 | perl -pe 's/(....).*/$1/') <(nice perl -e 'for("x011".."x110"){print "$_\t", ("\n", map { rand } (1..100000)) }'| nice parallel -N10 -L1 --pipe -j6 --block 20M --compress --line-buffer pv -qL 1000000 | perl -pe 's/(....).*/$1/') >/dev/null || (echo 'Good: --line-buffer matters'; false) && echo 'Bad: --line-buffer not working'
|
||||||
2
|
bug #41613: --compress --line-buffer no --tagstring
|
||||||
|
Good: --line-buffer matters
|
||||||
|
echo 'bug #41613: --compress --line-buffer with --tagstring'; diff <(nice perl -e 'for("x011".."x110"){print "$_\t", ("\n", map { rand } (1..100000)) }'| nice parallel -N10 -L1 --pipe -j6 --block 20M --compress --tagstring {#} pv -qL 1000000 | perl -pe 's/(....).*/$1/') <(nice perl -e 'for("x011".."x110"){print "$_\t", ("\n", map { rand } (1..100000)) }'| nice parallel -N10 -L1 --pipe -j6 --block 20M --compress --tagstring {#} --line-buffer pv -qL 1000000 | perl -pe 's/(....).*/$1/') >/dev/null || (echo 'Good: --line-buffer matters'; false) && echo 'Bad: --line-buffer not working'
|
||||||
|
bug #41613: --compress --line-buffer with --tagstring
|
||||||
|
Good: --line-buffer matters
|
||||||
echo '**'
|
echo '**'
|
||||||
**
|
**
|
||||||
|
|
|
@ -848,3 +848,33 @@ echo '### bug #47750: -k --line-buffer should give current job up to now'
|
||||||
stdout top
|
stdout top
|
||||||
stderr in the middle
|
stderr in the middle
|
||||||
stdout end
|
stdout end
|
||||||
|
echo '**'
|
||||||
|
**
|
||||||
|
echo "### Test memory consumption stays (almost) the same for 30 and 300 jobs"
|
||||||
|
### Test memory consumption stays (almost) the same for 30 and 300 jobs
|
||||||
|
echo "should give 1 == true"
|
||||||
|
should give 1 == true
|
||||||
|
mem30=$( stdout time -f %M parallel -j2 true :::: <(perl -e '$a="x"x60000;for(1..30){print $a,"\n"}') ); mem300=$( stdout time -f %M parallel -j2 true :::: <(perl -e '$a="x"x60000;for(1..300){print $a,"\n"}') ); echo "Memory use should not depend very much on the total number of jobs run\n"; echo "Test if memory consumption(300 jobs) < memory consumption(30 jobs) * 110% "; echo $(($mem300*100 < $mem30 * 110))
|
||||||
|
Memory use should not depend very much on the total number of jobs run\n
|
||||||
|
Test if memory consumption(300 jobs) < memory consumption(30 jobs) * 110%
|
||||||
|
1
|
||||||
|
echo '**'
|
||||||
|
**
|
||||||
|
echo "### Test max line length -m -I"
|
||||||
|
### Test max line length -m -I
|
||||||
|
seq 1 60000 | parallel -I :: -m -j1 echo a::b::c | sort >/tmp/114-a$$; md5sum </tmp/114-a$$; export CHAR=$(cat /tmp/114-a$$ | wc -c); export LINES=$(cat /tmp/114-a$$ | wc -l); echo "Chars per line ($CHAR/$LINES): "$(echo "$CHAR/$LINES" | bc); rm /tmp/114-a$$
|
||||||
|
14bacad229d8b0d32be0a2339c2a6af7 -
|
||||||
|
Chars per line (697810/11): 63437
|
||||||
|
echo "### Test max line length -X -I"
|
||||||
|
### Test max line length -X -I
|
||||||
|
seq 1 60000 | parallel -I :: -X -j1 echo a::b::c | sort >/tmp/114-b$$; md5sum </tmp/114-b$$; export CHAR=$(cat /tmp/114-b$$ | wc -c); export LINES=$(cat /tmp/114-b$$ | wc -l); echo "Chars per line ($CHAR/$LINES): "$(echo "$CHAR/$LINES" | bc); rm /tmp/114-b$$
|
||||||
|
81c0a85162c989c07f666b827a30ce52 -
|
||||||
|
Chars per line (817788/13): 62906
|
||||||
|
echo '**'
|
||||||
|
**
|
||||||
|
echo "### bug #41609: --compress fails"
|
||||||
|
### bug #41609: --compress fails
|
||||||
|
seq 12 | parallel --compress --compress-program bzip2 -k seq {} 1000000 | md5sum
|
||||||
|
24812dd0f24a26d08a780f988b9d5ad2 -
|
||||||
|
seq 12 | parallel --compress -k seq {} 1000000 | md5sum
|
||||||
|
24812dd0f24a26d08a780f988b9d5ad2 -
|
||||||
|
|
|
@ -1,3 +1,16 @@
|
||||||
|
echo "### BUG: The length for -X is not close to max (131072)"; seq 1 60000 | parallel -X echo {.} aa {}{.} {}{}d{} {}dd{}d{.} |head -n 1 |wc
|
||||||
|
### BUG: The length for -X is not close to max (131072)
|
||||||
|
1 6861 65500
|
||||||
|
seq 1 60000 | parallel -X echo a{}b{}c |head -n 1 |wc
|
||||||
|
1 5644 65514
|
||||||
|
seq 1 60000 | parallel -X echo |head -n 1 |wc
|
||||||
|
1 12771 65520
|
||||||
|
seq 1 60000 | parallel -X echo a{}b{}c {} |head -n 1 |wc
|
||||||
|
1 8098 65512
|
||||||
|
seq 1 60000 | parallel -X echo {}aa{} |head -n 1 |wc
|
||||||
|
1 6157 65513
|
||||||
|
seq 1 60000 | parallel -X echo {} aa {} |head -n 1 |wc
|
||||||
|
1 13547 65519
|
||||||
echo '### Test --fifo under csh'
|
echo '### Test --fifo under csh'
|
||||||
### Test --fifo under csh
|
### Test --fifo under csh
|
||||||
csh -c "seq 3000000 | parallel -k --pipe --fifo 'sleep .{#};cat {}|wc -c ; false; echo \$status; false'"; echo exit $?
|
csh -c "seq 3000000 | parallel -k --pipe --fifo 'sleep .{#};cat {}|wc -c ; false; echo \$status; false'"; echo exit $?
|
||||||
|
@ -46,3 +59,262 @@ echo '### Test --fifo under csh'
|
||||||
868832
|
868832
|
||||||
1
|
1
|
||||||
exit 22
|
exit 22
|
||||||
|
echo '**'
|
||||||
|
**
|
||||||
|
echo '### bug #44546: If --compress-program fails: fail'
|
||||||
|
### bug #44546: If --compress-program fails: fail
|
||||||
|
parallel --line-buffer --compress-program false echo \;ls ::: /no-existing; echo $?
|
||||||
|
1
|
||||||
|
parallel: Error: false failed.
|
||||||
|
parallel: Error: false failed.
|
||||||
|
parallel --tag --line-buffer --compress-program false echo \;ls ::: /no-existing; echo $?
|
||||||
|
1
|
||||||
|
parallel: Error: false failed.
|
||||||
|
parallel: Error: false failed.
|
||||||
|
(parallel --files --tag --line-buffer --compress-program false echo \;sleep 1\;ls ::: /no-existing; echo $?) | tail -n1
|
||||||
|
1
|
||||||
|
parallel: Error: false failed.
|
||||||
|
parallel: Error: false failed.
|
||||||
|
parallel: Error: false failed.
|
||||||
|
parallel: Error: false failed.
|
||||||
|
parallel --tag --compress-program false echo \;ls ::: /no-existing; echo $?
|
||||||
|
1
|
||||||
|
parallel: Error: false failed.
|
||||||
|
parallel: Error: false failed.
|
||||||
|
parallel --line-buffer --compress-program false echo \;ls ::: /no-existing; echo $?
|
||||||
|
1
|
||||||
|
parallel: Error: false failed.
|
||||||
|
parallel: Error: false failed.
|
||||||
|
parallel --compress-program false echo \;ls ::: /no-existing; echo $?
|
||||||
|
1
|
||||||
|
parallel: Error: false failed.
|
||||||
|
parallel: Error: false failed.
|
||||||
|
echo 'bug #41613: --compress --line-buffer - no newline'; echo 'pipe compress tagstring'
|
||||||
|
bug #41613: --compress --line-buffer - no newline
|
||||||
|
pipe compress tagstring
|
||||||
|
perl -e 'print "O"'| parallel --compress --tagstring {#} --pipe --line-buffer cat; echo "K"
|
||||||
|
1 OK
|
||||||
|
echo 'pipe compress notagstring'
|
||||||
|
pipe compress notagstring
|
||||||
|
perl -e 'print "O"'| parallel --compress --pipe --line-buffer cat; echo "K"
|
||||||
|
OK
|
||||||
|
echo 'pipe nocompress tagstring'
|
||||||
|
pipe nocompress tagstring
|
||||||
|
perl -e 'print "O"'| parallel --tagstring {#} --pipe --line-buffer cat; echo "K"
|
||||||
|
1 OK
|
||||||
|
echo 'pipe nocompress notagstring'
|
||||||
|
pipe nocompress notagstring
|
||||||
|
perl -e 'print "O"'| parallel --pipe --line-buffer cat; echo "K"
|
||||||
|
OK
|
||||||
|
echo 'nopipe compress tagstring'
|
||||||
|
nopipe compress tagstring
|
||||||
|
parallel --compress --tagstring {#} --line-buffer echo {} O ::: -n; echo "K"
|
||||||
|
1 OK
|
||||||
|
echo 'nopipe compress notagstring'
|
||||||
|
nopipe compress notagstring
|
||||||
|
parallel --compress --line-buffer echo {} O ::: -n; echo "K"
|
||||||
|
OK
|
||||||
|
echo 'nopipe nocompress tagstring'
|
||||||
|
nopipe nocompress tagstring
|
||||||
|
parallel --tagstring {#} --line-buffer echo {} O ::: -n; echo "K"
|
||||||
|
1 OK
|
||||||
|
echo 'nopipe nocompress notagstring'
|
||||||
|
nopipe nocompress notagstring
|
||||||
|
parallel --line-buffer echo {} O ::: -n; echo "K"
|
||||||
|
OK
|
||||||
|
echo 'Compress with failing (de)compressor'
|
||||||
|
Compress with failing (de)compressor
|
||||||
|
parallel -k --tag --compress --compress-program 'cat;true' --decompress-program 'cat;true' echo ::: tag true true
|
||||||
|
tag tag
|
||||||
|
true true
|
||||||
|
true true
|
||||||
|
parallel -k --tag --compress --compress-program 'cat;false' --decompress-program 'cat;true' echo ::: tag false true
|
||||||
|
tag tag
|
||||||
|
false false
|
||||||
|
true true
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel -k --tag --compress --compress-program 'cat;false' --decompress-program 'cat;false' echo ::: tag false false
|
||||||
|
tag tag
|
||||||
|
false false
|
||||||
|
false false
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel -k --tag --compress --compress-program 'cat;true' --decompress-program 'cat;false' echo ::: tag true false
|
||||||
|
tag tag
|
||||||
|
true true
|
||||||
|
false false
|
||||||
|
parallel -k --compress --compress-program 'cat;true' --decompress-program 'cat;true' echo ::: true true
|
||||||
|
true
|
||||||
|
true
|
||||||
|
parallel -k --compress --compress-program 'cat;false' --decompress-program 'cat;true' echo ::: false true
|
||||||
|
false
|
||||||
|
true
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel -k --compress --compress-program 'cat;false' --decompress-program 'cat;false' echo ::: false false
|
||||||
|
false
|
||||||
|
false
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel -k --compress --compress-program 'cat;true' --decompress-program 'cat;false' echo ::: true false
|
||||||
|
true
|
||||||
|
false
|
||||||
|
parallel -k --line-buffer --compress --compress-program 'cat;true' --decompress-program 'cat;true' echo ::: line-buffer true true
|
||||||
|
line-buffer
|
||||||
|
true
|
||||||
|
true
|
||||||
|
parallel -k --line-buffer --compress --compress-program 'cat;false' --decompress-program 'cat;true' echo ::: line-buffer false true
|
||||||
|
line-buffer
|
||||||
|
false
|
||||||
|
true
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel -k --line-buffer --compress --compress-program 'cat;false' --decompress-program 'cat;false' echo ::: line-buffer false false
|
||||||
|
line-buffer
|
||||||
|
false
|
||||||
|
false
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel -k --tag --line-buffer --compress --compress-program 'cat;true' --decompress-program 'cat;false' echo ::: tag line-buffer true false
|
||||||
|
tag tag
|
||||||
|
line-buffer line-buffer
|
||||||
|
true true
|
||||||
|
false false
|
||||||
|
parallel -k --tag --line-buffer --compress --compress-program 'cat;true' --decompress-program 'cat;true' echo ::: tag line-buffer true true
|
||||||
|
tag tag
|
||||||
|
line-buffer line-buffer
|
||||||
|
true true
|
||||||
|
true true
|
||||||
|
parallel -k --tag --line-buffer --compress --compress-program 'cat;false' --decompress-program 'cat;true' echo ::: tag line-buffer false true
|
||||||
|
tag tag
|
||||||
|
line-buffer line-buffer
|
||||||
|
false false
|
||||||
|
true true
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel -k --tag --line-buffer --compress --compress-program 'cat;false' --decompress-program 'cat;false' echo ::: tag line-buffer false false
|
||||||
|
tag tag
|
||||||
|
line-buffer line-buffer
|
||||||
|
false false
|
||||||
|
false false
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel -k --tag --line-buffer --compress --compress-program 'cat;true' --decompress-program 'cat;false' echo ::: tag line-buffer true false
|
||||||
|
tag tag
|
||||||
|
line-buffer line-buffer
|
||||||
|
true true
|
||||||
|
false false
|
||||||
|
parallel -k --files --compress --compress-program 'cat;true' --decompress-program 'cat;true' echo ::: files true true | parallel rm
|
||||||
|
parallel -k --files --compress --compress-program 'cat;false' --decompress-program 'cat;true' echo ::: files false true | parallel rm
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel -k --files --compress --compress-program 'cat;false' --decompress-program 'cat;false' echo ::: files false false | parallel rm
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel: Error: cat;false failed.
|
||||||
|
parallel -k --files --compress --compress-program 'cat;true' --decompress-program 'cat;false' echo ::: files true false | parallel rm
|
||||||
|
echo 'bug #44250: pxz complains File format not recognized but decompresses anyway'
|
||||||
|
bug #44250: pxz complains File format not recognized but decompresses anyway
|
||||||
|
# The first line dumps core if run from make file. Why?!
|
||||||
|
stdout parallel --compress --compress-program pxz ls /{} ::: OK-if-missing-file
|
||||||
|
parallel: Error: pxz failed.
|
||||||
|
stdout parallel --compress --compress-program pixz --decompress-program 'pixz -d' ls /{} ::: OK-if-missing-file
|
||||||
|
ls: cannot access /OK-if-missing-file: No such file or directory
|
||||||
|
stdout parallel --compress --compress-program pixz --decompress-program 'pixz -d' true ::: OK-if-no-output
|
||||||
|
stdout parallel --compress --compress-program pxz true ::: OK-if-no-output
|
||||||
|
echo 'bug #41613: --compress --line-buffer no newline'; perl -e 'print "It worked"'| parallel --pipe --compress --line-buffer cat; echo
|
||||||
|
bug #41613: --compress --line-buffer no newline
|
||||||
|
It worked
|
||||||
|
echo '**'
|
||||||
|
**
|
||||||
|
echo "### Test -I"; seq 1 10 | parallel -k 'seq 1 {} | parallel -k -I :: echo {} ::'
|
||||||
|
### Test -I
|
||||||
|
1 1
|
||||||
|
2 1
|
||||||
|
2 2
|
||||||
|
3 1
|
||||||
|
3 2
|
||||||
|
3 3
|
||||||
|
4 1
|
||||||
|
4 2
|
||||||
|
4 3
|
||||||
|
4 4
|
||||||
|
5 1
|
||||||
|
5 2
|
||||||
|
5 3
|
||||||
|
5 4
|
||||||
|
5 5
|
||||||
|
6 1
|
||||||
|
6 2
|
||||||
|
6 3
|
||||||
|
6 4
|
||||||
|
6 5
|
||||||
|
6 6
|
||||||
|
7 1
|
||||||
|
7 2
|
||||||
|
7 3
|
||||||
|
7 4
|
||||||
|
7 5
|
||||||
|
7 6
|
||||||
|
7 7
|
||||||
|
8 1
|
||||||
|
8 2
|
||||||
|
8 3
|
||||||
|
8 4
|
||||||
|
8 5
|
||||||
|
8 6
|
||||||
|
8 7
|
||||||
|
8 8
|
||||||
|
9 1
|
||||||
|
9 2
|
||||||
|
9 3
|
||||||
|
9 4
|
||||||
|
9 5
|
||||||
|
9 6
|
||||||
|
9 7
|
||||||
|
9 8
|
||||||
|
9 9
|
||||||
|
10 1
|
||||||
|
10 2
|
||||||
|
10 3
|
||||||
|
10 4
|
||||||
|
10 5
|
||||||
|
10 6
|
||||||
|
10 7
|
||||||
|
10 8
|
||||||
|
10 9
|
||||||
|
10 10
|
||||||
|
echo "### Test -X -I"; seq 1 10 | parallel -k 'seq 1 {} | parallel -j1 -X -k -I :: echo a{} b::'
|
||||||
|
### Test -X -I
|
||||||
|
a1 b1
|
||||||
|
a2 b1 b2
|
||||||
|
a3 b1 b2 b3
|
||||||
|
a4 b1 b2 b3 b4
|
||||||
|
a5 b1 b2 b3 b4 b5
|
||||||
|
a6 b1 b2 b3 b4 b5 b6
|
||||||
|
a7 b1 b2 b3 b4 b5 b6 b7
|
||||||
|
a8 b1 b2 b3 b4 b5 b6 b7 b8
|
||||||
|
a9 b1 b2 b3 b4 b5 b6 b7 b8 b9
|
||||||
|
a10 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10
|
||||||
|
echo "### Test -m -I"; seq 1 10 | parallel -k 'seq 1 {} | parallel -j1 -m -k -I :: echo a{} b::'
|
||||||
|
### Test -m -I
|
||||||
|
a1 b1
|
||||||
|
a2 b1 2
|
||||||
|
a3 b1 2 3
|
||||||
|
a4 b1 2 3 4
|
||||||
|
a5 b1 2 3 4 5
|
||||||
|
a6 b1 2 3 4 5 6
|
||||||
|
a7 b1 2 3 4 5 6 7
|
||||||
|
a8 b1 2 3 4 5 6 7 8
|
||||||
|
a9 b1 2 3 4 5 6 7 8 9
|
||||||
|
a10 b1 2 3 4 5 6 7 8 9 10
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
echo '### Test --load remote'
|
||||||
|
### Test --load remote
|
||||||
|
ssh parallel@lo 'seq 10 | parallel --nice 19 --timeout 15 -j0 -N0 burnP6' & sleep 1; stdout /usr/bin/time -f %e parallel -S parallel@lo --load 10 sleep ::: 1 | perl -ne '$_ > 10 and print "OK\n"'
|
||||||
|
OK
|
||||||
|
echo '**'
|
||||||
|
**
|
||||||
echo '### Stop if all hosts are filtered and there are no hosts left to run on'
|
echo '### Stop if all hosts are filtered and there are no hosts left to run on'
|
||||||
### Stop if all hosts are filtered and there are no hosts left to run on
|
### Stop if all hosts are filtered and there are no hosts left to run on
|
||||||
stdout parallel --filter-hosts -S no-such.host echo ::: 1
|
stdout parallel --filter-hosts -S no-such.host echo ::: 1
|
||||||
|
@ -183,6 +189,13 @@ ls: cannot access bug46519.bb: No such file or directory
|
||||||
ls: cannot access bug46519.bbb: No such file or directory
|
ls: cannot access bug46519.bbb: No such file or directory
|
||||||
ls: cannot access bug46519.cc: No such file or directory
|
ls: cannot access bug46519.cc: No such file or directory
|
||||||
ls: cannot access bug46519.ccc: No such file or directory
|
ls: cannot access bug46519.ccc: No such file or directory
|
||||||
|
echo '### Test --nice remote'
|
||||||
|
### Test --nice remote
|
||||||
|
stdout parallel --nice 1 -S lo -vv 'PAR=a bash -c "echo \$PAR {}"' ::: b | perl -pe 's/\S*parallel-server\S*/one-server/;s:[a-z/\\+=0-9]{500,}:base64:i;'
|
||||||
|
ssh lo -- exec perl -e @GNU_Parallel\\\=\\\(\\\"use\\\",\\\"IPC::Open3\\\;\\\",\\\"use\\\",\\\"MIME::Base64\\\"\\\)\\\;eval\\\"@GNU_Parallel\\\"\\\;my\\\$eval\\\=decode_base64\\\(join\\\"\\\",@ARGV\\\)\\\;eval\\\$eval\\\; base64;
|
||||||
|
a b
|
||||||
|
echo '**'
|
||||||
|
**
|
||||||
echo TODO
|
echo TODO
|
||||||
TODO
|
TODO
|
||||||
## echo '### Test --trc --basefile --/./--foo7 :/./:foo8 " "/./" "foo9 ./foo11/./foo11'
|
## echo '### Test --trc --basefile --/./--foo7 :/./:foo8 " "/./" "foo9 ./foo11/./foo11'
|
||||||
|
|
|
@ -44,24 +44,24 @@ echo '### bug #42999: --pipepart with remote does not work'
|
||||||
11 11 33
|
11 11 33
|
||||||
11 11 33
|
11 11 33
|
||||||
9 9 28
|
9 9 28
|
||||||
14 14 33 /tmp/parallel-local-ssh2/parXXXXX
|
14 14 33 /tmp/parallel-local-ssh2-tmpdir/parXXXXX
|
||||||
11 11 33 /tmp/parallel-local-ssh2/parXXXXX
|
11 11 33 /tmp/parallel-local-ssh2-tmpdir/parXXXXX
|
||||||
11 11 33 /tmp/parallel-local-ssh2/parXXXXX
|
11 11 33 /tmp/parallel-local-ssh2-tmpdir/parXXXXX
|
||||||
11 11 33 /tmp/parallel-local-ssh2/parXXXXX
|
11 11 33 /tmp/parallel-local-ssh2-tmpdir/parXXXXX
|
||||||
11 11 33 /tmp/parallel-local-ssh2/parXXXXX
|
11 11 33 /tmp/parallel-local-ssh2-tmpdir/parXXXXX
|
||||||
11 11 33 /tmp/parallel-local-ssh2/parXXXXX
|
11 11 33 /tmp/parallel-local-ssh2-tmpdir/parXXXXX
|
||||||
11 11 33 /tmp/parallel-local-ssh2/parXXXXX
|
11 11 33 /tmp/parallel-local-ssh2-tmpdir/parXXXXX
|
||||||
11 11 33 /tmp/parallel-local-ssh2/parXXXXX
|
11 11 33 /tmp/parallel-local-ssh2-tmpdir/parXXXXX
|
||||||
9 9 28 /tmp/parallel-local-ssh2/parXXXXX
|
9 9 28 /tmp/parallel-local-ssh2-tmpdir/parXXXXX
|
||||||
14 14 33 /tmp/parallel-local-ssh2/parXXXXX
|
14 14 33 /tmp/parallel-local-ssh2-tmpdir/parXXXXX
|
||||||
11 11 33 /tmp/parallel-local-ssh2/parXXXXX
|
11 11 33 /tmp/parallel-local-ssh2-tmpdir/parXXXXX
|
||||||
11 11 33 /tmp/parallel-local-ssh2/parXXXXX
|
11 11 33 /tmp/parallel-local-ssh2-tmpdir/parXXXXX
|
||||||
11 11 33 /tmp/parallel-local-ssh2/parXXXXX
|
11 11 33 /tmp/parallel-local-ssh2-tmpdir/parXXXXX
|
||||||
11 11 33 /tmp/parallel-local-ssh2/parXXXXX
|
11 11 33 /tmp/parallel-local-ssh2-tmpdir/parXXXXX
|
||||||
11 11 33 /tmp/parallel-local-ssh2/parXXXXX
|
11 11 33 /tmp/parallel-local-ssh2-tmpdir/parXXXXX
|
||||||
11 11 33 /tmp/parallel-local-ssh2/parXXXXX
|
11 11 33 /tmp/parallel-local-ssh2-tmpdir/parXXXXX
|
||||||
11 11 33 /tmp/parallel-local-ssh2/parXXXXX
|
11 11 33 /tmp/parallel-local-ssh2-tmpdir/parXXXXX
|
||||||
9 9 28 /tmp/parallel-local-ssh2/parXXXXX
|
9 9 28 /tmp/parallel-local-ssh2-tmpdir/parXXXXX
|
||||||
echo '### --cat gives incorrect exit value in csh'
|
echo '### --cat gives incorrect exit value in csh'
|
||||||
### --cat gives incorrect exit value in csh
|
### --cat gives incorrect exit value in csh
|
||||||
echo false | parallel --pipe --cat -Scsh@lo 'cat {}; false' ; echo $?; echo false | parallel --pipe --cat -Stcsh@lo 'cat {}; false' ; echo $?; echo true | parallel --pipe --cat -Scsh@lo 'cat {}; true' ; echo $?; echo true | parallel --pipe --cat -Stcsh@lo 'cat {}; true' ; echo $?; echo '### --cat and --fifo exit value in bash'
|
echo false | parallel --pipe --cat -Scsh@lo 'cat {}; false' ; echo $?; echo false | parallel --pipe --cat -Stcsh@lo 'cat {}; false' ; echo $?; echo true | parallel --pipe --cat -Scsh@lo 'cat {}; true' ; echo $?; echo true | parallel --pipe --cat -Stcsh@lo 'cat {}; true' ; echo $?; echo '### --cat and --fifo exit value in bash'
|
||||||
|
|
Binary file not shown.
|
@ -97,13 +97,13 @@ echo '### Test weird regexp chars'
|
||||||
a1b1^c1[.}c a2b2^c2[.}c a3b3^c3[.}c a4b4^c4[.}c a5b5^c5[.}c a6b6^c6[.}c
|
a1b1^c1[.}c a2b2^c2[.}c a3b3^c3[.}c a4b4^c4[.}c a5b5^c5[.}c a6b6^c6[.}c
|
||||||
echo '### Test -m'
|
echo '### Test -m'
|
||||||
### Test -m
|
### Test -m
|
||||||
(echo foo;echo bar;echo joe.gif) | parallel -j1 -km echo 1{}2{.}3 A{.}B{.}C
|
(echo foo;echo bar;echo joe.gif) | parallel -j1 -km echo 1{}2{.}3 A{.}B{.}C
|
||||||
1foo bar joe.gif2foo bar joe3 Afoo bar joeBfoo bar joeC
|
1foo bar joe.gif2foo bar joe3 Afoo bar joeBfoo bar joeC
|
||||||
(echo foo;echo bar;echo joe.gif) | parallel -j1 -kX echo 1{}2{.}3 A{.}B{.}C
|
(echo foo;echo bar;echo joe.gif) | parallel -j1 -kX echo 1{}2{.}3 A{.}B{.}C
|
||||||
1foo2foo3 1bar2bar3 1joe.gif2joe3 AfooBfooC AbarBbarC AjoeBjoeC
|
1foo2foo3 1bar2bar3 1joe.gif2joe3 AfooBfooC AbarBbarC AjoeBjoeC
|
||||||
seq 1 6 | parallel -k printf '{}.gif\\n' | parallel -j1 -km echo a{}b{.}c{.}
|
seq 1 6 | parallel -k printf '{}.gif\\n' | parallel -j1 -km echo a{}b{.}c{.}
|
||||||
a1.gif 2.gif 3.gif 4.gif 5.gif 6.gifb1 2 3 4 5 6c1 2 3 4 5 6
|
a1.gif 2.gif 3.gif 4.gif 5.gif 6.gifb1 2 3 4 5 6c1 2 3 4 5 6
|
||||||
seq 1 6 | parallel -k printf '{}.gif\\n' | parallel -j1 -kX echo a{}b{.}c{.}
|
seq 1 6 | parallel -k printf '{}.gif\\n' | parallel -j1 -kX echo a{}b{.}c{.}
|
||||||
a1.gifb1c1 a2.gifb2c2 a3.gifb3c3 a4.gifb4c4 a5.gifb5c5 a6.gifb6c6
|
a1.gifb1c1 a2.gifb2c2 a3.gifb3c3 a4.gifb4c4 a5.gifb5c5 a6.gifb6c6
|
||||||
echo '### Test -m with 60000 args'; seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -km echo a{}b{.}c{.} | tee >(wc; sleep 1) >(md5sum; sleep 1) >/dev/null; wait; sleep 1
|
echo '### Test -m with 60000 args'; seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -km echo a{}b{.}c{.} | tee >(wc; sleep 1) >(md5sum; sleep 1) >/dev/null; wait; sleep 1
|
||||||
### Test -m with 60000 args
|
### Test -m with 60000 args
|
||||||
|
@ -115,51 +115,51 @@ echo '### Test -X with 60000 args'; seq 1 60000 | perl -pe 's/$/.gif/' | par
|
||||||
21 60000 1346682
|
21 60000 1346682
|
||||||
echo '### Test -X with 60000 args and 5 expansions'
|
echo '### Test -X with 60000 args and 5 expansions'
|
||||||
### Test -X with 60000 args and 5 expansions
|
### Test -X with 60000 args and 5 expansions
|
||||||
seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.}{.}{} | wc -l
|
seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.}{.}{} | wc -l
|
||||||
34
|
34
|
||||||
seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.}{.} | wc -l
|
seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.}{.} | wc -l
|
||||||
25
|
25
|
||||||
seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.} | wc -l
|
seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c{.} | wc -l
|
||||||
21
|
21
|
||||||
seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c | wc -l
|
seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b{.}c | wc -l
|
||||||
17
|
17
|
||||||
seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b | wc -l
|
seq 1 60000 | perl -pe 's/$/.gif/' | parallel -j1 -kX echo a{}b | wc -l
|
||||||
11
|
11
|
||||||
echo '### Test {.} does not repeat more than {}'
|
echo '### Test {.} does not repeat more than {}'
|
||||||
### Test {.} does not repeat more than {}
|
### Test {.} does not repeat more than {}
|
||||||
seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -kX echo a{}b{.}c{.}
|
seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -kX echo a{}b{.}c{.}
|
||||||
a1.gifb1c1 a2.gifb2c2 a3.gifb3c3 a4.gifb4c4 a5.gifb5c5 a6.gifb6c6
|
a1.gifb1c1 a2.gifb2c2 a3.gifb3c3 a4.gifb4c4 a5.gifb5c5 a6.gifb6c6
|
||||||
a7.gifb7c7 a8.gifb8c8 a9.gifb9c9 a10.gifb10c10 a11.gifb11c11 a12.gifb12c12
|
a7.gifb7c7 a8.gifb8c8 a9.gifb9c9 a10.gifb10c10 a11.gifb11c11 a12.gifb12c12
|
||||||
a13.gifb13c13 a14.gifb14c14 a15.gifb15c15
|
a13.gifb13c13 a14.gifb14c14 a15.gifb15c15
|
||||||
seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -km echo a{}b{.}c{.}
|
seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -km echo a{}b{.}c{.}
|
||||||
a1.gif 2.gif 3.gif 4.gif 5.gif 6.gif 7.gifb1 2 3 4 5 6 7c1 2 3 4 5 6 7
|
a1.gif 2.gif 3.gif 4.gif 5.gif 6.gif 7.gifb1 2 3 4 5 6 7c1 2 3 4 5 6 7
|
||||||
a8.gif 9.gif 10.gif 11.gif 12.gif 13.gifb8 9 10 11 12 13c8 9 10 11 12 13
|
a8.gif 9.gif 10.gif 11.gif 12.gif 13.gifb8 9 10 11 12 13c8 9 10 11 12 13
|
||||||
a14.gif 15.gifb14 15c14 15
|
a14.gif 15.gifb14 15c14 15
|
||||||
seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -kX echo a{}b{.}c{.}
|
seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -kX echo a{}b{.}c{.}
|
||||||
a1.gifb1c1 a2.gifb2c2 a3.gifb3c3 a4.gifb4c4 a5.gifb5c5 a6.gifb6c6
|
a1.gifb1c1 a2.gifb2c2 a3.gifb3c3 a4.gifb4c4 a5.gifb5c5 a6.gifb6c6
|
||||||
a7.gifb7c7 a8.gifb8c8 a9.gifb9c9 a10.gifb10c10 a11.gifb11c11 a12.gifb12c12
|
a7.gifb7c7 a8.gifb8c8 a9.gifb9c9 a10.gifb10c10 a11.gifb11c11 a12.gifb12c12
|
||||||
a13.gifb13c13 a14.gifb14c14 a15.gifb15c15
|
a13.gifb13c13 a14.gifb14c14 a15.gifb15c15
|
||||||
seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -km echo a{}b{.}c{.}
|
seq 1 15 | perl -pe 's/$/.gif/' | parallel -j1 -s 80 -km echo a{}b{.}c{.}
|
||||||
a1.gif 2.gif 3.gif 4.gif 5.gif 6.gif 7.gifb1 2 3 4 5 6 7c1 2 3 4 5 6 7
|
a1.gif 2.gif 3.gif 4.gif 5.gif 6.gif 7.gifb1 2 3 4 5 6 7c1 2 3 4 5 6 7
|
||||||
a8.gif 9.gif 10.gif 11.gif 12.gif 13.gifb8 9 10 11 12 13c8 9 10 11 12 13
|
a8.gif 9.gif 10.gif 11.gif 12.gif 13.gifb8 9 10 11 12 13c8 9 10 11 12 13
|
||||||
a14.gif 15.gifb14 15c14 15
|
a14.gif 15.gifb14 15c14 15
|
||||||
echo '### Test -I with shell meta chars'
|
echo '### Test -I with shell meta chars'
|
||||||
### Test -I with shell meta chars
|
### Test -I with shell meta chars
|
||||||
seq 1 60000 | parallel -j1 -I :: -X echo a::b::c:: | wc -l
|
seq 1 60000 | parallel -j1 -I :: -X echo a::b::c:: | wc -l
|
||||||
17
|
17
|
||||||
seq 1 60000 | parallel -j1 -I '<>' -X echo 'a<>b<>c<>' | wc -l
|
seq 1 60000 | parallel -j1 -I '<>' -X echo 'a<>b<>c<>' | wc -l
|
||||||
17
|
17
|
||||||
seq 1 60000 | parallel -j1 -I '<' -X echo 'a<b<c<' | wc -l
|
seq 1 60000 | parallel -j1 -I '<' -X echo 'a<b<c<' | wc -l
|
||||||
17
|
17
|
||||||
seq 1 60000 | parallel -j1 -I '>' -X echo 'a>b>c>' | wc -l
|
seq 1 60000 | parallel -j1 -I '>' -X echo 'a>b>c>' | wc -l
|
||||||
17
|
17
|
||||||
echo '### Test {.}'
|
echo '### Test {.}'
|
||||||
### Test {.}
|
### Test {.}
|
||||||
echo a | parallel -qX echo "'"{.}"' "
|
echo a | parallel -qX echo "'"{.}"' "
|
||||||
'a'
|
'a'
|
||||||
echo a | parallel -qX echo "'{.}'"
|
echo a | parallel -qX echo "'{.}'"
|
||||||
'a'
|
'a'
|
||||||
(echo "sleep 3; echo begin"; seq 1 30 | parallel -kq echo "sleep 1; echo {.}"; echo "echo end") | parallel -k -j0
|
(echo "sleep 3; echo begin"; seq 1 30 | parallel -kq echo "sleep 1; echo {.}"; echo "echo end") | parallel -k -j0
|
||||||
begin
|
begin
|
||||||
1
|
1
|
||||||
2
|
2
|
||||||
|
@ -194,7 +194,7 @@ begin
|
||||||
end
|
end
|
||||||
echo '### Test -I with -X and -m'
|
echo '### Test -I with -X and -m'
|
||||||
### Test -I with -X and -m
|
### Test -I with -X and -m
|
||||||
seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -k -I :: echo {.} ::'
|
seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -k -I :: echo {.} ::'
|
||||||
1 1
|
1 1
|
||||||
2 1
|
2 1
|
||||||
2 2
|
2 2
|
||||||
|
@ -250,7 +250,7 @@ seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -k -I :: echo {.} ::'
|
||||||
10 8
|
10 8
|
||||||
10 9
|
10 9
|
||||||
10 10
|
10 10
|
||||||
seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -j1 -X -k -I :: echo a{.} b::'
|
seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -j1 -X -k -I :: echo a{.} b::'
|
||||||
a1 b1
|
a1 b1
|
||||||
a2 b1 b2
|
a2 b1 b2
|
||||||
a3 b1 b2 b3
|
a3 b1 b2 b3
|
||||||
|
@ -261,7 +261,7 @@ a7 b1 b2 b3 b4 b5 b6 b7
|
||||||
a8 b1 b2 b3 b4 b5 b6 b7 b8
|
a8 b1 b2 b3 b4 b5 b6 b7 b8
|
||||||
a9 b1 b2 b3 b4 b5 b6 b7 b8 b9
|
a9 b1 b2 b3 b4 b5 b6 b7 b8 b9
|
||||||
a10 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10
|
a10 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10
|
||||||
seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -j1 -m -k -I :: echo a{.} b::'
|
seq 1 10 | parallel -k 'seq 1 {.} | 'parallel' -j1 -m -k -I :: echo a{.} b::'
|
||||||
a1 b1
|
a1 b1
|
||||||
a2 b1 2
|
a2 b1 2
|
||||||
a3 b1 2 3
|
a3 b1 2 3
|
||||||
|
@ -274,21 +274,21 @@ a9 b1 2 3 4 5 6 7 8 9
|
||||||
a10 b1 2 3 4 5 6 7 8 9 10
|
a10 b1 2 3 4 5 6 7 8 9 10
|
||||||
echo '### Test -i'
|
echo '### Test -i'
|
||||||
### Test -i
|
### Test -i
|
||||||
(echo a; echo END; echo b) | parallel -k -i -eEND echo repl{.}ce
|
(echo a; echo END; echo b) | parallel -k -i -eEND echo repl{.}ce
|
||||||
replace
|
replace
|
||||||
echo '### Test --replace'
|
echo '### Test --replace'
|
||||||
### Test --replace
|
### Test --replace
|
||||||
(echo a; echo END; echo b) | parallel -k --replace -eEND echo repl{.}ce
|
(echo a; echo END; echo b) | parallel -k --replace -eEND echo repl{.}ce
|
||||||
replace
|
replace
|
||||||
echo '### Test -t'
|
echo '### Test -t'
|
||||||
### Test -t
|
### Test -t
|
||||||
(echo b; echo c; echo f) | parallel -k -t echo {.}ar 2>&1 >/dev/null
|
(echo b; echo c; echo f) | parallel -k -t echo {.}ar 2>&1 >/dev/null
|
||||||
echo bar
|
echo bar
|
||||||
echo car
|
echo car
|
||||||
echo far
|
echo far
|
||||||
echo '### Test --verbose'
|
echo '### Test --verbose'
|
||||||
### Test --verbose
|
### Test --verbose
|
||||||
(echo b; echo c; echo f) | parallel -k --verbose echo {.}ar 2>&1 >/dev/null
|
(echo b; echo c; echo f) | parallel -k --verbose echo {.}ar 2>&1 >/dev/null
|
||||||
echo bar
|
echo bar
|
||||||
echo car
|
echo car
|
||||||
echo far
|
echo far
|
||||||
|
|
|
@ -46,24 +46,24 @@ echo '### bug #42041: Implement $PARALLEL_JOBSLOT'
|
||||||
echo '### bug #42363: --pipepart and --fifo/--cat does not work'
|
echo '### bug #42363: --pipepart and --fifo/--cat does not work'
|
||||||
### bug #42363: --pipepart and --fifo/--cat does not work
|
### bug #42363: --pipepart and --fifo/--cat does not work
|
||||||
seq 100 > /tmp/bug42363; parallel --pipepart --block 31 -a /tmp/bug42363 -k --fifo wc | perl -pe 's:(/tmp\S+par).....:${1}XXXXX:'; parallel --pipepart --block 31 -a /tmp/bug42363 -k --cat wc | perl -pe 's:(/tmp\S+par).....:${1}XXXXX:'; rm /tmp/bug42363
|
seq 100 > /tmp/bug42363; parallel --pipepart --block 31 -a /tmp/bug42363 -k --fifo wc | perl -pe 's:(/tmp\S+par).....:${1}XXXXX:'; parallel --pipepart --block 31 -a /tmp/bug42363 -k --cat wc | perl -pe 's:(/tmp\S+par).....:${1}XXXXX:'; rm /tmp/bug42363
|
||||||
14 14 33 /tmp/parallel-local22/parXXXXX
|
14 14 33 /tmp/parallel-local22-tmpdir/parXXXXX
|
||||||
11 11 33 /tmp/parallel-local22/parXXXXX
|
11 11 33 /tmp/parallel-local22-tmpdir/parXXXXX
|
||||||
11 11 33 /tmp/parallel-local22/parXXXXX
|
11 11 33 /tmp/parallel-local22-tmpdir/parXXXXX
|
||||||
11 11 33 /tmp/parallel-local22/parXXXXX
|
11 11 33 /tmp/parallel-local22-tmpdir/parXXXXX
|
||||||
11 11 33 /tmp/parallel-local22/parXXXXX
|
11 11 33 /tmp/parallel-local22-tmpdir/parXXXXX
|
||||||
11 11 33 /tmp/parallel-local22/parXXXXX
|
11 11 33 /tmp/parallel-local22-tmpdir/parXXXXX
|
||||||
11 11 33 /tmp/parallel-local22/parXXXXX
|
11 11 33 /tmp/parallel-local22-tmpdir/parXXXXX
|
||||||
11 11 33 /tmp/parallel-local22/parXXXXX
|
11 11 33 /tmp/parallel-local22-tmpdir/parXXXXX
|
||||||
9 9 28 /tmp/parallel-local22/parXXXXX
|
9 9 28 /tmp/parallel-local22-tmpdir/parXXXXX
|
||||||
14 14 33 /tmp/parallel-local22/parXXXXX
|
14 14 33 /tmp/parallel-local22-tmpdir/parXXXXX
|
||||||
11 11 33 /tmp/parallel-local22/parXXXXX
|
11 11 33 /tmp/parallel-local22-tmpdir/parXXXXX
|
||||||
11 11 33 /tmp/parallel-local22/parXXXXX
|
11 11 33 /tmp/parallel-local22-tmpdir/parXXXXX
|
||||||
11 11 33 /tmp/parallel-local22/parXXXXX
|
11 11 33 /tmp/parallel-local22-tmpdir/parXXXXX
|
||||||
11 11 33 /tmp/parallel-local22/parXXXXX
|
11 11 33 /tmp/parallel-local22-tmpdir/parXXXXX
|
||||||
11 11 33 /tmp/parallel-local22/parXXXXX
|
11 11 33 /tmp/parallel-local22-tmpdir/parXXXXX
|
||||||
11 11 33 /tmp/parallel-local22/parXXXXX
|
11 11 33 /tmp/parallel-local22-tmpdir/parXXXXX
|
||||||
11 11 33 /tmp/parallel-local22/parXXXXX
|
11 11 33 /tmp/parallel-local22-tmpdir/parXXXXX
|
||||||
9 9 28 /tmp/parallel-local22/parXXXXX
|
9 9 28 /tmp/parallel-local22-tmpdir/parXXXXX
|
||||||
echo '### bug #42055: --pipepart -a bigfile should not require sequential reading of bigfile'
|
echo '### bug #42055: --pipepart -a bigfile should not require sequential reading of bigfile'
|
||||||
### bug #42055: --pipepart -a bigfile should not require sequential reading of bigfile
|
### bug #42055: --pipepart -a bigfile should not require sequential reading of bigfile
|
||||||
parallel --pipepart -a /etc/passwd -L 1 should not be run
|
parallel --pipepart -a /etc/passwd -L 1 should not be run
|
||||||
|
@ -355,4 +355,4 @@ Send Receive Exitval
|
||||||
echo '### --tmux test - check termination'
|
echo '### --tmux test - check termination'
|
||||||
### --tmux test - check termination
|
### --tmux test - check termination
|
||||||
perl -e 'map {printf "$_%o%c\n",$_,$_}1..255' | stdout parallel --tmux echo {} :::: - ::: a b | perl -pe 's:(/tmp\S+/tms).....:$1XXXXX:;'
|
perl -e 'map {printf "$_%o%c\n",$_,$_}1..255' | stdout parallel --tmux echo {} :::: - ::: a b | perl -pe 's:(/tmp\S+/tms).....:$1XXXXX:;'
|
||||||
See output with: tmux -S /tmp/parallel-local22/tmsXXXXX attach
|
See output with: tmux -S /tmp/parallel-local22-tmpdir/tmsXXXXX attach
|
||||||
|
|
|
@ -1,34 +1,34 @@
|
||||||
echo '### tmux1.9'
|
echo '### tmux1.9'
|
||||||
### tmux1.9
|
### tmux1.9
|
||||||
seq 000 100 | TMUX=tmux1.9 par_tmux
|
seq 000 100 | TMUX=tmux1.9 par_tmux
|
||||||
See output with: tmux1.9 -S /tmp/parallel-local7/tmsXXXXX attach
|
See output with: tmux1.9 -S /tmp/parallel-local7-tmpdir/tmsXXXXX attach
|
||||||
0
|
0
|
||||||
seq 100 200 | TMUX=tmux1.9 par_tmux
|
seq 100 200 | TMUX=tmux1.9 par_tmux
|
||||||
See output with: tmux1.9 -S /tmp/parallel-local7/tmsXXXXX attach
|
See output with: tmux1.9 -S /tmp/parallel-local7-tmpdir/tmsXXXXX attach
|
||||||
0
|
0
|
||||||
seq 200 300 | TMUX=tmux1.9 par_tmux
|
seq 200 300 | TMUX=tmux1.9 par_tmux
|
||||||
See output with: tmux1.9 -S /tmp/parallel-local7/tmsXXXXX attach
|
See output with: tmux1.9 -S /tmp/parallel-local7-tmpdir/tmsXXXXX attach
|
||||||
0
|
0
|
||||||
seq 300 400 | TMUX=tmux1.9 par_tmux
|
seq 300 400 | TMUX=tmux1.9 par_tmux
|
||||||
See output with: tmux1.9 -S /tmp/parallel-local7/tmsXXXXX attach
|
See output with: tmux1.9 -S /tmp/parallel-local7-tmpdir/tmsXXXXX attach
|
||||||
0
|
0
|
||||||
seq 400 500 | TMUX=tmux1.9 par_tmux
|
seq 400 500 | TMUX=tmux1.9 par_tmux
|
||||||
See output with: tmux1.9 -S /tmp/parallel-local7/tmsXXXXX attach
|
See output with: tmux1.9 -S /tmp/parallel-local7-tmpdir/tmsXXXXX attach
|
||||||
0
|
0
|
||||||
seq 500 600 | TMUX=tmux1.9 par_tmux
|
seq 500 600 | TMUX=tmux1.9 par_tmux
|
||||||
See output with: tmux1.9 -S /tmp/parallel-local7/tmsXXXXX attach
|
See output with: tmux1.9 -S /tmp/parallel-local7-tmpdir/tmsXXXXX attach
|
||||||
0
|
0
|
||||||
seq 600 700 | TMUX=tmux1.9 par_tmux
|
seq 600 700 | TMUX=tmux1.9 par_tmux
|
||||||
See output with: tmux1.9 -S /tmp/parallel-local7/tmsXXXXX attach
|
See output with: tmux1.9 -S /tmp/parallel-local7-tmpdir/tmsXXXXX attach
|
||||||
0
|
0
|
||||||
seq 700 800 | TMUX=tmux1.9 par_tmux
|
seq 700 800 | TMUX=tmux1.9 par_tmux
|
||||||
See output with: tmux1.9 -S /tmp/parallel-local7/tmsXXXXX attach
|
See output with: tmux1.9 -S /tmp/parallel-local7-tmpdir/tmsXXXXX attach
|
||||||
0
|
0
|
||||||
seq 800 900 | TMUX=tmux1.9 par_tmux
|
seq 800 900 | TMUX=tmux1.9 par_tmux
|
||||||
See output with: tmux1.9 -S /tmp/parallel-local7/tmsXXXXX attach
|
See output with: tmux1.9 -S /tmp/parallel-local7-tmpdir/tmsXXXXX attach
|
||||||
0
|
0
|
||||||
seq 900 1000 | TMUX=tmux1.9 par_tmux
|
seq 900 1000 | TMUX=tmux1.9 par_tmux
|
||||||
See output with: tmux1.9 -S /tmp/parallel-local7/tmsXXXXX attach
|
See output with: tmux1.9 -S /tmp/parallel-local7-tmpdir/tmsXXXXX attach
|
||||||
0
|
0
|
||||||
seq 1000 1100 | TMUX=tmux1.9 par_tmux
|
seq 1000 1100 | TMUX=tmux1.9 par_tmux
|
||||||
parallel: Error: Command line too long (2023 >= 2023) at input 0: 1007
|
parallel: Error: Command line too long (2023 >= 2023) at input 0: 1007
|
||||||
|
@ -80,13 +80,13 @@ parallel: Error: Command line too long (4053 >= 2023) at input 0: 2022
|
||||||
echo '### tmux1.8'
|
echo '### tmux1.8'
|
||||||
### tmux1.8
|
### tmux1.8
|
||||||
seq 1 50 | TMUX=tmux1.8 par_tmux
|
seq 1 50 | TMUX=tmux1.8 par_tmux
|
||||||
See output with: tmux1.8 -S /tmp/parallel-local7/tmsXXXXX attach
|
See output with: tmux1.8 -S /tmp/parallel-local7-tmpdir/tmsXXXXX attach
|
||||||
0
|
0
|
||||||
seq 51 100 | TMUX=tmux1.8 par_tmux
|
seq 51 100 | TMUX=tmux1.8 par_tmux
|
||||||
See output with: tmux1.8 -S /tmp/parallel-local7/tmsXXXXX attach
|
See output with: tmux1.8 -S /tmp/parallel-local7-tmpdir/tmsXXXXX attach
|
||||||
0
|
0
|
||||||
seq 101 150 | TMUX=tmux1.8 par_tmux
|
seq 101 150 | TMUX=tmux1.8 par_tmux
|
||||||
See output with: tmux1.8 -S /tmp/parallel-local7/tmsXXXXX attach
|
See output with: tmux1.8 -S /tmp/parallel-local7-tmpdir/tmsXXXXX attach
|
||||||
parallel: Error: Command line too long (236 >= 236) at input 0: 114
|
parallel: Error: Command line too long (236 >= 236) at input 0: 114
|
||||||
255
|
255
|
||||||
seq 151 200 | TMUX=tmux1.8 par_tmux
|
seq 151 200 | TMUX=tmux1.8 par_tmux
|
||||||
|
@ -115,27 +115,27 @@ parallel: Error: Command line too long (480 >= 236) at input 0: 236
|
||||||
echo '### tmux1.8 0..255 ascii'
|
echo '### tmux1.8 0..255 ascii'
|
||||||
### tmux1.8 0..255 ascii
|
### tmux1.8 0..255 ascii
|
||||||
perl -e 'print map { ($_, map { pack("c*",$_) } grep { $_>=1 && $_!=10 } 0..$_),"\n" } 0..255' | TMUX=tmux1.8 stdout parallel --tmux --timeout 3 echo | par_tmux_filter; echo $?
|
perl -e 'print map { ($_, map { pack("c*",$_) } grep { $_>=1 && $_!=10 } 0..$_),"\n" } 0..255' | TMUX=tmux1.8 stdout parallel --tmux --timeout 3 echo | par_tmux_filter; echo $?
|
||||||
See output with: tmux1.8 -S /tmp/parallel-local7/tmsXXXXX attach
|
See output with: tmux1.8 -S /tmp/parallel-local7-tmpdir/tmsXXXXX attach
|
||||||
parallel: Error: Command line too long (236 >= 236) at input 0: 155
!"#$%&'()*+,-./0...
|
parallel: Error: Command line too long (236 >= 236) at input 0: 155
!"#$%&'()*+,-./0...
|
||||||
0
|
0
|
||||||
echo '### tmux1.9 0..255 ascii'
|
echo '### tmux1.9 0..255 ascii'
|
||||||
### tmux1.9 0..255 ascii
|
### tmux1.9 0..255 ascii
|
||||||
perl -e 'print map { ($_, map { pack("c*",$_) } grep { $_>=1 && $_!=10 } 0..$_),"\n" } 0..255' | TMUX=tmux1.9 stdout parallel --tmux --timeout 3 echo | par_tmux_filter; echo $?
|
perl -e 'print map { ($_, map { pack("c*",$_) } grep { $_>=1 && $_!=10 } 0..$_),"\n" } 0..255' | TMUX=tmux1.9 stdout parallel --tmux --timeout 3 echo | par_tmux_filter; echo $?
|
||||||
See output with: tmux1.9 -S /tmp/parallel-local7/tmsXXXXX attach
|
See output with: tmux1.9 -S /tmp/parallel-local7-tmpdir/tmsXXXXX attach
|
||||||
0
|
0
|
||||||
echo '### Test output ascii'
|
echo '### Test output ascii'
|
||||||
### Test output ascii
|
### Test output ascii
|
||||||
rm -f /tmp/paralocal7-ascii*; perl -e 'print map { ($_, map { pack("c*",$_) } grep { $_>=1 && $_!=10 } $_-10..$_),"\n" } 1..255' | stdout parallel --tmux echo {}'>>/tmp/paralocal7-ascii{%}' | par_tmux_filter; sort /tmp/paralocal7-ascii* | md5sum
|
rm -f /tmp/paralocal7-ascii*; perl -e 'print map { ($_, map { pack("c*",$_) } grep { $_>=1 && $_!=10 } $_-10..$_),"\n" } 1..255' | stdout parallel --tmux echo {}'>>/tmp/paralocal7-ascii{%}' | par_tmux_filter; sort /tmp/paralocal7-ascii* | md5sum
|
||||||
See output with: tmux -S /tmp/parallel-local7/tmsXXXXX attach
|
See output with: tmux -S /tmp/parallel-local7-tmpdir/tmsXXXXX attach
|
||||||
053c7e8e945ef7641fc63bc309ac069d -
|
053c7e8e945ef7641fc63bc309ac069d -
|
||||||
echo '### Test critical lengths. Must not block'
|
echo '### Test critical lengths. Must not block'
|
||||||
### Test critical lengths. Must not block
|
### Test critical lengths. Must not block
|
||||||
seq 70 130 | TMUX=tmux1.8 stdout parallel --tmux echo '{}{=$_="&"x$_=}' | par_tmux_filter
|
seq 70 130 | TMUX=tmux1.8 stdout parallel --tmux echo '{}{=$_="&"x$_=}' | par_tmux_filter
|
||||||
See output with: tmux1.8 -S /tmp/parallel-local7/tmsXXXXX attach
|
See output with: tmux1.8 -S /tmp/parallel-local7-tmpdir/tmsXXXXX attach
|
||||||
parallel: Error: Command line too long (236 >= 236) at input 0: 114
|
parallel: Error: Command line too long (236 >= 236) at input 0: 114
|
||||||
seq 70 130 | TMUX=tmux1.9 stdout parallel --tmux echo '{}{=$_="&"x$_=}' | par_tmux_filter
|
seq 70 130 | TMUX=tmux1.9 stdout parallel --tmux echo '{}{=$_="&"x$_=}' | par_tmux_filter
|
||||||
See output with: tmux1.9 -S /tmp/parallel-local7/tmsXXXXX attach
|
See output with: tmux1.9 -S /tmp/parallel-local7-tmpdir/tmsXXXXX attach
|
||||||
seq 280 425 | TMUX=tmux1.8 stdout parallel --tmux echo '{}{=$_="a"x$_=}' | par_tmux_filter
|
seq 280 425 | TMUX=tmux1.8 stdout parallel --tmux echo '{}{=$_="a"x$_=}' | par_tmux_filter
|
||||||
parallel: Error: Command line too long (288 >= 236) at input 0: 280
|
parallel: Error: Command line too long (288 >= 236) at input 0: 280
|
||||||
seq 280 425 | TMUX=tmux1.9 stdout parallel --tmux echo '{}{=$_="a"x$_=}' | par_tmux_filter
|
seq 280 425 | TMUX=tmux1.9 stdout parallel --tmux echo '{}{=$_="a"x$_=}' | par_tmux_filter
|
||||||
See output with: tmux1.9 -S /tmp/parallel-local7/tmsXXXXX attach
|
See output with: tmux1.9 -S /tmp/parallel-local7-tmpdir/tmsXXXXX attach
|
||||||
|
|
|
@ -1,11 +1,3 @@
|
||||||
echo 'bug #41613: --compress --line-buffer no --tagstring';
|
|
||||||
bug #41613: --compress --line-buffer no --tagstring
|
|
||||||
diff <(nice perl -e 'for("x011".."x110"){print "$_\t", ("\n", map { rand } (1..100000)) }'| $NICEPAR -N10 -L1 --pipe -j6 --block 20M --compress pv -qL 1000000 | perl -pe 's/(....).*/$1/') <(nice perl -e 'for("x011".."x110"){print "$_\t", ("\n", map { rand } (1..100000)) }'| $NICEPAR -N10 -L1 --pipe -j6 --block 20M --compress --line-buffer pv -qL 1000000 | perl -pe 's/(....).*/$1/') >/dev/null || (echo 'Good: --line-buffer matters'; false) && echo 'Bad: --line-buffer not working'
|
|
||||||
Good: --line-buffer matters
|
|
||||||
echo 'bug #41613: --compress --line-buffer with --tagstring';
|
|
||||||
bug #41613: --compress --line-buffer with --tagstring
|
|
||||||
diff <(nice perl -e 'for("x011".."x110"){print "$_\t", ("\n", map { rand } (1..100000)) }'| $NICEPAR -N10 -L1 --pipe -j6 --block 20M --compress --tagstring {#} pv -qL 1000000 | perl -pe 's/(....).*/$1/') <(nice perl -e 'for("x011".."x110"){print "$_\t", ("\n", map { rand } (1..100000)) }'| $NICEPAR -N10 -L1 --pipe -j6 --block 20M --compress --tagstring {#} --line-buffer pv -qL 1000000 | perl -pe 's/(....).*/$1/') >/dev/null || (echo 'Good: --line-buffer matters'; false) && echo 'Bad: --line-buffer not working'
|
|
||||||
Good: --line-buffer matters
|
|
||||||
echo 'bug #41412: --timeout + --delay causes deadlock';
|
echo 'bug #41412: --timeout + --delay causes deadlock';
|
||||||
bug #41412: --timeout + --delay causes deadlock
|
bug #41412: --timeout + --delay causes deadlock
|
||||||
seq 10 | parallel -j10 --timeout 1 --delay .3 echo;
|
seq 10 | parallel -j10 --timeout 1 --delay .3 echo;
|
||||||
|
@ -407,7 +399,7 @@ seq 1 4000 | nice parallel -k -X echo {.} aa {}{.} {}{}d{} {}dd{}d{.} |head -n 1
|
||||||
echo "### BUG: empty lines with --show-limit"
|
echo "### BUG: empty lines with --show-limit"
|
||||||
### BUG: empty lines with --show-limit
|
### BUG: empty lines with --show-limit
|
||||||
echo | $NICEPAR --show-limits
|
echo | $NICEPAR --show-limits
|
||||||
Maximal size of command: 131048
|
Maximal size of command: 131049
|
||||||
Maximal used size of command: 65528
|
Maximal used size of command: 65528
|
||||||
|
|
||||||
Execution of will continue now, and it will try to read its input
|
Execution of will continue now, and it will try to read its input
|
||||||
|
|
|
@ -140,7 +140,7 @@ dragonfly.polarhome.com
|
||||||
freebsd.polarhome.com
|
freebsd.polarhome.com
|
||||||
hpux-ia64
|
hpux-ia64
|
||||||
hpux64
|
hpux64
|
||||||
macosx
|
macosx.polarhome.com
|
||||||
mandriva.polarhome.com
|
mandriva.polarhome.com
|
||||||
miros.polarhome.com
|
miros.polarhome.com
|
||||||
netbsd.polarhome.com
|
netbsd.polarhome.com
|
||||||
|
|
|
@ -124,8 +124,8 @@ C
|
||||||
A
|
A
|
||||||
B
|
B
|
||||||
(echo 1; echo; echo 2) | parallel --no-run-if-empty echo
|
(echo 1; echo; echo 2) | parallel --no-run-if-empty echo
|
||||||
1
|
9
|
||||||
2
|
9
|
||||||
parallel ::: ls 'echo foo' pwd
|
parallel ::: ls 'echo foo' pwd
|
||||||
abc-file
|
abc-file
|
||||||
abc0-file
|
abc0-file
|
||||||
|
@ -160,13 +160,13 @@ A
|
||||||
parallel echo {/.} ::: A/B.C
|
parallel echo {/.} ::: A/B.C
|
||||||
B
|
B
|
||||||
parallel echo {#} ::: A B C
|
parallel echo {#} ::: A B C
|
||||||
1
|
9
|
||||||
2
|
9
|
||||||
3
|
9
|
||||||
parallel -j 2 echo {%} ::: A B C
|
parallel -j 2 echo {%} ::: A B C
|
||||||
1
|
9
|
||||||
2
|
9
|
||||||
1
|
9
|
||||||
parallel -I ,, echo ,, ::: A/B.C
|
parallel -I ,, echo ,, ::: A/B.C
|
||||||
A/B.C
|
A/B.C
|
||||||
parallel --extensionreplace ,, echo ,, ::: A/B.C
|
parallel --extensionreplace ,, echo ,, ::: A/B.C
|
||||||
|
@ -178,13 +178,13 @@ A
|
||||||
parallel --basenameextensionreplace ,, echo ,, ::: A/B.C
|
parallel --basenameextensionreplace ,, echo ,, ::: A/B.C
|
||||||
B
|
B
|
||||||
parallel --seqreplace ,, echo ,, ::: A B C
|
parallel --seqreplace ,, echo ,, ::: A B C
|
||||||
1
|
9
|
||||||
2
|
9
|
||||||
3
|
9
|
||||||
parallel -j2 --slotreplace ,, echo ,, ::: A B C
|
parallel -j2 --slotreplace ,, echo ,, ::: A B C
|
||||||
1
|
9
|
||||||
2
|
9
|
||||||
1
|
9
|
||||||
parallel echo '{= s:\.[^.]+$::;s:\.[^.]+$::; =}' ::: foo.tar.gz
|
parallel echo '{= s:\.[^.]+$::;s:\.[^.]+$::; =}' ::: foo.tar.gz
|
||||||
foo
|
foo
|
||||||
parallel echo Job {#} of {= '$_=total_jobs()' =} ::: {1..5}
|
parallel echo Job {#} of {= '$_=total_jobs()' =} ::: {1..5}
|
||||||
|
@ -196,10 +196,10 @@ Job 5 of 5
|
||||||
parallel echo {} shell quoted is {= '$_=Q($_)' =} ::: '*/!#$'
|
parallel echo {} shell quoted is {= '$_=Q($_)' =} ::: '*/!#$'
|
||||||
*/!#$ shell quoted is \*/\!\#\$
|
*/!#$ shell quoted is \*/\!\#\$
|
||||||
parallel echo {= 'if($_==3) { $job->skip() }' =} ::: {1..5}
|
parallel echo {= 'if($_==3) { $job->skip() }' =} ::: {1..5}
|
||||||
1
|
9
|
||||||
2
|
9
|
||||||
4
|
9
|
||||||
5
|
9
|
||||||
parallel echo {= 'if($arg[1]==$arg[2]) { $job->skip() }' =} ::: {1..3} ::: {1..3}
|
parallel echo {= 'if($arg[1]==$arg[2]) { $job->skip() }' =} ::: {1..3} ::: {1..3}
|
||||||
1 2
|
1 2
|
||||||
1 3
|
1 3
|
||||||
|
@ -283,16 +283,16 @@ Job 3 of 5
|
||||||
Job 4 of 5
|
Job 4 of 5
|
||||||
Job 5 of 5
|
Job 5 of 5
|
||||||
cat num30000 | parallel --xargs echo | wc -l
|
cat num30000 | parallel --xargs echo | wc -l
|
||||||
3
|
9
|
||||||
cat num30000 | parallel --xargs -s 10000 echo | wc -l
|
cat num30000 | parallel --xargs -s 10000 echo | wc -l
|
||||||
17
|
99
|
||||||
cat num30000 | parallel --jobs 4 -m echo | wc -l
|
cat num30000 | parallel --jobs 4 -m echo | wc -l
|
||||||
6
|
9
|
||||||
parallel --jobs 4 -m echo ::: 1 2 3 4 5 6 7 8 9 10
|
parallel --jobs 4 -m echo ::: 1 2 3 4 5 6 7 8 9 10
|
||||||
1 2 3
|
1 2 3
|
||||||
4 5 6
|
4 5 6
|
||||||
7 8 9
|
7 8 9
|
||||||
10
|
99
|
||||||
parallel --jobs 4 -X echo pre-{}-post ::: A B C D E F G
|
parallel --jobs 4 -X echo pre-{}-post ::: A B C D E F G
|
||||||
pre-A-post pre-B-post
|
pre-A-post pre-B-post
|
||||||
pre-C-post pre-D-post
|
pre-C-post pre-D-post
|
||||||
|
@ -348,8 +348,6 @@ echo B
|
||||||
echo C
|
echo C
|
||||||
parallel -j2 'printf "%s-start\n%s" {} {};sleep {};printf "%s\n" -middle;echo {}-end' ::: 4 2 1
|
parallel -j2 'printf "%s-start\n%s" {} {};sleep {};printf "%s\n" -middle;echo {}-end' ::: 4 2 1
|
||||||
4-start
|
4-start
|
||||||
4-middle
|
|
||||||
4-end
|
|
||||||
2-start
|
2-start
|
||||||
2-middle
|
2-middle
|
||||||
2-end
|
2-end
|
||||||
|
@ -365,7 +363,6 @@ echo C
|
||||||
1-middle
|
1-middle
|
||||||
1-end
|
1-end
|
||||||
-middle
|
-middle
|
||||||
4-end
|
|
||||||
parallel -j2 --linebuffer 'printf "%s-start\n%s" {} {};sleep {};printf "%s\n" -middle;echo {}-end' ::: 4 2 1
|
parallel -j2 --linebuffer 'printf "%s-start\n%s" {} {};sleep {};printf "%s\n" -middle;echo {}-end' ::: 4 2 1
|
||||||
4-start
|
4-start
|
||||||
2-start
|
2-start
|
||||||
|
@ -374,12 +371,8 @@ echo C
|
||||||
1-start
|
1-start
|
||||||
1-middle
|
1-middle
|
||||||
1-end
|
1-end
|
||||||
4-middle
|
|
||||||
4-end
|
|
||||||
parallel -j2 -k 'printf "%s-start\n%s" {} {};sleep {};printf "%s\n" -middle;echo {}-end' ::: 4 2 1
|
parallel -j2 -k 'printf "%s-start\n%s" {} {};sleep {};printf "%s\n" -middle;echo {}-end' ::: 4 2 1
|
||||||
4-start
|
4-start
|
||||||
4-middle
|
|
||||||
4-end
|
|
||||||
2-start
|
2-start
|
||||||
2-middle
|
2-middle
|
||||||
2-end
|
2-end
|
||||||
|
@ -387,9 +380,9 @@ echo C
|
||||||
1-middle
|
1-middle
|
||||||
1-end
|
1-end
|
||||||
parallel --files echo ::: A B C
|
parallel --files echo ::: A B C
|
||||||
/tmp/parallel-tutorial/parXXXXX.par
|
/tmp/parallel-tutorial-tmpdir/parXXXXX.par
|
||||||
/tmp/parallel-tutorial/parXXXXX.par
|
/tmp/parallel-tutorial-tmpdir/parXXXXX.par
|
||||||
/tmp/parallel-tutorial/parXXXXX.par
|
/tmp/parallel-tutorial-tmpdir/parXXXXX.par
|
||||||
parallel --tmpdir /var/tmp --files echo ::: A B C
|
parallel --tmpdir /var/tmp --files echo ::: A B C
|
||||||
/var/tmp/parXXXXX.par
|
/var/tmp/parXXXXX.par
|
||||||
/var/tmp/parXXXXX.par
|
/var/tmp/parXXXXX.par
|
||||||
|
@ -446,19 +439,19 @@ B D
|
||||||
/bin/bash: line 10: outdir/f1/B/f2/D/stderr: No such file or directory
|
/bin/bash: line 10: outdir/f1/B/f2/D/stderr: No such file or directory
|
||||||
/bin/bash: line 11: outdir/f1/B/f2/D/stdout: No such file or directory
|
/bin/bash: line 11: outdir/f1/B/f2/D/stdout: No such file or directory
|
||||||
/usr/bin/time -f %e parallel -N0 -j64 sleep 1 :::: num128
|
/usr/bin/time -f %e parallel -N0 -j64 sleep 1 :::: num128
|
||||||
2
|
9
|
||||||
/usr/bin/time -f %e parallel -N0 sleep 1 :::: num128
|
/usr/bin/time -f %e parallel -N0 sleep 1 :::: num128
|
||||||
16
|
99
|
||||||
/usr/bin/time -f %e parallel -N0 --jobs 200% sleep 1 :::: num128
|
/usr/bin/time -f %e parallel -N0 --jobs 200% sleep 1 :::: num128
|
||||||
8
|
9
|
||||||
/usr/bin/time -f %e parallel -N0 --jobs 0 sleep 1 :::: num128
|
/usr/bin/time -f %e parallel -N0 --jobs 0 sleep 1 :::: num128
|
||||||
1
|
9
|
||||||
echo 50% > my_jobs
|
echo 50% > my_jobs
|
||||||
/usr/bin/time -f %e parallel -N0 --jobs my_jobs sleep 1 :::: num128 &
|
/usr/bin/time -f %e parallel -N0 --jobs my_jobs sleep 1 :::: num128 &
|
||||||
sleep 1
|
sleep 1
|
||||||
echo 0 > my_jobs
|
echo 0 > my_jobs
|
||||||
wait
|
wait
|
||||||
3
|
9
|
||||||
parallel --use-cpus-instead-of-cores -N0 sleep 1 :::: num8
|
parallel --use-cpus-instead-of-cores -N0 sleep 1 :::: num8
|
||||||
parallel --shuf echo ::: 1 2 3 ::: a b c ::: A B C
|
parallel --shuf echo ::: 1 2 3 ::: a b c ::: A B C
|
||||||
123 abc ABC
|
123 abc ABC
|
||||||
|
@ -490,7 +483,7 @@ B D
|
||||||
123 abc ABC
|
123 abc ABC
|
||||||
|
|
||||||
seq 10 20 | parallel --tmux 'echo start {}; sleep {}; echo done {}'
|
seq 10 20 | parallel --tmux 'echo start {}; sleep {}; echo done {}'
|
||||||
See output with: tmux -S /tmp/parallel-tutorial/tmsXXXXX attach
|
See output with: tmux -S /tmp/parallel-tutorial-tmpdir/tmsXXXXX attach
|
||||||
tmux -S /tmp/tmsXXXXX attach
|
tmux -S /tmp/tmsXXXXX attach
|
||||||
no sessions
|
no sessions
|
||||||
parallel --delay 2.5 echo Starting {}\;date ::: 1 2 3
|
parallel --delay 2.5 echo Starting {}\;date ::: 1 2 3
|
||||||
|
@ -501,13 +494,13 @@ DATE OUTPUT
|
||||||
Starting 3
|
Starting 3
|
||||||
DATE OUTPUT
|
DATE OUTPUT
|
||||||
parallel --timeout 4.1 sleep {}\; echo {} ::: 2 4 6 8
|
parallel --timeout 4.1 sleep {}\; echo {} ::: 2 4 6 8
|
||||||
2
|
9
|
||||||
4
|
9
|
||||||
parallel --timeout 200% sleep {}\; echo {} ::: 2.1 2.2 3 7 2.3
|
parallel --timeout 200% sleep {}\; echo {} ::: 2.1 2.2 3 7 2.3
|
||||||
2
|
9
|
||||||
2
|
9
|
||||||
3
|
9
|
||||||
2
|
9
|
||||||
parallel --eta sleep ::: 1 3 2 2 1 3 3 2 1
|
parallel --eta sleep ::: 1 3 2 2 1 3 3 2 1
|
||||||
|
|
||||||
Computers / CPU cores / Max jobs to run
|
Computers / CPU cores / Max jobs to run
|
||||||
|
@ -570,26 +563,26 @@ Seq Host Starttime JobRuntime Send Receive Exitval Signal Command
|
||||||
1 : TIMESTAMP 9.999 0 0 1 0 exit 1
|
1 : TIMESTAMP 9.999 0 0 1 0 exit 1
|
||||||
2 : TIMESTAMP 9.999 0 0 2 0 exit 2
|
2 : TIMESTAMP 9.999 0 0 2 0 exit 2
|
||||||
3 : TIMESTAMP 9.999 0 0 3 0 exit 3
|
3 : TIMESTAMP 9.999 0 0 3 0 exit 3
|
||||||
0
|
9
|
||||||
0
|
9
|
||||||
1
|
9
|
||||||
2
|
9
|
||||||
parallel: This job failed:
|
parallel: This job failed:
|
||||||
echo X; exit X
|
echo X; exit X
|
||||||
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
|
parallel: Starting no more jobs. Waiting for 1 jobs to finish.
|
||||||
parallel: This job failed:
|
parallel: This job failed:
|
||||||
echo X; exit X
|
echo X; exit X
|
||||||
parallel -j2 --halt now,fail=1 echo {}\; exit {} ::: 0 0 1 2 3
|
parallel -j2 --halt now,fail=1 echo {}\; exit {} ::: 0 0 1 2 3
|
||||||
0
|
9
|
||||||
0
|
9
|
||||||
1
|
9
|
||||||
parallel: This job failed:
|
parallel: This job failed:
|
||||||
echo X; exit X
|
echo X; exit X
|
||||||
parallel -j2 --halt soon,fail=20% echo {}\; exit {} ::: 0 1 2 3 4 5 6 7 8 9
|
parallel -j2 --halt soon,fail=20% echo {}\; exit {} ::: 0 1 2 3 4 5 6 7 8 9
|
||||||
0
|
9
|
||||||
1
|
9
|
||||||
2
|
9
|
||||||
3
|
9
|
||||||
parallel: This job failed:
|
parallel: This job failed:
|
||||||
echo X; exit X
|
echo X; exit X
|
||||||
parallel: This job failed:
|
parallel: This job failed:
|
||||||
|
@ -598,10 +591,10 @@ parallel: Starting no more jobs. Waiting for 1 jobs to finish.
|
||||||
parallel: This job failed:
|
parallel: This job failed:
|
||||||
echo X; exit X
|
echo X; exit X
|
||||||
parallel -j2 --halt now,success=1 echo {}\; exit {} ::: 1 2 3 0 4 5 6
|
parallel -j2 --halt now,success=1 echo {}\; exit {} ::: 1 2 3 0 4 5 6
|
||||||
1
|
9
|
||||||
2
|
9
|
||||||
3
|
9
|
||||||
0
|
9
|
||||||
parallel: This job succeeded:
|
parallel: This job succeeded:
|
||||||
echo X; exit X
|
echo X; exit X
|
||||||
parallel -k --retries 3 'echo tried {} >>/tmp/runs; echo completed {}; exit {}' ::: 1 2 0
|
parallel -k --retries 3 'echo tried {} >>/tmp/runs; echo completed {}; exit {}' ::: 1 2 0
|
||||||
|
@ -686,13 +679,13 @@ foo
|
||||||
/home/parallel/privat/parallel/testsuite/tmp
|
/home/parallel/privat/parallel/testsuite/tmp
|
||||||
/home/parallel/.TMPWORKDIR
|
/home/parallel/.TMPWORKDIR
|
||||||
parallel -S $SERVER1 --sshdelay 0.2 echo ::: 1 2 3
|
parallel -S $SERVER1 --sshdelay 0.2 echo ::: 1 2 3
|
||||||
1
|
9
|
||||||
2
|
9
|
||||||
3
|
9
|
||||||
parallel --controlmaster -S $SERVER1 echo ::: 1 2 3
|
parallel --controlmaster -S $SERVER1 echo ::: 1 2 3
|
||||||
1
|
9
|
||||||
2
|
9
|
||||||
3
|
9
|
||||||
parallel --filter-hosts -S 173.194.32.46,$SERVER1 echo ::: bar
|
parallel --filter-hosts -S 173.194.32.46,$SERVER1 echo ::: bar
|
||||||
bar
|
bar
|
||||||
parallel: Warning: Removed 173.194.32.46.
|
parallel: Warning: Removed 173.194.32.46.
|
||||||
|
@ -861,51 +854,51 @@ _
|
||||||
}
|
}
|
||||||
export -f my_func3
|
export -f my_func3
|
||||||
parallel -vv --workdir ... --nice 17 --env _ --trc {}.out -S $SERVER1 my_func3 {} ::: abc-file
|
parallel -vv --workdir ... --nice 17 --env _ --trc {}.out -S $SERVER1 my_func3 {} ::: abc-file
|
||||||
( ssh -l parallel lo -- mkdir -p ./.TMPWORKDIR;rsync --protocol 30 -rlDzR -essh\ -l\ parallel ./abc-file lo:./.TMPWORKDIR );ssh -l parallel lo -- exec perl -e @GNU_Parallel\\\=\\\(\\\"use\\\",\\\"IPC::Open3\\\;\\\",\\\"use\\\",\\\"MIME::Base64\\\"\\\)\\\;eval\\\"@GNU_Parallel\\\"\\\;my\\\$eval\\\=decode_base64\\\(join\\\"\\\",@ARGV\\\)\\\;eval\\\$eval\\\; BASE64 BASE64;_EXIT_status=$?; mkdir -p ./.; rsync --protocol 30 --rsync-path=cd\ ./.TMPWORKDIR/./.\;\ rsync -rlDzR -essh\ -l\ parallel lo:./abc-file.out ./.;ssh -l parallel lo -- \(rm\ -f\ ./.TMPWORKDIR/abc-file\;\ sh\ -c\ \'rmdir\ ./.TMPWORKDIR/\ ./.parallel/tmp/\ ./.parallel/\ 2\>/dev/null\'\;rm\ -rf\ ./.TMPWORKDIR\;\);ssh -l parallel lo -- \(rm\ -f\ ./.TMPWORKDIR/abc-file.out\;\ sh\ -c\ \'rmdir\ ./.TMPWORKDIR/\ ./.parallel/tmp/\ ./.parallel/\ 2\>/dev/null\'\;rm\ -rf\ ./.TMPWORKDIR\;\);ssh -l parallel lo -- rm -rf .TMPWORKDIR; exit $_EXIT_status;
|
( ssh -l parallel lo -- mkdir -p ./.TMPWORKDIR;rsync --protocol 30 -rlDzR -essh\ -l\ parallel ./abc-file lo:./.TMPWORKDIR );ssh -l parallel lo -- exec perl -e @GNU_Parallel\\\=\\\(\\\"use\\\",\\\"IPC::Open3\\\;\\\",\\\"use\\\",\\\"MIME::Base64\\\"\\\)\\\;eval\\\"@GNU_Parallel\\\"\\\;my\\\$eval\\\=decode_base64\\\(join\\\"\\\",@ARGV\\\)\\\;eval\\\$eval\\\; BASE64 BASE64;_EXIT_status=$?; mkdir -p ./.; rsync --protocol 30 --rsync-path=cd\ ./.TMPWORKDIR/./.\;\ rsync -rlDzR -essh\ -l\ parallel lo:./abc-file.out ./.;ssh -l parallel lo -- \(rm\ -f\ ./.TMPWORKDIR/abc-file\;\ sh\ -c\ rmdir\\\ ./.TMPWORKDIR/\\\ ./.parallel/tmp/\\\ ./.parallel/\\\ 2\\\>/dev/null\\\;rm\\\ -rf\\\ ./.TMPWORKDIR\\\;\);ssh -l parallel lo -- \(rm\ -f\ ./.TMPWORKDIR/abc-file.out\;\ sh\ -c\ rmdir\\\ ./.TMPWORKDIR/\\\ ./.parallel/tmp/\\\ ./.parallel/\\\ 2\\\>/dev/null\\\;rm\\\ -rf\\\ ./.TMPWORKDIR\\\;\);ssh -l parallel lo -- rm -rf .TMPWORKDIR; exit $_EXIT_status;
|
||||||
parallel --sqlandworker csv:////%2Ftmp%2Flog.csv seq ::: 10 ::: 12 13 14
|
parallel --sqlandworker csv:////%2Ftmp%2Flog.csv seq ::: 10 ::: 12 13 14
|
||||||
cat /tmp/log.csv
|
cat /tmp/log.csv
|
||||||
10
|
99
|
||||||
11
|
99
|
||||||
12
|
99
|
||||||
10
|
99
|
||||||
11
|
99
|
||||||
12
|
99
|
||||||
13
|
99
|
||||||
10
|
99
|
||||||
11
|
99
|
||||||
12
|
99
|
||||||
13
|
99
|
||||||
14
|
99
|
||||||
Seq,Host,Starttime,JobRuntime,Send,Receive,Exitval,_Signal,Command,V1,V2,Stdout,Stderr
|
Seq,Host,Starttime,JobRuntime,Send,Receive,Exitval,_Signal,Command,V1,V2,Stdout,Stderr
|
||||||
1,:,000000000.000,0.000,0,9,0,0,"seq 10 12",10,12,"10
|
1,:,000000000.000,0.000,0,9,0,0,"seq 10 12",10,12,"10
|
||||||
11
|
99
|
||||||
12
|
99
|
||||||
",
|
",
|
||||||
2,:,000000000.000,0.000,0,12,0,0,"seq 10 13",10,13,"10
|
2,:,000000000.000,0.000,0,12,0,0,"seq 10 13",10,13,"10
|
||||||
11
|
99
|
||||||
12
|
99
|
||||||
13
|
99
|
||||||
",
|
",
|
||||||
3,:,000000000.000,0.000,0,15,0,0,"seq 10 14",10,14,"10
|
3,:,000000000.000,0.000,0,15,0,0,"seq 10 14",10,14,"10
|
||||||
11
|
99
|
||||||
12
|
99
|
||||||
13
|
99
|
||||||
14
|
99
|
||||||
",
|
",
|
||||||
parallel --results outdir --sqlandworker csv:////%2Ftmp%2Flog2.csv seq ::: 10 ::: 12 13 14
|
parallel --results outdir --sqlandworker csv:////%2Ftmp%2Flog2.csv seq ::: 10 ::: 12 13 14
|
||||||
cat /tmp/log2.csv
|
cat /tmp/log2.csv
|
||||||
10
|
99
|
||||||
11
|
99
|
||||||
12
|
99
|
||||||
10
|
99
|
||||||
11
|
99
|
||||||
12
|
99
|
||||||
13
|
99
|
||||||
10
|
99
|
||||||
11
|
99
|
||||||
12
|
99
|
||||||
13
|
99
|
||||||
14
|
99
|
||||||
Seq,Host,Starttime,JobRuntime,Send,Receive,Exitval,_Signal,Command,V1,V2,Stdout,Stderr
|
Seq,Host,Starttime,JobRuntime,Send,Receive,Exitval,_Signal,Command,V1,V2,Stdout,Stderr
|
||||||
1,:,000000000.000,0.000,0,9,0,0,"seq 10 12",10,12,outdir/1/10/2/12/stdout,outdir/1/10/2/12/stderr
|
1,:,000000000.000,0.000,0,9,0,0,"seq 10 12",10,12,outdir/1/10/2/12/stdout,outdir/1/10/2/12/stderr
|
||||||
2,:,000000000.000,0.000,0,12,0,0,"seq 10 13",10,13,outdir/1/10/2/13/stdout,outdir/1/10/2/13/stderr
|
2,:,000000000.000,0.000,0,12,0,0,"seq 10 13",10,13,outdir/1/10/2/13/stdout,outdir/1/10/2/13/stderr
|
||||||
|
@ -1014,48 +1007,48 @@ END
|
||||||
JOB1
|
JOB1
|
||||||
%head1
|
%head1
|
||||||
%head2
|
%head2
|
||||||
1
|
9
|
||||||
2
|
9
|
||||||
3
|
9
|
||||||
JOB2
|
JOB2
|
||||||
%head1
|
%head1
|
||||||
%head2
|
%head2
|
||||||
4
|
9
|
||||||
5
|
9
|
||||||
6
|
9
|
||||||
JOB3
|
JOB3
|
||||||
%head1
|
%head1
|
||||||
%head2
|
%head2
|
||||||
7
|
9
|
||||||
8
|
9
|
||||||
9
|
9
|
||||||
JOB4
|
JOB4
|
||||||
%head1
|
%head1
|
||||||
%head2
|
%head2
|
||||||
10
|
99
|
||||||
cat num_%header | parallel --header 2 --pipe -N3 echo JOB{#}\;cat
|
cat num_%header | parallel --header 2 --pipe -N3 echo JOB{#}\;cat
|
||||||
JOB1
|
JOB1
|
||||||
%head1
|
%head1
|
||||||
%head2
|
%head2
|
||||||
1
|
9
|
||||||
2
|
9
|
||||||
3
|
9
|
||||||
JOB2
|
JOB2
|
||||||
%head1
|
%head1
|
||||||
%head2
|
%head2
|
||||||
4
|
9
|
||||||
5
|
9
|
||||||
6
|
9
|
||||||
JOB3
|
JOB3
|
||||||
%head1
|
%head1
|
||||||
%head2
|
%head2
|
||||||
7
|
9
|
||||||
8
|
9
|
||||||
9
|
9
|
||||||
JOB4
|
JOB4
|
||||||
%head1
|
%head1
|
||||||
%head2
|
%head2
|
||||||
10
|
99
|
||||||
parallel --pipepart -a num1000000 --block 3m wc
|
parallel --pipepart -a num1000000 --block 3m wc
|
||||||
444444 444444 3000003
|
444444 444444 3000003
|
||||||
428572 428572 3000004
|
428572 428572 3000004
|
||||||
|
@ -1306,8 +1299,8 @@ mentioned in the release notes of next version of GNU Parallel.
|
||||||
|
|
||||||
parallel --number-of-cpus
|
parallel --number-of-cpus
|
||||||
parallel --number-of-cores
|
parallel --number-of-cores
|
||||||
1
|
9
|
||||||
8
|
9
|
||||||
echo '--nice 17' > ~/.parallel/nicetimeout
|
echo '--nice 17' > ~/.parallel/nicetimeout
|
||||||
echo '--timeout 300%' >> ~/.parallel/nicetimeout
|
echo '--timeout 300%' >> ~/.parallel/nicetimeout
|
||||||
parallel --profile nicetimeout echo ::: A B C
|
parallel --profile nicetimeout echo ::: A B C
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
### Test -k
|
### Test -k
|
||||||
parallel: Warning: Only enough file handles to run 9 jobs in parallel.
|
parallel: Warning: Only enough file handles to run 9 jobs in parallel.
|
||||||
Running 'parallel -j0 -N9 --pipe parallel -j0' or raising ulimit -n or /etc/security/limits.conf may help.
|
parallel: Warning: Running 'parallel -j0 -N 9 --pipe parallel -j0' or
|
||||||
|
parallel: Warning: raising ulimit -n or /etc/security/limits.conf may help.
|
||||||
|
parallel: Warning: No more file handles.
|
||||||
|
parallel: Warning: Raising ulimit -n or /etc/security/limits.conf may help.
|
||||||
begin
|
begin
|
||||||
1
|
1
|
||||||
2
|
2
|
||||||
|
@ -10,7 +13,6 @@ begin
|
||||||
6
|
6
|
||||||
7
|
7
|
||||||
8
|
8
|
||||||
parallel: Warning: No more file handles. Raising ulimit -n or /etc/security/limits.conf may help.
|
|
||||||
9
|
9
|
||||||
10
|
10
|
||||||
11
|
11
|
||||||
|
@ -59,10 +61,11 @@ job2
|
||||||
7
|
7
|
||||||
8
|
8
|
||||||
9
|
9
|
||||||
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: SIGTERM received. No new jobs will be started.
|
||||||
parallel: Waiting for these 8 jobs to finish. Send SIGTERM again to stop now.
|
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: Warning: Only enough file handles to run 8 jobs in parallel.
|
||||||
|
parallel: Warning: Running 'parallel -j0 -N 8 --pipe parallel -j0' or
|
||||||
|
parallel: Warning: raising ulimit -n or /etc/security/limits.conf may help.
|
||||||
parallel: sleep 3; echo 10
|
parallel: sleep 3; echo 10
|
||||||
parallel: sleep 3; echo 11
|
parallel: sleep 3; echo 11
|
||||||
parallel: sleep 3; echo 12
|
parallel: sleep 3; echo 12
|
||||||
|
|
|
@ -7,10 +7,10 @@ please cite:
|
||||||
O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
|
O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
|
||||||
;login: The USENIX Magazine, February 2011:42-47.
|
;login: The USENIX Magazine, February 2011:42-47.
|
||||||
|
|
||||||
This helps funding further development; and it won't cost you a cent.
|
This helps funding further development; AND IT WON'T COST YOU A CENT.
|
||||||
If you pay 10000 EUR you should feel free to use GNU Parallel without citing.
|
If you pay 10000 EUR you should feel free to use GNU Parallel without citing.
|
||||||
|
|
||||||
Silence the citation notice: run 'parallel --bibtex' once or use '--will-cite'.
|
To silence the citation notice: run 'parallel --citation'.
|
||||||
|
|
||||||
sleep 0.1; echo opt-p 1 ?...y
|
sleep 0.1; echo opt-p 1 ?...y
|
||||||
sleep 0.1; echo opt-p 2 ?...n
|
sleep 0.1; echo opt-p 2 ?...n
|
||||||
|
@ -24,10 +24,10 @@ please cite:
|
||||||
O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
|
O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
|
||||||
;login: The USENIX Magazine, February 2011:42-47.
|
;login: The USENIX Magazine, February 2011:42-47.
|
||||||
|
|
||||||
This helps funding further development; and it won't cost you a cent.
|
This helps funding further development; AND IT WON'T COST YOU A CENT.
|
||||||
If you pay 10000 EUR you should feel free to use GNU Parallel without citing.
|
If you pay 10000 EUR you should feel free to use GNU Parallel without citing.
|
||||||
|
|
||||||
Silence the citation notice: run 'parallel --bibtex' once or use '--will-cite'.
|
To silence the citation notice: run 'parallel --citation'.
|
||||||
|
|
||||||
sleep 0.1; echo opt--interactive 1 ?...y
|
sleep 0.1; echo opt--interactive 1 ?...y
|
||||||
sleep 0.1; echo opt--interactive 2 ?...n
|
sleep 0.1; echo opt--interactive 2 ?...n
|
||||||
|
@ -41,220 +41,6 @@ echo '### Test killing children with --timeout and exit value (failed if timed o
|
||||||
0 0 0
|
0 0 0
|
||||||
2
|
2
|
||||||
0 0 0
|
0 0 0
|
||||||
echo '### Test -L -l and --max-lines'
|
|
||||||
### Test -L -l and --max-lines
|
|
||||||
(echo a_b;echo c) | parallel -km -L2 echo
|
|
||||||
a_b
|
|
||||||
c
|
|
||||||
(echo a_b;echo c) | parallel -k -L2 echo
|
|
||||||
a_b c
|
|
||||||
(echo a_b;echo c) | xargs -L2 echo
|
|
||||||
a_b c
|
|
||||||
echo '### xargs -L1 echo'
|
|
||||||
### xargs -L1 echo
|
|
||||||
(echo a_b;echo c) | parallel -km -L1 echo
|
|
||||||
a_b
|
|
||||||
c
|
|
||||||
(echo a_b;echo c) | parallel -k -L1 echo
|
|
||||||
a_b
|
|
||||||
c
|
|
||||||
(echo a_b;echo c) | xargs -L1 echo
|
|
||||||
a_b
|
|
||||||
c
|
|
||||||
echo 'Lines ending in space should continue on next line'
|
|
||||||
Lines ending in space should continue on next line
|
|
||||||
echo '### xargs -L1 echo'
|
|
||||||
### xargs -L1 echo
|
|
||||||
(echo a_b' ';echo c;echo d) | parallel -km -L1 echo
|
|
||||||
a_b c
|
|
||||||
d
|
|
||||||
(echo a_b' ';echo c;echo d) | parallel -k -L1 echo
|
|
||||||
a_b c
|
|
||||||
d
|
|
||||||
(echo a_b' ';echo c;echo d) | xargs -L1 echo
|
|
||||||
a_b c
|
|
||||||
d
|
|
||||||
echo '### xargs -L2 echo'
|
|
||||||
### xargs -L2 echo
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | parallel -km -L2 echo
|
|
||||||
a_b c d
|
|
||||||
e
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | parallel -k -L2 echo
|
|
||||||
a_b c d
|
|
||||||
e
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | xargs -L2 echo
|
|
||||||
a_b c d
|
|
||||||
e
|
|
||||||
echo '### xargs -l echo'
|
|
||||||
### xargs -l echo
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | parallel -l -km echo # This behaves wrong
|
|
||||||
a_b c
|
|
||||||
d
|
|
||||||
e
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | parallel -l -k echo # This behaves wrong
|
|
||||||
a_b c
|
|
||||||
d
|
|
||||||
e
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | xargs -l echo
|
|
||||||
a_b c
|
|
||||||
d
|
|
||||||
e
|
|
||||||
echo '### xargs -l2 echo'
|
|
||||||
### xargs -l2 echo
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | parallel -km -l2 echo
|
|
||||||
a_b c d
|
|
||||||
e
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | parallel -k -l2 echo
|
|
||||||
a_b c d
|
|
||||||
e
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | xargs -l2 echo
|
|
||||||
a_b c d
|
|
||||||
e
|
|
||||||
echo '### xargs -l1 echo'
|
|
||||||
### xargs -l1 echo
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | parallel -km -l1 echo
|
|
||||||
a_b c
|
|
||||||
d
|
|
||||||
e
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | parallel -k -l1 echo
|
|
||||||
a_b c
|
|
||||||
d
|
|
||||||
e
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | xargs -l1 echo
|
|
||||||
a_b c
|
|
||||||
d
|
|
||||||
e
|
|
||||||
echo '### xargs --max-lines=2 echo'
|
|
||||||
### xargs --max-lines=2 echo
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | parallel -km --max-lines 2 echo
|
|
||||||
a_b c d
|
|
||||||
e
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | parallel -k --max-lines 2 echo
|
|
||||||
a_b c d
|
|
||||||
e
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | xargs --max-lines=2 echo
|
|
||||||
a_b c d
|
|
||||||
e
|
|
||||||
echo '### xargs --max-lines echo'
|
|
||||||
### xargs --max-lines echo
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | parallel --max-lines -km echo # This behaves wrong
|
|
||||||
a_b c
|
|
||||||
d
|
|
||||||
e
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | parallel --max-lines -k echo # This behaves wrong
|
|
||||||
a_b c
|
|
||||||
d
|
|
||||||
e
|
|
||||||
(echo a_b' ';echo c;echo d;echo e) | xargs --max-lines echo
|
|
||||||
a_b c
|
|
||||||
d
|
|
||||||
e
|
|
||||||
echo '### test too long args'
|
|
||||||
### test too long args
|
|
||||||
perl -e 'print "z"x1000000' | parallel echo 2>&1
|
|
||||||
parallel: Error: Command line too long (1000005 >= 131071) at input 0: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...
|
|
||||||
perl -e 'print "z"x1000000' | xargs echo 2>&1
|
|
||||||
xargs: argument line too long
|
|
||||||
(seq 1 10; perl -e 'print "z"x1000000'; seq 12 15) | stdout parallel -j1 -km -s 10 echo
|
|
||||||
1 2
|
|
||||||
3 4
|
|
||||||
5 6
|
|
||||||
7 8
|
|
||||||
9 10
|
|
||||||
parallel: Error: Command line too long (1000007 >= 10) at input 0: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...
|
|
||||||
(seq 1 10; perl -e 'print "z"x1000000'; seq 12 15) | stdout xargs -s 10 echo
|
|
||||||
1 2
|
|
||||||
3 4
|
|
||||||
5 6
|
|
||||||
7 8
|
|
||||||
xargs: argument line too long
|
|
||||||
9 10
|
|
||||||
(seq 1 10; perl -e 'print "z"x1000000'; seq 12 15) | stdout parallel -j1 -kX -s 10 echo
|
|
||||||
1 2
|
|
||||||
3 4
|
|
||||||
5 6
|
|
||||||
7 8
|
|
||||||
9 10
|
|
||||||
parallel: Error: Command line too long (1000007 >= 10) at input 0: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...
|
|
||||||
echo '### Test -x'
|
|
||||||
### Test -x
|
|
||||||
(seq 1 10; echo 12345; seq 12 15) | stdout parallel -j1 -km -s 10 -x echo
|
|
||||||
1 2
|
|
||||||
3 4
|
|
||||||
5 6
|
|
||||||
7 8
|
|
||||||
9 10
|
|
||||||
parallel: Error: Command line too long (10 >= 10) at input 0: 12345
|
|
||||||
(seq 1 10; echo 12345; seq 12 15) | stdout parallel -j1 -kX -s 10 -x echo
|
|
||||||
1 2
|
|
||||||
3 4
|
|
||||||
5 6
|
|
||||||
7 8
|
|
||||||
9 10
|
|
||||||
parallel: Error: Command line too long (10 >= 10) at input 0: 12345
|
|
||||||
(seq 1 10; echo 12345; seq 12 15) | stdout xargs -s 10 -x echo
|
|
||||||
1 2
|
|
||||||
3 4
|
|
||||||
5 6
|
|
||||||
xargs: argument line too long
|
|
||||||
7 8
|
|
||||||
(seq 1 10; echo 1234; seq 12 15) | stdout parallel -j1 -km -s 10 -x echo
|
|
||||||
1 2
|
|
||||||
3 4
|
|
||||||
5 6
|
|
||||||
7 8
|
|
||||||
9 10
|
|
||||||
1234
|
|
||||||
12
|
|
||||||
13
|
|
||||||
14
|
|
||||||
15
|
|
||||||
(seq 1 10; echo 1234; seq 12 15) | stdout parallel -j1 -kX -s 10 -x echo
|
|
||||||
1 2
|
|
||||||
3 4
|
|
||||||
5 6
|
|
||||||
7 8
|
|
||||||
9 10
|
|
||||||
1234
|
|
||||||
12
|
|
||||||
13
|
|
||||||
14
|
|
||||||
15
|
|
||||||
(seq 1 10; echo 1234; seq 12 15) | stdout xargs -s 10 -x echo
|
|
||||||
1 2
|
|
||||||
3 4
|
|
||||||
5 6
|
|
||||||
7 8
|
|
||||||
9 10
|
|
||||||
1234
|
|
||||||
12
|
|
||||||
13
|
|
||||||
14
|
|
||||||
15
|
|
||||||
echo '### Test -a and --arg-file: Read input from file instead of stdin'
|
|
||||||
### Test -a and --arg-file: Read input from file instead of stdin
|
|
||||||
seq 1 10 >/tmp/parallel_$$-1; parallel -k -a /tmp/parallel_$$-1 echo; rm /tmp/parallel_$$-1
|
|
||||||
1
|
|
||||||
2
|
|
||||||
3
|
|
||||||
4
|
|
||||||
5
|
|
||||||
6
|
|
||||||
7
|
|
||||||
8
|
|
||||||
9
|
|
||||||
10
|
|
||||||
seq 1 10 >/tmp/parallel_$$-2; parallel -k --arg-file /tmp/parallel_$$-2 echo; rm /tmp/parallel_$$-2
|
|
||||||
1
|
|
||||||
2
|
|
||||||
3
|
|
||||||
4
|
|
||||||
5
|
|
||||||
6
|
|
||||||
7
|
|
||||||
8
|
|
||||||
9
|
|
||||||
10
|
|
||||||
xargs Expect: 3 1 2
|
xargs Expect: 3 1 2
|
||||||
3
|
3
|
||||||
1
|
1
|
||||||
|
@ -267,10 +53,10 @@ please cite:
|
||||||
O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
|
O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
|
||||||
;login: The USENIX Magazine, February 2011:42-47.
|
;login: The USENIX Magazine, February 2011:42-47.
|
||||||
|
|
||||||
This helps funding further development; and it won't cost you a cent.
|
This helps funding further development; AND IT WON'T COST YOU A CENT.
|
||||||
If you pay 10000 EUR you should feel free to use GNU Parallel without citing.
|
If you pay 10000 EUR you should feel free to use GNU Parallel without citing.
|
||||||
|
|
||||||
Silence the citation notice: run 'parallel --bibtex' once or use '--will-cite'.
|
To silence the citation notice: run 'parallel --citation'.
|
||||||
|
|
||||||
3
|
3
|
||||||
1
|
1
|
||||||
|
@ -288,10 +74,10 @@ please cite:
|
||||||
O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
|
O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
|
||||||
;login: The USENIX Magazine, February 2011:42-47.
|
;login: The USENIX Magazine, February 2011:42-47.
|
||||||
|
|
||||||
This helps funding further development; and it won't cost you a cent.
|
This helps funding further development; AND IT WON'T COST YOU A CENT.
|
||||||
If you pay 10000 EUR you should feel free to use GNU Parallel without citing.
|
If you pay 10000 EUR you should feel free to use GNU Parallel without citing.
|
||||||
|
|
||||||
Silence the citation notice: run 'parallel --bibtex' once or use '--will-cite'.
|
To silence the citation notice: run 'parallel --citation'.
|
||||||
|
|
||||||
1
|
1
|
||||||
3
|
3
|
||||||
|
@ -301,625 +87,3 @@ via pseudotty
|
||||||
gzip /tmp/parallel_f1
|
gzip /tmp/parallel_f1
|
||||||
gzip /tmp/parallel_f2'
|
gzip /tmp/parallel_f2'
|
||||||
'
|
'
|
||||||
echo '### Test -i and --replace: Replace with argument'
|
|
||||||
### Test -i and --replace: Replace with argument
|
|
||||||
(echo a; echo END; echo b) | parallel -k -i -eEND echo repl{}ce
|
|
||||||
replace
|
|
||||||
(echo a; echo END; echo b) | parallel -k --replace -eEND echo repl{}ce
|
|
||||||
replace
|
|
||||||
(echo a; echo END; echo b) | parallel -k -i+ -eEND echo repl+ce
|
|
||||||
replace
|
|
||||||
(echo e; echo END; echo b) | parallel -k -i'*' -eEND echo r'*'plac'*'
|
|
||||||
replace
|
|
||||||
(echo a; echo END; echo b) | parallel -k --replace + -eEND echo repl+ce
|
|
||||||
replace
|
|
||||||
(echo a; echo END; echo b) | parallel -k --replace== -eEND echo repl=ce
|
|
||||||
replace
|
|
||||||
(echo a; echo END; echo b) | parallel -k --replace = -eEND echo repl=ce
|
|
||||||
replace
|
|
||||||
(echo a; echo END; echo b) | parallel -k --replace=^ -eEND echo repl^ce
|
|
||||||
replace
|
|
||||||
(echo a; echo END; echo b) | parallel -k -I^ -eEND echo repl^ce
|
|
||||||
replace
|
|
||||||
echo '### Test -E: Artificial end-of-file'
|
|
||||||
### Test -E: Artificial end-of-file
|
|
||||||
(echo include this; echo END; echo not this) | parallel -k -E END echo
|
|
||||||
include this
|
|
||||||
(echo include this; echo END; echo not this) | parallel -k -EEND echo
|
|
||||||
include this
|
|
||||||
echo '### Test -e and --eof: Artificial end-of-file'
|
|
||||||
### Test -e and --eof: Artificial end-of-file
|
|
||||||
(echo include this; echo END; echo not this) | parallel -k -e END echo
|
|
||||||
include this
|
|
||||||
(echo include this; echo END; echo not this) | parallel -k -eEND echo
|
|
||||||
include this
|
|
||||||
(echo include this; echo END; echo not this) | parallel -k --eof=END echo
|
|
||||||
include this
|
|
||||||
(echo include this; echo END; echo not this) | parallel -k --eof END echo
|
|
||||||
include this
|
|
||||||
echo '### Test -n and --max-args: Max number of args per line (only with -X and -m)'
|
|
||||||
### Test -n and --max-args: Max number of args per line (only with -X and -m)
|
|
||||||
(echo line 1;echo line 2;echo line 3) | parallel -k -n1 -m echo
|
|
||||||
line 1
|
|
||||||
line 2
|
|
||||||
line 3
|
|
||||||
(echo line 1;echo line 1;echo line 2) | parallel -k -n2 -m echo
|
|
||||||
line 1 line 1
|
|
||||||
line 2
|
|
||||||
(echo line 1;echo line 2;echo line 3) | parallel -k -n1 -X echo
|
|
||||||
line 1
|
|
||||||
line 2
|
|
||||||
line 3
|
|
||||||
(echo line 1;echo line 1;echo line 2) | parallel -k -n2 -X echo
|
|
||||||
line 1 line 1
|
|
||||||
line 2
|
|
||||||
(echo line 1;echo line 2;echo line 3) | parallel -k -n1 echo
|
|
||||||
line 1
|
|
||||||
line 2
|
|
||||||
line 3
|
|
||||||
(echo line 1;echo line 1;echo line 2) | parallel -k -n2 echo
|
|
||||||
line 1 line 1
|
|
||||||
line 2
|
|
||||||
(echo line 1;echo line 2;echo line 3) | parallel -k --max-args=1 -X echo
|
|
||||||
line 1
|
|
||||||
line 2
|
|
||||||
line 3
|
|
||||||
(echo line 1;echo line 2;echo line 3) | parallel -k --max-args 1 -X echo
|
|
||||||
line 1
|
|
||||||
line 2
|
|
||||||
line 3
|
|
||||||
(echo line 1;echo line 1;echo line 2) | parallel -k --max-args=2 -X echo
|
|
||||||
line 1 line 1
|
|
||||||
line 2
|
|
||||||
(echo line 1;echo line 1;echo line 2) | parallel -k --max-args 2 -X echo
|
|
||||||
line 1 line 1
|
|
||||||
line 2
|
|
||||||
(echo line 1;echo line 2;echo line 3) | parallel -k --max-args 1 echo
|
|
||||||
line 1
|
|
||||||
line 2
|
|
||||||
line 3
|
|
||||||
(echo line 1;echo line 1;echo line 2) | parallel -k --max-args 2 echo
|
|
||||||
line 1 line 1
|
|
||||||
line 2
|
|
||||||
echo '### Test --max-procs and -P: Number of processes'
|
|
||||||
### Test --max-procs and -P: Number of processes
|
|
||||||
seq 1 10 | parallel -k --max-procs +0 echo max proc
|
|
||||||
max proc 1
|
|
||||||
max proc 2
|
|
||||||
max proc 3
|
|
||||||
max proc 4
|
|
||||||
max proc 5
|
|
||||||
max proc 6
|
|
||||||
max proc 7
|
|
||||||
max proc 8
|
|
||||||
max proc 9
|
|
||||||
max proc 10
|
|
||||||
seq 1 10 | parallel -k -P 200% echo 200% proc
|
|
||||||
200% proc 1
|
|
||||||
200% proc 2
|
|
||||||
200% proc 3
|
|
||||||
200% proc 4
|
|
||||||
200% proc 5
|
|
||||||
200% proc 6
|
|
||||||
200% proc 7
|
|
||||||
200% proc 8
|
|
||||||
200% proc 9
|
|
||||||
200% proc 10
|
|
||||||
echo '### Test --delimiter and -d: Delimiter instead of newline'
|
|
||||||
### Test --delimiter and -d: Delimiter instead of newline
|
|
||||||
echo '# Yes there is supposed to be an extra newline for -d N'
|
|
||||||
# Yes there is supposed to be an extra newline for -d N
|
|
||||||
echo line 1Nline 2Nline 3 | parallel -k -d N echo This is
|
|
||||||
This is line 1
|
|
||||||
This is line 2
|
|
||||||
This is line 3
|
|
||||||
|
|
||||||
echo line 1Nline 2Nline 3 | parallel -k --delimiter N echo This is
|
|
||||||
This is line 1
|
|
||||||
This is line 2
|
|
||||||
This is line 3
|
|
||||||
|
|
||||||
printf "delimiter NUL line 1\0line 2\0line 3" | parallel -k -d '\0' echo
|
|
||||||
delimiter NUL line 1
|
|
||||||
line 2
|
|
||||||
line 3
|
|
||||||
printf "delimiter TAB line 1\tline 2\tline 3" | parallel -k --delimiter '\t' echo
|
|
||||||
delimiter TAB line 1
|
|
||||||
line 2
|
|
||||||
line 3
|
|
||||||
echo '### Test --max-chars and -s: Max number of chars in a line'
|
|
||||||
### Test --max-chars and -s: Max number of chars in a line
|
|
||||||
(echo line 1;echo line 1;echo line 2) | parallel -k --max-chars 25 -X echo
|
|
||||||
line 1 line 1
|
|
||||||
line 2
|
|
||||||
(echo line 1;echo line 1;echo line 2) | parallel -k -s 25 -X echo
|
|
||||||
line 1 line 1
|
|
||||||
line 2
|
|
||||||
echo '### Test --no-run-if-empty and -r: This should give no output'
|
|
||||||
### Test --no-run-if-empty and -r: This should give no output
|
|
||||||
echo " " | parallel -r echo
|
|
||||||
echo " " | parallel --no-run-if-empty echo
|
|
||||||
echo '### Test --help and -h: Help output (just check we get the same amount of lines)'
|
|
||||||
### Test --help and -h: Help output (just check we get the same amount of lines)
|
|
||||||
echo Output from -h and --help
|
|
||||||
Output from -h and --help
|
|
||||||
parallel -h | wc -l
|
|
||||||
37
|
|
||||||
parallel --help | wc -l
|
|
||||||
37
|
|
||||||
echo '### Test --version: Version output (just check we get the same amount of lines)'
|
|
||||||
### Test --version: Version output (just check we get the same amount of lines)
|
|
||||||
parallel --version | wc -l
|
|
||||||
11
|
|
||||||
echo '### Test --verbose and -t'
|
|
||||||
### Test --verbose and -t
|
|
||||||
(echo b; echo c; echo f) | parallel -k -t echo {}ar 2>&1 >/dev/null
|
|
||||||
echo bar
|
|
||||||
echo car
|
|
||||||
echo far
|
|
||||||
(echo b; echo c; echo f) | parallel -k --verbose echo {}ar 2>&1 >/dev/null
|
|
||||||
echo bar
|
|
||||||
echo car
|
|
||||||
echo far
|
|
||||||
echo '### Test --show-limits'
|
|
||||||
### Test --show-limits
|
|
||||||
(echo b; echo c; echo f) | parallel -k --show-limits echo {}ar
|
|
||||||
Maximal size of command: 131071
|
|
||||||
Maximal used size of command: 131071
|
|
||||||
|
|
||||||
Execution of will continue now, and it will try to read its input
|
|
||||||
and run commands; if this is not what you wanted to happen, please
|
|
||||||
press CTRL-D or CTRL-C
|
|
||||||
bar
|
|
||||||
car
|
|
||||||
far
|
|
||||||
(echo b; echo c; echo f) | parallel -j1 -kX --show-limits -s 100 echo {}ar
|
|
||||||
Maximal size of command: 131071
|
|
||||||
Maximal used size of command: 100
|
|
||||||
|
|
||||||
Execution of will continue now, and it will try to read its input
|
|
||||||
and run commands; if this is not what you wanted to happen, please
|
|
||||||
press CTRL-D or CTRL-C
|
|
||||||
bar car far
|
|
||||||
echo '### Test empty line as input'
|
|
||||||
### Test empty line as input
|
|
||||||
echo | parallel echo empty input line
|
|
||||||
empty input line
|
|
||||||
echo '### Tests if (cat | sh) works'
|
|
||||||
### Tests if (cat | sh) works
|
|
||||||
perl -e 'for(1..25) {print "echo a $_; echo b $_\n"}' | parallel 2>&1 | sort
|
|
||||||
a 1
|
|
||||||
a 10
|
|
||||||
a 11
|
|
||||||
a 12
|
|
||||||
a 13
|
|
||||||
a 14
|
|
||||||
a 15
|
|
||||||
a 16
|
|
||||||
a 17
|
|
||||||
a 18
|
|
||||||
a 19
|
|
||||||
a 2
|
|
||||||
a 20
|
|
||||||
a 21
|
|
||||||
a 22
|
|
||||||
a 23
|
|
||||||
a 24
|
|
||||||
a 25
|
|
||||||
a 3
|
|
||||||
a 4
|
|
||||||
a 5
|
|
||||||
a 6
|
|
||||||
a 7
|
|
||||||
a 8
|
|
||||||
a 9
|
|
||||||
b 1
|
|
||||||
b 10
|
|
||||||
b 11
|
|
||||||
b 12
|
|
||||||
b 13
|
|
||||||
b 14
|
|
||||||
b 15
|
|
||||||
b 16
|
|
||||||
b 17
|
|
||||||
b 18
|
|
||||||
b 19
|
|
||||||
b 2
|
|
||||||
b 20
|
|
||||||
b 21
|
|
||||||
b 22
|
|
||||||
b 23
|
|
||||||
b 24
|
|
||||||
b 25
|
|
||||||
b 3
|
|
||||||
b 4
|
|
||||||
b 5
|
|
||||||
b 6
|
|
||||||
b 7
|
|
||||||
b 8
|
|
||||||
b 9
|
|
||||||
echo '### Test if xargs-mode works'
|
|
||||||
### Test if xargs-mode works
|
|
||||||
perl -e 'for(1..25) {print "a $_\nb $_\n"}' | parallel echo 2>&1 | sort
|
|
||||||
a 1
|
|
||||||
a 10
|
|
||||||
a 11
|
|
||||||
a 12
|
|
||||||
a 13
|
|
||||||
a 14
|
|
||||||
a 15
|
|
||||||
a 16
|
|
||||||
a 17
|
|
||||||
a 18
|
|
||||||
a 19
|
|
||||||
a 2
|
|
||||||
a 20
|
|
||||||
a 21
|
|
||||||
a 22
|
|
||||||
a 23
|
|
||||||
a 24
|
|
||||||
a 25
|
|
||||||
a 3
|
|
||||||
a 4
|
|
||||||
a 5
|
|
||||||
a 6
|
|
||||||
a 7
|
|
||||||
a 8
|
|
||||||
a 9
|
|
||||||
b 1
|
|
||||||
b 10
|
|
||||||
b 11
|
|
||||||
b 12
|
|
||||||
b 13
|
|
||||||
b 14
|
|
||||||
b 15
|
|
||||||
b 16
|
|
||||||
b 17
|
|
||||||
b 18
|
|
||||||
b 19
|
|
||||||
b 2
|
|
||||||
b 20
|
|
||||||
b 21
|
|
||||||
b 22
|
|
||||||
b 23
|
|
||||||
b 24
|
|
||||||
b 25
|
|
||||||
b 3
|
|
||||||
b 4
|
|
||||||
b 5
|
|
||||||
b 6
|
|
||||||
b 7
|
|
||||||
b 8
|
|
||||||
b 9
|
|
||||||
echo '### Test -q'
|
|
||||||
### Test -q
|
|
||||||
parallel -kq perl -e '$ARGV[0]=~/^\S+\s+\S+$/ and print $ARGV[0],"\n"' ::: "a b" c "d e f" g "h i"
|
|
||||||
a b
|
|
||||||
h i
|
|
||||||
echo '### Test -q {#}'
|
|
||||||
### Test -q {#}
|
|
||||||
parallel -kq echo {#} ::: a b
|
|
||||||
1
|
|
||||||
2
|
|
||||||
parallel -kq echo {\#} ::: a b
|
|
||||||
1
|
|
||||||
2
|
|
||||||
parallel -kq echo {\\#} ::: a b
|
|
||||||
{\#} a
|
|
||||||
{\#} b
|
|
||||||
echo '### Test long commands do not take up all memory'
|
|
||||||
### Test long commands do not take up all memory
|
|
||||||
seq 1 100 | parallel -j0 -qv perl -e '$r=rand(shift);for($f=0;$f<$r;$f++){$a="a"x100};print shift,"\n"' 10000 2>/dev/null | sort
|
|
||||||
1
|
|
||||||
10
|
|
||||||
100
|
|
||||||
11
|
|
||||||
12
|
|
||||||
13
|
|
||||||
14
|
|
||||||
15
|
|
||||||
16
|
|
||||||
17
|
|
||||||
18
|
|
||||||
19
|
|
||||||
2
|
|
||||||
20
|
|
||||||
21
|
|
||||||
22
|
|
||||||
23
|
|
||||||
24
|
|
||||||
25
|
|
||||||
26
|
|
||||||
27
|
|
||||||
28
|
|
||||||
29
|
|
||||||
3
|
|
||||||
30
|
|
||||||
31
|
|
||||||
32
|
|
||||||
33
|
|
||||||
34
|
|
||||||
35
|
|
||||||
36
|
|
||||||
37
|
|
||||||
38
|
|
||||||
39
|
|
||||||
4
|
|
||||||
40
|
|
||||||
41
|
|
||||||
42
|
|
||||||
43
|
|
||||||
44
|
|
||||||
45
|
|
||||||
46
|
|
||||||
47
|
|
||||||
48
|
|
||||||
49
|
|
||||||
5
|
|
||||||
50
|
|
||||||
51
|
|
||||||
52
|
|
||||||
53
|
|
||||||
54
|
|
||||||
55
|
|
||||||
56
|
|
||||||
57
|
|
||||||
58
|
|
||||||
59
|
|
||||||
6
|
|
||||||
60
|
|
||||||
61
|
|
||||||
62
|
|
||||||
63
|
|
||||||
64
|
|
||||||
65
|
|
||||||
66
|
|
||||||
67
|
|
||||||
68
|
|
||||||
69
|
|
||||||
7
|
|
||||||
70
|
|
||||||
71
|
|
||||||
72
|
|
||||||
73
|
|
||||||
74
|
|
||||||
75
|
|
||||||
76
|
|
||||||
77
|
|
||||||
78
|
|
||||||
79
|
|
||||||
8
|
|
||||||
80
|
|
||||||
81
|
|
||||||
82
|
|
||||||
83
|
|
||||||
84
|
|
||||||
85
|
|
||||||
86
|
|
||||||
87
|
|
||||||
88
|
|
||||||
89
|
|
||||||
9
|
|
||||||
90
|
|
||||||
91
|
|
||||||
92
|
|
||||||
93
|
|
||||||
94
|
|
||||||
95
|
|
||||||
96
|
|
||||||
97
|
|
||||||
98
|
|
||||||
99
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 1
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 10
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 100
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 11
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 12
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 13
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 14
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 15
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 16
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 17
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 18
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 19
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 2
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 20
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 21
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 22
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 23
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 24
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 25
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 26
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 27
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 28
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 29
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 3
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 30
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 31
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 32
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 33
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 34
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 35
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 36
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 37
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 38
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 39
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 4
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 40
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 41
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 42
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 43
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 44
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 45
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 46
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 47
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 48
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 49
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 5
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 50
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 51
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 52
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 53
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 54
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 55
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 56
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 57
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 58
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 59
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 6
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 60
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 61
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 62
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 63
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 64
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 65
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 66
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 67
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 68
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 69
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 7
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 70
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 71
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 72
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 73
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 74
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 75
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 76
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 77
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 78
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 79
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 8
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 80
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 81
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 82
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 83
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 84
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 85
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 86
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 87
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 88
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 89
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 9
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 90
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 91
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 92
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 93
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 94
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 95
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 96
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 97
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 98
|
|
||||||
perl -e \$r=rand\(shift\)\;for\(\$f=0\;\$f\<\$r\;\$f++\)\{\$a=\"a\"x100\}\;print\ shift,\"\\n\" 10000 99
|
|
||||||
echo '### Test 0-arguments'
|
|
||||||
### Test 0-arguments
|
|
||||||
seq 1 2 | parallel -k -n0 echo n0
|
|
||||||
n0
|
|
||||||
n0
|
|
||||||
seq 1 2 | parallel -k -L0 echo L0
|
|
||||||
L0
|
|
||||||
L0
|
|
||||||
seq 1 2 | parallel -k -N0 echo N0
|
|
||||||
N0
|
|
||||||
N0
|
|
||||||
echo '### Because of --tollef -l, then -l0 == -l1, sorry'
|
|
||||||
### Because of --tollef -l, then -l0 == -l1, sorry
|
|
||||||
seq 1 2 | parallel -k -l0 echo l0
|
|
||||||
l0 1
|
|
||||||
l0 2
|
|
||||||
echo '### Test replace {}'
|
|
||||||
### Test replace {}
|
|
||||||
seq 1 2 | parallel -k -N0 echo replace {} curlies
|
|
||||||
replace curlies
|
|
||||||
replace curlies
|
|
||||||
echo '### Test arguments on commandline'
|
|
||||||
### Test arguments on commandline
|
|
||||||
parallel -k -N0 echo args on cmdline ::: 1 2
|
|
||||||
args on cmdline
|
|
||||||
args on cmdline
|
|
||||||
echo '### Test --nice locally'
|
|
||||||
### Test --nice locally
|
|
||||||
parallel --nice 1 -vv 'PAR=a bash -c "echo \$PAR {}"' ::: b
|
|
||||||
\nice -n1 /bin/bash -c PAR=a\ bash\ -c\ \"echo\ \ \\\$PAR\ b\"
|
|
||||||
a b
|
|
||||||
echo '### Test --nice remote'
|
|
||||||
### Test --nice remote
|
|
||||||
stdout parallel --nice 1 -S .. -vv 'PAR=a bash -c "echo \$PAR {}"' ::: b | perl -pe 's/\S*parallel-server\S*/one-server/;s/[a-f0-9]{500,}/hex/;s/\d{5,8}/pId/g;'
|
|
||||||
ssh one-server exec perl\ -e\ \\\$ENV\\\{\\\"PARALLEL_PID\\\"\\\}=\\\"pId\\\"\\\;\\\$ENV\\\{\\\"PARALLEL_SEQ\\\"\\\}=\\\"1\\\"\\\;\\\$bashfunc\\\ =\\\ \\\"\\\"\\\;@ARGV=\\\"\\\\\\\\nice\\\ -n1\\\ \\\\\\\$SHELL\\\ -c\\\ PAR=a\\\\\\\\\\\ bash\\\\\\\\\\\ -c\\\\\\\\\\\ \\\\\\\\\\\\\\\"echo\\\\\\\\\\\ \\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\$PAR\\\\\\\\\\\ b\\\\\\\\\\\\\\\"\\\"\\\;\\\$SIG\\\{CHLD\\\}=sub\\\{\\\$done=1\\\;\\\}\\\;\\\$pid=fork\\\;unless\\\(\\\$pid\\\)\\\{setpgrp\\\;exec\\\$ENV\\\{SHELL\\\},\\\"-c\\\",\\\(\\\$bashfunc.\\\"@ARGV\\\"\\\)\\\;die\\\"exec:\\\$\\\!\\\\n\\\"\\\;\\\}do\\\{\\\$s=\\\$s\\\<1\\\?0.001+\\\$s\\\*1.03:\\\$s\\\;select\\\(undef,undef,undef,\\\$s\\\)\\\;\\\}until\\\(\\\$done\\\|\\\|getppid==1\\\)\\\;kill\\\(SIGHUP,-\\\$\\\{pid\\\}\\\)unless\\\$done\\\;wait\\\;exit\\\(\\\$\\\?\\\&127\\\?128+\\\(\\\$\\\?\\\&127\\\):1+\\\$\\\?\\\>\\\>8\\\);
|
|
||||||
a b
|
|
||||||
echo '### Test distribute arguments at EOF to 2 jobslots'
|
|
||||||
### Test distribute arguments at EOF to 2 jobslots
|
|
||||||
seq 1 92 | parallel -j+0 -kX -s 100 echo
|
|
||||||
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
|
||||||
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
|
||||||
66 67 68 69
|
|
||||||
70 71 72 73
|
|
||||||
74 75 76 77
|
|
||||||
78 79 80 81
|
|
||||||
82 83 84 85
|
|
||||||
86 87 88 89
|
|
||||||
90 91 92
|
|
||||||
echo '### Test distribute arguments at EOF to 5 jobslots'
|
|
||||||
### Test distribute arguments at EOF to 5 jobslots
|
|
||||||
seq 1 92 | parallel -j+3 -kX -s 100 echo
|
|
||||||
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
|
||||||
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
|
||||||
66 67 68
|
|
||||||
69 70 71
|
|
||||||
72 73 74
|
|
||||||
75 76 77
|
|
||||||
78 79 80
|
|
||||||
81 82 83
|
|
||||||
84 85 86
|
|
||||||
87 88 89
|
|
||||||
90 91 92
|
|
||||||
echo '### Test distribute arguments at EOF to infinity jobslots'
|
|
||||||
### Test distribute arguments at EOF to infinity jobslots
|
|
||||||
seq 1 92 | parallel -j0 -kX -s 100 echo 2>/dev/null
|
|
||||||
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
|
||||||
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
|
||||||
66
|
|
||||||
67
|
|
||||||
68
|
|
||||||
69
|
|
||||||
70
|
|
||||||
71
|
|
||||||
72
|
|
||||||
73
|
|
||||||
74
|
|
||||||
75
|
|
||||||
76
|
|
||||||
77
|
|
||||||
78
|
|
||||||
79
|
|
||||||
80
|
|
||||||
81
|
|
||||||
82
|
|
||||||
83
|
|
||||||
84
|
|
||||||
85
|
|
||||||
86
|
|
||||||
87
|
|
||||||
88
|
|
||||||
89
|
|
||||||
90
|
|
||||||
91
|
|
||||||
92
|
|
||||||
echo '### Test -N is not broken by distribution - single line'
|
|
||||||
### Test -N is not broken by distribution - single line
|
|
||||||
seq 9 | parallel -N 10 echo
|
|
||||||
1 2 3 4 5 6 7 8 9
|
|
||||||
echo '### Test -N is not broken by distribution - two lines'
|
|
||||||
### Test -N is not broken by distribution - two lines
|
|
||||||
seq 19 | parallel -k -N 10 echo
|
|
||||||
1 2 3 4 5 6 7 8 9 10
|
|
||||||
11 12 13 14 15 16 17 18 19
|
|
||||||
echo '### Test -N context replace'
|
|
||||||
### Test -N context replace
|
|
||||||
seq 19 | parallel -k -N 10 echo a{}b
|
|
||||||
a1b a2b a3b a4b a5b a6b a7b a8b a9b a10b
|
|
||||||
a11b a12b a13b a14b a15b a16b a17b a18b a19b
|
|
||||||
echo '### Test -L context replace'
|
|
||||||
### Test -L context replace
|
|
||||||
seq 19 | parallel -k -L 10 echo a{}b
|
|
||||||
a1b a2b a3b a4b a5b a6b a7b a8b a9b a10b
|
|
||||||
a11b a12b a13b a14b a15b a16b a17b a18b a19b
|
|
||||||
|
|
|
@ -75,29 +75,29 @@ OK
|
||||||
ls: tmp/parallel.file*: No such file or directory
|
ls: tmp/parallel.file*: No such file or directory
|
||||||
OK
|
OK
|
||||||
Input for ssh
|
Input for ssh
|
||||||
one-server mkdir -p ./.
|
-l parallel one-server -- mkdir -p ./.
|
||||||
-l parallel one-server rsync --server -lDrRze.iLsfx . ./.
|
-l parallel one-server rsync --server -lDrRze.iLs . ./.
|
||||||
one-server exec perl -e '@GNU_Parallel=("use","IPC::Open3;","use","MIME::Base64");eval"@GNU_Parallel";$SIG{CHLD}="IGNORE";my$zip=(grep{-x$_}"/usr/local/bin/bzip2")[0]||"bzip2";my($in,$out,$eval);open3($in,$out,">&STDERR",$zip,"-dc");if(my$perlpid=fork){close$in;$eval=join"",<$out>;close$out;}else{close$out;print$in(decode_base64(join"",@ARGV));close$in;exit;}wait;eval$eval;' base64
|
-l parallel one-server -- exec perl -e @GNU_Parallel\=\(\"use\",\"IPC::Open3\;\",\"use\",\"MIME::Base64\"\)\;eval\"@GNU_Parallel\"\;my\$eval\=decode_base64\(join\"\",@ARGV\)\;eval\$eval\; base64
|
||||||
-l parallel one-server cd ././tmp; rsync --server --sender -lDrRze.iLsfx . ./parallel.file.'
|
-l parallel one-server cd ././tmp; rsync --server --sender -lDrRze.iLs . ./parallel.file.'
|
||||||
'newlineX.out
|
'newlineX.out
|
||||||
-l parallel one-server cd ././tmp; rsync --server --sender -lDrRze.iLsfx . ./parallel.file.'
|
-l parallel one-server cd ././tmp; rsync --server --sender -lDrRze.iLs . ./parallel.file.'
|
||||||
'newlineX.out2
|
'newlineX.out2
|
||||||
one-server (rm -f ./tmp/parallel.file.'
|
-l parallel one-server -- (rm -f ./tmp/parallel.file.'
|
||||||
'newlineX; rmdir ./tmp/ ./ >&/dev/null;)
|
'newlineX; sh -c rmdir\ ./tmp/\ ./\ 2\>/dev/null\;)
|
||||||
one-server (rm -f ./tmp/parallel.file.'
|
-l parallel one-server -- (rm -f ./tmp/parallel.file.'
|
||||||
'newlineX.out; rmdir ./tmp/ ./ >&/dev/null;)
|
'newlineX.out; sh -c rmdir\ ./tmp/\ ./\ 2\>/dev/null\;)
|
||||||
one-server (rm -f ./tmp/parallel.file.'
|
-l parallel one-server -- (rm -f ./tmp/parallel.file.'
|
||||||
'newlineX.out2; rmdir ./tmp/ ./ >&/dev/null;)
|
'newlineX.out2; sh -c rmdir\ ./tmp/\ ./\ 2\>/dev/null\;)
|
||||||
one-server mkdir -p ./.
|
-l parallel one-server -- mkdir -p ./.
|
||||||
-l parallel one-server rsync --server -lDrRze.iLsfx . ./.
|
-l parallel one-server rsync --server -lDrRze.iLs . ./.
|
||||||
one-server exec perl -e '@GNU_Parallel=("use","IPC::Open3;","use","MIME::Base64");eval"@GNU_Parallel";$SIG{CHLD}="IGNORE";my$zip=(grep{-x$_}"/usr/local/bin/bzip2")[0]||"bzip2";my($in,$out,$eval);open3($in,$out,">&STDERR",$zip,"-dc");if(my$perlpid=fork){close$in;$eval=join"",<$out>;close$out;}else{close$out;print$in(decode_base64(join"",@ARGV));close$in;exit;}wait;eval$eval;' base64
|
-l parallel one-server -- exec perl -e @GNU_Parallel\=\(\"use\",\"IPC::Open3\;\",\"use\",\"MIME::Base64\"\)\;eval\"@GNU_Parallel\"\;my\$eval\=decode_base64\(join\"\",@ARGV\)\;eval\$eval\; base64
|
||||||
-l parallel one-server cd ././tmp; rsync --server --sender -lDrRze.iLsfx . ./parallel.file.'
|
-l parallel one-server cd ././tmp; rsync --server --sender -lDrRze.iLs . ./parallel.file.'
|
||||||
'newlineX.out
|
'newlineX.out
|
||||||
-l parallel one-server cd ././tmp; rsync --server --sender -lDrRze.iLsfx . ./parallel.file.'
|
-l parallel one-server cd ././tmp; rsync --server --sender -lDrRze.iLs . ./parallel.file.'
|
||||||
'newlineX.out2
|
'newlineX.out2
|
||||||
one-server (rm -f ./tmp/parallel.file.'
|
-l parallel one-server -- (rm -f ./tmp/parallel.file.'
|
||||||
'newlineX; rmdir ./tmp/ ./ >&/dev/null;)
|
'newlineX; sh -c rmdir\ ./tmp/\ ./\ 2\>/dev/null\;)
|
||||||
one-server (rm -f ./tmp/parallel.file.'
|
-l parallel one-server -- (rm -f ./tmp/parallel.file.'
|
||||||
'newlineX.out; rmdir ./tmp/ ./ >&/dev/null;)
|
'newlineX.out; sh -c rmdir\ ./tmp/\ ./\ 2\>/dev/null\;)
|
||||||
one-server (rm -f ./tmp/parallel.file.'
|
-l parallel one-server -- (rm -f ./tmp/parallel.file.'
|
||||||
'newlineX.out2; rmdir ./tmp/ ./ >&/dev/null;)
|
'newlineX.out2; sh -c rmdir\ ./tmp/\ ./\ 2\>/dev/null\;)
|
||||||
|
|
|
@ -20,26 +20,9 @@ echo '### Test of --progress with no jobs'
|
||||||
Computers / CPU cores / Max jobs to run
|
Computers / CPU cores / Max jobs to run
|
||||||
1:local / 8 / 1
|
1:local / 8 / 1
|
||||||
0
|
0
|
||||||
echo '### bug #34422: parallel -X --eta crashes with div by zero'
|
|
||||||
### bug #34422: parallel -X --eta crashes with div by zero
|
|
||||||
# We do not care how long it took
|
|
||||||
seq 2 | stdout parallel -X --eta echo | grep -E -v 'ETA:.*AVG'
|
|
||||||
|
|
||||||
Computers / CPU cores / Max jobs to run
|
|
||||||
1:local / 8 / 1
|
|
||||||
|
|
||||||
Computer:jobs running/jobs completed/%of started jobs/Average seconds to complete
|
|
||||||
echo '### --timeout --onall on remote machines: 2*slept 1, 2 jobs failed'
|
echo '### --timeout --onall on remote machines: 2*slept 1, 2 jobs failed'
|
||||||
### --timeout --onall on remote machines: 2*slept 1, 2 jobs failed
|
### --timeout --onall on remote machines: 2*slept 1, 2 jobs failed
|
||||||
parallel -j0 --timeout 6 --onall -S localhost,parallel@parallel-server1 'sleep {}; echo slept {}' ::: 1 8 9 ; echo jobs failed: $?
|
parallel -j0 --timeout 6 --onall -S localhost,parallel@parallel-server1 'sleep {}; echo slept {}' ::: 1 8 9 ; echo jobs failed: $?
|
||||||
slept 1
|
slept 1
|
||||||
slept 1
|
slept 1
|
||||||
jobs failed: 2
|
jobs failed: 2
|
||||||
echo '### --pipe without command'
|
|
||||||
### --pipe without command
|
|
||||||
seq -w 10 | stdout parallel --pipe
|
|
||||||
parallel: Error: --pipe must have a command to pipe into (e.g. 'cat').
|
|
||||||
echo '### bug #36260: {n} expansion in --colsep files fails for empty fields if all following fields are also empty'
|
|
||||||
### bug #36260: {n} expansion in --colsep files fails for empty fields if all following fields are also empty
|
|
||||||
echo A,B,, | parallel --colsep , echo {1}{3}{2}
|
|
||||||
AB
|
|
||||||
|
|
|
@ -1,16 +1,3 @@
|
||||||
echo "### BUG: The length for -X is not close to max (131072)"; seq 1 60000 | nice parallel -X echo {.} aa {}{.} {}{}d{} {}dd{}d{.} |head -n 1 |wc
|
|
||||||
### BUG: The length for -X is not close to max (131072)
|
|
||||||
1 12821 131060
|
|
||||||
seq 1 60000 | nice parallel -X echo a{}b{}c |head -n 1 |wc
|
|
||||||
1 10948 131060
|
|
||||||
seq 1 60000 | nice parallel -X echo |head -n 1 |wc
|
|
||||||
1 23695 131064
|
|
||||||
seq 1 60000 | nice parallel -X echo a{}b{}c {} |head -n 1 |wc
|
|
||||||
1 15810 131064
|
|
||||||
seq 1 60000 | nice parallel -X echo {}aa{} |head -n 1 |wc
|
|
||||||
1 11790 131058
|
|
||||||
seq 1 60000 | nice parallel -X echo {} aa {} |head -n 1 |wc
|
|
||||||
1 25545 131055
|
|
||||||
echo '### bug #32191: Deep recursion on subroutine main::get_job_with_sshlogin'
|
echo '### bug #32191: Deep recursion on subroutine main::get_job_with_sshlogin'
|
||||||
### bug #32191: Deep recursion on subroutine main::get_job_with_sshlogin
|
### bug #32191: Deep recursion on subroutine main::get_job_with_sshlogin
|
||||||
seq 1 150 | stdout nice parallel -j9 --retries 2 -S localhost,: "/bin/non-existant 2>/dev/null"
|
seq 1 150 | stdout nice parallel -j9 --retries 2 -S localhost,: "/bin/non-existant 2>/dev/null"
|
||||||
|
@ -20,11 +7,6 @@ echo '### Test --load locally - should take >10s'
|
||||||
# This will run 10 processes in parallel for 10s
|
# This will run 10 processes in parallel for 10s
|
||||||
sleep 2; stdout /usr/bin/time -f %e parallel --load 10 sleep ::: 1 | perl -ne '$_ > 10 and print "OK\n"'
|
sleep 2; stdout /usr/bin/time -f %e parallel --load 10 sleep ::: 1 | perl -ne '$_ > 10 and print "OK\n"'
|
||||||
OK
|
OK
|
||||||
echo '### Test --load remote'
|
|
||||||
### Test --load remote
|
|
||||||
ssh parallel@parallel-server1 'seq 10 | parallel --nice 19 --timeout 10 -j0 -N0 "gzip < /dev/zero > /dev/null"' &
|
|
||||||
stdout /usr/bin/time -f %e parallel -S parallel@parallel-server1 --load 10 sleep ::: 1 | perl -ne '$_ > 10 and print "OK\n"'
|
|
||||||
OK
|
|
||||||
echo '### Test --load read from a file - more than 3s'
|
echo '### Test --load read from a file - more than 3s'
|
||||||
### Test --load read from a file - more than 3s
|
### Test --load read from a file - more than 3s
|
||||||
echo '# This will run 10 processes in parallel for 10s'; seq 10 | parallel --nice 19 --timeout 10 -j0 -N0 "gzip < /dev/zero > /dev/null" & ( echo 8 > /tmp/parallel_load_file; sleep 10; echo 1000 > /tmp/parallel_load_file ) & sleep 1; stdout /usr/bin/time -f %e parallel --load /tmp/parallel_load_file sleep ::: 1 | perl -ne '$_ > 9 and print "OK\n"'; rm /tmp/parallel_load_file
|
echo '# This will run 10 processes in parallel for 10s'; seq 10 | parallel --nice 19 --timeout 10 -j0 -N0 "gzip < /dev/zero > /dev/null" & ( echo 8 > /tmp/parallel_load_file; sleep 10; echo 1000 > /tmp/parallel_load_file ) & sleep 1; stdout /usr/bin/time -f %e parallel --load /tmp/parallel_load_file sleep ::: 1 | perl -ne '$_ > 9 and print "OK\n"'; rm /tmp/parallel_load_file
|
||||||
|
|
|
@ -1,73 +1,13 @@
|
||||||
echo '### Test --return of weirdly named file'
|
echo '### Test --return of weirdly named file'
|
||||||
### Test --return of weirdly named file
|
### Test --return of weirdly named file
|
||||||
stdout parallel --return {} -vv -S parallel\@parallel-server3 echo '>'{} ::: 'aa<${#}" b' | perl -pe 's/\S*parallel-server\S*/one-server/;s/[a-f0-9]{500,}/hex/;s/\d{5,8}/pId/g;'; rm 'aa<${#}" b'
|
stdout parallel --return {} -vv -S parallel\@parallel-server3 echo '>'{} ::: 'aa<${#}" b' | perl -pe 's/\S*parallel-server\S*/one-server/;s:[a-z+=/\\0-9]{500,}:base64:i;'; rm 'aa<${#}" b'
|
||||||
ssh one-server exec perl\ -e\ \\\$ENV\\\{\\\"PARALLEL_PID\\\"\\\}=\\\"pId\\\"\\\;\\\$ENV\\\{\\\"PARALLEL_SEQ\\\"\\\}=\\\"1\\\"\\\;\\\$bashfunc\\\ =\\\ \\\"\\\"\\\;@ARGV=\\\"echo\\\ \\\>aa\\\\\\\\\\\<\\\\\\\\\\\\\\\$\\\\\\\\\\\{\\\\\\\\\\\#\\\\\\\\\\\}\\\\\\\\\\\\\\\"\\\\\\\\\\\ b\\\"\\\;\\\$SIG\\\{CHLD\\\}=sub\\\{\\\$done=1\\\;\\\}\\\;\\\$pid=fork\\\;unless\\\(\\\$pid\\\)\\\{setpgrp\\\;exec\\\$ENV\\\{SHELL\\\},\\\"-c\\\",\\\(\\\$bashfunc.\\\"@ARGV\\\"\\\)\\\;die\\\"exec:\\\$\\\!\\\\n\\\"\\\;\\\}do\\\{\\\$s=\\\$s\\\<1\\\?0.001+\\\$s\\\*1.03:\\\$s\\\;select\\\(undef,undef,undef,\\\$s\\\)\\\;\\\}until\\\(\\\$done\\\|\\\|getppid==1\\\)\\\;kill\\\(SIGHUP,-\\\$\\\{pid\\\}\\\)unless\\\$done\\\;wait\\\;exit\\\(\\\$\\\?\\\&127\\\?128+\\\(\\\$\\\?\\\&127\\\):1+\\\$\\\?\\\>\\\>8\\\);_EXIT_status=$?; mkdir -p ./.; rsync --protocol 30 --rsync-path=cd\ ././.\;\ rsync -rlDzR -essh parallel@parallel-server3:./aa\\\<\\\$\\\{\\\#\\\}\\\"\\\ b ./.; exit $_EXIT_status;
|
ssh -l parallel one-server -- exec perl -e @GNU_Parallel\\\=\\\(\\\"use\\\",\\\"IPC::Open3\\\;\\\",\\\"use\\\",\\\"MIME::Base64\\\"\\\)\\\;eval\\\"@GNU_Parallel\\\"\\\;my\\\$eval\\\=decode_base64\\\(join\\\"\\\",@ARGV\\\)\\\;eval\\\$eval\\\; base64;_EXIT_status=$?; mkdir -p ./.; rsync --protocol 30 --rsync-path=cd\ ././.\;\ rsync -rlDzR -essh\ -l\ parallel parallel-server3:./aa\\\<\\\$\\\{\\\#\\\}\\\"\\\ b ./.; exit $_EXIT_status;
|
||||||
echo '### Test if remote login shell is csh'
|
echo '### Test if remote login shell is csh'
|
||||||
### Test if remote login shell is csh
|
### Test if remote login shell is csh
|
||||||
stdout parallel -k -vv -S csh@localhost 'echo $PARALLEL_PID $PARALLEL_SEQ {}| wc -w' ::: a b c | perl -pe 's/\S*parallel-server\S*/one-server/;s/[a-f0-9]{500,}/hex/;s/\d{5,8}/pId/g;'
|
stdout parallel -k -vv -S csh@localhost 'echo $PARALLEL_PID $PARALLEL_SEQ {}| wc -w' ::: a b c | perl -pe 's/\S*parallel-server\S*/one-server/;s:[a-z+=/\\0-9]{500,}:base64:i;'
|
||||||
ssh csh@localhost exec perl\ -e\ \\\$ENV\\\{\\\"PARALLEL_PID\\\"\\\}=\\\"pId\\\"\\\;\\\$ENV\\\{\\\"PARALLEL_SEQ\\\"\\\}=\\\"1\\\"\\\;\\\$bashfunc\\\ =\\\ \\\"\\\"\\\;@ARGV=\\\"echo\\\ \\\\\\\$PARALLEL_PID\\\ \\\\\\\$PARALLEL_SEQ\\\ a\\\|\\\ wc\\\ -w\\\"\\\;\\\$SIG\\\{CHLD\\\}=sub\\\{\\\$done=1\\\;\\\}\\\;\\\$pid=fork\\\;unless\\\(\\\$pid\\\)\\\{setpgrp\\\;exec\\\$ENV\\\{SHELL\\\},\\\"-c\\\",\\\(\\\$bashfunc.\\\"@ARGV\\\"\\\)\\\;die\\\"exec:\\\$\\\!\\\\n\\\"\\\;\\\}do\\\{\\\$s=\\\$s\\\<1\\\?0.001+\\\$s\\\*1.03:\\\$s\\\;select\\\(undef,undef,undef,\\\$s\\\)\\\;\\\}until\\\(\\\$done\\\|\\\|getppid==1\\\)\\\;kill\\\(SIGHUP,-\\\$\\\{pid\\\}\\\)unless\\\$done\\\;wait\\\;exit\\\(\\\$\\\?\\\&127\\\?128+\\\(\\\$\\\?\\\&127\\\):1+\\\$\\\?\\\>\\\>8\\\);
|
ssh -l csh localhost -- exec perl -e @GNU_Parallel\\\=\\\(\\\"use\\\",\\\"IPC::Open3\\\;\\\",\\\"use\\\",\\\"MIME::Base64\\\"\\\)\\\;eval\\\"@GNU_Parallel\\\"\\\;my\\\$eval\\\=decode_base64\\\(join\\\"\\\",@ARGV\\\)\\\;eval\\\$eval\\\; base64;
|
||||||
3
|
3
|
||||||
ssh csh@localhost exec perl\ -e\ \\\$ENV\\\{\\\"PARALLEL_PID\\\"\\\}=\\\"pId\\\"\\\;\\\$ENV\\\{\\\"PARALLEL_SEQ\\\"\\\}=\\\"2\\\"\\\;\\\$bashfunc\\\ =\\\ \\\"\\\"\\\;@ARGV=\\\"echo\\\ \\\\\\\$PARALLEL_PID\\\ \\\\\\\$PARALLEL_SEQ\\\ b\\\|\\\ wc\\\ -w\\\"\\\;\\\$SIG\\\{CHLD\\\}=sub\\\{\\\$done=1\\\;\\\}\\\;\\\$pid=fork\\\;unless\\\(\\\$pid\\\)\\\{setpgrp\\\;exec\\\$ENV\\\{SHELL\\\},\\\"-c\\\",\\\(\\\$bashfunc.\\\"@ARGV\\\"\\\)\\\;die\\\"exec:\\\$\\\!\\\\n\\\"\\\;\\\}do\\\{\\\$s=\\\$s\\\<1\\\?0.001+\\\$s\\\*1.03:\\\$s\\\;select\\\(undef,undef,undef,\\\$s\\\)\\\;\\\}until\\\(\\\$done\\\|\\\|getppid==1\\\)\\\;kill\\\(SIGHUP,-\\\$\\\{pid\\\}\\\)unless\\\$done\\\;wait\\\;exit\\\(\\\$\\\?\\\&127\\\?128+\\\(\\\$\\\?\\\&127\\\):1+\\\$\\\?\\\>\\\>8\\\);
|
ssh -l csh localhost -- exec perl -e @GNU_Parallel\\\=\\\(\\\"use\\\",\\\"IPC::Open3\\\;\\\",\\\"use\\\",\\\"MIME::Base64\\\"\\\)\\\;eval\\\"@GNU_Parallel\\\"\\\;my\\\$eval\\\=decode_base64\\\(join\\\"\\\",@ARGV\\\)\\\;eval\\\$eval\\\; base64;
|
||||||
3
|
3
|
||||||
ssh csh@localhost exec perl\ -e\ \\\$ENV\\\{\\\"PARALLEL_PID\\\"\\\}=\\\"pId\\\"\\\;\\\$ENV\\\{\\\"PARALLEL_SEQ\\\"\\\}=\\\"3\\\"\\\;\\\$bashfunc\\\ =\\\ \\\"\\\"\\\;@ARGV=\\\"echo\\\ \\\\\\\$PARALLEL_PID\\\ \\\\\\\$PARALLEL_SEQ\\\ c\\\|\\\ wc\\\ -w\\\"\\\;\\\$SIG\\\{CHLD\\\}=sub\\\{\\\$done=1\\\;\\\}\\\;\\\$pid=fork\\\;unless\\\(\\\$pid\\\)\\\{setpgrp\\\;exec\\\$ENV\\\{SHELL\\\},\\\"-c\\\",\\\(\\\$bashfunc.\\\"@ARGV\\\"\\\)\\\;die\\\"exec:\\\$\\\!\\\\n\\\"\\\;\\\}do\\\{\\\$s=\\\$s\\\<1\\\?0.001+\\\$s\\\*1.03:\\\$s\\\;select\\\(undef,undef,undef,\\\$s\\\)\\\;\\\}until\\\(\\\$done\\\|\\\|getppid==1\\\)\\\;kill\\\(SIGHUP,-\\\$\\\{pid\\\}\\\)unless\\\$done\\\;wait\\\;exit\\\(\\\$\\\?\\\&127\\\?128+\\\(\\\$\\\?\\\&127\\\):1+\\\$\\\?\\\>\\\>8\\\);
|
ssh -l csh localhost -- exec perl -e @GNU_Parallel\\\=\\\(\\\"use\\\",\\\"IPC::Open3\\\;\\\",\\\"use\\\",\\\"MIME::Base64\\\"\\\)\\\;eval\\\"@GNU_Parallel\\\"\\\;my\\\$eval\\\=decode_base64\\\(join\\\"\\\",@ARGV\\\)\\\;eval\\\$eval\\\; base64;
|
||||||
3
|
3
|
||||||
echo '### Test {} multiple times in different commands'
|
|
||||||
### Test {} multiple times in different commands
|
|
||||||
seq 10 | parallel -v -Xj1 echo {} \; echo {}
|
|
||||||
echo 1 2 3 4 5 6 7 8 9 10 ; echo 1 2 3 4 5 6 7 8 9 10
|
|
||||||
1 2 3 4 5 6 7 8 9 10
|
|
||||||
1 2 3 4 5 6 7 8 9 10
|
|
||||||
echo '### Test of -X {1}-{2} with multiple input sources'
|
|
||||||
### Test of -X {1}-{2} with multiple input sources
|
|
||||||
parallel -j1 -kX echo {1}-{2} ::: a ::: b
|
|
||||||
a-b
|
|
||||||
parallel -j2 -kX echo {1}-{2} ::: a b ::: c d
|
|
||||||
a-c
|
|
||||||
b-c
|
|
||||||
parallel -j2 -kX echo {1}-{2} ::: a b c ::: d e f
|
|
||||||
a-d
|
|
||||||
b-f
|
|
||||||
parallel -j0 -kX echo {1}-{2} ::: a b c ::: d e f
|
|
||||||
a-d
|
|
||||||
a-e
|
|
||||||
a-f
|
|
||||||
b-d
|
|
||||||
b-e
|
|
||||||
b-f
|
|
||||||
c-d
|
|
||||||
c-e
|
|
||||||
c-f
|
|
||||||
echo '### Test of -X {}-{.} with multiple input sources'
|
|
||||||
### Test of -X {}-{.} with multiple input sources
|
|
||||||
parallel -j1 -kX echo {}-{.} ::: a ::: b
|
|
||||||
a-a b-b
|
|
||||||
parallel -j2 -kX echo {}-{.} ::: a b ::: c d
|
|
||||||
a-a c-c a-a d-d
|
|
||||||
b-b c-c b-b d-d
|
|
||||||
parallel -j2 -kX echo {}-{.} ::: a b c ::: d e f
|
|
||||||
a-a d-d a-a e-e a-a f-f b-b d-d b-b e-e
|
|
||||||
b-b f-f c-c d-d c-c e-e c-c f-f
|
|
||||||
parallel -j0 -kX echo {}-{.} ::: a b c ::: d e f
|
|
||||||
a-a d-d
|
|
||||||
a-a e-e
|
|
||||||
a-a f-f
|
|
||||||
b-b d-d
|
|
||||||
b-b e-e
|
|
||||||
b-b f-f
|
|
||||||
c-c d-d
|
|
||||||
c-c e-e
|
|
||||||
c-c f-f
|
|
||||||
echo '### Test of -r with --pipe - the first should give an empty line. The second should not.'
|
|
||||||
### Test of -r with --pipe - the first should give an empty line. The second should not.
|
|
||||||
echo | parallel -j2 -N1 --pipe cat | wc -l
|
|
||||||
1
|
|
||||||
echo | parallel -r -j2 -N1 --pipe cat | wc -l
|
|
||||||
0
|
|
||||||
echo '### Test --tty'
|
|
||||||
### Test --tty
|
|
||||||
seq 0.1 0.1 0.5 | parallel -j1 --tty tty\;sleep
|
|
||||||
/dev/tty
|
|
||||||
/dev/tty
|
|
||||||
/dev/tty
|
|
||||||
/dev/tty
|
|
||||||
/dev/tty
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
echo "### Test memory consumption stays (almost) the same for 30 and 300 jobs"
|
|
||||||
### Test memory consumption stays (almost) the same for 30 and 300 jobs
|
|
||||||
mem30=$( stdout time -f %M parallel -j2 true :::: <(perl -e '$a="x"x100000;for(1..30){print $a,"\n"}') ); mem300=$( stdout time -f %M parallel -j2 true :::: <(perl -e '$a="x"x100000;for(1..300){print $a,"\n"}') ); echo "Memory use should not depend very much on the total number of jobs run\n"; echo "Test if memory consumption(300 jobs) < memory consumption(30 jobs) * 110% "; echo $(($mem300*100 < $mem30 * 110))
|
|
||||||
Memory use should not depend very much on the total number of jobs run\n
|
|
||||||
Test if memory consumption(300 jobs) < memory consumption(30 jobs) * 110%
|
|
||||||
1
|
|
||||||
echo '### Test --shellquote'
|
|
||||||
### Test --shellquote
|
|
||||||
perl -e 'print pack("c*",1..255)' | parallel -0 --shellquote
|
|
||||||
\\\\\\\\ '
|
|
||||||
'\\\
\\\\\\\\\\\\\\ \!\"\#\$%\&\'\(\)\*+,-./0123456789:\;\<=\>\?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\[\\\]\^_\`abcdefghijklmnopqrstuvwxyz\{\|\}\~€<7F>\‚\ƒ\„\…\†\‡\ˆ\‰\Š\‹\Œ\<5C>\Ž\<5C>\<5C>\‘\’\“\”\•\–\—\˜\™\š\›\œ\<5C>\ž\Ÿ\ \¡\¢\£\¤\¥\¦\§\¨\©\ª\«\¬\\®\¯\°\±\²\³\´\µ\¶\·\¸\¹\º\»\¼\½\¾\¿\À\Á\Â\Ã\Ä\Å\Æ\Ç\È\É\Ê\Ë\Ì\Í\Î\Ï\Ð\Ñ\Ò\Ó\Ô\Õ\Ö\×\Ø\Ù\Ú\Û\Ü\Ý\Þ\ß\à\á\â\ã\ä\å\æ\ç\è\é\ê\ë\ì\í\î\ï\ð\ñ\ò\ó\ô\õ\ö\÷\ø\ù\ú\û\ü\ý\þ\ÿ
|
|
Loading…
Reference in a new issue