From 5b325c60ba8e5d0eb5e2ed8fed62815576464b77 Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Tue, 22 Feb 2022 22:55:41 +0100 Subject: [PATCH] Released as 20220222 ('Donetsk Luhansk') --- NEWS | 24 +++++++++++ README | 24 +++++------ configure | 20 +++++----- configure.ac | 2 +- doc/haikus | 8 ++-- doc/release_new_version | 40 ++++++++++--------- packager/obs/home:tange/parallel/.osc/_files | 12 +++--- .../home:tange/parallel/.osc/parallel.spec | 5 ++- src/Makefile.am | 4 +- src/env_parallel.ash | 2 +- src/env_parallel.bash | 2 +- src/env_parallel.dash | 2 +- src/env_parallel.ksh | 2 +- src/env_parallel.mksh | 2 +- src/env_parallel.sh | 2 +- src/env_parallel.zsh | 2 +- src/niceload | 2 +- src/parallel | 24 ++++++----- src/parallel.pod | 19 ++++++--- src/parsort | 2 +- src/pod2graph | 11 +++-- src/sql | 2 +- testsuite/REQUIREMENTS | 2 +- testsuite/tests-to-run/parallel-local-0.3s.sh | 4 ++ testsuite/tests-to-run/parallel-local-30s.sh | 7 ++-- testsuite/tests-to-run/parallel-local7.sh | 13 +++--- testsuite/wanted-results/parallel-local-0.3s | 16 ++++++++ testsuite/wanted-results/parallel-local-300s | 4 +- testsuite/wanted-results/parallel-local-30s | 16 ++++---- testsuite/wanted-results/parallel-local7 | 34 ++++++++-------- 30 files changed, 185 insertions(+), 124 deletions(-) diff --git a/NEWS b/NEWS index ef446634..dc927fae 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,27 @@ +20220222 + +New in this release: + +* Encoding of remote commands has changed. This limits the length of + remote commands to less than half. It also requires $REMOTE_TMPDIR + to be writable. It makes this release beta quality. + +* Time functions hh_mm_ss() hhmmss() hh_mm() hhmm() are now available + for {= =}. + +* Many options in the man page for parallel now has 'see also' for + related options. + +* parallel_options_map.pdf is a map showing which options other + options relate to. + +* {uniq} added to --plus to only run jobs with unique values. + +* sem --fg exits with the exit code of the job. + +* Bug fixes and man page updates. + + 20220122 New in this release: diff --git a/README b/README index df836ccf..9a268f28 100644 --- a/README +++ b/README @@ -57,11 +57,11 @@ document. Full installation of GNU Parallel is as simple as: - wget https://ftpmirror.gnu.org/parallel/parallel-20220122.tar.bz2 - wget https://ftpmirror.gnu.org/parallel/parallel-20220122.tar.bz2.sig - gpg parallel-20220122.tar.bz2.sig - bzip2 -dc parallel-20220122.tar.bz2 | tar xvf - - cd parallel-20220122 + wget https://ftpmirror.gnu.org/parallel/parallel-20220222.tar.bz2 + wget https://ftpmirror.gnu.org/parallel/parallel-20220222.tar.bz2.sig + gpg parallel-20220222.tar.bz2.sig + bzip2 -dc parallel-20220222.tar.bz2 | tar xvf - + cd parallel-20220222 ./configure && make && sudo make install @@ -70,11 +70,11 @@ 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 https://ftpmirror.gnu.org/parallel/parallel-20220122.tar.bz2 - wget https://ftpmirror.gnu.org/parallel/parallel-20220122.tar.bz2.sig - gpg parallel-20220122.tar.bz2.sig - bzip2 -dc parallel-20220122.tar.bz2 | tar xvf - - cd parallel-20220122 + wget https://ftpmirror.gnu.org/parallel/parallel-20220222.tar.bz2 + wget https://ftpmirror.gnu.org/parallel/parallel-20220222.tar.bz2.sig + gpg parallel-20220222.tar.bz2.sig + bzip2 -dc parallel-20220222.tar.bz2 | tar xvf - + cd parallel-20220222 ./configure --prefix=$HOME && make && make install Or if your system lacks 'make' you can simply copy src/parallel @@ -122,8 +122,8 @@ will love you for it. When using programs that use GNU Parallel to process data for publication please cite: - Tange, O. (2022, January 22). GNU Parallel 20220122 ('20 years'). - Zenodo. https://doi.org/10.5281/zenodo.5893336 + Tange, O. (2022, February 22). GNU Parallel 20220222 ('Donetsk Luhansk'). + Zenodo. https://doi.org/10.5281/zenodo.6213471 Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ole Tange, http://ole.tange.dk and diff --git a/configure b/configure index d1bf1054..cffffaca 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 20220122. +# Generated by GNU Autoconf 2.69 for parallel 20220222. # # Report bugs to . # @@ -579,8 +579,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='parallel' PACKAGE_TARNAME='parallel' -PACKAGE_VERSION='20220122' -PACKAGE_STRING='parallel 20220122' +PACKAGE_VERSION='20220222' +PACKAGE_STRING='parallel 20220222' PACKAGE_BUGREPORT='bug-parallel@gnu.org' PACKAGE_URL='' @@ -1214,7 +1214,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 20220122 to adapt to many kinds of systems. +\`configure' configures parallel 20220222 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1281,7 +1281,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of parallel 20220122:";; + short | recursive ) echo "Configuration of parallel 20220222:";; esac cat <<\_ACEOF @@ -1357,7 +1357,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -parallel configure 20220122 +parallel configure 20220222 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1374,7 +1374,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 20220122, which was +It was created by parallel $as_me 20220222, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2237,7 +2237,7 @@ fi # Define the identity of the package. PACKAGE='parallel' - VERSION='20220122' + VERSION='20220222' cat >>confdefs.h <<_ACEOF @@ -2880,7 +2880,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 20220122, which was +This file was extended by parallel $as_me 20220222, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -2942,7 +2942,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 20220122 +parallel config.status 20220222 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index d5d761f9..7cf22137 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([parallel],[20220122],[bug-parallel@gnu.org]) +AC_INIT([parallel],[20220222],[bug-parallel@gnu.org]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([ diff --git a/doc/haikus b/doc/haikus index 1676c0a3..e6d92d6f 100644 --- a/doc/haikus +++ b/doc/haikus @@ -102,10 +102,6 @@ Quote of the month: --jobs parameters #GiveThanks -- Erin Young @ErinYoun - I also prefer gnu parallel. Mainly because it makes embarrassingly - parallel tasks embarrassingly easy to run on the command line. - -- Vincent D. Warmerdam @fishnets88@twitter - It's not a data migration party until GNU Parallel is involved... involved involved @@ -170,6 +166,10 @@ https://negfeedback.blogspot.com/2020/05/indispensable-command-line-tools.html === Used === + I also prefer gnu parallel. Mainly because it makes embarrassingly + parallel tasks embarrassingly easy to run on the command line. + -- Vincent D. Warmerdam @fishnets88@twitter + I'm going to make GNU parallel my new superpower this year. -- Christian G. Warden @xn@twitter diff --git a/doc/release_new_version b/doc/release_new_version index de887d1e..080e52bf 100644 --- a/doc/release_new_version +++ b/doc/release_new_version @@ -254,33 +254,37 @@ from:tange@gnu.org to:parallel@gnu.org, bug-parallel@gnu.org stable-bcc: Jesse Alama -Subject: GNU Parallel 20220222 ('Ukraine/Mali') released [stable] +Subject: GNU Parallel 20220222 ('Donetsk Luhansk') released -GNU Parallel 20220222 ('<<>>') [stable] has been released. It is available for download at: lbry://@GnuParallel:4 +GNU Parallel 20220222 ('Donetsk Luhansk') has been released. It is available for download at: lbry://@GnuParallel:4 -No new functionality was introduced so this is a good candidate for a stable release. +This release has a major change in the remote code. This makes this release beta quality. Quote of the month: - <<>> - + I also prefer gnu parallel. Mainly because it makes embarrassingly + parallel tasks embarrassingly easy to run on the command line. + -- Vincent D. Warmerdam @fishnets88@twitter + New in this release: * Encoding of remote commands has changed. This limits the length of remote commands to less than half. It also requires $REMOTE_TMPDIR to be writable. * Time functions hh_mm_ss() hhmmss() hh_mm() hhmm() are now available for {= =}. -<<>> +* parallel_options_map.pdf is a map showing which options other options relate to. + +* {uniq} added to --plus to only run jobs with unique values. * Bug fixes and man page updates: Many options now have a 'See also' section. News about GNU Parallel: -https://kim.uni-hohenheim.de/en/96097?tx_ttnews%5Btt_news%5D=53919&cHash=985f4f4ac1a166d180d81f6e9be832a3 -https://blog.csdn.net/qq_38197157/article/details/112596389 -https://www.freelancer.com/projects/linux/gnu-parallel-processing-for-data/?ngsw-bypass=&w=f +* HPC at Noon - GNU Parallel u SLURM srun , 22 February 2022 https://kim.uni-hohenheim.de/en/96097?tx_ttnews%5Btt_news%5D=53919&cHash=985f4f4ac1a166d180d81f6e9be832a3 -<<>> +* linux 命令 -- parallel https://blog.csdn.net/qq_38197157/article/details/112596389 + +* Iterating Over Each Line of ls -l Output https://www.baeldung.com/linux/iterating-ls-l-output Get the book: GNU Parallel 2018 http://www.lulu.com/shop/ole-tange/gnu-parallel-2018/paperback/product-23558902.html @@ -312,13 +316,13 @@ You can install GNU Parallel in just 10 seconds with: $ (wget -O - pi.dk/3 || lynx -source pi.dk/3 || curl pi.dk/3/ || \ fetch -o - http://pi.dk/3 ) > install.sh - $ sha1sum install.sh | grep c82233e7da3166308632ac8c34f850c0 - 12345678 c82233e7 da316630 8632ac8c 34f850c0 - $ md5sum install.sh | grep ae3d7aac5e15cf3dfc87046cfc5918d2 - ae3d7aac 5e15cf3d fc87046c fc5918d2 - $ sha512sum install.sh | grep dfc00d823137271a6d96225cea9e89f533ff6c81f - 9c5198d5 31a3b755 b7910ece 3a42d206 c804694d fc00d823 137271a6 d96225ce - a9e89f53 3ff6c81f f52b298b ef9fb613 2d3f9ccd 0e2c7bd3 c35978b5 79acb5ca + $ sha1sum install.sh | grep 883c667e01eed62f975ad28b6d50e22a + 12345678 883c667e 01eed62f 975ad28b 6d50e22a + $ md5sum install.sh | grep cc21b4c943fd03e93ae1ae49e28573c0 + cc21b4c9 43fd03e9 3ae1ae49 e28573c0 + $ sha512sum install.sh | grep ec113b49a54e705f86d51e784ebced224fdff3f52 + 79945d9d 250b42a4 2067bb00 99da012e c113b49a 54e705f8 6d51e784 ebced224 + fdff3f52 ca588d64 e75f6033 61bd543f d631f592 2f87ceb2 ab034149 6df84a35 $ bash install.sh Watch the intro video on http://www.youtube.com/playlist?list=PL284C9FF2488BC6D1 @@ -360,4 +364,4 @@ O. Tange (2011): GNU SQL - A Command Line Tool for Accessing Different Databases = About GNU Niceload = -GNU niceload slows down a program when the computer load average (or other system activity) is above a certain limit. When the limit is reached the program will be suspended for some time. If the limit is a soft limit the program will be allowed to run for short amounts of time before being suspended again. If the limit is a hard limit the program will only be allowed to run when the system is below the limit. +GNU niceload slows down a program when the computer load average (or other system activity) is above a certain limit. When the limit is reached the program will be suspended for some time. If the limit is a soft limit the program will be allowed to run for short amounts of time before being suspended again. If the limit is a hard limit the program will only be allowed to run when the system is below the limit. \ No newline at end of file diff --git a/packager/obs/home:tange/parallel/.osc/_files b/packager/obs/home:tange/parallel/.osc/_files index cd72a721..7c18031d 100644 --- a/packager/obs/home:tange/parallel/.osc/_files +++ b/packager/obs/home:tange/parallel/.osc/_files @@ -1,7 +1,7 @@ - - - - - - + + + + + + diff --git a/packager/obs/home:tange/parallel/.osc/parallel.spec b/packager/obs/home:tange/parallel/.osc/parallel.spec index a40f40f2..dd6c8f52 100644 --- a/packager/obs/home:tange/parallel/.osc/parallel.spec +++ b/packager/obs/home:tange/parallel/.osc/parallel.spec @@ -1,7 +1,7 @@ Summary: Shell tool for executing jobs in parallel Name: parallel -Version: 20220122 +Version: 20220222 Release: 1.3 License: GPL-3.0-or-later Group: Productivity/File utilities @@ -92,6 +92,7 @@ rm $RPM_BUILD_ROOT%{_docdir}/parcat.pdf rm $RPM_BUILD_ROOT%{_docdir}/parset.pdf rm $RPM_BUILD_ROOT%{_docdir}/parsort.pdf rm $RPM_BUILD_ROOT%{_docdir}/parallel_cheat_bw.pdf +rm $RPM_BUILD_ROOT%{_docdir}/parallel_options_map.pdf rm $RPM_BUILD_ROOT%{_docdir}/parallel.rst rm $RPM_BUILD_ROOT%{_docdir}/env_parallel.rst rm $RPM_BUILD_ROOT%{_docdir}/parallel_tutorial.rst @@ -113,7 +114,7 @@ rm -rf $RPM_BUILD_ROOT /usr/bin/* /usr/share/man/man1/* /usr/share/man/man7/* -%doc README NEWS src/parallel.html src/env_parallel.html src/parallel_tutorial.html src/parallel_design.html src/parallel_alternatives.html src/parallel_book.html src/sem.html src/sql.html src/parcat.html src/parset.html src/parsort.html src/niceload.html src/parallel.texi src/env_parallel.texi src/parallel_tutorial.texi src/parallel_design.texi src/parallel_alternatives.texi src/parallel_book.texi src/niceload.texi src/sem.texi src/sql.texi src/parcat.texi src/parset.texi src/parsort.texi src/parallel.pdf src/env_parallel.pdf src/parallel_tutorial.pdf src/parallel_design.pdf src/parallel_alternatives.pdf src/parallel_book.pdf src/niceload.pdf src/sem.pdf src/sql.pdf src/parcat.pdf src/parset.pdf src/parsort.pdf src/parallel_cheat_bw.pdf src/parallel.rst src/env_parallel.rst src/parallel_tutorial.rst src/parallel_design.rst src/parallel_alternatives.rst src/parallel_book.rst src/niceload.rst src/sem.rst src/sql.rst src/parcat.rst src/parset.rst src/parsort.rst +%doc README NEWS src/parallel.html src/env_parallel.html src/parallel_tutorial.html src/parallel_design.html src/parallel_alternatives.html src/parallel_book.html src/sem.html src/sql.html src/parcat.html src/parset.html src/parsort.html src/niceload.html src/parallel.texi src/env_parallel.texi src/parallel_tutorial.texi src/parallel_design.texi src/parallel_alternatives.texi src/parallel_book.texi src/niceload.texi src/sem.texi src/sql.texi src/parcat.texi src/parset.texi src/parsort.texi src/parallel.pdf src/env_parallel.pdf src/parallel_tutorial.pdf src/parallel_design.pdf src/parallel_alternatives.pdf src/parallel_book.pdf src/niceload.pdf src/sem.pdf src/sql.pdf src/parcat.pdf src/parset.pdf src/parsort.pdf src/parallel_cheat_bw.pdf src/parallel_options_map.pdf src/parallel.rst src/env_parallel.rst src/parallel_tutorial.rst src/parallel_design.rst src/parallel_alternatives.rst src/parallel_book.rst src/niceload.rst src/sem.rst src/sql.rst src/parcat.rst src/parset.rst src/parsort.rst %changelog * Sat Jan 22 2011 Ole Tange diff --git a/src/Makefile.am b/src/Makefile.am index 56953c71..87f3b715 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -345,7 +345,7 @@ parallel_cheat_bw.pdf: parallel_cheat_bw.fodt libreoffice --headless --convert-to pdf parallel_cheat_bw.fodt \ || echo "Warning: libreoffice failed. Using old parallel_cheat_bw.pdf" -parallel_options_map.pdf: parallel.pod +parallel_options_map.pdf: parallel.pod pod2graph ./pod2graph parallel.pod > parallel_options_map.pdf \ || echo "Warning: pod2graph failed. Using old parallel_options_map.pdf" @@ -379,4 +379,4 @@ EXTRA_DIST = parallel sem sql niceload parcat parset parsort \ parset.pod sem.pod parallel.pod env_parallel.pod niceload.pod \ parallel_tutorial.pod parallel_book.pod parallel_design.pod \ parallel_alternatives.pod parallel_cheat_bw.fodt \ - $(DISTCLEANFILES) + pod2graph $(DISTCLEANFILES) diff --git a/src/env_parallel.ash b/src/env_parallel.ash index 6de04cd8..50a79230 100755 --- a/src/env_parallel.ash +++ b/src/env_parallel.ash @@ -385,7 +385,7 @@ _parset_main() { return 255 fi if [ "$_parset_NAME" = "--version" ] ; then - echo "parset 20220123 (GNU parallel `parallel --minversion 1`)" + echo "parset 20220222 (GNU parallel `parallel --minversion 1`)" echo "Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software" echo "Foundation, Inc." echo "License GPLv3+: GNU GPL version 3 or later " diff --git a/src/env_parallel.bash b/src/env_parallel.bash index f4e1fbc5..af4f48cf 100755 --- a/src/env_parallel.bash +++ b/src/env_parallel.bash @@ -385,7 +385,7 @@ _parset_main() { return 255 fi if [ "$_parset_NAME" = "--version" ] ; then - echo "parset 20220123 (GNU parallel `parallel --minversion 1`)" + echo "parset 20220222 (GNU parallel `parallel --minversion 1`)" echo "Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software" echo "Foundation, Inc." echo "License GPLv3+: GNU GPL version 3 or later " diff --git a/src/env_parallel.dash b/src/env_parallel.dash index 9ab35ac5..45308c42 100755 --- a/src/env_parallel.dash +++ b/src/env_parallel.dash @@ -385,7 +385,7 @@ _parset_main() { return 255 fi if [ "$_parset_NAME" = "--version" ] ; then - echo "parset 20220123 (GNU parallel `parallel --minversion 1`)" + echo "parset 20220222 (GNU parallel `parallel --minversion 1`)" echo "Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software" echo "Foundation, Inc." echo "License GPLv3+: GNU GPL version 3 or later " diff --git a/src/env_parallel.ksh b/src/env_parallel.ksh index 2943deae..76e4dc23 100755 --- a/src/env_parallel.ksh +++ b/src/env_parallel.ksh @@ -363,7 +363,7 @@ _parset_main() { return 255 fi if [ "$_parset_NAME" = "--version" ] ; then - echo "parset 20220123 (GNU parallel `parallel --minversion 1`)" + echo "parset 20220222 (GNU parallel `parallel --minversion 1`)" echo "Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software" echo "Foundation, Inc." echo "License GPLv3+: GNU GPL version 3 or later " diff --git a/src/env_parallel.mksh b/src/env_parallel.mksh index 62ae8e0b..e61126f0 100644 --- a/src/env_parallel.mksh +++ b/src/env_parallel.mksh @@ -365,7 +365,7 @@ _parset_main() { return 255 fi if [ "$_parset_NAME" = "--version" ] ; then - echo "parset 20220123 (GNU parallel `parallel --minversion 1`)" + echo "parset 20220222 (GNU parallel `parallel --minversion 1`)" echo "Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software" echo "Foundation, Inc." echo "License GPLv3+: GNU GPL version 3 or later " diff --git a/src/env_parallel.sh b/src/env_parallel.sh index b8e81f3a..28625620 100755 --- a/src/env_parallel.sh +++ b/src/env_parallel.sh @@ -390,7 +390,7 @@ _parset_main() { return 255 fi if [ "$_parset_NAME" = "--version" ] ; then - echo "parset 20220123 (GNU parallel `parallel --minversion 1`)" + echo "parset 20220222 (GNU parallel `parallel --minversion 1`)" echo "Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software" echo "Foundation, Inc." echo "License GPLv3+: GNU GPL version 3 or later " diff --git a/src/env_parallel.zsh b/src/env_parallel.zsh index c1267bd8..4ca66750 100755 --- a/src/env_parallel.zsh +++ b/src/env_parallel.zsh @@ -355,7 +355,7 @@ _parset_main() { return 255 fi if [ "$_parset_NAME" = "--version" ] ; then - echo "parset 20220123 (GNU parallel `parallel --minversion 1`)" + echo "parset 20220222 (GNU parallel `parallel --minversion 1`)" echo "Copyright (C) 2007-2022 Ole Tange, http://ole.tange.dk and Free Software" echo "Foundation, Inc." echo "License GPLv3+: GNU GPL version 3 or later " diff --git a/src/niceload b/src/niceload index 52fa88f5..670eb2af 100755 --- a/src/niceload +++ b/src/niceload @@ -26,7 +26,7 @@ use strict; use Getopt::Long; $Global::progname="niceload"; -$Global::version = 20220122; +$Global::version = 20220222; 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 fae8d35a..587d6bd3 100755 --- a/src/parallel +++ b/src/parallel @@ -2313,7 +2313,7 @@ sub check_invalid_option_combinations() { sub init_globals() { # Defaults: - $Global::version = 20220202; + $Global::version = 20220222; $Global::progname = 'parallel'; $::name = "GNU Parallel"; $Global::infinity = 2**31; @@ -2356,6 +2356,8 @@ sub init_globals() { '{/...}' => 's:.*/::; s:\.[^/.]+\.[^/.]+\.[^/.]+$::', # n choose k = Binomial coefficient '{choose_k}' => 'for $t (2..$#arg){ if($arg[$t-1] ge $arg[$t]) { skip() } }', + # unique values: Skip job if any args are the same + '{uniq}' => 'if(::uniq(@arg) != @arg) { skip(); }', # {##} = number of jobs '{##}' => '1 $_=total_jobs()', # {0%} = 0-padded jobslot @@ -5140,8 +5142,8 @@ sub usage() { "If you use programs that use GNU Parallel to process data for an article in a", "scientific publication, please cite:", "", - " Tange, O. (2022, January 22). GNU Parallel 20220122 ('20 years').", - " Zenodo. https://doi.org/10.5281/zenodo.5893336", + " Tange, O. (2022, February 22). GNU Parallel 20220222 ('Donetsk Luhansk').", + " Zenodo. https://doi.org/10.5281/zenodo.6213471", "", # Before changing these lines, please read # https://www.gnu.org/software/parallel/parallel_design.html#Citation-notice @@ -5173,8 +5175,8 @@ sub citation_notice() { "If you use programs that use GNU Parallel to process data for an article in a", "scientific publication, please cite:", "", - " Tange, O. (2022, January 22). GNU Parallel 20220122 ('20 years').", - " Zenodo. https://doi.org/10.5281/zenodo.5893336", + " Tange, O. (2022, February 22). GNU Parallel 20220222 ('Donetsk Luhansk').", + " Zenodo. https://doi.org/10.5281/zenodo.6213471", "", # Before changing these line, please read # https://www.gnu.org/software/parallel/parallel_design.html#Citation-notice and @@ -5299,20 +5301,20 @@ sub citation() { "If you use programs that use GNU Parallel to process data for an article in a", "scientific publication, please cite:", "", - "\@software{tange_2022_5893336,", + "\@software{tange_2022_6213471,", " author = {Tange, Ole},", - " title = {GNU Parallel 20220122 ('20 years')},", - " month = Jan,", + " title = {GNU Parallel 20220222 ('Donetsk Luhansk')},", + " month = Feb,", " year = 2021,", " 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.5893336},", - " url = {https://doi.org/10.5281/zenodo.5893336}", + " doi = {10.5281/zenodo.6213471},", + " url = {https://doi.org/10.5281/zenodo.6213471}", "}", "", - "(Feel free to use \\nocite{tange_2022_5893336})", + "(Feel free to use \\nocite{tange_2022_6213471})", "", # Before changing these lines, please read # https://www.gnu.org/software/parallel/parallel_design.html#Citation-notice and diff --git a/src/parallel.pod b/src/parallel.pod index e6ab23e2..f783bd59 100644 --- a/src/parallel.pod +++ b/src/parallel.pod @@ -403,7 +403,7 @@ See also: B<--rpl> B<--parens> B<{}> B<{=>I IB<=}> =item B<{=>I IB<=}> -Positional equivalent to B<{=perl expression=}>. +Positional equivalent to B<{=>IB<=}>. To understand positional replacement strings see B<{>IB<}>. @@ -1057,7 +1057,7 @@ but this means output from different commands can get mixed. B<--group> is the default. Can be reversed with B<-u>. -See also: B<--line-buffer> B<--ungroup> +See also: B<--line-buffer> B<--ungroup> B<--tag> =item B<--group-by> I @@ -1567,7 +1567,7 @@ mix. Compare: parallel -j0 --lb 'echo {};sleep {};echo {}' ::: 1 3 2 4 parallel -j0 -k --lb 'echo {};sleep {};echo {}' ::: 1 3 2 4 -See also: B<--group> B<--ungroup> B<--keep-order> +See also: B<--group> B<--ungroup> B<--keep-order> B<--tag> =item B<--link> @@ -1889,6 +1889,8 @@ 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. +B<{uniq}> skips jobs where values from two input sources are the same. + Shorthands for variables: {slot} $PARALLEL_JOBSLOT (see {%}) @@ -1902,7 +1904,7 @@ inspired by bash's parameter expansion: {:-str} str if the value is empty {:num} remove the first num characters - {:num1:num2} characters from num1 to num2 + {:pos:len} substring from position pos length len {#regexp} remove prefix regexp (non-greedy) {##regexp} remove prefix regexp (greedy) {%regexp} remove postfix regexp (non-greedy) @@ -2059,7 +2061,7 @@ redirections and without variable assignments. Most people will not need this. Quoting is disabled by default. -See also: QUOTING I B<--shell-quote> B +See also: QUOTING I B<--shell-quote> B B =item B<--no-run-if-empty> @@ -4117,6 +4119,13 @@ B<{choose_k}> works for any number of input sources: parallel --plus echo {choose_k} ::: A B C D ::: A B C D ::: A B C D +Where B<{choose_k}> does not care about order, B<{uniq}> cares about +order. It simply skips jobs where values from different input sources +are the same: + + parallel --plus echo {uniq} ::: A B C ::: A B C ::: A B C + parallel --plus echo {1uniq}+{2uniq}+{3uniq} ::: A B C ::: A B C ::: A B C + =head2 EXAMPLE: From a to b and b to c diff --git a/src/parsort b/src/parsort index bc60af1e..bf0366e4 100755 --- a/src/parsort +++ b/src/parsort @@ -122,7 +122,7 @@ GetOptions( "help" => \$opt::dummy, ) || exit(255); $Global::progname = ($0 =~ m:(^|/)([^/]+)$:)[1]; -$Global::version = 20220123; +$Global::version = 20220222; if($opt::version) { version(); exit 0; } @Global::sortoptions = grep { ! /^-D$/ } shell_quote(@ARGV_before[0..($#ARGV_before-$#ARGV-1)]); diff --git a/src/pod2graph b/src/pod2graph index 65ad8361..2c07cc44 100755 --- a/src/pod2graph +++ b/src/pod2graph @@ -82,20 +82,19 @@ for(split(/\n\n+/,$pod)) { sub header() { return q[ graph test123 { - graph [splines=true overlap=false;nodesep=2; - ]; + graph [splines=true; overlap=false;]; labelloc="t"; - label="Related map for options for GNU Parallel\nFind which options relate to which";fontsize=33; + label="Related map for options for GNU Parallel\nFind the options you use and learn about the options related to it";fontsize=33; "{}"[margin=0.3;] - "--sshlogin"[margin=0.3] + "--sshlogin"[margin=0.3;] "--pipe"[margin=0.3;] ":::"[margin=0.3;] - "-N"[margin=0.3] + "-X"[margin=0.3;] ]; } -open(GRAPHVIZ,"|-","sfdp -Tpdf") || die; +open(GRAPHVIZ,"|-","tee foo.dot |neato -Gepsilon=.000000001 -Tpdf") || die; print GRAPHVIZ header(), (sort { rand()*3 -1 } @nodelines), "}"; close GRAPHVIZ; diff --git a/src/sql b/src/sql index 70d22194..63078077 100755 --- a/src/sql +++ b/src/sql @@ -600,7 +600,7 @@ $Global::Initfile && unlink $Global::Initfile; exit ($err); sub parse_options { - $Global::version = 20220123; + $Global::version = 20220222; $Global::progname = 'sql'; # This must be done first as this may exec myself diff --git a/testsuite/REQUIREMENTS b/testsuite/REQUIREMENTS index 500f62cf..72561b41 100644 --- a/testsuite/REQUIREMENTS +++ b/testsuite/REQUIREMENTS @@ -42,7 +42,7 @@ install_packages() { # Build Tools build_pkgs="bison libxxhash-dev libzstd-dev liblz4-dev libssl-dev" - build_pkgs="$build_pkgs python3-cmarkgfm" + build_pkgs="$build_pkgs python3-cmarkgfm graphviz" sudo dpkg --add-architecture i386; sudo apt update if $INSTALL $test_pkgs $packaging_pkgs $shebang_pkgs $sql_pkgs \ diff --git a/testsuite/tests-to-run/parallel-local-0.3s.sh b/testsuite/tests-to-run/parallel-local-0.3s.sh index dbb927c3..a7f3cf33 100644 --- a/testsuite/tests-to-run/parallel-local-0.3s.sh +++ b/testsuite/tests-to-run/parallel-local-0.3s.sh @@ -44,6 +44,10 @@ par_plus() { parallel --plus echo {%.z.z} ::: foo.z.z.z echo ${a%%.z*z} parallel --plus echo {%%.z.*z} ::: foo.z.z.z + + parallel -k --plus echo {uniq} ::: A B C ::: A B C ::: A B C + parallel -k --plus echo {1uniq}+{2uniq}+{3uniq} ::: A B C ::: A B C ::: A B C + parallel -k --plus echo {choose_k} ::: A B C D ::: A B C D ::: A B C D } par_env_parallel_pipefail() { diff --git a/testsuite/tests-to-run/parallel-local-30s.sh b/testsuite/tests-to-run/parallel-local-30s.sh index 262b6098..b8d115f2 100755 --- a/testsuite/tests-to-run/parallel-local-30s.sh +++ b/testsuite/tests-to-run/parallel-local-30s.sh @@ -20,8 +20,9 @@ par_bin() { paste <(seq 10) <(seq 10 -1 1) | parallel --pipe --colsep '\t' --bin '2 $_%=2' -j4 wc | sort echo '### Blocks in version 20220122' - echo 10 | ppar --pipe --bin 1 -j100% wc - paste <(seq 10) <(seq 10 -1 1) | parallel --pipe --colsep '\t' --bin 2 wc + echo 10 | parallel --pipe --bin 1 -j100% wc | sort + paste <(seq 10) <(seq 10 -1 1) | + parallel --pipe --colsep '\t' --bin 2 wc | sort } par_shard_a() { @@ -563,7 +564,7 @@ par_keeporder_roundrobin() { } random1G | parallel $1 -j13 --block 1m --pipe --roundrobin 'echo {#} $(md5sum)' | - sort + sort } env_parset a,b,c run_roundrobin ::: -k -k '' diff --git a/testsuite/tests-to-run/parallel-local7.sh b/testsuite/tests-to-run/parallel-local7.sh index 090c3306..e05ae207 100755 --- a/testsuite/tests-to-run/parallel-local7.sh +++ b/testsuite/tests-to-run/parallel-local7.sh @@ -31,18 +31,19 @@ export -f par_tmux cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -vj8 --delay 1 --timeout 100 --retries 1 -k --joblog /tmp/jl-`basename $0` -L1 -r echo '### tmux-1.9' - seq 0000 10 1000 | PARALLEL_TMUX=tmux-1.9 par_tmux - seq 1001 10 2000 | PARALLEL_TMUX=tmux-1.9 par_tmux + seq 510 512 | PARALLEL_TMUX=tmux-1.9 par_tmux + seq 0000 10 510 | PARALLEL_TMUX=tmux-1.9 par_tmux + +echo '### tmux-1.9 fails' + seq 512 10 2000 | PARALLEL_TMUX=tmux-1.9 par_tmux seq 2001 10 3000 | PARALLEL_TMUX=tmux-1.9 par_tmux seq 3001 10 4000 | PARALLEL_TMUX=tmux-1.9 par_tmux - seq 4001 10 4030 | PARALLEL_TMUX=tmux-1.9 par_tmux - -echo '### tmux-1.9 fails' + seq 4001 10 4030 | PARALLEL_TMUX=tmux-1.9 par_tm echo 4036 | PARALLEL_TMUX=tmux-1.9 par_tmux echo 4037 | PARALLEL_TMUX=tmux-1.9 par_tmux echo 4038 | PARALLEL_TMUX=tmux-1.9 par_tmux -echo '### tmux-1.8' +echo '### tmux-1.8 (fails for all in 20220222' seq 1 5 100 | PARALLEL_TMUX=tmux-1.8 par_tmux seq 101 5 200 | PARALLEL_TMUX=tmux-1.8 par_tmux seq 201 5 300 | PARALLEL_TMUX=tmux-1.8 par_tmux diff --git a/testsuite/wanted-results/parallel-local-0.3s b/testsuite/wanted-results/parallel-local-0.3s index 07dcbf8c..49dc22a9 100644 --- a/testsuite/wanted-results/parallel-local-0.3s +++ b/testsuite/wanted-results/parallel-local-0.3s @@ -739,6 +739,22 @@ par_plus foo.z par_plus foo.z par_plus foo par_plus foo +par_plus A B C +par_plus A C B +par_plus B A C +par_plus B C A +par_plus C A B +par_plus C B A +par_plus A+B+C +par_plus A+C+B +par_plus B+A+C +par_plus B+C+A +par_plus C+A+B +par_plus C+B+A +par_plus A B C +par_plus A B D +par_plus A C D +par_plus B C D par_profile ### Test -J profile, -J /dir/profile, -J ./profile par_profile local local par_profile abs abs diff --git a/testsuite/wanted-results/parallel-local-300s b/testsuite/wanted-results/parallel-local-300s index 1d3828d8..beddd14c 100644 --- a/testsuite/wanted-results/parallel-local-300s +++ b/testsuite/wanted-results/parallel-local-300s @@ -224,7 +224,7 @@ par_test_build_and_install ln -s parallel "/tmp/parallel-install/bin"/sem par_test_build_and_install make[0]: Leaving directory '/tmp/parallel-00000000/src' par_test_build_and_install /bin/mkdir -p '/tmp/parallel-install/share/doc/parallel' par_test_build_and_install /bin/install -c -m 644 parallel.html env_parallel.html sem.html sql.html niceload.html parallel_tutorial.html parallel_book.html parallel_design.html parallel_alternatives.html parcat.html parset.html parsort.html parallel.texi env_parallel.texi sem.texi sql.texi niceload.texi parallel_tutorial.texi parallel_book.texi parallel_design.texi parallel_alternatives.texi parcat.texi parset.texi parsort.texi parallel.rst env_parallel.rst sem.rst sql.rst niceload.rst parallel_tutorial.rst parallel_book.rst parallel_design.rst parallel_alternatives.rst parcat.rst parset.rst parsort.rst parallel.pdf env_parallel.pdf sem.pdf sql.pdf '/tmp/parallel-install/share/doc/parallel' -par_test_build_and_install /bin/install -c -m 644 niceload.pdf parallel_tutorial.pdf parallel_book.pdf parallel_design.pdf parallel_alternatives.pdf parcat.pdf parset.pdf parsort.pdf parallel_cheat_bw.pdf '/tmp/parallel-install/share/doc/parallel' +par_test_build_and_install /bin/install -c -m 644 niceload.pdf parallel_tutorial.pdf parallel_book.pdf parallel_design.pdf parallel_alternatives.pdf parcat.pdf parset.pdf parsort.pdf parallel_cheat_bw.pdf parallel_options_map.pdf '/tmp/parallel-install/share/doc/parallel' par_test_build_and_install /bin/mkdir -p '/tmp/parallel-install/share/man/man1' par_test_build_and_install /bin/install -c -m 644 parallel.1 env_parallel.1 sem.1 sql.1 niceload.1 parcat.1 parset.1 parsort.1 '/tmp/parallel-install/share/man/man1' par_test_build_and_install /bin/mkdir -p '/tmp/parallel-install/share/man/man7' @@ -639,7 +639,7 @@ par_test_build_and_install /bin/bash: pod2pdf: command not found par_test_build_and_install Warning: pod2pdf not found. Using old parset.pdf par_test_build_and_install /bin/mkdir -p '/tmp/parallel-install/share/doc/parallel' par_test_build_and_install /bin/install -c -m 644 parallel.html env_parallel.html sem.html sql.html niceload.html parallel_tutorial.html parallel_book.html parallel_design.html parallel_alternatives.html parcat.html parset.html parsort.html parallel.texi env_parallel.texi sem.texi sql.texi niceload.texi parallel_tutorial.texi parallel_book.texi parallel_design.texi parallel_alternatives.texi parcat.texi parset.texi parsort.texi parallel.rst env_parallel.rst sem.rst sql.rst niceload.rst parallel_tutorial.rst parallel_book.rst parallel_design.rst parallel_alternatives.rst parcat.rst parset.rst parsort.rst parallel.pdf env_parallel.pdf sem.pdf sql.pdf '/tmp/parallel-install/share/doc/parallel' -par_test_build_and_install /bin/install -c -m 644 niceload.pdf parallel_tutorial.pdf parallel_book.pdf parallel_design.pdf parallel_alternatives.pdf parcat.pdf parset.pdf parsort.pdf parallel_cheat_bw.pdf '/tmp/parallel-install/share/doc/parallel' +par_test_build_and_install /bin/install -c -m 644 niceload.pdf parallel_tutorial.pdf parallel_book.pdf parallel_design.pdf parallel_alternatives.pdf parcat.pdf parset.pdf parsort.pdf parallel_cheat_bw.pdf parallel_options_map.pdf '/tmp/parallel-install/share/doc/parallel' par_test_build_and_install pod2man --release='00000000' --center='parallel' \ par_test_build_and_install --section=1 "."/parallel.pod > "."/parallel.1n \ par_test_build_and_install && mv "."/parallel.1n "."/parallel.1 \ diff --git a/testsuite/wanted-results/parallel-local-30s b/testsuite/wanted-results/parallel-local-30s index 2adaf324..9daf4271 100644 --- a/testsuite/wanted-results/parallel-local-30s +++ b/testsuite/wanted-results/parallel-local-30s @@ -20,20 +20,20 @@ par_bin 5 10 21 par_bin ### Blocks in version 20220122 par_bin 0 0 0 par_bin 0 0 0 +par_bin 0 0 0 +par_bin 0 0 0 +par_bin 0 0 0 +par_bin 0 0 0 +par_bin 0 0 0 par_bin 1 1 3 -par_bin 0 0 0 -par_bin 0 0 0 -par_bin 0 0 0 -par_bin 0 0 0 -par_bin 0 0 0 +par_bin 1 2 4 +par_bin 1 2 4 +par_bin 1 2 4 par_bin 1 2 4 par_bin 1 2 4 par_bin 1 2 4 par_bin 2 4 9 -par_bin 1 2 4 par_bin 2 4 9 -par_bin 1 2 4 -par_bin 1 2 4 par_exit_code bug #52207: Exit status 0 when child job is killed, even with "now,fail=1" par_exit_code # Ideally the command should return the same par_exit_code # with or without parallel diff --git a/testsuite/wanted-results/parallel-local7 b/testsuite/wanted-results/parallel-local7 index 9d791742..82221dcc 100644 --- a/testsuite/wanted-results/parallel-local7 +++ b/testsuite/wanted-results/parallel-local7 @@ -1,33 +1,33 @@ echo '### tmux-1.9' ### tmux-1.9 - seq 0000 10 1000 | PARALLEL_TMUX=tmux-1.9 par_tmux + seq 510 512 | PARALLEL_TMUX=tmux-1.9 par_tmux See output with: tmux-1.9 -S /tmp/parallel-local7-tmpdir/tmsXXXXX attach 0 - seq 1001 10 2000 | PARALLEL_TMUX=tmux-1.9 par_tmux + seq 0000 10 510 | PARALLEL_TMUX=tmux-1.9 par_tmux +See output with: tmux-1.9 -S /tmp/parallel-local7-tmpdir/tmsXXXXX attach +0 +echo '### tmux-1.9 fails' seq 512 10 2000 | PARALLEL_TMUX=tmux-1.9 par_tmux See output with: tmux-1.9 -S /tmp/parallel-local7-tmpdir/tmsXXXXX attach 0 seq 2001 10 3000 | PARALLEL_TMUX=tmux-1.9 par_tmux -See output with: tmux-1.9 -S /tmp/parallel-local7-tmpdir/tmsXXXXX attach -0 +parallel: Error: Command line too long (2012 >= 523) at input 0: 2001 +255 seq 3001 10 4000 | PARALLEL_TMUX=tmux-1.9 par_tmux -See output with: tmux-1.9 -S /tmp/parallel-local7-tmpdir/tmsXXXXX attach -0 - seq 4001 10 4030 | PARALLEL_TMUX=tmux-1.9 par_tmux -See output with: tmux-1.9 -S /tmp/parallel-local7-tmpdir/tmsXXXXX attach -0 -echo '### tmux-1.9 fails' -### tmux-1.9 fails +parallel: Error: Command line too long (3012 >= 523) at input 0: 3001 +255 + seq 4001 10 4030 | PARALLEL_TMUX=tmux-1.9 par_tm +/usr/bin/bash: par_tm: command not found echo 4036 | PARALLEL_TMUX=tmux-1.9 par_tmux -parallel: Error: Command line too long (4047 >= 4047) at input 0: 4036 +parallel: Error: Command line too long (4047 >= 523) at input 0: 4036 255 echo 4037 | PARALLEL_TMUX=tmux-1.9 par_tmux -parallel: Error: Command line too long (4048 >= 4047) at input 0: 4037 +parallel: Error: Command line too long (4048 >= 523) at input 0: 4037 255 echo 4038 | PARALLEL_TMUX=tmux-1.9 par_tmux -parallel: Error: Command line too long (4049 >= 4047) at input 0: 4038 +parallel: Error: Command line too long (4049 >= 523) at input 0: 4038 255 -echo '### tmux-1.8' -### tmux-1.8 +echo '### tmux-1.8 (fails for all in 20220222' +### tmux-1.8 (fails for all in 20220222 seq 1 5 100 | PARALLEL_TMUX=tmux-1.8 par_tmux parallel: Error: Command line too long (9 >= -1264) at input 0: 1 255 @@ -78,4 +78,4 @@ See output with: tmux-1.9 -S /tmp/parallel-local7-tmpdir/tmsXXXXX attach seq 560 850 | PARALLEL_TMUX=tmux-1.8 stdout parallel --tmux echo '{}{=$_="a"x$_=}' | par_tmux_filter parallel: Error: Command line too long (568 >= -1264) at input 0: 560 seq 560 850 | PARALLEL_TMUX=tmux-1.9 stdout parallel --tmux echo '{}{=$_="a"x$_=}' | par_tmux_filter -See output with: tmux-1.9 -S /tmp/parallel-local7-tmpdir/tmsXXXXX attach +parallel: Error: Command line too long (568 >= 523) at input 0: 560