Thursday, 26 March 2015

Building ATLAS 3.11 on ARM with gcc 4.9

I am in the process of re-running our HPL benchmarks on the ARM boards. The latest version of ATLAS, 3.11.32 has several optimisations for ARM and specifically ARMv8 which I would like to compare to the older and more stable ATLAS 3.10. I also discovered that gcc 4.9.2 makes quite a big difference in the CoreMark benchmark on all of the platforms we have available.

This post is just some quick documentation for myself as well as others as to how to get ATLAS to compile on the Wandboard, Cubieboard A20 and the Applied Micro X-Gene (Mustang).

In all cases I found that the recipe for success is to manually specify the compilers. Of course, setting the CPU frequency governor to performance is also required.

The Tegra-K1 compile doesn't seem to be working yet. I'll post as soon as I'm successful!

On all of the boards the following commands work to set the CPU governors:
sudo su
echo "performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

and on the Tegra-K1 it's required to turn off the power saver core:
echo 0 > /sys/devices/system/cpu/cpu0/cpuquiet/...

When you are done setting up the CPU governors, find out the running frequency and exit the su:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq

Go ahead and create a directory where you would like to download and build ATLAS to. Inside that directory, fetch the latest unstable version of atlas and if required, rename it.

Extract it and head to a build directory:
tar xf ./atlas3.11.32.tar.bz2
mkdir build
cd build

Now the magic happens... The configure command has loads of options but I find that in the unstable (3.11) range, the defaults work well for ARM. It just needs a little help. We have to manually specify the CPU frequency and since I am using gcc-4.9 and gfortran-4.9 I force them. I found that even if you tell the system that gcc and gfortran are the respective -4.9 versions, it doesnt always work.

Go ahead and type the following command to do the configure:
../configure -m <fpu_freq> -C acg gcc-4.9 -C if gfortran-4.9 -D c -DWALL

Everything should work out with no errors. If there are, then you need to delete the contents of the build directory and start again. Try different configure flags.

When the configure is done with no errors simply run
make build
and give it an hour or two!

Tuesday, 3 March 2015

Interview with the SABC

This week our HEP group had a great visit from the SABC. Their crew were filming a piece for the show “Teenagers On a Mission” (Tomz). They were very interested in the 3D printing development that we have been doing for the Mini PC project. We were able to outline the whole 3D printing process and give them quick demonstration using our 3D scanning and printing setup in the lab.

Thomas Wrigley giving his take on 3D printing in South Africa

Tomz, part factual, part fictional with some drama, comedy and science fiction will be broadcast in a fair spread of Xhosa, Sotho, Sepedi, English and Zulu with full subtitles in English”

 Airs every week: Monday 4:00-4:30pm, Tuesday 4:00-4:30pm on SABC 1