05 May 2012

138. Compile ATLAS blas on debian testing

I first tried the latest stable and gave up due to "ERROR 639 DURING CACHE EDGE DETECTION!!" errors. Hence, I used unstable.

Start here

mkdir /opt/ATLAS
chown ${USER}  /opt/ATLAS
mkdir ~/tmp
cd ~/tmp
 wget http://downloads.sourceforge.net/project/math-atlas/Developer%20%28unstable%29/3.9.72/atlas3.9.72.tar.bz2


tar xvf atlas3.9.72.tar.bz2
cd ATLAS/


Edit ATLAS/Make.top 
change the V on line 6 to lowercase i.e. from
- $(ICC) -V 2>&1  >> bin/INSTALL_LOG/ERROR.LOG
to
- $(ICC) -v 2>&1  >> bin/INSTALL_LOG/ERROR.LOG

mkdir build/
cd build/
sudo apt-get install cpufrequtils

Since I don't like computers overheating I normally throttle my cpu. To unset throttling on a AMD64 (phenom II) six core system, before compile:
/usr/bin/cpufreq-selector -g performance
sudo cp /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

sudo cp /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
sudo cp /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
sudo cp /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
sudo cp /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor /sys/devices/system/cpu/cpu5/cpufreq/scaling_governor

Alternatively, you can disable throttle checking using the -Si cputhrchk 0 configure switch. If you don't, and throttling is on, configure will fail.

OK, continuing with the build, in your build/ directory:

.././configure --prefix=/opt/ATLAS -A AMD64

Before you continue, do
make xprint_enums ; ./xprint_enums
and study the output -- you might find a better ARCH fit than e.g. AMD64.  If so, run the configure command above again. There is a lot of other options which you can configure as well. Obviously, nothing prevents you from experimenting and re-compiling if something goes wrong. You can also run without any -A switch at all.

Continuing:
make
make install
cp lib/lib* /opt/ATLAS/lib

Your libs should be in /opt/ATLAS/lib -- when you compiled something to include the new libs, use
"-L/opt/ATLAS/lib"

137. Setting up Gaussian g09 on debian -- precompiled binaries

Most people would use a precompiled and pre-installed copy of gaussian on their local computational grid. If you do, however, purchase your own copy, or work at an institution with a site license, then you can install gaussian on your local beowulf cluster (or over-powered desktop).

And it's easy. I've presumed that your username is verahill, and your group is verahill.


You need csh
sudo apt-get install csh

Next set up a destination directory
mkdir /opt/gaussian
sudo chown verahill:verahill /opt/gaussian

copy the gaussian binaries to /opt/gaussian/g09 so that you have

/opt/gaussian/g09
|-- basis
|-- bsd
`-- tests
    |-- com
    |-- ia64
    `-- newz

Gaussian wants almost everything to be executable
chmod +x /opt/gaussian/g09/*
chmod +x /opt/gaussian/g09/bsd/*
cd /opt/gaussian/g09
csh bsd/install

Next, edit your ~/.bashrc and add (anywhere)
export g09root=/opt/gaussian export GAUSS_SCRDIR=/scratch . /opt/gaussian/g09/bsd/g09.profile export PATH=$PATH:/opt/gaussian/g09/bsd:/opt/gaussian/g09/local

Source your bashrc to make changes take effect immediately:
source ~/.bashrc

You need to edit the bashrc of anyone wanting to use gaussian

And you're done!

136. Compiling GIMP 2.8 on Debian Wheezy/Testing

EDIT 14/12/2012: To use an ugly approach to running gimp 2.8 on debian stable/squeeze, look here:
http://verahill.blogspot.com.au/2012/12/running-gimp-28-in-chroot-on-debian.html
It ain't pretty...

EDIT 27/05/2012: GIMP 2.8 is now in the debian testing repos.

GIMP 2.8 is out -- and it's got the fabled single-window mode: http://www.phoronix.com/scan.php?page=news_item&px=MTA5NjA

First you need to install babl >=0.1.10, and gegl-0.2 >= 0.2.0,  then you can compile and install GIMP 2.8. The versions of babel and gegl in the debian testing/wheezy repos are too old, so you will need to compile tboth babel and gegl yourself -- luckily it is very easy to do so (see below).

Building with python script support needed a ton of packages (it requires PyGTK which depends on pygobject which depends on glib and gobject-introspection etc.), so here I passed --disable-python during build. It just means you can't script gimp with python. No python.

As always, I only spot what packages are missing on my system. If you find that other packages are missing, let me know in the comment section and I'll expand the post. At a minimum, you will need build-essential

LMDE MINT USERS: it seems like you need to add a single line to your /etc/ld.so.conf file:
/usr/local/lib
Then do
sudo ldconfig 

ldconfig is in the package libc-bin

Both babl and gegl are gimp specific, so not giving install prefixes is probably ok. Just don't try to uninstall the pre-existing versions or gnome will disappear on you. See here http://forums.linuxmint.com/viewtopic.php?f=190&t=101253 for more LMDE discussions. See here http://cloudplasma.co.uk/2012/05/gimp-2-8-on-linux-mint-debian-edition/ for a compile based on this post.

START HERE
0. sudo apt-get install build-essential libatk1.0-dev libfontconfig1-dev libcairo2-dev libgudev-1.0-0 libdbus-1-dev libdbus-glib-1-dev liblcms1-dev libexif-dev libxfixes-dev libgtk2.0-dev python2.7-dev libtiff4-dev libpango1.0-dev

1. babl 0.1.10
wget ftp://ftp.gtk.org/pub/babl/0.1/babl-0.1.10.tar.bz2
tar xvf babl-0.1.10.tar.bz2
cd babl-0.1.10/
./configure
make
sudo make install

2. gegl 0.2.0
sudo apt-get install libglib2.0-dev zlib1g-dev
wget ftp://ftp.gtk.org/pub/gegl/0.2/gegl-0.2.0.tar.bz2
tar xvf gegl-0.2.0.tar.bz2 
cd gegl-0.2.0/
./configure
make
sudo make install

3. gimp 2.8.0
sudo apt-get install intltool
wget ftp://ftp.gimp.org/pub/gimp/v2.8/gimp-2.8.0.tar.bz2
tar xvf gimp-2.8.0.tar.bz2 
cd gimp-2.8.0/
./configure --prefix=/home/me/.gimp --disable-python
make
make install

3. ~/.bashrc
Chuck the following in your ~/.bashrc
alias gimp28='/home/me/.gimp/bin/gimp-2.8'
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

and source it. (source ~/.bashrc)

Start from the terminal using
gimp28

Done!

You can turn on single-window mode, by going to Windows and checking Single-Window Mode.


Edit: posted the how-to above eight hours ago, and already linked to by Debian-facile :-)


Links to this post:
http://forums.linuxmint.com/viewtopic.php?t=101253&f=190
http://cloudplasma.co.uk/2012/05/gimp-2-8-on-linux-mint-debian-edition/
http://linuxmint-fr.org/forum/graphisme/92501-installation-de-gimp-28.html