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 if you want to, otherwise just type “make” immediately”.

Then, modify the file UFconfig/

To use Intel’s compiler, find the section

# Using Intel's icc and ifort compilers:
#   (does not work for mexFunctions unless you add a file)
F77 = ifort
CC = icc
CFLAGS = -O3 -xN -vec_report=0
# 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
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/ 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:

# 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.


One Response

  1. […] public links >> lapack Installing SuiteSparse from scratch using Intel compiler Saved by Zhiliang88 on Tue 14-10-2008 Les librairies BLAS et LAPACK avec ifort Saved by […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: