-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathINSTALL
261 lines (175 loc) · 10.5 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
Installing SCIP-SDP
=====================
Additional Software
-------------------
For using SCIP-SDP you need an installed and fully working version of SCIP (http://scipopt.de/)
version 8 or higher. Additionally, you should install at least one of the following SDP-Solvers:
DSDP 5.8 (http://www.mcs.anl.gov/hs/software/DSDP/).
MOSEK at least version 8.1 (https://www.mosek.com/)
SDPA 7.4.4 (https://github.com/sdpaninf/SDPA)
See the notes below for comments on the corresponding installation.
The building and installation of SCIP-SDP can be done either via Makefile or via cmake. We first
discuss the makefile option.
Building SCIP-SDP via Makefile
------------------------------
For building via Makefile, you need to set a symbolic link to your SCIP directory in the
lib-subdirectory after unpacking the files, this can for example be done via
mkdir lib
cd lib
ln -s /home/username/scipoptsuite-9.0.0/scip/ scip
cd ..
where /home/username/scipoptsuite-9.0.0/scip is the path to your SCIP directory. Afterwards you can
use "make" to compile the plugin. For SCIP-SDP the makefile option SDPS is mandatory. It defines the
SDP-solver that should be used. You can choose between "dsdp", "msk", "sdpa", and "none". (In the
latter case, you can only use LP-relaxations with additional cutting planes enforcing the positive
semidefiniteness and need to disable SDP-relaxations by setting the relaxing/SDP/solvesds to
false.)
So, for example to compile SCIP-SDP with DSDP, just type
make SDPS=dsdp
in the main directory. Additionally, you can use the same options for the Makefile as you can use
for building SCIP (e.g., make SDPS=sdpa OPT=dbg LPS=cpx), note that a compiled SCIP binary with the
same settings needs to exist in the linked path. You may also create a doxygen-documentation by
calling, e.g., make OPT=dbg SDPS=dsdp doc .
After calling "make" with an SDPS-option other than none, you will be asked for paths to your
installation of the SDP-solver and possibly other libraries. The corresponding settings are
explained in the following for different SDP solvers.
Setting Links for DSDP
----------------------
For DSDP (assuming an installation path of /home/username/DSDP5.8 ) you need to enter
- preparing missing soft-link "lib/include/dsdpinc":
> Enter soft-link target file or directory for "lib/include/dsdpinc" (return if not needed):
> /home/username/DSDP5.8/include/
- preparing missing soft-link "lib/static/libdsdp.a":
> Enter soft-link target file or directory for "lib/static/libdsdp.a" (return if not needed):
> /home/username/DSDP5.8/lib/libdsdp.a
Setting Links for MOSEK
-----------------------
For SDPS=msk the following links need to be set, where we assume that /home/username/mosek/10 is the
path to the MOSEK directory. Please note that the omp and cilk (for MOSEK 8) libraries must be
available in the same directory as the given MOSEK library.
- preparing missing soft-link "lib/include/mosekh":
> Enter soft-link target file or directory for "lib/include/mosekh" (return if not needed):
> /home/username/mosek/10/tools/platform/linux64x86/h/
- preparing missing soft-link "lib/shared/libmosek64.so":
> Enter soft-link target file or directory for "lib/shared/libmosek64.so" (return if not needed):
> /home/username/mosek/10/tools/platform/linux64x86/bin/libmosek64.so
Setting Links for SDPA
----------------------
In case of SDPA you also need to link to Mumps (this should be the same version used to build
SDPA). You do not need to give the link to libsdpa.so if you linked to libsdpa.a. We assume that
SDPA is installed in /home/username/sdpa.7.4.4:
- preparing missing soft-link "lib/include/sdpainc":
> Enter soft-link target file or directory for "lib/include/sdpainc" (return if not needed):
> /home/username/sdpa.7.4.4/include/
- preparing missing soft-link "lib/static/libsdpa.a":
> Enter soft-link target file or directory for "lib/static/libsdpa.a" (return if not needed):
> /home/username/sdpa.7.4.4/lib/libsdpa.a
- preparing missing soft-link "lib/shared/libsdpa.so":
* this soft-link is not necessarily needed since "lib/static/libsdpa.a" already exists - press return to skip
> Enter soft-link target file or directory for "lib/shared/libsdpa.so" (return if not needed):
>
- preparing missing soft-link "lib/include/mumpsinc":
> Enter soft-link target file or directory for "lib/include/mumpsinc" (return if not needed):
> /home/username/sdpa-7.4.4/mumps/build/include/
- preparing missing soft-link "lib/static/libdmumps.a":
> Enter soft-link target file or directory for "lib/static/libdmumps.a" (return if not needed):
> /home/username/sdpa.7.4.4/mumps/build/lib/libdmumps.a
- preparing missing soft-link "lib/static/libmumps_common.a":
> Enter soft-link target file or directory for "lib/static/libmumps_common.a" (return if not needed):
> /home/username/sdpa.7.4.4/mumps/build/lib/libmumps_common.a
- preparing missing soft-link "lib/static/libpord.a":
> Enter soft-link target file or directory for "lib/static/libpord.a" (return if not needed):
> /home/username/sdpa.7.4.4/mumps/build/lib/libpord.a
- preparing missing soft-link "lib/static/libmpiseq.a":
> Enter soft-link target file or directory for "lib/static/libmpiseq.a" (return if not needed):
> /home/username/sdpa.7.4.4/mumps/build/libseq/libmpiseq.a
Testing the Installation
------------------------
After building SCIP-SDP, the success of the installation can now be tested by running a small test
set via make test by typing for example
make SDPS=msk test
where you have to use the same options you included in your make command. If "SDPS=none" the the
tests will automatically use the "lp_approx" settings, but the solution process is rather slow for
many instances in this testset. You can also manually choose such settings as follows: "make
SDPS=none SETTINGS=lp_approx test".
Usage of SCIP-SDP
-----------------
To use SCIP-SDP call
./bin/scipsdp
to open a SCIP shell for solving MISDPs. There you can read a CBF or SDPA-File. For instance, you can use
SCIP-SDP> read instances/example_small.dat-s
followed by
SCIP-SDP> optimize
as in the usual SCIP shell (for more details about the SCIP shell please see the SCIP documentation
and FAQ). Further examples are given in the "instances"-subfolder.
As explained above, if you want to use the LP-based approach, you can set the corresponding
parameter before solving:
SCIP-SDP> read instances/example_small.dat-s
SCIP-SDP> set relaxing SDP solvesds false
SCIP-SDP> optimize
Using DSDP as SDP-solver
------------------------
DSDP is a relatively old, but stable SDP solver. It is currently not developed, but can still be
used with SCIP-SDP. No particular comments apply.
Using MOSEK as SDP-Solver
-------------------------
MOSEK is currently the fastest and most stable SDP-solver interfaced with SCIP-SDP. One can apply for
an academic license on the MOSEK web page, if applicable.
One can determine the number of threads that MOSEK uses via the SCIP-SDP command line: "set relaxing
SDP advanced sdpsolverthreads n". The default value of the parameter is 1, since this is usually
faster. The value -1 would automatically detect and use the number of cores. Note that this will
only parallelize the solution of the SDP-relaxations but not the eigenvalue computations in
SCIP-SDP.
One MacOS platforms, the MOSEK libraries can sometimes not be found when trying to run the
binary. One solution is to add symbolic links to the MOSEK libraries to the "bin"
directory. Alternatively, you can use the "install_name_tool". One example usage is:
install_name_tool -change libmosek64.10.1.dylib @rpath/libmosek64.10.1.dylib bin/scipsd
This lets the SCIP-SDP binary use the rpath to search for the MOSEK library.
Using SDPA as SDP-solver
------------------------
We recommend to use the "LP64" version which uses ordinary sized integers. This will probably
suffice for every instance that can be solved with SCIP-SDP. SDPA will automatically build Mumps and
SCIP-SDP needs to be linked with this version (when linking with a different pre-installed Mumps
version, obviously strange errors can occur).
We recommend to build SDPA with some Lapack installation and run it with only one thread. If you
want to run SDPA in parallel, you should follow the installation instructions of SDPA and set the
threads, e.g., with "export OMP_NUM_THREADS=8". You may need to specify the usage of Openblas by
using the makefile parameter "OPENBLAS=true".
Parallelization using UG
------------------------
In addition to parallelizing the SDP solves, it is also possible to parallelize the branch-and-bound
tree using the UG framework included in the SCIP-optimization-suite. In this case SCIP-SDP needs to
be compiled as a library via, e.g.,
make SDPS=msk libscipsdp
before compiling the MISDP application within UG. For more information see the README file included
in the MISDP application of UG. Please note, that the MISDP application within UG is still a very early
beta version and far from bug free.
Using the Concurrent Mode
-------------------------
One can also run the SDP- and LP-based approaches in parallel on two threads. For this SCIP and
SCIP-SDP need to be compiled with TPI=tny or TPI=omp. Then in the shell one uses:
SCIP-SDP> read <instance>
SCIP-SDP> set load settings concurrent2.set
SCIP-SDP> concurrentopt
It depends on the particular instance whether this approach is faster, since the synchronization of
the two threads is not always perfect.
Building SCIP-SDP via cmake
---------------------------
It is also possible to build SCIP-SDP via cmake. In this case also SCIP must have been built with
cmake.
CMake uses an out-of-source build, i.e., compiled binaries and object files are separated from the
source tree and located in another directory, which you have to create. Usually this directory is
called "build" or whatever you prefer. From within this directory, run "cmake <path/to/SCIPSDP>" to
configure your build, followed by "make" to compile the code according to the current configuration.
You need to set the additional option "-DSDPS={none,msk,dsdp,sdpa}". Additionally, it may be
necessary to give paths to find SCIP and SDP-solver by adding the following strings to the "cmake
..." call.
- SCIP: "-DSCIP_DIR=<path to SCIP build directory)".
- DSDP: "-DDSDP_DIR=<path to DSDP>"
- MOSEK: e.g. "-DMOSEK_DIR=<path to Mosek>/tools/platform/linux64x86"
- SDPA: "-DSDPA_DIR=<path to SDPA> -DMUMPS_DIR=<path to mumps>".
So, for example to build SCIP-SDP via cmake using Mosek the call could be
mkdir build
cd build
cmake .. -DSCIP_DIR=/home/username/scipoptsuite-9.0.0/scip/build/ -DSDPS=msk -DMOSEK_DIR=/home/username/mosek/10/tools/platform/linux64x86/
make