SDPB requires
-
Boost C++ Libraries (version 1.54 or later).
System-specific installation instructions are below. Please use the issue tracker if you encounter installation problems. For those with experience packaging software, I'd appreciate help making SDPB easier to install.
(Thanks to Chris Beem for help with these instructions.)
SDPB has been tested on Red Hat Linux. To install,
-
Download Boost and GMP from the links above. Install GMP with the option
--enable-cxx
added to./configure
. Install Boost. -
Edit the
Makefile
to define the variablesGMPINCLUDEDIR
,BOOSTINCLUDEDIR
, andLIBDIR.
EnsureLIBDIR
is in yourLD_LIBRARY_PATH
. -
Type
make
to build thesdpb
executable.
SDPB was included in Debian and is expected to be part of stable releases starting from Debian 10 and Ubuntu 17.04. When using such a release, it is enough to install the package sdpb (and sdpb-doc for documentation).
On Debian 9 one can try to download the package from here and install it manually. The package is not installable on older releases of Debian or Ubuntu due to a mismatch in Boost versions.
(Thanks to Yuji Tachikawa for help setting up SDPB for OS X)
The following instructions have been tested on Mac OS 10.11 El Capitan.
-
Install Xcode command line tools and Homebrew if you haven't.
# for Xcode commad line tools xcode-select --install # for Homebrew ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
-
If you just want to use vanilla
sdpb
from the command line, just dobrew tap yujitach/tap brew install sdpb
-
If you want to develop
sdpb
, you should do the following instead.#install dependencies brew install homebrew/boneyard/clang-omp brew install gmp brew install boost git clone https://github.com/davidsd/sdpb cd sdpb # make using clang-omp CLANG=1 make
(Thanks to Peter Kravchuk for these instructions.)
The following instructions have been tested on Windows 8.1 using Boost 1.59.0, GMP 6.0.0, Cygwin DLL ver. 2.2.1. These are written to be accessible to people with no Unix experience by a person with little Unix experience, so suggestions to improve are appreciated.
Below are the steps to build SDPB executable on your machine. These steps use Cygwin to provide POSIX environment for SDPB and its dependecies. To simplify the process, it is assumed that you do not intend to use Boost or GMP installations for a purpose other than building SDPB. The goal here was not to follow the best practices of Unix, but to make the installation process as quick as possible.
It is not required to have any specific directory structure for the installation. However, to be concrete, it is assumed in the instructions that you have created a directory C:\SDPB
, where you are going to store files related to SDPB. The filenames used in the instructions are suitable for Boost 1.59.0 and GMP 6.0.0a. If you are using newer versions, you will have to use the appropriate file and directory names.
-
Download and install Cygwin from the Cygwin installation webpage. Choose the appropriate version (32-bit or 64-bit) and run the dowloaded executable file (
setup-x86.exe
orsetup-x86_64.exe
). -
Choose
Install from Internet
. -
Choose the installation directory and the directory for storing the downloaded packages.
-
Choose appropriate proxy settings. If you don't know what it is, try
Direct Connection
orUse Internet Explorer Proxy Settings
. -
Choose a download site. Any choice should work.
-
Choose the packages for installation. You will need * All the
Base
packages (choosen by default, no action should be required). *bzip2
andlzip
inArchive
. *gcc-core
,gcc-g++
andmake
underDevel
*m4
underInterpreters
* If in further steps some required tools are found to be missing, they can be installed by re-running this installer. -
Continue and accept any package dependencies.
-
(optional) When the installation is finished, add the
\bin
subdirectory of the Cygwin installation directory to your systemPath
variable. -
Download and build Boost from the Boost website. You should get the Unix variant. Put the downloaded file in
C:\SDPB
. -
Run the Cygwin terminal. Navigate to
C:\SDPB
by typingcd /cygdrive/c/SDPB
and pressing Enter key. Note that the paths are case-sensitive, but the drive letter has to be lowercase.
-
Unpack the Boost archive by typing
tar --bzip2 -xf boost_1_59_0.tar.bz2
-
Navigate to Boost directory and build the required Boost libraries. For this, type
cd boost_1_59_0/ ./bootstrap.sh --with-libraries=filesystem,serialization,program_options,date_time,timer ./b2 stage
Note: Using
stage
target instead ofinstall
can save a lot of time by skipping the copying of Boost header files, which is done more efficiently by Windows methods. -
Dowload and build GMP from the GMP website. Download the latest version, and put the file in
C:\SDPB
. -
In Cygwin terminal, navigate to
C:\SDPB
and unpack the archive. For this, typecd /cygdrive/c/SDPB tar --lzip -xf gmp-6.0.0a.tar.lz
-
Build GMP libraries. For this, type
mkdir installation cd gmp-6.0.0 ./configure --enable-cxx --prefix=/cygdrive/c/SDPB/installation make install
-
Run GMP tests to make sure that everything is in order
make check
-
Collect the header and lib files in one place
-
Move
C:\SDPB\boost_1_59_0\boost
directory intoC:\SDPB\installation\include
(so you will now haveC:\SDPB\installation\include\boost
directory). -
Copy the contents of
C:\SDPB\boost_1_59_0\stage\lib
directory intoC:\SDPB\installation\lib
. -
(optional) Add
C:\SDPB\installation\lib
to your systemPath
variable. -
Download and build SDPB. Obtain the latest SDPB sources from github, for example, by downloading the zip of the repository and unpacking the contents into
C:\SDPB
. As the result you should have the contents of the repository inC:\SDPB\sdpb-master
. -
Use any text-editing software to open
C:\SDPB\sdpb-master\Makefile
* Follow the instructions in the file to locate those instances of the variablesGMPINCLUDEDIR
,BOOSTINCLUDEDIR
andLIBDIR
which should be edited on a Windows system. * Edit the appropriate lines to look as followsGMPINCLUDEDIR = /cygdrive/c/SDPB/installation/include BOOSTINCLUDEDIR = /cygdrive/c/SDPB/installation/include/boost LIBDIR = /cygdrive/c/SDPB/installation/lib
* Save the file and exit
-
In Cygwin terminal, navigate to
C:\SDPB\sdpb-master
and build SDPBcd /cygdrive/c/SDPB/sdpb-master make
After the process finishes, `sdpb.exe` should appear in `C:\SDPB\sdpb-master`
- If you have added all the suggested locations to your system
Path
variable, then you should be able to runsdpb.exe
. If you have not, then you need to either modifyPath
variable or put copies of the.dll
files fromC:\SDPB\installation\lib
and a copy ofcygwin1.dll
from\bin
subdirectory of Cygwin installation into the directory where you would like to keepsdpb.exe
. You then might want to add this directory toPath
variable to be able to access SDPB from Windows Command Line at any time.