Released as 20140722 ('MH17').

This commit is contained in:
Ole Tange 2014-07-22 06:47:30 +02:00
parent 546f5aea03
commit 9bb46c6ed6
16 changed files with 127 additions and 36 deletions

67
NEWS
View file

@ -1,3 +1,70 @@
20140722
* {= perl expression =} can be used as replacement string. The
expression should modify $_. E.g. {= s/\.gz$// =} to remove .gz from
the string. This makes replacement strings extremely flexible.
* Positional perl expressions (similar to {2}) are given as {=2 perl
expression=} where 2 is the position.
* One small backwards incompatability: {1}_{2} will replace {2} with
the empty string if there is only one argument. Previously {2} would
have been left untouched.
* Replacement strings can be defined using --rpl. E.g. parallel --rpl
'{.gz} s/\.gz$//' echo {.gz} ::: *.gz
* The parenthesis around {= perl expression =} can be changed with
--parens.
* --tmux will direct the output to a tmux session instead of
files. Each running jobs will be in its own window.
* --halt 10% will stop spawning new jobs if 10% failed so far.
* GNU Parallel was cited in: bammds: A tool for assessing the ancestry
of low depth whole genome data using multidimensional scaling (MDS)
http://bioinformatics.oxfordjournals.org/content/early/2014/06/28/bioinformatics.btu410.abstract
* GNU Parallel was cited in: Molecular ferroelectric contributions to
anomalous hysteresis in hybrid perovskite solar cells
http://people.bath.ac.uk/aw558/publications/2014/arxiv_hysteresis_14.pdf
* GNU Parallel was cited in: Energy Sorghum-a genetic model for the
design of C4 grass bioenergy crops
http://jxb.oxfordjournals.org/content/early/2014/06/20/jxb.eru229.short
* GNU Parallel was cited in: Web-scale Content Reuse Detection
www.isi.edu/~johnh/PAPERS/Ardi14a.pdf
* Tell your friends to sign up for the Webcast at 2014-08-20 covering
GNU Parallel: Data Science at the Command Line
http://www.oreilly.com/pub/e/3115
* GNU Parallel all the things!
http://longwayaround.org.uk/notes/gnu-parallel-all-the-things/
* Shell command composition and dispatch
http://lukeluo.blogspot.dk/2014/07/linux-virtual-console6-shell-command.html
* Parallelising plink (or anything else) the easy way
http://chrisladroue.com/2012/03/parallelising-plink-or-anything-else-the-easy-way/
* Easy and cheap cluster building on AWS
https://grapeot.me/easy-and-cheap-cluster-building-on-aws.html
* Paralelizace běžných činností v konzoli pomocí GNU Parallel
http://www.abclinuxu.cz/clanky/paralelizace-beznych-cinnosti-v-konzoli-pomoci-gnu-parallel
* [原] Ubuntu 下使用 parallel 命令的注意事项
http://blog.ailms.me/2014/06/28/ubuntu-with-parallel.html
* 简单的并行, 可使用GNU parallel
http://jerkwin.github.io/2014/06/10/GNU-parallel/
* Bug fixes and man page updates.
20140622 20140622
* --shebang and --shebang-wrap now works on FreeBSD. * --shebang and --shebang-wrap now works on FreeBSD.

12
README
View file

@ -40,9 +40,9 @@ document.
Full installation of GNU Parallel is as simple as: Full installation of GNU Parallel is as simple as:
wget http://ftpmirror.gnu.org/parallel/parallel-20140711.tar.bz2 wget http://ftpmirror.gnu.org/parallel/parallel-20140722.tar.bz2
bzip2 -dc parallel-20140711.tar.bz2 | tar xvf - bzip2 -dc parallel-20140722.tar.bz2 | tar xvf -
cd parallel-20140711 cd parallel-20140722
./configure && make && make install ./configure && make && make install
@ -51,9 +51,9 @@ Full installation of GNU Parallel is as simple as:
If you are not root you can add ~/bin to your path and install in If you are not root you can add ~/bin to your path and install in
~/bin and ~/share: ~/bin and ~/share:
wget http://ftpmirror.gnu.org/parallel/parallel-20140711.tar.bz2 wget http://ftpmirror.gnu.org/parallel/parallel-20140722.tar.bz2
bzip2 -dc parallel-20140711.tar.bz2 | tar xvf - bzip2 -dc parallel-20140722.tar.bz2 | tar xvf -
cd parallel-20140711 cd parallel-20140722
./configure --prefix=$HOME && make && make install ./configure --prefix=$HOME && make && make install
Or if your system lacks 'make' you can simply copy src/parallel Or if your system lacks 'make' you can simply copy src/parallel

20
configure vendored
View file

@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for parallel 20140711. # Generated by GNU Autoconf 2.69 for parallel 20140722.
# #
# Report bugs to <bug-parallel@gnu.org>. # Report bugs to <bug-parallel@gnu.org>.
# #
@ -579,8 +579,8 @@ MAKEFLAGS=
# Identity of this package. # Identity of this package.
PACKAGE_NAME='parallel' PACKAGE_NAME='parallel'
PACKAGE_TARNAME='parallel' PACKAGE_TARNAME='parallel'
PACKAGE_VERSION='20140711' PACKAGE_VERSION='20140722'
PACKAGE_STRING='parallel 20140711' PACKAGE_STRING='parallel 20140722'
PACKAGE_BUGREPORT='bug-parallel@gnu.org' PACKAGE_BUGREPORT='bug-parallel@gnu.org'
PACKAGE_URL='' PACKAGE_URL=''
@ -1197,7 +1197,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures parallel 20140711 to adapt to many kinds of systems. \`configure' configures parallel 20140722 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1263,7 +1263,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of parallel 20140711:";; short | recursive ) echo "Configuration of parallel 20140722:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
@ -1337,7 +1337,7 @@ fi
test -n "$ac_init_help" && exit $ac_status test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
parallel configure 20140711 parallel configure 20140722
generated by GNU Autoconf 2.69 generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc. Copyright (C) 2012 Free Software Foundation, Inc.
@ -1354,7 +1354,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by parallel $as_me 20140711, which was It was created by parallel $as_me 20140722, which was
generated by GNU Autoconf 2.69. Invocation command line was generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@ $ $0 $@
@ -2169,7 +2169,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE='parallel' PACKAGE='parallel'
VERSION='20140711' VERSION='20140722'
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
@ -2741,7 +2741,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. # values after options handling.
ac_log=" ac_log="
This file was extended by parallel $as_me 20140711, which was This file was extended by parallel $as_me 20140722, which was
generated by GNU Autoconf 2.69. Invocation command line was generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
@ -2803,7 +2803,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\ ac_cs_version="\\
parallel config.status 20140711 parallel config.status 20140722
configured by $0, generated by GNU Autoconf 2.69, configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\" with options \\"\$ac_cs_config\\"

View file

@ -1,4 +1,4 @@
AC_INIT([parallel], [20140711], [bug-parallel@gnu.org]) AC_INIT([parallel], [20140722], [bug-parallel@gnu.org])
AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([ AC_CONFIG_FILES([

View file

@ -245,6 +245,8 @@ New in this release:
* --tmux will direct the output to a tmux session instead of files. Each running jobs will be in its own window. * --tmux will direct the output to a tmux session instead of files. Each running jobs will be in its own window.
* --halt 10% will stop spawning new jobs if 10% failed so far.
* GNU Parallel was cited in: bammds: A tool for assessing the ancestry of low depth whole genome data using multidimensional scaling (MDS) http://bioinformatics.oxfordjournals.org/content/early/2014/06/28/bioinformatics.btu410.abstract * GNU Parallel was cited in: bammds: A tool for assessing the ancestry of low depth whole genome data using multidimensional scaling (MDS) http://bioinformatics.oxfordjournals.org/content/early/2014/06/28/bioinformatics.btu410.abstract
* GNU Parallel was cited in: Molecular ferroelectric contributions to anomalous hysteresis in hybrid perovskite solar cells http://people.bath.ac.uk/aw558/publications/2014/arxiv_hysteresis_14.pdf * GNU Parallel was cited in: Molecular ferroelectric contributions to anomalous hysteresis in hybrid perovskite solar cells http://people.bath.ac.uk/aw558/publications/2014/arxiv_hysteresis_14.pdf

View file

@ -1,6 +1,6 @@
Summary: Shell tool for executing jobs in parallel Summary: Shell tool for executing jobs in parallel
Name: parallel Name: parallel
Version: 20140622 Version: 20140722
Release: 1 Release: 1
License: GPL License: GPL
Group: Productivity/File utilities Group: Productivity/File utilities

View file

@ -24,7 +24,7 @@
use strict; use strict;
use Getopt::Long; use Getopt::Long;
$Global::progname="niceload"; $Global::progname="niceload";
$Global::version = 20140711; $Global::version = 20140722;
Getopt::Long::Configure("bundling","require_order"); Getopt::Long::Configure("bundling","require_order");
get_options_from_array(\@ARGV) || die_usage(); get_options_from_array(\@ARGV) || die_usage();
if($opt::version) { if($opt::version) {

View file

@ -720,7 +720,7 @@ sub get_options_from_array {
sub parse_options { sub parse_options {
# Returns: N/A # Returns: N/A
# Defaults: # Defaults:
$Global::version = 20140719; $Global::version = 20140722;
$Global::progname = 'parallel'; $Global::progname = 'parallel';
$Global::infinity = 2**31; $Global::infinity = 2**31;
$Global::debug = 0; $Global::debug = 0;
@ -5279,7 +5279,6 @@ sub start {
# The eval is needed to catch exception from open3 # The eval is needed to catch exception from open3
if($opt::tmux) { if($opt::tmux) {
$command = $job->tmux_wrap($command); $command = $job->tmux_wrap($command);
# $command = tmux_wrap($command,$job->replaced());
} }
eval { eval {
$pid = ::open3("<&IN", ">&OUT", ">&ERR", $ENV{SHELL}, "-c", $command) || $pid = ::open3("<&IN", ">&OUT", ">&ERR", $ENV{SHELL}, "-c", $command) ||
@ -5296,7 +5295,6 @@ sub start {
# The eval is needed to catch exception from open3 # The eval is needed to catch exception from open3
if($opt::tmux) { if($opt::tmux) {
$command = $job->tmux_wrap($command); $command = $job->tmux_wrap($command);
# $command = tmux_wrap($command,$job->replaced());
} }
eval { eval {
$pid = ::open3("<&IN", ">&OUT", ">&ERR", $ENV{SHELL}, "-c", $command) || $pid = ::open3("<&IN", ">&OUT", ">&ERR", $ENV{SHELL}, "-c", $command) ||
@ -5308,7 +5306,6 @@ sub start {
} else { } else {
if($opt::tmux) { if($opt::tmux) {
$command = $job->tmux_wrap($command); $command = $job->tmux_wrap($command);
# $command = tmux_wrap($command,$job->replaced());
} }
eval { eval {
$pid = ::open3(::gensym, ">&OUT", ">&ERR", $ENV{SHELL}, "-c", $command) || $pid = ::open3(::gensym, ">&OUT", ">&ERR", $ENV{SHELL}, "-c", $command) ||
@ -5348,20 +5345,18 @@ sub tmux_wrap {
close $fh; close $fh;
unlink $tmpfile; unlink $tmpfile;
my $visual_command = $self->replaced(); my $visual_command = $self->replaced();
my $c = ::undef_as_empty($self->{'commandline'}->replace_placeholders(["\257<\257>"],0,0)).""; my $title = ::undef_as_empty($self->{'commandline'}->replace_placeholders(["\257<\257>"],0,0))."";
# ascii 194-224 annoys tmux # ascii 194-224 annoys tmux
$c =~ s/[\011-\016;\302-\340]//g; $title =~ s/[\011-\016;\302-\340]//g;
my $tmux; my $tmux;
if($Global::total_running == 0) { if($Global::total_running == 0) {
$tmux = "tmux new-session -s p$$ -d -n ". $tmux = "tmux new-session -s p$$ -d -n ".
::shell_quote_scalar($c); ::shell_quote_scalar($title);
print $Global::original_stderr "See output with: tmux attach -t p$$\n"; print $Global::original_stderr "See output with: tmux attach -t p$$\n";
} else { } else {
$tmux = "tmux new-window -t p$$ -n ".::shell_quote_scalar($c); $tmux = "tmux new-window -t p$$ -n ".::shell_quote_scalar($title);
} }
# $tmux = "tmux new-session -s p$$ -d true >/dev/null; ".
# "tmux new-window -t p$$ -n ".::shell_quote_scalar($c);
return "mkfifo $tmpfile; $tmux ". return "mkfifo $tmpfile; $tmux ".
# Run in tmux # Run in tmux
::shell_quote_scalar("(".$actual_command.');(echo $?$status;echo 255) >'.$tmpfile.";". ::shell_quote_scalar("(".$actual_command.');(echo $?$status;echo 255) >'.$tmpfile.";".

View file

@ -244,7 +244,7 @@ directory (if any) and extension removed.
To understand positional replacement strings see B<{>I<n>B<}>. To understand positional replacement strings see B<{>I<n>B<}>.
=item B<{=>I<perl expression>B<=}> =item B<{=>I<perl expression>B<=}> (alpha testing)
Replace with calculated I<perl expression>. B<$_> will contain the Replace with calculated I<perl expression>. B<$_> will contain the
same as B<{}>. After evaluating I<perl expression> B<$_> will be used same as B<{}>. After evaluating I<perl expression> B<$_> will be used
@ -257,7 +257,7 @@ The B<{=>I<perl expression>B<=}> must be given as a single string.
See also: B<--rpl> B<--parens> See also: B<--rpl> B<--parens>
=item B<{=>I<n> I<perl expression>B<=}> =item B<{=>I<n> I<perl expression>B<=}> (alpha testing)
Positional equivalent to B<{= perl expression =}>. To understand Positional equivalent to B<{= perl expression =}>. To understand
positional replacement strings see B<{>I<n>B<}>. positional replacement strings see B<{>I<n>B<}>.

View file

@ -323,8 +323,8 @@ directory (if any) and extension removed.
To understand positional replacement strings see @strong{@{}@emph{n}@strong{@}}. To understand positional replacement strings see @strong{@{}@emph{n}@strong{@}}.
@item @strong{@{=}@emph{perl expression}@strong{=@}} @item @strong{@{=}@emph{perl expression}@strong{=@}} (alpha testing)
@anchor{@strong{@{=}@emph{perl expression}@strong{=@}}} @anchor{@strong{@{=}@emph{perl expression}@strong{=@}} (alpha testing)}
Replace with calculated @emph{perl expression}. @strong{$_} will contain the Replace with calculated @emph{perl expression}. @strong{$_} will contain the
same as @strong{@{@}}. After evaluating @emph{perl expression} @strong{$_} will be used same as @strong{@{@}}. After evaluating @emph{perl expression} @strong{$_} will be used
@ -336,8 +336,8 @@ The @strong{@{=}@emph{perl expression}@strong{=@}} must be given as a single str
See also: @strong{--rpl} @strong{--parens} See also: @strong{--rpl} @strong{--parens}
@item @strong{@{=}@emph{n} @emph{perl expression}@strong{=@}} @item @strong{@{=}@emph{n} @emph{perl expression}@strong{=@}} (alpha testing)
@anchor{@strong{@{=}@emph{n} @emph{perl expression}@strong{=@}}} @anchor{@strong{@{=}@emph{n} @emph{perl expression}@strong{=@}} (alpha testing)}
Positional equivalent to @strong{@{= perl expression =@}}. To understand Positional equivalent to @strong{@{= perl expression =@}}. To understand
positional replacement strings see @strong{@{}@emph{n}@strong{@}}. positional replacement strings see @strong{@{}@emph{n}@strong{@}}.

View file

@ -566,7 +566,7 @@ $Global::Initfile && unlink $Global::Initfile;
exit ($err); exit ($err);
sub parse_options { sub parse_options {
$Global::version = 20140711; $Global::version = 20140722;
$Global::progname = 'sql'; $Global::progname = 'sql';
# This must be done first as this may exec myself # This must be done first as this may exec myself

Binary file not shown.

View file

@ -57,4 +57,7 @@ echo '### bug #42055: --pipe -a bigfile should not require sequential reading of
parallel --pipepart -a /etc/passwd -N 1 should not be run parallel --pipepart -a /etc/passwd -N 1 should not be run
parallel --pipepart -a /etc/passwd -l 1 should not be run parallel --pipepart -a /etc/passwd -l 1 should not be run
echo '### --tmux test - check termination'
perl -e 'map {printf "$_%o%c\n",$_,$_}1..255' | parallel --tmux echo {} :::: - ::: a b
EOF EOF

View file

@ -5,6 +5,26 @@ test -d "parallel-00000000" || mkdir "parallel-00000000"
(cd src && make top_distdir=../parallel-00000000 distdir=../parallel-00000000/src \ (cd src && make top_distdir=../parallel-00000000 distdir=../parallel-00000000/src \
am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
make[0]: Entering directory `/home/tange/privat/parallel/src' make[0]: Entering directory `/home/tange/privat/parallel/src'
pod2man --release='00000000' --center='parallel' \
--section=1 ./parallel.pod > ./parallel.1n \
&& mv ./parallel.1n ./parallel.1 \
|| echo "Warning: pod2man not found. Using old parallel.1"
/bin/bash: pod2man: command not found
Warning: pod2man not found. Using old parallel.1
pod2html ./parallel.pod > ./parallel.htmln \
&& mv ./parallel.htmln ./parallel.html \
|| echo "Warning: pod2html not found. Using old parallel.html"
/bin/bash: pod2html: command not found
Warning: pod2html not found. Using old parallel.html
rm -f ./pod2htm*
pod2texi --output=./parallel.texi ./parallel.pod \
|| echo "Warning: pod2texi not found. Using old parallel.texi"
/bin/bash: pod2texi: command not found
Warning: pod2texi not found. Using old parallel.texi
pod2pdf --output-file ./parallel.pdf ./parallel.pod --title "GNU Parallel" \
|| echo "Warning: pod2pdf not found. Using old parallel.pdf"
/bin/bash: pod2pdf: command not found
Warning: pod2pdf not found. Using old parallel.pdf
make[0]: Leaving directory `/home/tange/privat/parallel/src' make[0]: Leaving directory `/home/tange/privat/parallel/src'
test -n "" \ test -n "" \
|| find "parallel-00000000" -type d ! -perm -755 \ || find "parallel-00000000" -type d ! -perm -755 \

View file

@ -73,3 +73,7 @@ parallel: Error: --pipepart is incompatible with --max-replace-args, --max-lines
parallel: Error: --pipepart is incompatible with --max-replace-args, --max-lines, and -L. parallel: Error: --pipepart is incompatible with --max-replace-args, --max-lines, and -L.
parallel --pipepart -a /etc/passwd -l 1 should not be run parallel --pipepart -a /etc/passwd -l 1 should not be run
parallel: Error: --pipepart is incompatible with --max-replace-args, --max-lines, and -L. parallel: Error: --pipepart is incompatible with --max-replace-args, --max-lines, and -L.
echo '### --tmux test - check termination'
### --tmux test - check termination
perl -e 'map {printf "$_%o%c\n",$_,$_}1..255' | parallel --tmux echo {} :::: - ::: a b
See output with: tmux attach -t p6522