diff options
author | Justin Lecher <jlec@gentoo.org> | 2013-10-13 16:39:22 +0200 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2013-10-13 16:39:22 +0200 |
commit | 2fb8661484662862590a72d5f5ac3a4dbf483146 (patch) | |
tree | 1851dd5657190891962714b276b9191835de74b4 /sci-libs/atlas/atlas-3.10.1-r1.ebuild | |
parent | sci-physics/abinit-7.4.2 patched to link libstdc++ with the C++ CUDA objects. (diff) | |
download | sci-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/atlas/atlas-3.10.1-r1.ebuild')
-rw-r--r-- | sci-libs/atlas/atlas-3.10.1-r1.ebuild | 29 |
1 files changed, 9 insertions, 20 deletions
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 } |