parallel: OpenBSD CPU detection. Thanks to Michał Markowski.

This commit is contained in:
Ole Tange 2012-12-17 01:07:20 +01:00
parent fd6044b0dc
commit 8eceb1f5b9
2 changed files with 26 additions and 26 deletions

View file

@ -171,43 +171,31 @@ cc:Sandro Cazzaniga <kharec@mandriva.org>,
Ryoichiro Suzuki <ryoichiro.suzuki@gmail.com>, Ryoichiro Suzuki <ryoichiro.suzuki@gmail.com>,
Jesse Alama <jesse.alama@gmail.com> Jesse Alama <jesse.alama@gmail.com>
Subject: GNU Parallel 20121122 ('Barack') released Subject: GNU Parallel 20121222 ('#freeandopen') released
GNU Parallel 20121122 ('Barack') has been released. It is GNU Parallel 20121222 ('#freeandopen') has been released. It is
available for download at: http://ftp.gnu.org/gnu/parallel/ available for download at: http://ftp.gnu.org/gnu/parallel/
New in this release: New in this release:
* niceload --sensor makes it possible to use a program to control if a * --shebang-wrap makes is possible to parallelize scripts by putting
program should be suspended. parallel in the shebang line (the first #! line in scripts).
* GNU Parallel was part of the justification for Nordic Free Software * --delay puts in a delay after starting each job. Useful to avoid
Award 2012 raceconditions and thundering herd problems.
https://fsfe.org/news/2012/news-20121112-01.html
* Dateien schneller packen und konvertieren mit GNU parallel * --results now uses / as separator instead of TAB and thus creates
http://www.linux-community.de/Archiv/Tipp-der-Woche/Dateien-schneller-packen-und-konvertieren-mit-GNU-parallel subdirs.
* Processing images from Lunar Reconnaissance Orbiter Narrow Angle * niceload --sensor allows for negative numbers to signify a lower
Camera http://lunokhod.org/?p=774 number means the limit is lower.
* GNU Parallel is used in types2: Type and Hapax Accumulation Curves * niceload --prg suspend a named program that is already running.
http://www.cs.helsinki.fi/u/josuomel/types2/
* GNU Parallel used in: A Hybrid Factor Analysis and Probabilistic * niceload --pid suspend process id that is already running.
PCA-based system for Dictionary Learning and Encoding for Robust
Speaker Recognition
http://www.superlectures.com/odyssey2012/lecture.php?id=8&lang=en
http://www.cse.iitm.ac.in/~mrsri/ppca.pdf
* Mapreduce avec parallel, cat et une redirection * Convertir des images avec find et imagemagick
http://datacratic.com/site/blog/mapreduce-avec-parallel-cat-et-une-redirection http://roger.b.over-blog.com/article-convertir-des-images-avec-find-et-imagemagick-113416637.html
* GNU Parallel for Large Batches of Small Jobs
https://support.scinet.utoronto.ca/wiki/images/7/7b/Tech-talk-gnu-parallel.pdf
* GNU Parallel used in black belt tip (8:50-10:12)
https://aws.amazon.com/apac/awspodcast/episode20/
* Bug fixes and man page updates. * Bug fixes and man page updates.

View file

@ -2903,6 +2903,8 @@ sub no_of_cores {
$no_of_cores = no_of_cores_gnu_linux(); $no_of_cores = no_of_cores_gnu_linux();
} elsif ($^O eq 'freebsd') { } elsif ($^O eq 'freebsd') {
$no_of_cores = no_of_cores_freebsd(); $no_of_cores = no_of_cores_freebsd();
} elsif ($^O eq 'openbsd') {
$no_of_cores = no_of_cores_openbsd();
} elsif ($^O eq 'solaris') { } elsif ($^O eq 'solaris') {
$no_of_cores = no_of_cores_solaris(); $no_of_cores = no_of_cores_solaris();
} elsif ($^O eq 'aix') { } elsif ($^O eq 'aix') {
@ -2911,6 +2913,7 @@ sub no_of_cores {
$no_of_cores = no_of_cores_darwin(); $no_of_cores = no_of_cores_darwin();
} else { } else {
$no_of_cores = (no_of_cores_freebsd() $no_of_cores = (no_of_cores_freebsd()
|| no_of_cores_openbsd()
|| no_of_cores_darwin() || no_of_cores_darwin()
|| no_of_cores_solaris() || no_of_cores_solaris()
|| no_of_cores_aix() || no_of_cores_aix()
@ -3010,6 +3013,15 @@ sub no_of_cores_freebsd {
return $no_of_cores; return $no_of_cores;
} }
sub no_of_cores_openbsd {
# Returns:
# Number of CPU cores on OpenBSD
# undef if not OpenBSD
my $no_of_cores = `sysctl -n hw.ncpu 2>/dev/null`;
chomp $no_of_cores;
return $no_of_cores;
}
sub no_of_cpus_solaris { sub no_of_cpus_solaris {
# Returns: # Returns:
# Number of physical CPUs on Solaris # Number of physical CPUs on Solaris