mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-12-22 20:57:53 +00:00
Bugfix: --eta/--progress with 0 jobs gave division by zero.
Bugfix in Makefile by Piotr Jaroszyński <p dot jaroszynski at gmail dot com>
This commit is contained in:
parent
0541bdf9ce
commit
b26dbadcc0
|
@ -64,8 +64,8 @@
|
|||
'AM_SET_LEADING_DOT' => 1,
|
||||
'AM_SET_DEPDIR' => 1,
|
||||
'_AM_DEPENDENCIES' => 1,
|
||||
'm4_include' => 1,
|
||||
'AM_PROG_INSTALL_SH' => 1,
|
||||
'm4_include' => 1,
|
||||
'_AC_AM_CONFIG_HEADER_HOOK' => 1,
|
||||
'AU_DEFUN' => 1,
|
||||
'AM_MAKE_INCLUDE' => 1
|
||||
|
@ -83,25 +83,25 @@
|
|||
'configure.ac'
|
||||
],
|
||||
{
|
||||
'AM_PROG_F77_C_O' => 1,
|
||||
'_LT_AC_TAGCONFIG' => 1,
|
||||
'AC_INIT' => 1,
|
||||
'AM_PROG_F77_C_O' => 1,
|
||||
'm4_pattern_forbid' => 1,
|
||||
'AC_CANONICAL_TARGET' => 1,
|
||||
'AC_INIT' => 1,
|
||||
'_AM_COND_IF' => 1,
|
||||
'AC_CONFIG_LIBOBJ_DIR' => 1,
|
||||
'AC_CANONICAL_TARGET' => 1,
|
||||
'AC_SUBST' => 1,
|
||||
'AC_CANONICAL_HOST' => 1,
|
||||
'AC_CONFIG_LIBOBJ_DIR' => 1,
|
||||
'AC_FC_SRCEXT' => 1,
|
||||
'AC_CANONICAL_HOST' => 1,
|
||||
'AC_PROG_LIBTOOL' => 1,
|
||||
'AM_INIT_AUTOMAKE' => 1,
|
||||
'AC_CONFIG_SUBDIRS' => 1,
|
||||
'AM_AUTOMAKE_VERSION' => 1,
|
||||
'LT_CONFIG_LTDL_DIR' => 1,
|
||||
'AC_CONFIG_LINKS' => 1,
|
||||
'AC_REQUIRE_AUX_FILE' => 1,
|
||||
'LT_SUPPORTED_TAG' => 1,
|
||||
'AC_CONFIG_LINKS' => 1,
|
||||
'm4_sinclude' => 1,
|
||||
'LT_SUPPORTED_TAG' => 1,
|
||||
'AM_MAINTAINER_MODE' => 1,
|
||||
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
|
||||
'_m4_warn' => 1,
|
||||
|
@ -114,17 +114,17 @@
|
|||
'include' => 1,
|
||||
'AM_GNU_GETTEXT' => 1,
|
||||
'AC_LIBSOURCE' => 1,
|
||||
'AC_CANONICAL_BUILD' => 1,
|
||||
'AM_PROG_FC_C_O' => 1,
|
||||
'AC_CANONICAL_BUILD' => 1,
|
||||
'AC_FC_FREEFORM' => 1,
|
||||
'AH_OUTPUT' => 1,
|
||||
'AC_CONFIG_AUX_DIR' => 1,
|
||||
'_AM_SUBST_NOTMAKE' => 1,
|
||||
'AM_PROG_CC_C_O' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'AC_CONFIG_AUX_DIR' => 1,
|
||||
'sinclude' => 1,
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'AM_PROG_CC_C_O' => 1,
|
||||
'AC_CANONICAL_SYSTEM' => 1,
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'AC_CONFIG_HEADERS' => 1,
|
||||
'AC_DEFINE_TRACE_LITERAL' => 1,
|
||||
'm4_include' => 1,
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
Bugfix: --eta/--progress with 0 jobs gave division by zero.
|
||||
Bugfix in Makefile by Piotr Jaroszyński <p dot jaroszynski at gmail dot com>
|
||||
|
||||
fex syntax for splitting fields
|
||||
http://www.semicomplete.com/projects/fex/
|
||||
sql :foo 'select * from bar' | parallel --fex '|{1,2}' do_stuff {2} {1}
|
||||
|
|
|
@ -98,32 +98,8 @@ download at: http://ftp.gnu.org/gnu/parallel/
|
|||
|
||||
New in this release:
|
||||
|
||||
* Counting semaphore functionality: start a job in the background. If
|
||||
N jobs are already running, wait for one to complete. Examples:
|
||||
sem 'sleep 2; echo foo'; sem 'sleep 1; echo bar'; sem --wait
|
||||
sem -j2 'sleep 2; echo foo'; sem -j2 'sleep 1; echo bar'; sem --wait
|
||||
|
||||
* With --colsep a table can be used as input. Example:
|
||||
cat tab_sep_table | parallel --colsep '\t' echo col1 {1} col2 {2}
|
||||
|
||||
* --trim can remove white space around arguments.
|
||||
|
||||
* --sshloginfile '..' means use ~/.parallel/sshloginfile
|
||||
|
||||
* Zero install package. Thanks to Tim Cuthbertson <tim3d dot junk at
|
||||
gmail dot com>
|
||||
|
||||
* OpenSUSE package. Thanks to Markus Ammer <mkmm at gmx-topmail dot
|
||||
de>
|
||||
|
||||
* NixOS package. Thanks to Ludovic Courtès <ludo at gnu dot org>
|
||||
|
||||
* Web review http://oentend.blogspot.com/2010/08/gnu-parallel.html
|
||||
Thanks to Pavel Nuzhdin <pnzhdin at gmail dot com>
|
||||
|
||||
* Web review http://psung.blogspot.com/2010/08/gnu-parallel.html
|
||||
Thanks to Phil Sung <psung at alum dot mit dot edu>
|
||||
|
||||
* First community generated bugfixes
|
||||
Piotr Jaroszyński <p.jaroszynski@gmail.com>
|
||||
|
||||
= About GNU Parallel =
|
||||
|
||||
|
|
|
@ -453,14 +453,14 @@ sem.1: sem.pod Makefile
|
|||
|
||||
parallel.html: parallel Makefile
|
||||
pod2html $(srcdir)/parallel > $(srcdir)/parallel.html
|
||||
rm $(srcdir)/pod2htm*
|
||||
rm -f $(srcdir)/pod2htm*
|
||||
|
||||
sem.html: sem.pod Makefile
|
||||
pod2html $(srcdir)/sem.pod > $(srcdir)/sem.html
|
||||
rm $(srcdir)/pod2htm*
|
||||
rm -f $(srcdir)/pod2htm*
|
||||
|
||||
sem: parallel
|
||||
ln -s parallel sem
|
||||
ln -fs parallel sem
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
|
|
16
src/parallel
16
src/parallel
|
@ -3458,13 +3458,15 @@ sub progress {
|
|||
$status = $eta .
|
||||
join(" ",map
|
||||
{
|
||||
my $completed = ($Global::host{$_}{'completed'}||0);
|
||||
my $running = $Global::host{$_}{'no_of_running'};
|
||||
my $time = $completed ? (time-$^T)/($completed) : "0";
|
||||
sprintf("%s:%d/%d/%d%%/%.1fs ",
|
||||
$sshlogin{$_}, $running, $completed,
|
||||
($running+$completed)*100
|
||||
/ $Global::total_started, $time);
|
||||
if($Global::total_started) {
|
||||
my $completed = ($Global::host{$_}{'completed'}||0);
|
||||
my $running = $Global::host{$_}{'no_of_running'};
|
||||
my $time = $completed ? (time-$^T)/($completed) : "0";
|
||||
sprintf("%s:%d/%d/%d%%/%.1fs ",
|
||||
$sshlogin{$_}, $running, $completed,
|
||||
($running+$completed)*100
|
||||
/ $Global::total_started, $time);
|
||||
}
|
||||
} @workers);
|
||||
}
|
||||
if(length $status > $termcols) {
|
||||
|
|
|
@ -3,5 +3,11 @@
|
|||
echo '### Test of --eta'
|
||||
seq 1 10 | stdout parallel --eta "sleep 1; echo {}" | wc -l
|
||||
|
||||
echo '### Test of --eta with no jobs'
|
||||
stdout parallel --eta "sleep 1; echo {}" < /dev/null
|
||||
|
||||
echo '### Test of --progress'
|
||||
seq 1 10 | stdout parallel --progress "sleep 1; echo {}" | wc -l
|
||||
|
||||
echo '### Test of --progress with no jobs'
|
||||
stdout parallel --progress "sleep 1; echo {}" < /dev/null
|
||||
|
|
|
@ -1,4 +1,14 @@
|
|||
### Test of --eta
|
||||
16
|
||||
### Test of --eta with no jobs
|
||||
|
||||
Computers / CPU cores / Max jobs to run
|
||||
1:local / - / 9
|
||||
|
||||
### Test of --progress
|
||||
16
|
||||
### Test of --progress with no jobs
|
||||
|
||||
Computers / CPU cores / Max jobs to run
|
||||
1:local / - / 9
|
||||
|
||||
|
|
Loading…
Reference in a new issue