[Pkg-scicomp-devel] Bug#571322: [atlas] custom build improvements
Adrian Benson
adrian.m.benson at gmail.com
Thu Feb 25 09:48:45 UTC 2010
Package: atlas
Version: 3.8.3-9
Hi Sylvestre
Sorry about the delay in submitting these.
1. There needs to be a way of incrementing the version for custom builds
otherwise the custom build will be superseded by the generic versions in
the repo. I changed debian/rules:|custom-stamp| and it seems to work.
|
custom-stamp:
rm -f configure-stamp
# Here, the trick is pretty simple:
# * We don't want to build all the optimized version of Atlas.
Just the
# one for the current CPU
# * We override ARCHS by base__
# * Base is the name of the package (libatlas3gf-base)
# * __ is provided to have the right expression
# * the regexp will consider that atlasArch and atlasISA are empty
# therefor, leaving the choice of the optimization to Atlas
# * After that, we fall back to the normal build procedure by
calling
# debian/rules itself (yep, recursively)
# incerment version with a local suffix to prevent custom
package being
# superseded and clobbered by the generic pre-built atlas
packages that
dch -U --local='+custom' "custom build on `uname -a`"
# Remove all the other archs in this case
sed '/AFTER THAT/q' $(CURDIR)/debian/control.in >
$(CURDIR)/debian/control
debian/rules ARCHS=base__ binary
touch $@|
2. Atlas timing needs th cpu clock to be set to the maximum - dynamic
frequency mechanisms
should be disabled. So you need to add 'cpufrequtils' as a build
dependency for custom builds.
There should then be a check using 'cpufreq-info' to make sure the cpu
governer is set to
'performance'. Not much of a makefile programmer, but a bash style test
would be:
|ncpu=$(cpufreq-info | grep "analyzing CPU" -c)
||for (( cpu=0 ; cpu < $ncpu ; cpu++)); do
if [ -z "$(cpufreq-info -p -c $cpu | grep performance)" ]; then
echo "frequency governor on cpu=$cpu is not set to 'performance'
echo "run: 'sudo cpufreq-set -g governor -c cpu#' for each cpu"
echo "aborting atlas build"
exit (1)
| fi
done
Adrian
More information about the Pkg-scicomp-devel
mailing list