Installing SuiteSparse from scratch using Intel compiler

I need to install Octave using SuiteSparse. I have written a post last time on how to build Suitesparse. But this time the server that I am installing doesn’t have gfortran, but rather it has intel fortran compiler.

Moreover, I would like to use Metis 4.0 within Suitesparse. You can download it from this page.

first copy Metis 4.0 tar source file to SuiteSparse directory, and then untar the archive there. Then cd into metis-4.0 directory and modify the Makefile.in if you want to, otherwise just type “make” immediately”.

Then, modify the file UFconfig/UFconfig.mk

To use Intel’s compiler, find the section

# Using Intel's icc and ifort compilers:
#   (does not work for mexFunctions unless you add a mexopts.sh file)
F77 = ifort
CC = icc
CFLAGS = -O3 -xN -vec_report=0
CFLAGS = -g
# old (broken): CFLAGS = -ansi -O3 -ip -tpp7 -xW -vec_report0

# 64bit:
F77FLAGS = -O -m64
CFLAGS = -O3 -fexceptions -m64
BLAS = -lgoto64 -lfrtbegin -lg2c -lpthread $(XERBLA)
LAPACK = -llapack64

uncomment the options, in the above example, I also use the options for 64-bit. After this, type “make” under the SuiteSparse directory.

Besides that, it turns out that the compilation couldn’t find libgoto64. So I use the one available in the server which is found in
/usr/lib/libgoto_itanium2-64-r0.99.so
you can check yours by typing “locate goto”.
Then I need to change the option in BLAS above, to

BLAS = -lgoto_itanium2-64-r0.9 -lfrtbegin -lg2c -lpthread $(XERBLA)

Another problem occurs when it runs the UMFPACK demo. Checking the output file, it turns out that it couldn’t find the xerbla library. So I changed also the UFconfig/UFconfig.mk file to use the provided libcerbla.a. This is shown below

# The BLAS might not contain xerbla, an error-handling routine for LAPACK and
# the BLAS. Also, the standard xerbla requires the Fortran I/O library, and
# stops the application program if an error occurs. A C version of xerbla
# distributed with this software (UFconfig/xerbla/libcerbla.a) includes a
# Fortran-callable xerbla routine that prints nothing and does not stop the
# application program. This is optional.
XERBLA = ../../UFconfig/xerbla/libcerbla.a

# If you wish to use the XERBLA in LAPACK and/or the BLAS instead,
# use this option:
#XERBLA =

# If you wish to use the Fortran UFconfig/xerbla/xerbla.f instead, use this:
# XERBLA = ../../UFconfig/xerbla/libxerbla.a

so basically I use the C version of Xerbla.

Advertisements

Adobe Acrobat Reader 8.12 takes 100% CPU in Linux Kubuntu Hardy

I am using Kubuntu Hardy, and installed Adobe Reader 8.12. I got this problem that whenever I open pdf from a website using firefox, after a while it will take 100% CPU.

I found that this is a known problem, check this blog.

The current solution is to run Adobe reader, go to “Preferences”. Click the tab “Internet”, and change from “Direct connection to Internet” to “Manual Proxy Configuration”.

I left the field empty, and now if I open Adobe, it no longer takes 100% of my CPU.

GCJ webplugin is not working in Box.net

I have an account in Box.net but I can’t use the java applet to upload the file. It turns out that it is due to the GCJ java webplugin used by my firefox 3. This is the default in Kubuntu Hardy.

In order to enable it, I need to use the Sun Java plugin. To install, just type

%sudo apt-get install sun-java6-plugin

and then you need to switch the java plugin to use the Sun Java plugin. To do that, follow the procedures in this post.

Error “Call to undefined function mysql_pconnect()”

I am not sure what happen, but recently I couldn’t run my Wikindx3, and got this error :

Fatal error: Call to undefined function mysql_pconnect()

It could be due to the update in php Ubuntu package.

What I did to solve this is

sudo apt-get install php5-mysql

Then go to

/etc/php5/apache2/

and edit the file php.ini

find this Dynamic Extension and make sure you have the line “extension=mysql.so”

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
;
extension=mysql.so

It solves my problem. Thanks to this post.

Installing Google Desktop Search in Kubuntu Hardy

Download the .deb file from

http://desktop.google.com/linux/

click to agree and save the file. Then go the folder where you download the file, and right click. Choose “Open With”->”GDebi Package Installer”.

This will install the google desktop, and you will see an applet on your tray icon. You can right click and see the index-> index status

from there you can set the “desktop preference” for your google desktop.

For more detail, you can refer to this post to install Google desktop on Ubuntu.

Strigi search takes/eats up space in Kubuntu Hardy

After I ran Strigi-daemon to index my folders, suddenly KDE gave a warning that my free space is only 4% left. I was quite surprise to see this. I checked and realized that the folder

~/.strigi/clucene

eats a lot of space, 20GB and more.

This is already filed in launchpad, and you can find some thread in Ubuntu forum. I think the solution for now is to uninstall strigi and delete the .strigi folder

sudo apt-get remove strigi-daemon strigi-applet

rm -rf ~/.strigi

If there is a solution to this problem, I will post again ūüôā

