diff --git a/NEWS b/NEWS index 9bfebdf6..cb6e460e 100644 --- a/NEWS +++ b/NEWS @@ -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 * --shebang and --shebang-wrap now works on FreeBSD. diff --git a/README b/README index 33e6d43e..5a6c8058 100644 --- a/README +++ b/README @@ -40,9 +40,9 @@ document. Full installation of GNU Parallel is as simple as: - wget http://ftpmirror.gnu.org/parallel/parallel-20140711.tar.bz2 - bzip2 -dc parallel-20140711.tar.bz2 | tar xvf - - cd parallel-20140711 + wget http://ftpmirror.gnu.org/parallel/parallel-20140722.tar.bz2 + bzip2 -dc parallel-20140722.tar.bz2 | tar xvf - + cd parallel-20140722 ./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 ~/bin and ~/share: - wget http://ftpmirror.gnu.org/parallel/parallel-20140711.tar.bz2 - bzip2 -dc parallel-20140711.tar.bz2 | tar xvf - - cd parallel-20140711 + wget http://ftpmirror.gnu.org/parallel/parallel-20140722.tar.bz2 + bzip2 -dc parallel-20140722.tar.bz2 | tar xvf - + cd parallel-20140722 ./configure --prefix=$HOME && make && make install Or if your system lacks 'make' you can simply copy src/parallel diff --git a/configure b/configure index 98ebe44b..7ccc959f 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # 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 . # @@ -579,8 +579,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='parallel' PACKAGE_TARNAME='parallel' -PACKAGE_VERSION='20140711' -PACKAGE_STRING='parallel 20140711' +PACKAGE_VERSION='20140722' +PACKAGE_STRING='parallel 20140722' PACKAGE_BUGREPORT='bug-parallel@gnu.org' 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. # This message is too long to be a string in the A/UX 3.1 sh. 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]... @@ -1263,7 +1263,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of parallel 20140711:";; + short | recursive ) echo "Configuration of parallel 20140722:";; esac cat <<\_ACEOF @@ -1337,7 +1337,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -parallel configure 20140711 +parallel configure 20140722 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1354,7 +1354,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while 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 $ $0 $@ @@ -2169,7 +2169,7 @@ fi # Define the identity of the package. PACKAGE='parallel' - VERSION='20140711' + VERSION='20140722' 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 # values after options handling. 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 CONFIG_FILES = $CONFIG_FILES @@ -2803,7 +2803,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -parallel config.status 20140711 +parallel config.status 20140722 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index a69d17f3..6e865872 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([ diff --git a/doc/release_new_version b/doc/release_new_version index b78b6f4a..ed4ed536 100644 --- a/doc/release_new_version +++ b/doc/release_new_version @@ -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. +* --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 diff --git a/packager/obs/home:tange/parallel/parallel.spec b/packager/obs/home:tange/parallel/parallel.spec index 4220825a..6a20c79b 100644 --- a/packager/obs/home:tange/parallel/parallel.spec +++ b/packager/obs/home:tange/parallel/parallel.spec @@ -1,6 +1,6 @@ Summary: Shell tool for executing jobs in parallel Name: parallel -Version: 20140622 +Version: 20140722 Release: 1 License: GPL Group: Productivity/File utilities diff --git a/src/niceload b/src/niceload index cf7737b6..e0bcaa07 100755 --- a/src/niceload +++ b/src/niceload @@ -24,7 +24,7 @@ use strict; use Getopt::Long; $Global::progname="niceload"; -$Global::version = 20140711; +$Global::version = 20140722; Getopt::Long::Configure("bundling","require_order"); get_options_from_array(\@ARGV) || die_usage(); if($opt::version) { diff --git a/src/parallel b/src/parallel index 292ae432..f8454537 100755 --- a/src/parallel +++ b/src/parallel @@ -720,7 +720,7 @@ sub get_options_from_array { sub parse_options { # Returns: N/A # Defaults: - $Global::version = 20140719; + $Global::version = 20140722; $Global::progname = 'parallel'; $Global::infinity = 2**31; $Global::debug = 0; @@ -5279,7 +5279,6 @@ sub start { # The eval is needed to catch exception from open3 if($opt::tmux) { $command = $job->tmux_wrap($command); -# $command = tmux_wrap($command,$job->replaced()); } eval { $pid = ::open3("<&IN", ">&OUT", ">&ERR", $ENV{SHELL}, "-c", $command) || @@ -5296,7 +5295,6 @@ sub start { # The eval is needed to catch exception from open3 if($opt::tmux) { $command = $job->tmux_wrap($command); -# $command = tmux_wrap($command,$job->replaced()); } eval { $pid = ::open3("<&IN", ">&OUT", ">&ERR", $ENV{SHELL}, "-c", $command) || @@ -5308,7 +5306,6 @@ sub start { } else { if($opt::tmux) { $command = $job->tmux_wrap($command); -# $command = tmux_wrap($command,$job->replaced()); } eval { $pid = ::open3(::gensym, ">&OUT", ">&ERR", $ENV{SHELL}, "-c", $command) || @@ -5348,20 +5345,18 @@ sub tmux_wrap { close $fh; unlink $tmpfile; 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 - $c =~ s/[\011-\016;\302-\340]//g; + $title =~ s/[\011-\016;\302-\340]//g; my $tmux; if($Global::total_running == 0) { $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"; } 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 ". # Run in tmux ::shell_quote_scalar("(".$actual_command.');(echo $?$status;echo 255) >'.$tmpfile.";". diff --git a/src/parallel.pod b/src/parallel.pod index ac2db6b1..dcc1d7b1 100644 --- a/src/parallel.pod +++ b/src/parallel.pod @@ -244,7 +244,7 @@ directory (if any) and extension removed. To understand positional replacement strings see B<{>IB<}>. -=item B<{=>IB<=}> +=item B<{=>IB<=}> (alpha testing) Replace with calculated I. B<$_> will contain the same as B<{}>. After evaluating I B<$_> will be used @@ -257,7 +257,7 @@ The B<{=>IB<=}> must be given as a single string. See also: B<--rpl> B<--parens> -=item B<{=>I IB<=}> +=item B<{=>I IB<=}> (alpha testing) Positional equivalent to B<{= perl expression =}>. To understand positional replacement strings see B<{>IB<}>. diff --git a/src/parallel.texi b/src/parallel.texi index c2b1c9a8..c54586ef 100644 --- a/src/parallel.texi +++ b/src/parallel.texi @@ -323,8 +323,8 @@ directory (if any) and extension removed. To understand positional replacement strings see @strong{@{}@emph{n}@strong{@}}. -@item @strong{@{=}@emph{perl expression}@strong{=@}} -@anchor{@strong{@{=}@emph{perl expression}@strong{=@}}} +@item @strong{@{=}@emph{perl expression}@strong{=@}} (alpha testing) +@anchor{@strong{@{=}@emph{perl expression}@strong{=@}} (alpha testing)} Replace with calculated @emph{perl expression}. @strong{$_} will contain the 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} -@item @strong{@{=}@emph{n} @emph{perl expression}@strong{=@}} -@anchor{@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{=@}} (alpha testing)} Positional equivalent to @strong{@{= perl expression =@}}. To understand positional replacement strings see @strong{@{}@emph{n}@strong{@}}. diff --git a/src/sql b/src/sql index ac7e2e40..15a044dc 100755 --- a/src/sql +++ b/src/sql @@ -566,7 +566,7 @@ $Global::Initfile && unlink $Global::Initfile; exit ($err); sub parse_options { - $Global::version = 20140711; + $Global::version = 20140722; $Global::progname = 'sql'; # This must be done first as this may exec myself diff --git a/src/sql.pdf b/src/sql.pdf index 5a775645..566cba09 100644 Binary files a/src/sql.pdf and b/src/sql.pdf differ diff --git a/testsuite/tests-to-run/parallel-local22.sh b/testsuite/tests-to-run/parallel-local22.sh index 5cc8d3c2..f424f3f0 100755 --- a/testsuite/tests-to-run/parallel-local22.sh +++ b/testsuite/tests-to-run/parallel-local22.sh @@ -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 -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 diff --git a/testsuite/wanted-results/parallel-install b/testsuite/wanted-results/parallel-install index 33c8875c..d67a34e0 100644 --- a/testsuite/wanted-results/parallel-install +++ b/testsuite/wanted-results/parallel-install @@ -5,6 +5,26 @@ test -d "parallel-00000000" || mkdir "parallel-00000000" (cd src && make top_distdir=../parallel-00000000 distdir=../parallel-00000000/src \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) 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' test -n "" \ || find "parallel-00000000" -type d ! -perm -755 \ diff --git a/testsuite/wanted-results/parallel-local-10s b/testsuite/wanted-results/parallel-local-10s new file mode 100644 index 00000000..e69de29b diff --git a/testsuite/wanted-results/parallel-local22 b/testsuite/wanted-results/parallel-local22 index 7448e7a2..7b244484 100644 --- a/testsuite/wanted-results/parallel-local22 +++ b/testsuite/wanted-results/parallel-local22 @@ -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 --pipepart -a /etc/passwd -l 1 should not be run 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