[Bug 781992] New: coreutils-8.9-singlethreaded-sort.patch disables OMP_NUM_THREADS
https://bugzilla.novell.com/show_bug.cgi?id=781992 https://bugzilla.novell.com/show_bug.cgi?id=781992#c0 Summary: coreutils-8.9-singlethreaded-sort.patch disables OMP_NUM_THREADS Classification: openSUSE Product: openSUSE 12.2 Version: Final Platform: All OS/Version: openSUSE 12.2 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: froh@suse.com QAContact: qa-bugs@suse.de Found By: --- Blocker: --- Created an attachment (id=506930) --> (http://bugzilla.novell.com/attachment.cgi?id=506930) this is the new version of the patch. User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.57 Safari/537.1 Multithreaded sort had bugs around coreutils 8.9. since then, we disable auto-detection of the number of threads to be used by sort(1), so it runs single threaded all time, except the user explicitely requests mutlithreaded sort. GNU sort(1) allows this in two ways: * provide a --parallel=N command line option * set the OMP_NUM_THREADS environment varible, named in the spirit of openmp.org, but not using their library. our patch to default the number of threads to 1 kept the command line switch alife, but it disabled the environment variable. this has created some chagrin on opensuse-factory@. I've modified the patch like this, to re-enable OMP_NUM_THREADS for sort(1) --- src/sort.c.orig +++ src/sort.c @@ -5288,7 +5288,11 @@ main (int argc, char **argv) { if (!nthreads) { - unsigned long int np = num_processors (NPROC_CURRENT_OVERRIDABLE); + unsigned long int np; + if (getenv("OMP_NUM_THREADS")) + np = num_processors (NPROC_CURRENT_OVERRIDABLE); + else + np = 1; nthreads = MIN (np, DEFAULT_MAX_THREADS); } Reproducible: Always -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=781992 https://bugzilla.novell.com/show_bug.cgi?id=781992#c1 Susanne Oberhauser <froh@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CLOSED Resolution| |FIXED AssignedTo|bnc-team-screening@forge.pr |froh@suse.com |ovo.novell.com | --- Comment #1 from Susanne Oberhauser <froh@suse.com> 2012-09-25 09:37:05 UTC --- this is fixed per the attached patch, and waiting for acceptance as maintenance update. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=781992 https://bugzilla.novell.com/show_bug.cgi?id=781992#c2 --- Comment #2 from Swamp Workflow Management <swamp@suse.de> 2012-10-03 10:09:22 UTC --- openSUSE-RU-2012:1283-1: An update that has one recommended fix can now be installed. Category: recommended (low) Bug References: 781992 CVE References: Sources used: openSUSE 12.2 (src): coreutils-8.16-5.4.1 openSUSE 12.1 (src): coreutils-8.14-3.7.1 openSUSE 11.4 (src): coreutils-8.9-19.1 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com