mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-21 13:37:56 +00:00
parallel: $PARALLEL_JOBSLOT = {%} unless the job is being retried.
parallel: $PARALLEL_SSHLOGIN = sshlogin with number of cores removed. parallel: $PARALLEL_SSHHOST = the host part of an sshlogin. parallel: {slot} {sshlogin} {host} added to --plus.
This commit is contained in:
parent
4430ee5f49
commit
5bba5c922d
48
src/parallel
48
src/parallel
|
@ -2150,7 +2150,7 @@ sub check_invalid_option_combinations() {
|
|||
|
||||
sub init_globals() {
|
||||
# Defaults:
|
||||
$Global::version = 20200423;
|
||||
$Global::version = 20200522;
|
||||
$Global::progname = 'parallel';
|
||||
$::name = "GNU Parallel";
|
||||
$Global::infinity = 2**31;
|
||||
|
@ -2212,10 +2212,12 @@ sub init_globals() {
|
|||
'{,([^}]+?)}' => 's/^($$1)/lc($1)/e;',
|
||||
# Bash ${a,,A}
|
||||
'{,,([^}]+?)}' => 's/($$1)/lc($1)/eg;',
|
||||
# {slot} = $PARALLEL_JOBSLOT
|
||||
'{slot}' => '1 $_="\${PARALLEL_JOBSLOT}";uq()',
|
||||
# {host} = ssh host
|
||||
'{host}' => '$_="\${PARALLEL_SSHHOST}";uq()',
|
||||
'{host}' => '1 $_="\${PARALLEL_SSHHOST}";uq()',
|
||||
# {sshlogin} = sshlogin
|
||||
'{sshlogin}' => '$_="\${PARALLEL_SSHLOGIN}";uq()',
|
||||
'{sshlogin}' => '1 $_="\${PARALLEL_SSHLOGIN}";uq()',
|
||||
);
|
||||
# Modifiable copy of %Global::replace
|
||||
%Global::rpl = %Global::replace;
|
||||
|
@ -4894,10 +4896,10 @@ sub usage() {
|
|||
"If you use programs that use GNU Parallel to process data for an article in a",
|
||||
"scientific publication, please cite:",
|
||||
"",
|
||||
" O. Tange (2018): GNU Parallel 2018, Mar 2018, ISBN 9781387509881,",
|
||||
" DOI https://doi.org/10.5281/zenodo.1146014",
|
||||
" Tange, O. (2020, May 22). GNU Parallel 20200522 ('Kraftwerk').",
|
||||
" Zenodo. https://doi.org/10.5281/zenodo.3840974",
|
||||
"",
|
||||
# Before changing this line, please read
|
||||
# Before changing this line, please read
|
||||
# https://www.gnu.org/software/parallel/parallel_design.html#Citation-notice
|
||||
# https://git.savannah.gnu.org/cgit/parallel.git/tree/doc/citation-notice-faq.txt
|
||||
"This helps funding further development; AND IT WON'T COST YOU A CENT.",
|
||||
|
@ -4925,10 +4927,10 @@ sub citation_notice() {
|
|||
"If you use programs that use GNU Parallel to process data for an article in a",
|
||||
"scientific publication, please cite:",
|
||||
"",
|
||||
" O. Tange (2018): GNU Parallel 2018, Mar 2018, ISBN 9781387509881,",
|
||||
" DOI https://doi.org/10.5281/zenodo.1146014",
|
||||
" Tange, O. (2020, May 22). GNU Parallel 20200522 ('Kraftwerk').",
|
||||
" Zenodo. https://doi.org/10.5281/zenodo.3840974",
|
||||
"",
|
||||
# Before changing this line, please read
|
||||
# Before changing this line, please read
|
||||
# https://www.gnu.org/software/parallel/parallel_design.html#Citation-notice and
|
||||
# https://git.savannah.gnu.org/cgit/parallel.git/tree/doc/citation-notice-faq.txt
|
||||
"This helps funding further development; AND IT WON'T COST YOU A CENT.",
|
||||
|
@ -5039,18 +5041,20 @@ sub citation() {
|
|||
"If you use programs that use GNU Parallel to process data for an article in a",
|
||||
"scientific publication, please cite:",
|
||||
"",
|
||||
"\@book{tange_ole_2018_1146014,",
|
||||
"\@software{tange_2020_3840974,",
|
||||
" author = {Tange, Ole},",
|
||||
" title = {GNU Parallel 2018},",
|
||||
" publisher = {Ole Tange},",
|
||||
" month = Mar,",
|
||||
" year = 2018,",
|
||||
" ISBN = {9781387509881},",
|
||||
" doi = {10.5281/zenodo.1146014},",
|
||||
" url = {https://doi.org/10.5281/zenodo.1146014}",
|
||||
" title = {GNU Parallel 20200522 ('Kraftwerk')},",
|
||||
" month = May,",
|
||||
" year = 2020,",
|
||||
" note = {{GNU Parallel is a general parallelizer to run",
|
||||
" multiple serial command line programs in parallel",
|
||||
" without changing them.}},",
|
||||
" publisher = {Zenodo},",
|
||||
" doi = {10.5281/zenodo.3840974},",
|
||||
" url = {https://doi.org/10.5281/zenodo.3840974}",
|
||||
"}",
|
||||
"",
|
||||
"(Feel free to use \\nocite{tange_ole_2018_1146014})",
|
||||
"(Feel free to use \\nocite{tange_2020_3840974})",
|
||||
"",
|
||||
# Before changing this line, please read
|
||||
# https://www.gnu.org/software/parallel/parallel_design.html#Citation-notice and
|
||||
|
@ -8977,7 +8981,9 @@ sub sshlogin_wrap($) {
|
|||
}
|
||||
# Duplicate vars as BASH functions to include post-shellshock functions (v1+v2)
|
||||
# So --env myfunc should look for BASH_FUNC_myfunc() and BASH_FUNC_myfunc%%
|
||||
push(@vars, "PARALLEL_PID", "PARALLEL_SEQ", "PARALLEL_SSHLOGIN", "PARALLEL_SSHHOST",
|
||||
|
||||
push(@vars, "PARALLEL_PID", "PARALLEL_SEQ",
|
||||
"PARALLEL_SSHLOGIN", "PARALLEL_SSHHOST", "PARALLEL_JOBSLOT",
|
||||
map { ("BASH_FUNC_$_()", "BASH_FUNC_$_%%") } @vars);
|
||||
# Keep only defined variables
|
||||
return grep { defined($ENV{$_}) } @vars;
|
||||
|
@ -9036,6 +9042,7 @@ sub sshlogin_wrap($) {
|
|||
my $serverlogin = $sshlogin->serverlogin();
|
||||
my $quoted_remote_command;
|
||||
$ENV{'PARALLEL_SEQ'} = $self->seq();
|
||||
$ENV{'PARALLEL_JOBSLOT'} = $self->slot();
|
||||
$ENV{'PARALLEL_SSHLOGIN'} = $sshlogin->string();
|
||||
$ENV{'PARALLEL_SSHHOST'} = $sshlogin->serverlogin();
|
||||
$ENV{'PARALLEL_PID'} = $$;
|
||||
|
@ -9509,12 +9516,11 @@ sub start($) {
|
|||
}
|
||||
$job->openoutputfiles();
|
||||
$job->print_verbose_dryrun();
|
||||
# Call slot to store the slot value
|
||||
$job->slot();
|
||||
my($stdout_fh,$stderr_fh) = ($job->fh(1,"w"),$job->fh(2,"w"));
|
||||
if($opt::dryrun or $opt::sqlmaster) { $command = "true"; }
|
||||
$ENV{'PARALLEL_SEQ'} = $job->seq();
|
||||
$ENV{'PARALLEL_PID'} = $$;
|
||||
$ENV{'PARALLEL_JOBSLOT'} = $job->slot();
|
||||
$ENV{'PARALLEL_TMP'} = ::tmpname("par");
|
||||
$job->add_rm($ENV{'PARALLEL_TMP'});
|
||||
::debug("run", $Global::total_running, " processes . Starting (",
|
||||
|
|
|
@ -209,6 +209,30 @@ number.
|
|||
|
||||
The replacement string B<{%}> can be changed with B<--slotreplace>.
|
||||
|
||||
If the job needs to be retried (e.g using B<--retries> or
|
||||
B<--retry-failed>) the job slot is not automatically updated. You
|
||||
should then instead use B<$PARALLEL_JOBSLOT>:
|
||||
|
||||
$ do_test() {
|
||||
id="$3 {%}=$1 PARALLEL_JOBSLOT=$2"
|
||||
echo run "$id";
|
||||
sleep 1
|
||||
# fail if {%} is odd
|
||||
return `echo $1%2 | bc`
|
||||
}
|
||||
$ export -f do_test
|
||||
$ parallel -j3 --jl mylog do_test {%} \$PARALLEL_JOBSLOT {} ::: A B C D
|
||||
run A {%}=1 PARALLEL_JOBSLOT=1
|
||||
run B {%}=2 PARALLEL_JOBSLOT=2
|
||||
run C {%}=3 PARALLEL_JOBSLOT=3
|
||||
run D {%}=1 PARALLEL_JOBSLOT=1
|
||||
$ parallel --retry-failed -j3 --jl mylog do_test {%} \$PARALLEL_JOBSLOT {} ::: A B C D
|
||||
run A {%}=1 PARALLEL_JOBSLOT=1
|
||||
run C {%}=3 PARALLEL_JOBSLOT=2
|
||||
run D {%}=1 PARALLEL_JOBSLOT=3
|
||||
|
||||
Notice how {%} and $PARALLEL_JOBSLOT differ in the retry run of C and D.
|
||||
|
||||
To understand replacement strings see B<{}>.
|
||||
|
||||
|
||||
|
@ -1538,7 +1562,7 @@ Activate additional replacement strings: {+/} {+.} {+..} {+...} {..}
|
|||
'{foo}' and {} = {+/}/{/} = {.}.{+.} = {+/}/{/.}.{+.} = {..}.{+..} =
|
||||
{+/}/{/..}.{+..} = {...}.{+...} = {+/}/{/...}.{+...}
|
||||
|
||||
B<{##}> is the number of jobs to be run. It is incompatible with
|
||||
B<{##}> is the total number of jobs to be run. It is incompatible with
|
||||
B<-X>/B<-m>/B<--xargs>.
|
||||
|
||||
B<{choose_k}> is inspired by n choose k: Given a list of n elements,
|
||||
|
@ -1546,10 +1570,11 @@ choose k. k is the number of input sources and n is the number of
|
|||
arguments in an input source. The content of the input sources must
|
||||
be the same and the arguments must be unique.
|
||||
|
||||
For remote jobs these are also activated:
|
||||
Shorthands for variables:
|
||||
|
||||
{sshlogin} sshlogin
|
||||
{host} hostname of sshlogin
|
||||
{slot} $PARALLEL_JOBSLOT (see {%})
|
||||
{sshlogin} $PARALLEL_SSHLOGIN
|
||||
{host} $PARALLEL_SSHHOST
|
||||
|
||||
The following dynamic replacement strings are also activated. They are
|
||||
inspired by bash's parameter expansion:
|
||||
|
@ -4793,13 +4818,23 @@ the currently running jobs are finished before exiting.
|
|||
Dir where GNU B<parallel> stores config files, semaphores, and caches
|
||||
information between invocations. Default: $HOME/.parallel.
|
||||
|
||||
=item $PARALLEL_JOBSLOT
|
||||
|
||||
Set by GNU B<parallel> and can be used in jobs run by GNU B<parallel>.
|
||||
Remember to quote the $, so it gets evaluated by the correct shell. Or
|
||||
use B<--plus> and {slot}.
|
||||
|
||||
$PARALLEL_JOBSLOT is the jobslot of the job. It is equal to {%} unless
|
||||
the job is being retried. See {%} for details.
|
||||
|
||||
|
||||
=item $PARALLEL_PID
|
||||
|
||||
The environment variable $PARALLEL_PID is set by GNU B<parallel> and
|
||||
is visible to the jobs started from GNU B<parallel>. This makes it
|
||||
possible for the jobs to communicate directly to GNU B<parallel>.
|
||||
Remember to quote the $, so it gets evaluated by the correct
|
||||
shell.
|
||||
Set by GNU B<parallel> and can be used in jobs run by GNU B<parallel>.
|
||||
Remember to quote the $, so it gets evaluated by the correct shell.
|
||||
|
||||
This makes it possible for the jobs to communicate directly to GNU
|
||||
B<parallel>.
|
||||
|
||||
B<Example:> If each of the jobs tests a solution and one of jobs finds
|
||||
the solution the job can tell GNU B<parallel> not to start more jobs
|
||||
|
@ -4839,17 +4874,36 @@ $SHELL. If undefined use:
|
|||
|
||||
=item $PARALLEL_SSH
|
||||
|
||||
GNU B<parallel> defaults to using B<ssh> for remote access. This can
|
||||
be overridden with $PARALLEL_SSH, which again can be overridden with
|
||||
B<--ssh>. It can also be set on a per server basis (see
|
||||
B<--sshlogin>).
|
||||
GNU B<parallel> defaults to using the B<ssh> command for remote
|
||||
access. This can be overridden with $PARALLEL_SSH, which again can be
|
||||
overridden with B<--ssh>. It can also be set on a per server basis
|
||||
(see B<--sshlogin>).
|
||||
|
||||
|
||||
=item $PARALLEL_SSHHOST
|
||||
|
||||
Set by GNU B<parallel> and can be used in jobs run by GNU B<parallel>.
|
||||
Remember to quote the $, so it gets evaluated by the correct shell. Or
|
||||
use B<--plus> and {host}.
|
||||
|
||||
|
||||
$PARALLEL_SSHHOST is the host part of an sshlogin line. E.g.
|
||||
|
||||
4//usr/bin/specialssh user@host
|
||||
|
||||
becomes:
|
||||
|
||||
host
|
||||
|
||||
|
||||
=item $PARALLEL_SSHLOGIN
|
||||
|
||||
The environment variable $PARALLEL_SSHLOGIN is set by GNU B<parallel>
|
||||
and is visible to the jobs started from GNU B<parallel>. The value is
|
||||
the sshlogin line with number of cores removed. E.g.
|
||||
Set by GNU B<parallel> and can be used in jobs run by GNU B<parallel>.
|
||||
Remember to quote the $, so it gets evaluated by the correct shell. Or
|
||||
use B<--plus> and {sshlogin}.
|
||||
|
||||
|
||||
The value is the sshlogin line with number of cores removed. E.g.
|
||||
|
||||
4//usr/bin/specialssh user@host
|
||||
|
||||
|
@ -4860,15 +4914,18 @@ becomes:
|
|||
|
||||
=item $PARALLEL_SEQ
|
||||
|
||||
$PARALLEL_SEQ will be set to the sequence number of the job
|
||||
running. Remember to quote the $, so it gets evaluated by the correct
|
||||
shell.
|
||||
Set by GNU B<parallel> and can be used in jobs run by GNU B<parallel>.
|
||||
Remember to quote the $, so it gets evaluated by the correct shell.
|
||||
|
||||
$PARALLEL_SEQ is the sequence number of the job running.
|
||||
|
||||
B<Example:>
|
||||
|
||||
seq 10 | parallel -N2 \
|
||||
echo seq:'$'PARALLEL_SEQ arg1:{1} arg2:{2}
|
||||
|
||||
{#} is a shorthand for $PARALLEL_SEQ.
|
||||
|
||||
|
||||
=item $PARALLEL_TMUX
|
||||
|
||||
|
@ -4897,7 +4954,7 @@ can be written as:
|
|||
cat list | PARALLEL='-kvj1 -S myssh\ user@server' \
|
||||
parallel echo
|
||||
|
||||
Notice the \ in the middle is needed because 'myssh' and 'user@server'
|
||||
Notice the \ after 'myssh' is needed because 'myssh' and 'user@server'
|
||||
must be one argument.
|
||||
|
||||
=back
|
||||
|
|
|
@ -776,6 +776,11 @@ par_cr_newline_header() {
|
|||
parallel --colsep , --header : echo {foo}
|
||||
}
|
||||
|
||||
par_plus_slot_replacement() {
|
||||
echo '### show {slot}'
|
||||
parallel -k --plus echo '{slot}=$PARALLEL_JOBSLOT={%}' ::: A B C
|
||||
}
|
||||
|
||||
export -f $(compgen -A function | grep par_)
|
||||
compgen -A function | grep par_ | LC_ALL=C sort |
|
||||
parallel --timeout 1000% -j6 --tag -k --joblog /tmp/jl-`basename $0` '{} 2>&1'
|
||||
|
|
|
@ -197,11 +197,11 @@ par_no_route_to_host() {
|
|||
) | perl -pe 's/(\d+\.\d+\.\d+\.\d+)/i.p.n.r/' | puniq
|
||||
}
|
||||
|
||||
par_PARALLEL_SSHLOGIN() {
|
||||
echo '### bug #56554: Introduce $PARALLEL_SSHLOGIN'
|
||||
par_PARALLEL_SSHLOGIN_SSHHOST() {
|
||||
echo '### bug #56554: Introduce $PARALLEL_SSHLOGIN $PARALLEL_SSHHOST'
|
||||
(echo lo; echo zsh@lo; echo /usr/bin/ssh csh@lo; echo 1/sh@lo;
|
||||
echo 1//usr/bin/ssh tcsh@lo) |
|
||||
parallel -k --tag --nonall -S - 'whoami;echo $PARALLEL_SSHLOGIN' |
|
||||
parallel -k --tag --nonall -S - 'whoami;echo $PARALLEL_SSHLOGIN $PARALLEL_SSHHOST' |
|
||||
LANG=C sort
|
||||
}
|
||||
|
||||
|
|
|
@ -618,6 +618,10 @@ par_pipepart_recend_recstart 9
|
|||
par_pipepart_recend_recstart 10
|
||||
par_pipepart_roundrobin ### bug #45769: --round-robin --pipepart gives wrong results
|
||||
par_pipepart_roundrobin 2
|
||||
par_plus_slot_replacement ### show {slot}
|
||||
par_plus_slot_replacement 1=1=1
|
||||
par_plus_slot_replacement 2=2=2
|
||||
par_plus_slot_replacement 3=3=3
|
||||
par_profile ### Test -J profile, -J /dir/profile, -J ./profile
|
||||
par_profile local local
|
||||
par_profile abs abs
|
||||
|
|
|
@ -72,7 +72,7 @@ par_remote_load parallel: Warning: This job was killed because it timed out:
|
|||
par_remote_load parallel: Warning: perl -e 'while(1){ }'
|
||||
par_remote_load OK
|
||||
par_remote_nice ### Test --nice remote
|
||||
par_remote_nice ssh lo -- exec 'perl -e '"'"'$ENV{"PARALLEL_PID"}="XXXXX";$ENV{"PARALLEL_SEQ"}="1";$ENV{"PARALLEL_SSHLOGIN"}="lo";$ENV{"PARALLEL_SSHHOST"}="lo";$bashfunc = "";@ARGV="PAR=a bash -c \"echo \\\$PAR b\"";$shell="$ENV{SHELL}";$tmpdir="/tmp/parallel-local-ssh1-tmpdir";$nice=1;do{$ENV{PARALLEL_TMP}=$tmpdir."/par".join"",map{(0..9,"a".."z","A".."Z")[rand(62)]}(1..5);}while(-e$ENV{PARALLEL_TMP});$SIG{CHLD}=sub{$done=1;};$pid=fork;unless($pid){eval{setpgrp};eval{setpriority(0,0,$nice)};exec$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)'"'";
|
||||
par_remote_nice ssh lo -- exec 'perl -e '"'"'$ENV{"PARALLEL_PID"}="XXXXX";$ENV{"PARALLEL_SEQ"}="1";$ENV{"PARALLEL_SSHLOGIN"}="lo";$ENV{"PARALLEL_SSHHOST"}="lo";$ENV{"PARALLEL_JOBSLOT"}="1";$bashfunc = "";@ARGV="PAR=a bash -c \"echo \\\$PAR b\"";$shell="$ENV{SHELL}";$tmpdir="/tmp/parallel-local-ssh1-tmpdir";$nice=1;do{$ENV{PARALLEL_TMP}=$tmpdir."/par".join"",map{(0..9,"a".."z","A".."Z")[rand(62)]}(1..5);}while(-e$ENV{PARALLEL_TMP});$SIG{CHLD}=sub{$done=1;};$pid=fork;unless($pid){eval{setpgrp};eval{setpriority(0,0,$nice)};exec$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)'"'";
|
||||
par_remote_nice a b
|
||||
par_ssh ### use --ssh
|
||||
par_ssh Run through BARSSH?
|
||||
|
|
|
@ -136,14 +136,14 @@ par_ash_embed your
|
|||
par_ash_embed code
|
||||
par_ash_embed here
|
||||
par_ash_embed Put your code here
|
||||
par_PARALLEL_SSHLOGIN ### bug #56554: Introduce $PARALLEL_SSHLOGIN
|
||||
par_PARALLEL_SSHLOGIN /usr/bin/ssh csh@lo /usr/bin/ssh csh@lo
|
||||
par_PARALLEL_SSHLOGIN /usr/bin/ssh csh@lo csh
|
||||
par_PARALLEL_SSHLOGIN /usr/bin/ssh tcsh@lo /usr/bin/ssh tcsh@lo
|
||||
par_PARALLEL_SSHLOGIN /usr/bin/ssh tcsh@lo tcsh
|
||||
par_PARALLEL_SSHLOGIN lo lo
|
||||
par_PARALLEL_SSHLOGIN lo tange
|
||||
par_PARALLEL_SSHLOGIN sh@lo sh
|
||||
par_PARALLEL_SSHLOGIN sh@lo sh@lo
|
||||
par_PARALLEL_SSHLOGIN zsh@lo zsh
|
||||
par_PARALLEL_SSHLOGIN zsh@lo zsh@lo
|
||||
par_PARALLEL_SSHLOGIN_SSHHOST ### bug #56554: Introduce $PARALLEL_SSHLOGIN $PARALLEL_SSHHOST
|
||||
par_PARALLEL_SSHLOGIN_SSHHOST /usr/bin/ssh csh@lo /usr/bin/ssh csh@lo lo
|
||||
par_PARALLEL_SSHLOGIN_SSHHOST /usr/bin/ssh csh@lo csh
|
||||
par_PARALLEL_SSHLOGIN_SSHHOST /usr/bin/ssh tcsh@lo /usr/bin/ssh tcsh@lo lo
|
||||
par_PARALLEL_SSHLOGIN_SSHHOST /usr/bin/ssh tcsh@lo tcsh
|
||||
par_PARALLEL_SSHLOGIN_SSHHOST lo lo lo
|
||||
par_PARALLEL_SSHLOGIN_SSHHOST lo tange
|
||||
par_PARALLEL_SSHLOGIN_SSHHOST sh@lo sh
|
||||
par_PARALLEL_SSHLOGIN_SSHHOST sh@lo sh@lo lo
|
||||
par_PARALLEL_SSHLOGIN_SSHHOST zsh@lo zsh
|
||||
par_PARALLEL_SSHLOGIN_SSHHOST zsh@lo zsh@lo lo
|
||||
|
|
|
@ -844,9 +844,11 @@ ORACLE_HOME
|
|||
ORACLE_SID
|
||||
PARALLEL
|
||||
PARALLEL_HOME
|
||||
PARALLEL_JOBSLOT
|
||||
PARALLEL_PID
|
||||
PARALLEL_RSYNC_OPTS
|
||||
PARALLEL_SEQ
|
||||
PARALLEL_SSHHOST
|
||||
PARALLEL_SSHLOGIN
|
||||
PARALLEL_TMP
|
||||
PATH
|
||||
|
@ -1425,4 +1427,4 @@ C
|
|||
echo A
|
||||
echo B
|
||||
echo C
|
||||
7
|
||||
8
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
echo '### Test --return of weirdly named file'
|
||||
### Test --return of weirdly named file
|
||||
stdout parallel --return {} -vv -S parallel\@parallel-server1 echo '>'{} ::: 'aa<${#}" b' | perl -pe 's/\S*parallel-server\S*/one-server/;s:[a-z+=/\\0-9]{500,}:base64:i;'; rm 'aa<${#}" b'
|
||||
ssh -l parallel one-server -- exec 'perl -e '"'"'$ENV{"PARALLEL_PID"}="XXXXX";$ENV{"PARALLEL_SEQ"}="1";$ENV{"PARALLEL_SSHLOGIN"}="parallel\@parallel-server1";$bashfunc = "";@ARGV="echo >'"'"'"'"'"'"'"'"'aa<\${#}\" b'"'"'"'"'"'"'"'"'";$shell="$ENV{SHELL}";$tmpdir="/tmp/test61-tmpdir";$nice=0;do{$ENV{PARALLEL_TMP}=$tmpdir."/par".join"",map{(0..9,"a".."z","A".."Z")[rand(62)]}(1..5);}while(-e$ENV{PARALLEL_TMP});$SIG{CHLD}=sub{$done=1;};$pid=fork;unless($pid){eval{setpgrp};eval{setpriority(0,0,$nice)};exec$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 -e'ssh -l parallel' parallel-server1:"'"'./aa<${#}" b'"'" ./.;exit $_EXIT_status;
|
||||
ssh -l parallel one-server -- exec 'perl -e '"'"'$ENV{"PARALLEL_PID"}="XXXXX";$ENV{"PARALLEL_SEQ"}="1";$ENV{"PARALLEL_SSHLOGIN"}="parallel\@parallel-server1";$ENV{"PARALLEL_SSHHOST"}="parallel-server1";$ENV{"PARALLEL_JOBSLOT"}="1";$bashfunc = "";@ARGV="echo >'"'"'"'"'"'"'"'"'aa<\${#}\" b'"'"'"'"'"'"'"'"'";$shell="$ENV{SHELL}";$tmpdir="/tmp/test61-tmpdir";$nice=0;do{$ENV{PARALLEL_TMP}=$tmpdir."/par".join"",map{(0..9,"a".."z","A".."Z")[rand(62)]}(1..5);}while(-e$ENV{PARALLEL_TMP});$SIG{CHLD}=sub{$done=1;};$pid=fork;unless($pid){eval{setpgrp};eval{setpriority(0,0,$nice)};exec$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 -e'ssh -l parallel' parallel-server1:"'"'./aa<${#}" b'"'" ./.;exit $_EXIT_status;
|
||||
echo '### 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-z+=/\\0-9]{500,}:base64:i;'
|
||||
ssh -l csh localhost -- exec 'perl -e '"'"'$ENV{"PARALLEL_PID"}="XXXXX";$ENV{"PARALLEL_SEQ"}="1";$ENV{"PARALLEL_SSHLOGIN"}="csh\@localhost";$bashfunc = "";@ARGV="echo \$PARALLEL_PID \$PARALLEL_SEQ a| wc -w";$shell="$ENV{SHELL}";$tmpdir="/tmp/test61-tmpdir";$nice=0;do{$ENV{PARALLEL_TMP}=$tmpdir."/par".join"",map{(0..9,"a".."z","A".."Z")[rand(62)]}(1..5);}while(-e$ENV{PARALLEL_TMP});$SIG{CHLD}=sub{$done=1;};$pid=fork;unless($pid){eval{setpgrp};eval{setpriority(0,0,$nice)};exec$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 '"'"'$ENV{"PARALLEL_PID"}="XXXXX";$ENV{"PARALLEL_SEQ"}="1";$ENV{"PARALLEL_SSHLOGIN"}="csh\@localhost";$ENV{"PARALLEL_SSHHOST"}="localhost";$ENV{"PARALLEL_JOBSLOT"}="1";$bashfunc = "";@ARGV="echo \$PARALLEL_PID \$PARALLEL_SEQ a| wc -w";$shell="$ENV{SHELL}";$tmpdir="/tmp/test61-tmpdir";$nice=0;do{$ENV{PARALLEL_TMP}=$tmpdir."/par".join"",map{(0..9,"a".."z","A".."Z")[rand(62)]}(1..5);}while(-e$ENV{PARALLEL_TMP});$SIG{CHLD}=sub{$done=1;};$pid=fork;unless($pid){eval{setpgrp};eval{setpriority(0,0,$nice)};exec$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)'"'";
|
||||
3
|
||||
ssh -l csh localhost -- exec 'perl -e '"'"'$ENV{"PARALLEL_PID"}="XXXXX";$ENV{"PARALLEL_SEQ"}="2";$ENV{"PARALLEL_SSHLOGIN"}="csh\@localhost";$bashfunc = "";@ARGV="echo \$PARALLEL_PID \$PARALLEL_SEQ b| wc -w";$shell="$ENV{SHELL}";$tmpdir="/tmp/test61-tmpdir";$nice=0;do{$ENV{PARALLEL_TMP}=$tmpdir."/par".join"",map{(0..9,"a".."z","A".."Z")[rand(62)]}(1..5);}while(-e$ENV{PARALLEL_TMP});$SIG{CHLD}=sub{$done=1;};$pid=fork;unless($pid){eval{setpgrp};eval{setpriority(0,0,$nice)};exec$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 '"'"'$ENV{"PARALLEL_PID"}="XXXXX";$ENV{"PARALLEL_SEQ"}="2";$ENV{"PARALLEL_SSHLOGIN"}="csh\@localhost";$ENV{"PARALLEL_SSHHOST"}="localhost";$ENV{"PARALLEL_JOBSLOT"}="2";$bashfunc = "";@ARGV="echo \$PARALLEL_PID \$PARALLEL_SEQ b| wc -w";$shell="$ENV{SHELL}";$tmpdir="/tmp/test61-tmpdir";$nice=0;do{$ENV{PARALLEL_TMP}=$tmpdir."/par".join"",map{(0..9,"a".."z","A".."Z")[rand(62)]}(1..5);}while(-e$ENV{PARALLEL_TMP});$SIG{CHLD}=sub{$done=1;};$pid=fork;unless($pid){eval{setpgrp};eval{setpriority(0,0,$nice)};exec$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)'"'";
|
||||
3
|
||||
ssh -l csh localhost -- exec 'perl -e '"'"'$ENV{"PARALLEL_PID"}="XXXXX";$ENV{"PARALLEL_SEQ"}="3";$ENV{"PARALLEL_SSHLOGIN"}="csh\@localhost";$bashfunc = "";@ARGV="echo \$PARALLEL_PID \$PARALLEL_SEQ c| wc -w";$shell="$ENV{SHELL}";$tmpdir="/tmp/test61-tmpdir";$nice=0;do{$ENV{PARALLEL_TMP}=$tmpdir."/par".join"",map{(0..9,"a".."z","A".."Z")[rand(62)]}(1..5);}while(-e$ENV{PARALLEL_TMP});$SIG{CHLD}=sub{$done=1;};$pid=fork;unless($pid){eval{setpgrp};eval{setpriority(0,0,$nice)};exec$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 '"'"'$ENV{"PARALLEL_PID"}="XXXXX";$ENV{"PARALLEL_SEQ"}="3";$ENV{"PARALLEL_SSHLOGIN"}="csh\@localhost";$ENV{"PARALLEL_SSHHOST"}="localhost";$ENV{"PARALLEL_JOBSLOT"}="3";$bashfunc = "";@ARGV="echo \$PARALLEL_PID \$PARALLEL_SEQ c| wc -w";$shell="$ENV{SHELL}";$tmpdir="/tmp/test61-tmpdir";$nice=0;do{$ENV{PARALLEL_TMP}=$tmpdir."/par".join"",map{(0..9,"a".."z","A".."Z")[rand(62)]}(1..5);}while(-e$ENV{PARALLEL_TMP});$SIG{CHLD}=sub{$done=1;};$pid=fork;unless($pid){eval{setpgrp};eval{setpriority(0,0,$nice)};exec$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)'"'";
|
||||
3
|
||||
|
|
Loading…
Reference in a new issue