bug-parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU Parallel Bug Reports A modest patch to support RH Enterprise 4.6


From: Nigel Stewart
Subject: Re: GNU Parallel Bug Reports A modest patch to support RH Enterprise 4.6
Date: Sun, 27 May 2012 12:16:38 -0500

Hi all,

I noticed this patch didn't turn up in the 20120522 .tar.bz,
is a git patch the preferred avenue for this kind of thing?

- Nigel

On Fri, Apr 27, 2012 at 9:58 PM, Nigel Stewart <address@hidden> wrote:
> Hi all,
>
> I came across an issue with GNU parallel on a particularly
> old build host, concerning --number-of-cpus option:
>
> In (our) build log, before and after:
>
> parallel: Cannot figure out number of cpus. Using 1 at /my/bin/parallel line
> 2622.
> :::  parallel info: 1 cpus, 1 cores
> ->
> :::  parallel info: 1 cpus, 1 cores
>
> Which appears to be due to /proc/cpuinfo missing the
> physical id field for this particularly old kernel:
>
> $ cat /proc/cpuinfo
> processor       : 0
> vendor_id       : GenuineIntel
> cpu family      : 6
> model           : 10
> model name      : Intel(R) Xeon(R) CPU           X5550  @ 2.67GHz
> stepping        : 5
> cpu MHz         : 2659.656
> cache size      : 8192 KB
> fpu             : yes
> fpu_exception   : yes
> cpuid level     : 11
> wp              : yes
> flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
> cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss syscall nx rdtscp lm
> pni cx16 popcnt lahf_lm
> bogomips        : 5323.21
> clflush size    : 64
> cache_alignment : 64
> address sizes   : 40 bits physical, 48 bits virtual
> power management:
>
> $ uname -a
> Linux hostname 2.6.9-67.ELsmp #1 SMP Wed Nov 7 13:56:44 EST 2007 x86_64
> x86_64 x86_64 GNU/Linux
>
> So this one-line change resorts to using the number of cores on
> Linux if the number of cpus is undefined, as follows:
>
> diff a/parallel b/parallel
> 2600c2600
> <         $no_of_cpus = no_of_cpus_gnu_linux();
> ---
>>         $no_of_cpus = no_of_cpus_gnu_linux() || no_of_cores_gnu_linux();
>
> Which seems better overall than defaulting to one CPU and
> polluting the log.  I'd be happy to try some other approach
> or solution, on this particular machine, as necessary.
> For your consideration, and thanks for GNU parallel.
>
> - Nigel
>
> -------------
>
> $ ./parallel --version
> GNU parallel 20120422
> Copyright (C) 2007,2008,2009,2010,2011,2012 Ole Tange and Free Software
> Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> GNU parallel comes with no warranty.
>
> Web site: http://www.gnu.org/software/parallel
>
> When using GNU Parallel for a publication please cite:
>
> O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
> ;login: The USENIX Magazine, February 2011:42-47.
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]