SDPA-C installation manual [Copyright (C) 2004 SDPA Project] This file explains how to install the SDPA-C. If you have any trouble about the installation, send us an e-mail (kojima-sdpa+is.titech.ac.jp replaced '+' by '@'). In this manual, we assume that your operating system is "Linux" such as "Fedora Core". The SDPA-C can work on other Unix operating systems as well. The line whose starts with the character '$' indicates a command you should execute. -- index -------------------------------- 1. Install ATLAS 2. Install CLAPACK (C version of LAPACK) 3. Install METIS 4. Install SPOOLES 5. Copy header and library files 6. Install SDPA-C A. Install SDPA-C with CLAPACK without ATLAS ----------------------------------------- ******************************************************* 1. Install ATLAS You can get the details of how to install ATLAS from ATLAS web-site (http://www.netlib.org/atlas/). $ cd $HOME $ mkdir lapack $ cd $HOME/lapack $ wget http://www.netlib.org/atlas/atlas3.6.0.tgz This command downloads the file atlas3.6.0.tgz into this directory. The latest developer version of ATLAS is distributed at http://math-atlas.sourceforge.net/ $ tar xzvf atlas3.6.0.tgz $ cd $HOME/lapack/ATLAS $ make You have to answer some questions about ATLAS. You can use default answers by typing 'Enter' key. But, at the question "Enter Architecture name (ARCH)", we recommend you to answer 'linux' to make things easier. $ make install arch=linux The execution of this command may need some waiting time. ******************************************************* 2. Install CLAPACK You can get the details of how to install CLAPACK from CLAPACK web-site (http://www.netlib.org/clapack/). $ cd $HOME/lapack $ wget http://www.netlib.org/clapack/clapack.tgz This command downloads the file clapack.tgz into this directory. $ tar xzvf clapack.tgz $ cd $HOME/lapack/CLAPACK $ cp INSTALL/make.inc.LINUX make.inc $ make f2clib cblaswrap lapacklib $ make clean ******************************************************* 3. Install METIS You can get the details of how to install METIS from file $HOME/lapack/metis-4.0/INSTALL after you untar the downloaded file below. $ cd $HOME/lapack $ wget http://www-users.cs.umn.edu/~karypis/metis/metis/files/metis-4.0.tar.gz This command downloads the file metis-4.0.tar.gz into this directory $ tar xzvf metis-4.0.tar.gz $ cd $HOME/lapack/metis-4.0 Edit $HOME/lapack/metis-4.0/Makefile.in line 3 :: CC = gcc $ cd $HOME/lapack/metis-4.0/Lib Edit $HOME/lapack/metis-4.0/Lib/rename.h line 413 :: #define log2 ___log2 (Change from __log2 to ___log2 to avoid a conflict with standard library function name.) $ cd $HOME/lapack/metis-4.0 $ make $ make clean ******************************************************* 4. Install SPOOLES You can get the details of how to install Spooles from Spooles web-site (http://www.netlib.org/linalg/spooles/spooles.2.2.html). $ cd $HOME/lapack $ mkdir spooles-2.2 $ cd $HOME/lapack/spooles-2.2 $ wget http://www.netlib.org/linalg/spooles/spooles.2.2.tgz This command downloads the file spooles.2.2.tgz into this directory $ tar xzvf spooles.2.2.tgz Edit $HOME/lapack/spooles-2.2/Make.inc line 15 :: CC = gcc line 31 :: OPTLEVEL = -O3 $ cd $HOME/lapack/spooles-2.2/Lock Edit Lock.h line 9 :: #define THREAD_TYPE TT_NONE $ cd $HOME/lapack/spooles-2.2 $ make lib $ mv spooles.a $HOME/lapack/ $ make clean $ mv $HOME/lapack/spooles.a $HOME/lapack/spooles-2.2/ ******************************************************* 5. Copy header and library files Copy header and library files to link to SDPA-C. $ cd $HOME/lapack $ mkdir include lib $ cp ATLAS/include/cblas.h include/ $ cp ATLAS/include/clapack.h include/clapack.h.atlas $ cp CLAPACK/clapack.h include/clapack.h.clapack $ cp CLAPACK/F2CLIBS/f2c.h include/f2c.h $ cp CLAPACK/BLAS/WRAP/fblaswr.h include/fblaswr.h $ cd $HOME/lapack/include $ cat clapack.h.atlas clapack.h.clapack | sed s/ATLAS_/CBLAS_/g > clapack.h $ /bin/rm -f clapack.h.atlas clapack.h.clapack $ cd $HOME/lapack/lib $ cp $HOME/lapack/ATLAS/lib/linux/*.a . $ mkdir tmp $ cd $HOME/lapack/lib/tmp $ ar x $HOME/lapack/lib/liblapack.a $ cp $HOME/lapack/CLAPACK/lapack_LINUX.a $HOME/lapack/lib/liblapack.a $ ar r $HOME/lapack/lib/liblapack.a *.o $ cd $HOME/lapack/lib $ /bin/rm -rf tmp $ cp $HOME/lapack/CLAPACK/libcblaswr.a . $ cp $HOME/lapack/CLAPACK/F2CLIBS/lib*.a . Edit $HOME/lapack/include/f2c.h line 10 :: typedef int integer; ******************************************************* 6. Install the SDPA-C $ cd $HOME Download sdpa-c.6.2.0.src.tar.gz into this directory. $ tar xzvf sdpa-c.6.2.0.src.tar.gz $ cd $HOME/sdpa-c Edit Makefile line 21 :: LAPACK = $(HOME)/lapack line 22 :: SPOOLES = $(HOME)/lapack line 23 :: METIS = $(HOME)/lapack $ make You will get the following files. sdpa-c :: An executable binary, which solves the SDPs param.sdpa :: A parameter file, which contains 9 parameters to control the SDPA-C. example1.dat-s :: A sample input file in the sparse data format example2.dat-s :: A sample input file in the sparse data format mcp250-1.dat-s :: A sample problem from SDPLIB Makefile :: A makefile to compile source files. Please examine the following commands to check whether the installation has been done successfully. $ ./sdpa-c $ ./sdpa-c example1.dat-s example1.result $ ./sdpa-c example2.dat-s example2.result $ ./sdpa-c mcp250-1.dat-s mcp250-1.result ******************************************************* ******************************************************* A. Install SDPA-C with CLAPACK, without ATLAS You can install SDPA-C using BLAS of CLAPACK, instead of ATLAS. Note that BLAS of CLAPACK is slower than ATLAS. Use the following option only in the case you can not compile ATLAS. A-1. Install CLAPACK You can get the details of how to install CLAPACK from CLAPACK web-site (http://www.netlib.org/clapack/). $ cd $HOME/lapack $ wget http://www.netlib.org/clapack/clapack.tgz This command downloads the file clapack.tgz into this directory. $ tar xzvf clapack.tgz $ cd $HOME/lapack/CLAPACK $ cp INSTALL/make.inc.LINUX make.inc $ cd $HOME/lapack/CLAPACK/F2CLIBS/libF77 $ make libF77.a $ cd $HOME/lapack/CLAPACK $ make blaslib $ cd $HOME/lapack/CLAPACK/SRC $ make $ cd $HOME/lapack/CLAPACK $ make clean ******************************************************* A-2. Copy header and library files Copy header and library files to link to SDPA-C. $ cd $HOME/lapack $ mkdir include lib $ cp CLAPACK/clapack.h include/ $ cp CLAPACK/BLAS/WRAP/*.h include/ $ cd $HOME/lapack/lib $ cp $HOME/lapack/CLAPACK/lapack_LINUX.a liblapack.a $ cp $HOME/lapack/CLAPACK/blas_LINUX.a libblas.a $ cp $HOME/lapack/CLAPACK/F2CLIBS/lib*.a . Edit $HOME/lapack/include/f2c.h line 10 :: typedef int integer; $HOME/lapack/include directory needs to contain blaswrap.h cblas.h clapack.h f2c.h fblaswr.h , and $HOME/lapack/lib directory needs to contain libF77.a libblas.a liblapack.a ******************************************************* A-3. Install the SDPA-C $ cd $HOME Download sdpa-c.6.2.0.src.tar.gz into this directory. $ tar xzvf sdpa-c.6.2.0.src.tar.gz $ cd $HOME/sdpa-c Edit Makefile line 21 :: LAPACK = $(HOME)/lapack line 22 :: SPOOLES = $(HOME)/lapack line 23 :: METIS = $(HOME)/lapack line 28,29 :: LAPACK_LIB = -llapack -lblas -lF77 Edit rsdpa_include.h line 36 :: #define NON_ATLAS_SDPA 1 $ make force You will get the following files. sdpa-c :: An executable binary, which solves the SDPs param.sdpa :: A parameter file, which contains 9 parameters to control the SDPA-C. example1.dat-s :: A sample input file in the sparse data format example2.dat-s :: A sample input file in the sparse data format mcp250-1.dat-s :: A sample problem from SDPLIB Makefile :: A makefile to compile source files. Please examine the following commands to check whether the installation has been done successfully. $ ./sdpa-c $ ./sdpa-c example1.dat-s example1.result $ ./sdpa-c example2.dat-s example2.result $ ./sdpa-c mcp250-1.dat-s mcp250-1.result