Trimming list of OS in Ubuntu/Kubuntu Hardy boot loader (grub)

If you have been upgrading ubuntu/kubuntu for several times, you will notice that the list in the boot loader increases.  By default Kubuntu keeps the previous Linux kernel for you to boot. So when you have upgraded the linux kernel, the old kernels will stay there in the boot loader.

So if you have windows, you will see a list of kernels version and at the end of the list is the other operating system, windows.

If you want to trim the list of OS displayed by the boot loader, this is what you need to do.

First back up the menu.lst file:

% sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.old

Then edit the menu.lst file

%sudo vi /boot/grub/menu.lst

comment those OS you do not want to display in Grub by adding “#” at the beginning of the line.¬† You will find the list of the OS most probably at the end of the file.

Below is what I have in my system. As you can see I comment all except my windows, memtest, and the latest kernel version together with its recovery mode. After reboot, you will see only these list in grub bootloader.

%cat menu.lst file

….

## ## End Default Options ##

title           Ubuntu 8.04, kernel 2.6.24-19-generic
root            (hd0,4)
kernel          /boot/vmlinuz-2.6.24-19-generic root=UUID=xxx ro quiet splash
initrd          /boot/initrd.img-2.6.24-19-generic
quiet

title           Ubuntu 8.04, kernel 2.6.24-19-generic (recovery mode)
root            (hd0,4)
kernel          /boot/vmlinuz-2.6.24-19-generic root=UUID=xxx ro single
initrd          /boot/initrd.img-2.6.24-19-generic

#title          Ubuntu 8.04, kernel 2.6.24-18-generic
#root           (hd0,4)
#kernel         /boot/vmlinuz-2.6.24-18-generic root=UUID=xxx ro quiet splash
#initrd         /boot/initrd.img-2.6.24-18-generic
#quiet

#title          Ubuntu 8.04, kernel 2.6.24-18-generic (recovery mode)
#root           (hd0,4)
#kernel         /boot/vmlinuz-2.6.24-18-generic root=UUID=xxx ro single
#initrd         /boot/initrd.img-2.6.24-18-generic

#title          Ubuntu 8.04, kernel 2.6.24-17-generic
#root           (hd0,4)
#kernel         /boot/vmlinuz-2.6.24-17-generic root=UUID=xxx ro quiet splash
#initrd         /boot/initrd.img-2.6.24-17-generic
#quiet

#title          Ubuntu 8.04, kernel 2.6.24-17-generic (recovery mode)
#root           (hd0,4)
#kernel         /boot/vmlinuz-2.6.24-17-generic root=UUID=xxx ro single
#initrd         /boot/initrd.img-2.6.24-17-generic

#title          Ubuntu 8.04, kernel 2.6.24-16-generic
#root           (hd0,4)
#kernel         /boot/vmlinuz-2.6.24-16-generic root=UUID=xxx ro quiet splash
#initrd         /boot/initrd.img-2.6.24-16-generic
#quiet

#title          Ubuntu 8.04, kernel 2.6.24-16-generic (recovery mode)
#root           (hd0,4)
#kernel         /boot/vmlinuz-2.6.24-16-generic root=UUID=xxx ro single
#initrd         /boot/initrd.img-2.6.24-16-generic

#title          Ubuntu 8.04, kernel 2.6.22-14-generic
#root           (hd0,4)
#kernel         /boot/vmlinuz-2.6.22-14-generic root=UUID=xxx ro quiet splash
#initrd         /boot/initrd.img-2.6.22-14-generic
#quiet

#title          Ubuntu 8.04, kernel 2.6.22-14-generic (recovery mode)
#root           (hd0,4)
#kernel         /boot/vmlinuz-2.6.22-14-generic root=UUID=xxx ro single
#initrd         /boot/initrd.img-2.6.22-14-generic

#title          Ubuntu 8.04, kernel 2.6.20-16-generic
#root           (hd0,4)
#kernel         /boot/vmlinuz-2.6.20-16-generic root=UUID=xxx ro quiet splash
#initrd         /boot/initrd.img-2.6.20-16-generic
#quiet

#title          Ubuntu 8.04, kernel 2.6.20-16-generic (recovery mode)
#root           (hd0,4)
#kernel         /boot/vmlinuz-2.6.20-16-generic root=UUID=xxx ro single
#initrd         /boot/initrd.img-2.6.20-16-generic

#title          Ubuntu 8.04, kernel 2.6.20-15-generic
#root           (hd0,4)
#kernel         /boot/vmlinuz-2.6.20-15-generic root=UUID=xxx ro quiet splash
#initrd         /boot/initrd.img-2.6.20-15-generic
#quiet

#title          Ubuntu 8.04, kernel 2.6.20-15-generic (recovery mode)
#root           (hd0,4)
#kernel         /boot/vmlinuz-2.6.20-15-generic root=UUID=xxx ro single
#initrd         /boot/initrd.img-2.6.20-15-generic

title           Ubuntu 8.04, memtest86+
root            (hd0,4)
kernel          /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title           Other operating systems:
root

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda2
title           Microsoft Windows XP Professional
root            (hd0,1)
savedefault
makeactive
chainloader     +1