SDPA installation manual [Copyright (C) 2004 SDPA Project] This file explains how to install the SDPA. 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 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. Copy header and library files 4. Install SDPA A. Install SDPA 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. Copy header and library files Copy header and library files to link to the SDPA. $ 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; ******************************************************* 4. Install the SDPA $ cd $HOME Download sdpa.6.2.0.src.tar.gz into this directory. $ tar xzvf sdpa.6.2.0.src.tar.gz $ cd $HOME/sdpa Edit Makefile line 22 :: LAPACK = $(HOME)/lapack $ make all You will get the following files. sdpa :: An executable binary, which solves the SDPs param.sdpa :: A parameter file, which contains 9 parameters to control the SDPA. example1.dat, example2.dat :: Sample input files in the dense data format. example1.dat-s :: A sample input file in the sparse data format example1.ini :: An initial point file in the dense data format. example1.ini-s :: An initial point file in the sparse data format libsdpa.a :: A callable library of the SDPA. Makefile :: A makefile to compile source files. example1-1.cpp, example1-2.cpp, example2-1.cpp, example2-2.cpp, example3.cpp, example4.cpp, example5.cpp, example6.cpp :: Sample source files which utilize the callable library. sdpa-lib.hpp, sdpa-lib2.hpp : Header files for utilizing the callable library libsdpa.a. Please examine the following commands to check whether the installation has been done successfully. $ ./sdpa $ ./sdpa example1.dat example1.result $ ./sdpa example1.dat-s example1.result $ ./sdpa example1.dat example1.result example1.ini If you want to compile the example source codes, type $ make examples You will get some executable binaries made from the example source codes. $ ./example1-1.exe $ ./example3.exe ******************************************************* ******************************************************* A. Install SDPA with CLAPACK, without ATLAS You can install SDPA 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 the SDPA. $ 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 $ cd $HOME Download sdpa.6.2.0.src.tar.gz into this directory. $ tar xzvf sdpa.6.2.0.src.tar.gz $ cd $HOME/sdpa Edit Makefile line 22 :: LAPACK = $(HOME)/lapack line 25,26 :: LAPACK_LIB = -llapack -lblas -lF77 Edit rsdpa_include.h line 35 :: #define NON_ATLAS_SDPA 1 $ make force all You will get the following files. sdpa :: An executable binary, which solves the SDPs param.sdpa :: A parameter file, which contains 9 parameters to control the SDPA. example1.dat, example2.dat :: Sample input files in the dense data format. example1.dat-s :: A sample input file in the sparse data format example1.ini :: An initial point file in the dense data format. example1.ini-s :: An initial point file in the sparse data format libsdpa.a :: A callable library of the SDPA. Makefile :: A makefile to compile source files. example1-1.cpp, example1-2.cpp, example2-1.cpp, example2-2.cpp, example3.cpp, example4.cpp, example5.cpp, example6.cpp :: Sample source files for utilizing the callable library. sdpa-lib.hpp, sdpa-lib2.hpp : Header files for utilizing the callable library libsdpa.a. Please examine the following commands to check whether the installation has been done successfully. $ ./sdpa $ ./sdpa example1.dat example1.result $ ./sdpa example1.dat-s example1.result $ ./sdpa example1.dat example1.result example1.ini If you want to compile the example source codes, type $ make examples You will get some executable binaries made from the example source codes. $ ./example1-1.exe $ ./example3.exe