bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] core-count: A new program to count the number of cpu cores


From: Paolo Bonzini
Subject: Re: [PATCH] core-count: A new program to count the number of cpu cores
Date: Tue, 27 Oct 2009 10:46:51 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20091014 Fedora/3.0-2.8.b4.fc11 Lightning/1.0pre Thunderbird/3.0b4


Some programs, like 'msgmerge' from GNU gettext, already pay
attention to the OMP_NUM_THREADS variable - a convention shared
by all programs that rely on OpenMP. Can you make the 'sort'
program use the same convention?

I am not working on the multi-threaded sort, but if somebody asks I can
make it read OMP_NUM_THREADS.
If is is already used by other GNU programs, then it seems a good idea
to use this value when --threads is not specified on the command line.

I agree. This also implies that no OMP_NUM_THREADS and no --threads _will_ activate threading by default.

Of course this should only apply if its effect is not externally observable; if I have a very small file B and a very large file A, and I can get

    $ md5sum --threads A B
    abcdabcdabcdabcdabcdabcdabcdabcd B
    12341234123412341234123412341234 A

Then the option would be necessary.

Paolo




reply via email to

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