- Notifications
You must be signed in to change notification settings - Fork1
Maintained fork of SDPA-GMP with an Application Binary Interface
License
sdpa-python/sdpa-multiprecision
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
SDPA Multiprecision is a fork of SDPA-GMP [1]. SDPA-GMP is a part of the SDPA [2] [3] [4] family and utilizes theGNU Multiple Precision library to provide a highly accurate SDP solver.
Since SDPA-GMP is not officially maintained, this fork aims to provide the additional functionality available in the main SDPA package, the most important of which is the ability to use the solver as a callable library in other programs. To this end, the buildsystem has been modified to also generate alibsdpa_gmp.a
static library, besides thesdpa_gmp
executable.
The installation process involves building the GMP library followed by building SDPA-GMP, linking it againstlibgmp.a
andlibgmpxx.a
.
Even if you havelibgmp
installed on your system, it's recommended to download and build GMP from the official website to ensure you have the latest version.
On Windows, owing to theautotools
based buildsystem of SDPA-GMP, a POSIX like environment is required to build from source.MSYS2 is recommended.
Download, extract andcd
into GMP source:
wget https://gmplib.org/download/gmp/gmp-6.3.0.tar.bz2tar xf gmp-6.3.0.tar.bz2cd gmp-6.3.0
Run the configure script. Assuming you had GMP extracted on the Desktop:
./configure --prefix=$HOME/Desktop/gmp-6.3.0 --enable-cxx
Build GMP. It's important to runmake check
as well asmake install
. Withoutmake install
, libraries and headers will not be generated.
makemake checkmake install
Clone this repository
git clone https://github.com/sdpa-python/sdpa-multiprecision.gitcd sdpa-multiprecision
On RedHat based Linux distributions, you might need to runyum install glibc-static
before you run the configure script (the static librarieslibc.a
,libm.a
andlibpthread.a
are not present by default).
You will also need to provide the location of GMP libraries and headers to the configure script
./configure --with-gmp-includedir=$HOME/Desktop/gmp-6.3.0/include --with-gmp-libdir=$HOME/Desktop/gmp-6.3.0/libmake
By default,autotools
builds with debugging symbols. If you would like to exclude debugging symbols, please addCFLAGS="-DNDEBUG" CXXFLAGS="-DNDEBUG"
to theconfigure
command.
If you are using MSYS2,make install
will have installed the GMP libraries and headers alongside other MinGW libraries and headers and they will be autodetected.
SDPA Multiprecision also requires the SPOOLES library. SPOOLES is also contained in this repository, and the buildsystem is configured to automatically build it, however, you may encounter problems building SPOOLES yourself on MSYS2. As a workaround, you can install it from theMSYS2 repo instead. While the library will be autodetected, you will have to manually specify the location of the SPOOLES headers.
Assuming you had MSYS2 installed in the default location:
./configure --with-system-spooles --with-spooles-includedir=/c/msys64/mingw64/include/spoolesmake
This will generate thesdpa_gmp
executable as well as thelibsdpa_gmp.a
static library. If you want to use SDPA Multiprecision through theSDPA for Python package, SDPA for Python can now link againstlibsdpa_gmp.a
.
You may use the executable to verify the build was successful. To this end, while still in the build directory, run
./sdpa_gmp example1.dat example1.out
If you seepdOPT
as the status, build was successful. On Windows, you will have to manually ensure thatexample1.dat
line endings areCRLF
instead ofLF
. You can do this conversion using most code editors.
[1] Nakata, M. (2010). A numerical evaluation of highly accurate multiple-precision arithmetic version of semidefinite programming solver: SDPA-GMP, -QD and -DD. 2010IEEE International Symposium on Computer-Aided Control System Design, 29–34. doi:10.1109/CACSD.2010.5612693
[2] Makoto Yamashita, Katsuki Fujisawa and Masakazu Kojima, "Implementation and evaluation of SDPA 6.0 (Semidefinite Programming Algorithm 6.0),"Optimization Methods and Software, vol. 18, no. 4, pp. 491–505, 2003, doi:10.1080/1055678031000118482.
[3] Makoto Yamashita, Katsuki Fujisawa, Kazuhide Nakata, Maho Nakata, Mituhiro Fukuda, Kazuhiro Kobayashi, and Kazushige Goto, "A high-performance software package for semidefinite programs: SDPA 7,"Research Report B-460 Dept. of Mathematical and Computing Science, Tokyo Institute of Technology, Tokyo, Japan, September, 2010.
[4] Makoto Yamashita, Katsuki Fujisawa, Mituhiro Fukuda, Kazuhiro Kobayashi, Kazuhide Nakata and Maho Nakata, “Latest Developments in the SDPA Family for Solving Large-Scale SDPs,” inHandbook on Semidefinite, Conic and Polynomial Optimization, M. F. Anjos and J. B. Lasserre, Eds. Boston, MA: Springer US, 2012, pp. 687–713. doi:10.1007/978-1-4614-0769-0_24.
About
Maintained fork of SDPA-GMP with an Application Binary Interface
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.