		Installation Guide for SparsePOP

    H. Waki, S. Kim, M. Kojima, M. Muramatsu and H. Sugimoto
			December, 2007

1. Overview

1.1 Two Versions

Two versions of SparsePOP are available in this package:
   (A) MATLAB only version
   (B) MATLAB with C++ version
(A) is always installed, while (B) is optional.

The functionality of the two is idential, but (B) is much faster
than (A) in generating SDP problems, because some of the time
consuming parts are rewritten in C++. We recommend to use (B)
whenever possible, although in many cases (A) is sufficient.

1.2 System Requirements

The following softwares is the minimum requirement:

  i. MATLAB 7 or later.
	-- availabel from Mathworks inc.
  ii. SeDuMi 1.0.4 or later.
	-- available from http://sedumi.mcmaster.ca

Be sure that you have an appropriate version of SeDuMi
for your MATLAB. For example, if you are using
MATLAB R2006b or later, then you need SeDuMi 1.1R3 or later.

If you want to use (B), then you need appropriate C++ compilers,
compatible with MATLAB, to compile the programs.

NOTE: On 64 bit machines (either Linux or Vista), SeDuMi will not
run properly at this point. This is a problem of SeDuMi and
MATLAB, and we hope this will be fixed soon.

2. Quick Installation Guide for MacOSX 10.4.8 or later

If you want to install the C++ version (B), in addition to
MATLAB and SeDuMi, you need Xcode, distributed by Apple.
Be sure that you have an appropriate version of Xcode.
See:
   http://www.mathworks.com/support/tech-notes/1600/1601.html
For example, if you are using MATLAB 7.4 or later,
then you must use:
   Xcode 2.4.1 or later
	--available from http://developer.apple.com/tools/xcode/

  Installation steps:

(NOTE: Skip the step marked with * if C++ version is not needed.)

  2.1 Download SparsePOP from:
	http://www.is.titech.ac.jp/~kojima/SparsePOP

  2.2 Unpack it by either:
	double-clicking the icon, or typing on the Terminal:
	% tar zxvf sparsePOP200.tar.gz

	You will get a folder named SparsePOP200

  2.3 Move the folder to any place you like, say, to
	/Users/smith/matlab/SparsePOP200 (if you are Smith),
	or, if you want to install SparsePOP machine-wide, to
	/Applications/MATLAB74/toolbox/shared/SparsePOP200

  2.4 Invoke MATLAB, and cd to the folder of SparsePOP200.
	>> cd /Users/smith/matlab/SparsePOP200

*2.5 Compile C++ codes from MATLAB window:
	>> compileSparsePOP

  2.6 Set MATLAB-path to SparsePOP200. Specifically,
	Choose: File->Set Path
	Push 'Add with Subfolders...' bottun, and 
	Select the folder SparsePOP200.
	Finally, Save it by pushing 'Save' bottun.

  2.7 Now you are ready to use SparsePOP.
	Test it by typing
	>> sparsePOP('example1.gms');

NOTE: If you want to use MATLAB in the mode matlab -nodisply, 
it is useful to add the path of the directory of SparsePOP in 
your startup.m. If your SparsePOP is installed in 
/Users/matlab/SparsePOP, write the following command in your 
startup.m:

addpath(genpath('/Users/matlab/SparsePOP'));

3. Quick Installation Guide for Linux

If you want to install the C++ version (B), in addition to
MATLAB and SeDuMi, you need gcc compilers, a free software
distributed by GNU. Be sure that you have an appropriate
version of gcc.
See:
   http://www.mathworks.com/support/tech-notes/1600/1601.html
For example, if you are using MATLAB R2007a or later, then
you must have:
	gcc/g++ version 4.1.1 or later, and
	appropriate kernel and glibc.

  Installation steps

(NOTE: Skip the step marked with * if C++ version is not needed.)


  3.1 Download SparsePOP from:
	http://www.is.titech.ac.jp/~kojima/SparsePOP

  3.2 Unpack it by either:
	double-clicking the icon, or typing on the terminal:
	% tar zxvf sparsePOP200.tar.gz

	You will get a directory named SparsePOP200

  3.3 Move the directory to any place you like, say, to
	/home/smith/matlab/SparsePOP200 (if you are Smith),
	or, if you want to install SparsePOP machine-widely, to
	/usr/matlab2007a/toolbox/shared/SparsePOP200

  3.4 Invoke MATLAB, and cd to the directory of SparsePOP200.
	>> cd /Users/smith/matlab/SparsePOP200

*3.5 Compile C++ codes from MATLAB window:
	>> compileSparsePOP

  3.6 Set MATLAB-path to SparsePOP200. Specifically,
	Choose: File->Set Path
	Push 'Add with Subfolders...' bottun, and 
	Select the folder SparsePOP200.
	Finally, Save it by pushing 'Save' bottun.
 
  3.7 Now you are ready to use SparsePOP.
	Test it by typing
	>> sparsePOP('example1.gms');

NOTE 1: On 64 bit Linux, SeDuMi will not run properly at this
point; SparsePOP only produces the SDP relaxation problem and
stops. This is a problem of SeDuMi, and we hope this will
be fixed soon.

NOTE2: If you want to use MATLAB in the mode matlab -nodisply, 
it is useful to add the path of the directory of SparsePOP in 
your startup.m. If your SparsePOP is installed in 
/home/matlab/SparsePOP, write the following command in your 
startup.m:

addpath(genpath('/home/matlab/SparsePOP'));

4. Quick Installation Guide for Windows XP and Vista

If you want to install the C++ version (B), in addition to
MATLAB and SeDuMi, you need an appropriate C++ compilers.
See:
   http://www.mathworks.com/support/tech-notes/1600/1601.html
We have tested it by Microsoft Visual C++ 2005.

  Installation steps:

(NOTE: Skip the step marked with * if C++ version is not needed.)

  4.1 Download SparsePOP from:
	http://www.is.titech.ac.jp/~kojima/SparsePOP

  4.2 Unpack it double-clicking the icon.
You may need an appropriate software for unpacking the
tar.gz file.

	You will get a folder named SparsePOP200

  4.3 Move the folder to, say, C:MATLABSparsePOP200

*4.4 Invoke DOS window, and type:
	> cd C:MATLABSparsePOP200

*4.5 Choose Compiler. In the DOS window, type:
	> mex -setup
	and follow the message to choose a compiler.

  4.6 Invoke MATLAB, and cd to the above folder.
	>> cd C:MATLABSparsePOP200

*4.7 Compile C++ codes from MATLAB window:
	>> compileSparsePOP

  4.8 Set MATLAB-path to SparsePOP200. Specifically,
	Choose: File->Set Path
	Push 'Add with Subfolders...' bottun, and 
	Select the folder SparsePOP200.
	Finally, Save it by pushing 'Save' bottun.

  4.9 Now you are ready to use SparsePOP.
	Test it by typing
	>> sparsePOP('example1.gms');

NOTE: On 64 bit Vista, SeDuMi will not run properly at this
point; SparsePOP only produces the SDP relaxation problem and
stops. This is a problem of SeDuMi, and we hope this will
be fixed soon.
