From b73488d761277acb526c7a48a1861801a5ee73d1 Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Tue, 31 Dec 2013 16:28:30 +0100 Subject: [PATCH] parallel: Maybe fixed bug #41038: loadavg_file-r --- NEWS | 2 +- doc/release_new_version | 4 ++-- src/parallel | 14 ++++++-------- testsuite/tests-to-run/parallel-polarhome.sh | 4 ++-- testsuite/wanted-results/parallel-polarhome | 7 +++++++ 5 files changed, 18 insertions(+), 13 deletions(-) diff --git a/NEWS b/NEWS index 8a3354ca..24c6beab 100644 --- a/NEWS +++ b/NEWS @@ -8,7 +8,7 @@ * --keep-order --(n)onall will sort according to the sshlogin. -* Detection number of CPUs on DEC Tru64. +* Detect the number of CPUs on DEC Tru64. * GNU sql: --list-tables for sqlite3. diff --git a/doc/release_new_version b/doc/release_new_version index 4f6498a4..abe37001 100644 --- a/doc/release_new_version +++ b/doc/release_new_version @@ -204,9 +204,9 @@ cc:Sandro Cazzaniga , Ryoichiro Suzuki , Jesse Alama -Subject: GNU Parallel 20131222 (玉兔 Mandela) released +Subject: GNU Parallel 20131222 ('玉兔 Mandela') released -GNU Parallel 20131222 (玉兔 Mandela) has been released. It is +GNU Parallel 20131222 ('玉兔 Mandela') has been released. It is available for download at: http://ftp.gnu.org/gnu/parallel/ New in this release: diff --git a/src/parallel b/src/parallel index 3e15aa52..a9d958ac 100755 --- a/src/parallel +++ b/src/parallel @@ -1,6 +1,6 @@ #!/usr/bin/env perl -# Copyright (C) 2007,2008,2009,2010,2011,2012,2013 Ole Tange and Free Software +# Copyright (C) 2007,2008,2009,2010,2011,2012,2013,2014 Ole Tange and Free Software # Foundation, Inc. # # This program is free software; you can redistribute it and/or modify @@ -625,7 +625,7 @@ sub get_options_from_array { sub parse_options { # Returns: N/A # Defaults: - $Global::version = 20131222; + $Global::version = 20140102; $Global::progname = 'parallel'; $Global::infinity = 2**31; $Global::debug = 0; @@ -2332,7 +2332,7 @@ sub usage { "", "See 'man $Global::progname' for details", "", - "When using GNU Parallel for a publication please cite:", + "When using programs that use GNU Parallel to process data for publication please cite:", "", "O. Tange (2011): GNU Parallel - The Command-Line Power Tool,", ";login: The USENIX Magazine, February 2011:42-47.", @@ -2406,13 +2406,13 @@ sub version { } print join("\n", "GNU $Global::progname $Global::version", - "Copyright (C) 2007,2008,2009,2010,2011,2012,2013 Ole Tange and Free Software Foundation, Inc.", + "Copyright (C) 2007,2008,2009,2010,2011,2012,2013,2014 Ole Tange and Free Software Foundation, Inc.", "License GPLv3+: GNU GPL version 3 or later ", "This is free software: you are free to change and redistribute it.", "GNU $Global::progname comes with no warranty.", "", "Web site: http://www.gnu.org/software/${Global::progname}\n", - "When using GNU Parallel for a publication please cite:\n", + "When using programs that use GNU Parallel to process data for publication please cite:\n", "O. Tange (2011): GNU Parallel - The Command-Line Power Tool, ", ";login: The USENIX Magazine, February 2011:42-47.\n", ); @@ -2905,9 +2905,7 @@ sub loadavg { my $self = shift; # Should we update the loadavg file? my $update_loadavg_file = 0; - if(-r $self->{'loadavg_file'}) { - open(my $load_fh, "<", $self->{'loadavg_file'}) || - ::die_bug("loadavg_file-r: ".$self->{'loadavg_file'}); + if(open(my $load_fh, "<", $self->{'loadavg_file'})) { local $/ = undef; my $load_out = <$load_fh>; close $load_fh; diff --git a/testsuite/tests-to-run/parallel-polarhome.sh b/testsuite/tests-to-run/parallel-polarhome.sh index f9d8d99b..34b049b6 100644 --- a/testsuite/tests-to-run/parallel-polarhome.sh +++ b/testsuite/tests-to-run/parallel-polarhome.sh @@ -2,9 +2,9 @@ P_ALL="vax freebsd solaris openbsd netbsd debian alpha aix redhat hpux ultrix qnx irix tru64 openindiana suse openstep mandriva ubuntu scosysv unixware dragonfly centos miros hurd raspberrypi" P_NOTWORKING="vax alpha openstep" -P_NOTWORKING_YET="ultrix tru64 irix minix raspberrypi" +P_NOTWORKING_YET="ultrix irix minix" -P_WORKING="freebsd solaris openbsd netbsd debian aix redhat hpux qnx openindiana suse mandriva ubuntu scosysv unixware dragonfly centos miros hurd" +P_WORKING="freebsd solaris openbsd netbsd debian aix redhat hpux qnx tru64 openindiana suse mandriva ubuntu scosysv unixware dragonfly centos miros hurd raspberrypi" P="$P_WORKING" POLAR=`parallel -k echo {}.polarhome.com ::: $P` diff --git a/testsuite/wanted-results/parallel-polarhome b/testsuite/wanted-results/parallel-polarhome index 5b617651..b8309cdd 100644 --- a/testsuite/wanted-results/parallel-polarhome +++ b/testsuite/wanted-results/parallel-polarhome @@ -28,6 +28,9 @@ copy_and_test qnx.polarhome.com qnx.polarhome.com ### Run the test on qnx.polarhome.com qnx.polarhome.com Works on qnx.polarhome.com qnx.polarhome.com parallel: Warning: Cannot figure out number of CPU cores. Using 1. +copy_and_test tru64.polarhome.com +tru64.polarhome.com ### Run the test on tru64.polarhome.com +tru64.polarhome.com Works on tru64.polarhome.com copy_and_test openindiana.polarhome.com openindiana.polarhome.com ### Run the test on openindiana.polarhome.com openindiana.polarhome.com Works on openindiana.polarhome.com @@ -59,3 +62,7 @@ miros.polarhome.com Works on miros.polarhome.com copy_and_test hurd.polarhome.com hurd.polarhome.com ### Run the test on hurd.polarhome.com hurd.polarhome.com Works on hurd.polarhome.com +copy_and_test raspberrypi.polarhome.com +raspberrypi.polarhome.com ### Run the test on raspberrypi.polarhome.com +raspberrypi.polarhome.com Works on raspberrypi.polarhome.com +raspberrypi.polarhome.com parallel: Warning: Cannot figure out number of CPU cores. Using 1.