aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2013-10-13 16:39:22 +0200
committerJustin Lecher <jlec@gentoo.org>2013-10-13 16:39:22 +0200
commit2fb8661484662862590a72d5f5ac3a4dbf483146 (patch)
tree1851dd5657190891962714b276b9191835de74b4 /sci-libs
parentsci-physics/abinit-7.4.2 patched to link libstdc++ with the C++ CUDA objects. (diff)
downloadsci-2fb8661484662862590a72d5f5ac3a4dbf483146.tar.gz
sci-2fb8661484662862590a72d5f5ac3a4dbf483146.tar.bz2
sci-2fb8661484662862590a72d5f5ac3a4dbf483146.zip
sci-libs/atlas: Set cpu freq governor without sys-power/cpufrequtils, #487882
Package-Manager: portage-2.2.7
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/atlas/ChangeLog4
-rw-r--r--sci-libs/atlas/atlas-3.10.1-r1.ebuild29
-rw-r--r--sci-libs/atlas/metadata.xml10
3 files changed, 18 insertions, 25 deletions
diff --git a/sci-libs/atlas/ChangeLog b/sci-libs/atlas/ChangeLog
index 0ac899947..db1066688 100644
--- a/sci-libs/atlas/ChangeLog
+++ b/sci-libs/atlas/ChangeLog
@@ -2,6 +2,10 @@
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 13 Oct 2013; Justin Lecher <jlec@gentoo.org> atlas-3.10.1-r1.ebuild,
+ metadata.xml:
+ Set cpu freq governor without sys-power/cpufrequtils, #487882
+
22 May 2013; Sébastien Fabbro <bicatali@gentoo.org> -atlas-3.10.1.ebuild,
metadata.xml:
Cleanup
diff --git a/sci-libs/atlas/atlas-3.10.1-r1.ebuild b/sci-libs/atlas/atlas-3.10.1-r1.ebuild
index 52d3f3ff1..e67c852cc 100644
--- a/sci-libs/atlas/atlas-3.10.1-r1.ebuild
+++ b/sci-libs/atlas/atlas-3.10.1-r1.ebuild
@@ -20,31 +20,20 @@ KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE="fortran doc generic lapack static-libs threads"
RDEPEND=""
-DEPEND="${RDEPEND}
- !prefix? ( sys-power/cpufrequtils )"
+DEPEND="${RDEPEND}"
S="${WORKDIR}/ATLAS"
pkg_setup() {
- if [[ -n $(type -P cpufreq-info) ]]; then
- [[ -z $(cpufreq-info -d) ]] && return
- local ncpu=$(LANG=C cpufreq-info | grep -c "analyzing CPU")
- local cpu=0
- while [[ ${cpu} -lt ${ncpu} ]]; do
- if ! $(LANG=C cpufreq-info -p -c ${cpu} | grep -q performance); then
- ewarn "CPU $cpu is not set to performance"
- ewarn "Run cpufreq-set -r -g performance as root"
- die "${PN} needs all cpu set to performance"
+ local _cpufreq
+ for _cpufreq in /sys/devices/system/cpu/cpu*/_cpufreq/scaling_governor; do
+ if [ -f ${_cpufreq} ]; then
+ if grep -q performance ${_cpufreq}; then
+ echo 2> /dev/null performance > ${_cpufreq} || \
+ die "${PN} needs all cpu set to performance"
fi
- cpu=$((cpu + 1))
- done
- else
- ewarn "Please make sure to disable CPU throttling completely"
- ewarn "during the compile of ${PN}. Otherwise, all ${PN}"
- ewarn "generated timings will be completely random and the"
- ewarn "performance of the resulting libraries will be degraded"
- ewarn "considerably."
- fi
+ fi
+ done
use fortran && fortran-2_pkg_setup
}
diff --git a/sci-libs/atlas/metadata.xml b/sci-libs/atlas/metadata.xml
index 2fddb0149..fde6aff3c 100644
--- a/sci-libs/atlas/metadata.xml
+++ b/sci-libs/atlas/metadata.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<herd>sci</herd>
-<longdescription lang='en'>
+ <herd>sci</herd>
+ <longdescription lang="en">
ATLAS is an approach for the automatic generation and optimization of
numerical software. Currently ATLAS supplies optimized versions for the
complete set of linear algebra kernels known as the Basic Linear Algebra
@@ -10,7 +10,7 @@
a subset of the linear algebra routine LAPACK library or the full
LAPACK using the reference LAPACK from Netlib.
</longdescription>
-<use>
- <flag name='generic'>Build atlas assuming a fairly generic architecture (sse2 for x86, core2 for amd64)</flag>
-</use>
+ <use>
+ <flag name="generic">Build atlas assuming a fairly generic architecture (sse2 for x86, core2 for amd64)</flag>
+ </use>
</pkgmetadata>