Scippy

SCIP

Solving Constraint Integer Programs

INSTALL.md
Go to the documentation of this file.
1 If you want to compile SCIP yourself, it is recommended to download the SCIP Optimization Suite tarball from [scipopt.org](https://scipopt.org/index.php#download) as it contains also the LP solver [SoPlex](https://soplex.zib.de) and the presolver [PaPILO](https://github.com/scipopt/papilo).
2 
3 We provide two different systems to compile the code:
4 - the [CMake](https://scipopt.org/doc/html/md_INSTALL.php#CMAKE) build system (recommended for new users) [(local link)](@ref CMAKE).
5 - the traditional [Makefile](https://scipopt.org/doc/html/md_INSTALL.php#MAKE) system [(local link)](@ref MAKE).
6 
7 Be aware that generated libraries and binaries of both systems might be different and incompatible.
8 For further information please refer to the [online documentation of SCIP](https://scipopt.org/doc/html/INSTALL.php).
9 
10 The easiest way to install SCIP is to use the SCIP Optimization Suite, which contains SCIP, SoPlex, and ZIMPL.
11 For that we refer to the `README.md` file of the SCIP Optimization Suite (in case of the SCIP Optimization Suite there is no need to specify any directories, the compiling process is fully automated).
12 
13 Building SCIP using CMake {#CMAKE}
14 ==================================
15 
16 [CMake](https://cmake.org/) is a build system generator that can create, e.g., Makefiles for UNIX and Mac or Visual Studio project files for Windows.
17 
18 CMake provides an [extensive documentation](https://cmake.org/cmake/help/latest/manual/cmake.1.html) explaining available features and use cases as well as an [FAQ section](https://gitlab.kitware.com/cmake/community/-/wikis/FAQ).
19 It's recommended to use the latest stable CMake version available. `cmake --help` is also a good first step to see available options and usage information.
20 
21 Windows and platform independent build instructions
22 ---------------------------------------------------
23 
24 To build SCIP you may use the CMake GUI to specify the path to SCIP and the desired location for the build.
25 Available options are listed and can be modified to fit your needs.
26 After the configuration step is done, open the generated Visual Studio solution file and compile it.
27 Note that compilation is tested on MSVC version >= 12.
28 
29 Alternatively, you may use the command line to configure and build SCIP by creating a `build` directory and then building the configuration:
30 
31 ```
32 cmake -Bbuild -H. [-DSOPLEX_DIR=/path/to/soplex]
33 cmake --build build --config Release [Debug]
34 ```
35 
36 Command line instructions (Linux, macOS)
37 ----------------------------------------
38 
39 Compiling SCIP directly can be done as follows:
40 
41 ```
42 tar xvzf scip-x.y.z.tgz # unpack the tarball
43 cd scip-x.y.z # change into the directory
44 mkdir build # create a new directory
45 cd build # change directories
46 cmake .. -DCMAKE_INSTALL_PREFIX=<install/dir> [-DSOPLEX_DIR=/path/to/soplex] # configure the build
47 make # start compiling SCIP
48 make check # (recommended) check build
49 make install # (optional) install SCIP executable, library, and headers
50 ```
51 
52 Note: For a full ctest run `ctest` instead of `make check` after compilation.
53 
54 CMake checks for available third-party libraries like GMP or ZLIB and sets up the configuration accordingly.
55 Note that the symmetry codes [Bliss](https://users.aalto.fi/~tjunttil/bliss/) and [Sassy](https://github.com/markusa4/sassy) are shipped with SCIP.
56 
57 Note: Here is a list of apt package requirements for ubuntu or debian users that want to build the entire SCIP Optimization Suite from source tarball:
58 ```
59 apt-get install wget cmake g++ m4 xz-utils libgmp-dev unzip zlib1g-dev libboost-program-options-dev libboost-serialization-dev libboost-regex-dev libboost-iostreams-dev libtbb-dev libreadline-dev pkg-config git liblapack-dev libgsl-dev flex bison libcliquer-dev gfortran file dpkg-dev libopenblas-dev rpm
60 ```
61 Additionally the following dependencies need to be downloaded, compiled and installed:
62  - [Hmetis](http://glaros.dtc.umn.edu/gkhome/metis/hmetis/download)
63  - [Metis](http://glaros.dtc.umn.edu/gkhome/metis/metis/download)
64  - [Ipopt](https://github.com/coin-or/Ipopt/releases) with [Mumps](https://github.com/coin-or-tools/ThirdParty-Mumps/releases)
65  - [Gmp](https://gmplib.org/#DOWNLOAD)
66 During the CMake configuration of the SCIP Optimization Suite the can be specified, see [CMake](https://scipopt.org/doc/html/md_INSTALL.php#CMAKE) [(local link)](@ref CMAKE) .
67 
68 
69 Troubleshooting
70 ---------------
71 
72 If you have a problem with your cmake configuration and just want to build scip with all the available dependencies, the **simplest solution is to activate the `AUTOBUILD` option**:
73 ```
74 cmake .. -DAUTOBUILD=on
75 ```
76 This option activates the automatic search for dependent packages like GMP, IPOPT, PaPILO, Readline, WORHP, ZIMPL, ZLIB, and deactivates the missing ones.
77 
78 If you need a specific package that is not automatically found, you should try setting a hint to the installation with the specified variable.
79 Specific packages can also be disabled individually.
80 
81 **Examples of errors and possible solutions:**
82 
83 Problem:
84 ```
85 -- Finding PAPILO
86 -- Could NOT find PAPILO (missing: PAPILO_DIR)
87 CMake Error at CMakeLists.txt:359 (message):
88  PAPILO not found, try specifying PAPILO_DIR.
89 
90  If you have troubles configuring, you can consider setting AUTOBUILD=ON to
91  try and find optional packages as available.
92 
93 
94 -- Configuring incomplete, errors occurred!
95 ```
96 Solution: add `-DPAPILO_DIR=/path/to/papilo/installation` or disable PaPILO by setting `-DPAPILO=off`.
97 
98 Problem:
99 ```
100 -- Finding ZIMPL
101 -- Could NOT find ZIMPL (missing: ZIMPL_DIR)
102 CMake Error at CMakeLists.txt:533 (message):
103  ZIMPL not found, try specifying ZIMPL_DIR.
104 
105  If you have troubles configuring, you can consider setting AUTOBUILD=ON to
106  try and find optional packages as available.
107 
108 
109 -- Configuring incomplete, errors occurred!
110 ```
111 Solution: add `-DZIMPL_DIR=/path/to/zimpl/installation` or disable ZIMPL by setting `-DZIMPL=off`.
112 
113 Problem:
114 ```
115 -- Finding IPOPT
116 -- Could NOT find IPOPT (missing: IPOPT_LIBRARIES) (Required is at least version "3.12.0")
117 CMake Error at CMakeLists.txt:564 (message):
118  IPOPT not found, try specifying IPOPT_DIR.
119 
120  If you have troubles configuring, you can consider setting AUTOBUILD=ON to
121  try and find optional packages as available.
122 
123 -- Configuring incomplete, errors occurred!
124 ```
125 Solution: add `-DIPOPT_DIR=/path/to/ipopt/installation` or disable IPOPT by setting `-DIPOPT=off`.
126 
127 Problem:
128 ```
129 -- Finding Solver "spx"
130 -- Finding Soplex
131 CMake Error at CMakeLists.txt:375 (find_package):
132  Could not find a package configuration file provided by "SOPLEX" with any
133  of the following names:
134 
135  SOPLEXConfig.cmake
136  soplex-config.cmake
137 
138  Add the installation prefix of "SOPLEX" to CMAKE_PREFIX_PATH or set
139  "SOPLEX_DIR" to a directory containing one of the above files. If "SOPLEX"
140  provides a separate development package or SDK, be sure it has been
141  installed.
142 
143 
144 -- Configuring incomplete, errors occurred!
145 ```
146 Solution: add `-DSOPLEX_DIR=/path/to/soplex/installation` or disable SOPLEX by setting `-DLPS=none` or select a different lp solver you have available by `-DLPS=grb -DGUROBI_DIR=/path/to/gurobi/installation` or `-DLPS=xprs -DXPRESS_DIR=/path/to/xpress/installation` or `-DLPS=msk -DMOSEK_DIR=/path/to/mosek/installation` or `-DLPS=cpx -DCPLEX_DIR=/path/to/cplex/installation` or `-DLPS=glob -DGLOB_DIR=/path/to/glob/installation`
147 
148 Modifying a CMake configuration
149 -------------------------------
150 
151 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.
152 Usually this directory is called `build` or `debug` or whatever you prefer.
153 From within this directory, run `cmake <path/to/SCIP>` to configure your build, followed by `make` to compile the code according to the current configuration (this assumes that you chose Linux Makefiles as CMake Generator).
154 By default, SCIP searches for SoPlex as LP solver.
155 If SoPlex is not installed systemwide, the path to a CMake build directory of SoPlex must be specified (i.e. one that contains "soplex-config.cmake").
156 Alternatively, a different LP solver can be specified with the `LPS` variable.
157 
158 Afterwards, successive calls to `make` are going to recompile modified source code, without requiring another call to `cmake`.
159 The initial configuration step checks your environment for available third-party libraries and packages and sets up the configuration accordingly, e.g., disabling support for GMP if not installed.
160 
161 The generated executable and libraries are put in directories `bin` and `lib` respectively and will simply be named `scip` or `libscip.so`.
162 This is different from the naming convention of the Makefile setup that appended the configuration details like OS and third party dependencies directly to the name of the binary or library.
163 The CMake setup tries to follow the established Linux/UNIX compilation conventions to facilitate the use of the libraries in other applications.
164 The previously generated sub-libraries like `liblpi.so` or `libobjscip.so` are not created by default anymore.
165 They can be built using the respective targets `liblpi`, `libobjscip`, etc.
166 The main library `libscip.so` will contain all SCIP sources and won't have dependencies to the other sub-libraries.
167 
168 There are several options that can be passed to the `cmake <path/to/SCIP>` call to modify how the code is built.
169 For all of these options and parameters you have to use `-D<Parameter_name>=<value>`.
170 Following a list of available options, for the full list run
171 
172 ```
173 cmake </path/to/SCIP/> -LH
174 ```
175 and set them by running `cmake .. -D<option>=<value>`.
176 Options can be chained together or be specified in subsequent calls to cmake.
177 The existing configuration will be updated or extended.
178 e.g., `cmake </path/to/SCIP> -DSOPLEX_DIR=<path/to/SoPlex/build/or/install>`.
179 
180 | CMake option | Available values | Makefile equivalent | Remarks |
181 |------------------------|------------------------------------|----------------------------|--------------------------------------------------------------------|
182 | `AUTOBUILD` | `on`, `off` | -- | automatically find dependencies on availability, ignores individual flags of these packages |
183 | `CMAKE_BUILD_TYPE` | `Release`, `Debug`, ... | `OPT=[opt, dbg]` | |
184 | `GMP` | `on`, `off` | `GMP=[true, false]` | specify `GMP_DIR` if not found automatically |
185 | `IPOPT` | `on`, `off` | `IPOPT=[true,false]` | requires IPOPT version >= 3.12.0; specify `IPOPT_DIR` if not found automatically |
186 | `LAPACK` | `on`, `off` | `LAPACK=[true,false]` | requires Lapack to be installed on the system |
187 | `LPS` | `spx`, `cpx`, `grb`, `xprs`, ... | `LPS=...` | specify `SOPLEX_DIR`, `CPLEX_DIR`, `MOSEK_DIR`, ... if LP solver is not found automatically |
188 | `SYM` | `bliss`, `sbliss`, `none`, ... | `SYM=[bliss, sbliss, none]`| choose symmetry handling |
189 | `WORHP` | `on`, `off` | `WORHP=[true,false]` | should worhp be linked; specify `WORHP_DIR` if not found automatically |
190 | `ZIMPL` | `on`, `off` | `ZIMPL=[true, false]` | specify `ZIMPL_DIR` if not found automatically |
191 | `AMPL` | `on`, `off` | `AMPL=[true, false]` | |
192 | `READLINE` | `on`, `off` | `READLINE=[true, false]` | |
193 | `..._DIR` | `<custom/path/to/.../package>` | -- | e.g. `IPOPT_DIR`, `CPLEX_DIR`, `WORHP_DIR`, `Readline_DIR` ... |
194 | `BOOST_ROOT` | `<custom/path/to/.../boost>` | -- | hint for location of boost |
195 | `CMAKE_INSTALL_PREFIX` | `<path>` | `INSTALLDIR=<path>` | |
196 | `SHARED` | `on`, `off` | `SHARED=[true, false]` | |
197 | `CXXONLY` | `on`, `off` | -- | use a C++ compiler for all source files |
198 | `COVERAGE` | `on`, `off` | -- | use with gcc, lcov, gcov in **debug** mode |
199 | `COVERAGE_CTEST_ARGS` | ctest argument string | -- | see `ctest --help` for arguments |
200 | `DEBUGSOL` | `on`, `off` | `DEBUGSOL=[true,false]` | specify a debugging solution by setting the "misc/debugsol" parameter of SCIP |
201 | `LPSCHECK` | `on`, `off` | `LPSCHECK=[true,false]` | double check SoPlex results with CPLEX |
202 | `NOBLKMEM` | `on`, `off` | `NOBLKMEM=[true,false]` | |
203 | `NOBUFMEM` | `on`, `off` | `NOBUFMEM=[true,false]` | |
204 | `NOBLKBUFMEM` | `on`, `off` | `NOBLKBUFMEM=[true,false]` | |
205 | `MT` | `on`, `off` | | use static runtime libraries for Visual Studio compiler on Windows |
206 | `THREADSAFE` | `on`, `off` | `THREADSAFE=[true,false]` | thread safe compilation |
207 | `SANITIZE_...` | `on`, `off` | -- | enable sanitizer in debug mode if available |
208 | `TPI` | `tny`, `omp`, `none` | `TPI=[tny,omp,none]` | enable task processing interface required for concurrent solver |
209 
210 Parameters can be set all at once or in subsequent calls to `cmake` - extending or modifying the existing configuration.
211 
212 Testing with CTest
213 ------------------
214 
215 There is an extensive test suite written for [CTest]("https://cmake.org/cmake/help/latest/manual/ctest.1.html)
216 that may take a while to complete.
217 To perform a quick test to see whether the compilation was really successful you may run `make check`.
218 To see all available tests, run
219 
220 ```
221 ctest -N
222 ```
223 
224 and to perform a memory check, run
225 
226 ```
227 ctest -T MemCheck
228 ```
229 
230 If [Criterion](https://criterion.readthedocs.io/en/master/) is installed (set custom path with `-DCRITERION_DIR=<path>`) the target `unittests` can be used to compile and run the available unit tests.
231 
232 A coverage report for the entire test suite can be generated.
233 This requires a modification of the compilation process.
234 Two variables govern the report generation, `COVERAGE` and `COVERAGE_CTEST_ARGS`.
235 It is recommended to use the Debug build type.
236 
237 ```
238 cmake </path/to/SCIP> -DCOVERAGE=on -DCOVERAGE_CTEST_ARGS="-R MIP -E stein -j4" -DCMAKE_BUILD_TYPE=Debug
239 ```
240 
241 In this example, coverage is enabled in combination with the build type Debug.
242 In addition, only the coverage for tests with "MIP" in the name are run, excluding those that have "stein" in the name.
243 The tests are performed in parallel using 4 cores.
244 
245 Use the `coverage` target, e.g., `make coverage`, to build the coverage report.
246 The generated report can be found under "coverage/index.html".
247 
248 Additional targets
249 ------------------
250 
251 There are several further targets available, which can be listed using `make help`.
252 For instance, there are some examples that can be built with `make examples` or by specifying a certain one: `make <example-name>`.
253 For detailed instructions see the [installation instructions for applications and examples](https://scipopt.org/doc/html/INSTALL_APPLICATIONS_EXAMPLES.php) [(local link)](@ref INSTALL_APPLICATIONS_EXAMPLES).
254 
255 | CMake target | Description | Requirements |
256 |-----------------|-------------------------------------------------------|---------------------------------------|
257 | scip | build SCIP executable | |
258 | applications | build executables for all applications | |
259 | examples | build executables for all examples | |
260 | unittests | build unit tests | the Criterion package |
261 | all_executables | build all of the above | |
262 | libscip | build the SCIP library | |
263 | install | install SCIP | |
264 | coverage | run the test suite and create a coverage report | build flag `-DCOVERAGE=on` |
265 | liblpi | build the LPI library | |
266 | libobjscip | build the ObjSCIP library for the C++ wrapper classes | |
267 
268 
269 Building SCIP using the Makefile system {#MAKE}
270 ===============================================
271 
272 For Linux and Mac, reading the section "Brief installation description" below should usually be enough.
273 If this is not the case, you can find the "Detailed installation description" below as well as some examples.
274 
275 We recommend using GCC version 4.8 or later.
276 
277 Brief installation description
278 ------------------------------
279 
280 The easiest way to install SCIP is to use the SCIP Optimization Suite which contains SCIP, SoPlex, and ZIMPL.
281 For that we refer to the `README.md` file of the SCIP Optimization Suite (main advantage: there is no need
282 to specify any directories, the compiling process is fully automated).
283 
284 Compiling SCIP directly can be done as follows:
285 
286 ```
287 tar xvzf scip-x.y.z.tgz # unpack the tarball
288 cd scip-x.y.z # change into the directory
289 make # start compiling SCIP
290 make test # (recommended) check your SCIP installation
291 make install INSTALLDIR=/path/to/install/dir # (optional) install the header, libraries, and binary
292 ```
293 
294 On your first compilation you will be asked for some soft-link targets, depending on the LP solver you want to use.
295 Usually, SCIP needs the following information
296  a. the directory where the include files of the LP solver are located
297  b. the library file(s) `lib*.a` or/and `lib*.so`
298 
299 Besides that, SCIP needs similar soft-link targets for ZIMPL
300  a. the directory where the include files of ZIMPL are located
301  b. the library file(s) `lib*.a` or/and `lib*.so`
302 
303 You will need either the `.a` or the `.so` files and can skip the others by just pressing return.
304 
305 The most common compiling issue is that some libraries are missing on your system or that they are outdated.
306 SCIP by default requires the following packages (with usual names for Linux systems in parentheses):
307 
308 - zlib (libz-dev)
309 - gmp (libgmp-dev),
310 - readline (libreadline-dev), and
311 - ncurses (libncurses-dev)
312 
313 Note that under Linux-based systems, you need to install the developer-versions of gmp/zlib/readline, in order to also have the header-files available.
314 
315 If you are not able or do not want to install these packages, try compiling with:
316 ```
317 make ZLIB=false READLINE=false GMP=false.
318 ```
319 
320 Detailed installation description
321 ---------------------------------
322 
323 Here is what you have to do to get SCIP running:
324 
325 ### 1. Compile the library and the solver program
326 
327 In your SCIP main directory, enter `make [options]` with the following options:
328 
329 | parameter and default | options | description |
330 |-----------------------|----------------------|--------------------------------------------------------------------------------------------------|
331 | `ARCH=x86_64` | `[x86_64, x86, sparc, mips, hppa, ppc, pwr4]` | the architecture: try to autodetect |
332 | `AMPL=true` | `[true, false]` | to enable or disable AMPL .nl file reader and support for using SCIP executable as solver in AMPL|
333 | `COMP=gnu` | `[gnu, clang, intel]`| Use Gnu, Clang or Intel compiler. |
334 | `EXPRINT=cppad` | `[cppad, none]` | to use CppAD as expressions interpreter |
335 | `FILTERSQP=false` | `[false, true]` | to enable or disable FilterSQP interface |
336 | `GMP=true` | `[true, false]` | to enable or disable GMP library for exact counting and Zimpl support |
337 | `IPOPT=false` | `[false, true]` | to disable or enable IPOPT interface (needs IPOPT >= 3.12.0) |
338 | `LAPACK=false` | `[false, true]` | link with Lapack; requires Lapack to be installed on the system |
339 | `LPS=spx` | `[spx1, cpx, grb, xprs, msk, clp, glop, qso, highs, none]` | determines the LP-Solver, should be installed seperately. Options to use SoPlex (> version 2.0), SoPlex (>= version 1.4), CPLEX, Gurobi, XPRESS, MOSEK, CLP, Glop, QSopt, HiGHS as LP solver, no LP solver |
340 | `LPSOPT=opt` | `[opt, dbg, opt-gccold]` | Choose the debug or optimized version (or old GCC optimized) version of the LP-solver (currently only available for SoPlex and CLP). |
341 | `NOBLKMEM=false` | `[false, true]` | Turns the internal SCIP block memory off or on. |
342 | `NOBUFMEM=false` | `[false, true]` | Turns the internal SCIP buffer memory off or on. |
343 | `NOBLKBUFMEM=false` | `[false, true]` | Turns the internal SCIP block and buffer memory off or on. This way the code can be checked by valgrind or similar tools. |
344 | `OPT=opt` | `[opt, dbg, perf]` | to use optimized, debug, performance (only with Gnu compiler) analysis compilation mode. `dbg` turns on debug mode. This enables asserts and avoids macros for several function in order to ease debugging. |
345 | `OSTYPE` | `[linux, darwin, cygwin, irix, windows, mingw]` | the operating system: try to autedetect |
346 | `PAPILO=false` | `[false, true]` | to disable or disable the MILP presolver based on the presolving library PaPILO |
347 | `READLINE=true` | `[true, false]` | to enable or disable readline library for interactive shell |
348 | `SHARED=false` | `[false, true]` | to suppress or create shared libraries (only Gnu compiler) |
349 | `SYM=none` | `[none, bliss, sbliss, nauty, snauty]` | to choose method for computing symmetries in mixed nonlinear integer programs |
350 | `TPI=none` | `[none, omp, tny]` | to disable the task processing interface or use it with the openmp or tinycthreads interface for concurrent solves |
351 | `VERBOSE=false` | `[false, true]` | to suppress or display of compiler and linker invocations |
352 | `WORHP=false` | `[false, true]` | to disable or enable WORHP interface (needs WORHP >= 2.00) |
353 | `ZIMPL=false` | `[false, true, auto]`| to enable or disable ZIMPL file reader (needs ZIMPL and GMP to be installed) |
354 | `ZLIB=true` | `[true, false]` | to enable or disable zlib for reading of compressed files |
355 
356 For example, if you want to install SCIP on a Linux system with a x86 processor
357 using the gnu compiler in debug mode, using Soplex version as LP solver,
358 and neither an expressions interpreter nor symmetry handling techniques or multi-threading,
359 you would use following:
360 
361 ```
362 make OSTYPE = linux ARCH = x86 COMP = gnu OPT = dbg EXPRINT = none
363 ```
364 
365 On some machines, you should use `gmake` instead of `make`.
366 
367 On your first compilation you will be asked for some soft-link targets, depending on the external software you want to use.
368 Usually, SCIP needs the following information:
369 - the directory where the include files of the external software
370 - the library file(s) `lib*.a` or/and `lib*.so`
371 You will need either the `.a` or the `.so` files and can skip the others by just pressing return.
372 
373 On MAC systems, GMP is often not installed in the library and include paths, e.g. in `/sw/include` and `/sw/lib`.
374 In this case, you have to add the paths explicitly.
375 In the above example add the settings:
376 
377 ```
378 USRFLAGS=-I/sw/include USRCPPFLAGS=-I/sw/include USRCFLAGS=-I/sw/include USRLDFLAGS=-L/sw/lib.
379 ```
380 
381 ### 2. Installing SCIP
382 
383 After compiling you can install the headers, the libraries, and the binary.
384 You do that by running the command:
385 
386 ```
387 make install INSTALLDIR=<directory>
388 ```
389 where you substitute
390 
391 - `INSTALLDIR=` to install in current directory (default)
392 - `INSTALLDIR=/usr/local` to install the headers (`/usr/local/include/`), the libraries (`/usr/local/lib/`), and binary (`/usr/local/bin/`) in the directory `/usr/local`
393 
394 For un-installing SCIP there exist the target `uninstall` which can be used in the same way as `install`.
395 
396 ### 3. Instructions for manually creating the soft-links, if the query script fails:
397 
398 Create necessary soft-links in the `lib/static` and `lib/include/` subdirectories of SCIP:
399 
400 #### a) to use SOPLEX (Version >= 1.4.0)
401 
402 For each used operating system and architecture:
403 ```
404 ln -s <path to SOPLEX' *.h files> <path to SCIP>/lib/include/spxinc
405 ln -s <file libsoplex.[...].a> <path to SCIP>/lib/static/libsoplex.$(OSTYPE).$(ARCH).$(COMP).a
406 ```
407 For example:
408 ```
409 cd scip
410 ln -s /soplex/lib/libsoplex.linux.x86_64.gnu.opt.a lib/static/libsoplex.linux.x86_64.gnu.a
411 ```
412 Warning! The `.opt` in the name of the SOPLEX library does not appear in the name of the soft-link.
413 
414 #### b) to use CPLEX (Version >= 10.0)
415 
416 For each used operation system and architecture:
417 ```
418 ln -s <path to directory of cplex.h> <path to SCIP>/lib/include/cpxinc
419 ln -s <file libcplex.a> <path to SCIP>/lib/static/libcplex.$(OSTYPE).$(ARCH).$(COMP).a
420 ```
421 For example:
422 ```
423 cd scip
424 ln -s /cplex121/include/ilcplex lib/include/cpxinc
425 ln -s /cplex121/lib/x86-64_debian4.0_4.1/static_pic/libcplex.a lib/static/libcplex.linux.x86.gnu.a
426 ```
427 
428 #### c) to use Gurobi
429 
430 For each used operation system and architecture:
431 ```
432 ln -s <path to the include directory of Gurobi> <path to SCIP>/lib/include/grbinc
433 ln -s <file libgurobi81.so> <path to SCIP>/lib/shared/libgurobi.$(OSTYPE).$(ARCH).$(COMP).so
434 ```
435 For example:
436 ```
437 cd scip
438 ln -s /gurobi81/linux64/include lib/include/grbinc
439 ln -s /gurobi81/linux64/lib/libgurobi81.so lib/shared/libgurobi.linux.x86_64.gnu.so
440 ```
441 
442 #### d) to use XPRESS
443 
444 For each used operation system and architecture:
445 ```
446 ln -s <path to directory of xprs.h> <path to SCIP>/lib/include/xprsinc
447 ln -s <file libxprs.a> <path to SCIP>/lib/static/libxprs.$(OSTYPE).$(ARCH).$(COMP).a
448 ```
449 For example:
450 ```
451 cd scip
452 ln -s /xpressmp/include lib/include/xprsinc
453 ln -s /xpressmp/lib/libxprs.a lib/static/libxprs.linux.x86.gnu.a
454 ```
455 
456 #### e) to use MOSEK
457 
458 For each used operation system and architecture:
459 ```
460 ln -s <path to directory of mosek.h> <path to SCIP>/lib/include/mskincn
461 ln -s <file libmosek.so> <path to SCIP>/lib/shared/libmosek.$(OSTYPE).$(ARCH).$(COMP).so
462 ```
463 For example:
464 ```
465 cd scip
466 ln -s /mosek/8/tools/platform/linux64x86/h lib/include/mskinc
467 ln -s /mosek/8/tools/platform/linux64x86/bin/libmosek64.so lib/shared/libmosek.linux.x86_64.gnu.so
468 ```
469 
470 #### f) to use CLP
471 
472 For each used operating system and architecture:
473 ```
474 ln -s <path to Clp main directory> <path to SCIP>/lib/include/libclp.$(OSTYPE).$(ARCH).$(COMP).$(LPSOPT)
475 ```
476 For example:
477 ```
478 cd scip
479 ln -s /Coin-Clp lib/include/libclp.linux.x86.gnu.opt
480 ```
481 
482 #### g) to use Glop
483 
484 ```
485 ln -s <path to OR-Tools main directory> <path to SCIP>/shared/ortools
486 ```
487 For example:
488 ```
489 cd scip
490 ln -s /ortools lib/shared/ortools
491 ```
492 
493 #### h) to use ZIMPL
494 
495 Use ZIMPL as additional file reader for reading *.zpl files:
496 ```
497 mkdir <path to SCIP>/lib/include/zimplinc
498 ln -s <path to ZIMPL's *.h files> <path to SCIP>/lib/include/zimplinc/zimpl
499 ln -s <file libzimpl-<version>.<options>.a> <path to SCIP>/lib/static/libzimpl.$(OSTYPE).$(ARCH).$(COMP).a
500 ```
501 Note that ZIMPL needs the GNU multiprecision library (GMP) to be installed on your system.
502 
503 #### i) to use IPOPT as NLP solver
504 
505 ```
506 ln -s <path to IPOPT installation> <path to SCIP>/lib/ipopt.$(OSTYPE).$(ARCH).$(COMP).$(IPOPTOPT)
507 (e.g. `cd scip; ln -s /Ipopt lib/shared/ipopt.linux.x86.gnu.opt
508 ```
509 The path to the IPOPT installation is the path under where the Ipopt build has been installed.
510 It should contain the directories `include/coin-or` with the Ipopt header files, the directory `lib` with the Ipopt libraries, and the file `lib/pkgconfig/ipopt.pc`.
511 
512 #### j) to use WORHP as NLP solver
513 
514 ```
515 ln -s <path to WORHP installation> <path to SCIP>/lib/shared/worhp.$(OSTYPE).$(ARCH).$(COMP).$(WORHPOPT)
516 ```
517 For example:
518 ```
519 cd scip
520 ln -s /Worhp lib/shared/worhp.linux.x86.gnu.opt
521 ```
522 The path to the WORHP installation is the path under where the Worhp build has been installed.
523 It should contain the directories `include/worhp` with the WORHP header files and the directory `lib` with the WORHP libraries.
524 
525 #### k) to use FilterSQP as NLP solver
526 
527 ```
528 ln -s <path to FilterSQP library> <path to SCIP>/lib/libfiltersqp.$(OSTYPE).$(ARCH).$(COMP).a
529 ln -s <path to BQPD library> <path to SCIP>/lib/libbqpd.$(OSTYPE).$(ARCH).$(COMP).a
530 ```
531 Make sure to replace the paths with your installation location.
532 
533 #### l) to use GAMS
534 
535 ```
536 ln -s <path to GAMS system directory> <path to SCIP>/lib/shared/gams.$(OSTYPE).$(ARCH).$(COMP)
537 ```
538 Make sure to replace the paths with your installation location.
539 
540 #### m) to use HiGHS
541 
542 ```
543 export LIBRARY_PATH=<path to HiGHS>/lib
544 export LD_LIBRARY_PATH=<path to HiGHS>/lib
545 ```
546 
547 ### 4. Run SCIP
548 
549 To run SCIP enter `bin/scip.$(OSTYPE).$(ARCH).$(COMP).$(OPT).$(LPS)`
550 (e.g. `bin/scip.linux.x86.gnu.opt.spx`) or just `bin/scip` for the last compiled version
551 
552 ### 5. Generate documentation
553 
554 To generate the documentation, you need to have doxygen installed, and enter `make doc`.
555 
556 ### 6. Check Code with (pc)lint
557 
558 To check the code with lint, you need to have flexelint installed, and enter `make lint`.
559 If you have pclint installed, enter `make pclint`.
560 
561 ### 7. Run a short test
562 
563 To run a short test, enter `make [options] test` with the same options with which you compiled SCIP in step 1.
564 If you use `EXPRINT=none`, a few MINLP instances might be aborted.
565 If you use `LPS=none`, many instances will fail or take ages to be solved.
566 
567 Further targets
568 ---------------
569 The SCIP makefile supports several targets (used via `make ... "target"`):
570 
571 | target | description|
572 |--|--|
573 | `all` | (or no target) Build SCIP library and binary. |
574 | `links` | Reconfigures the links in the `lib` directory. |
575 | `doc` | Creates documentation in the `doc` directory. |
576 | `clean` | Removes all object files. |
577 | `depend` | Updates dependencies files. This is only needed if you add checks for preprocessor-defines `WITH_*` in source files. |
578 | `check` | or `test`. Runs the check script. |
579 | `lint` | Statically checks the code via flexelint. The call produces the file `lint.out` which contains all the detected warnings. |
580 | `tags` | Generates tags which can be used in the editor **emacs** and **xemacs**. |
581 
582 The SCIP makefiles are structured as follows.
583 
584 - `Makefile` This is the basic makefile in the SCIP root directory. It loads
585  additional makefile information depending on the parameters set.
586 - `make/make.project` This file contains definitions that are useful for all codes
587  that use SCIP, for instance, the examples.
588 - `make.<sys>.<machine>.<compiler>.<dbg|opt|prf|opt-gccold>` These file contain system/compiler specific
589  definitions. If you have an unsupported compiler, you can copy one of these and modify it
590  accordingly.
591 
592 If your platform or compiler is not supported by SCIP you might try and copy one of the existing
593 makefiles in the `make` directory and modify it. If you succeed, we are always
594 interested in including more Makefiles into the system.
595 
596 Examples
597 --------
598 
599 ### Example 1 (defaults: SoPlex, with ZIMPL support):
600 
601 Typing `make` uses SoPlex as LP solver and includes support for the modeling language ZIMPL.
602 You will be asked the following questions on the first call to `make` (example answers are already given):
603 
604 ```
605 make[1]: Entering directory '/sw/scip'
606 
607 ** creating softlinks: LPS=spx OSTYPE=linux ARCH=x86 COMP=gnu SUFFIX= ZIMPL=true ZIMPLOPT=opt IPOPT=false IPOPTOPT=opt EXPRINT=cppad
608 
609 ** creating directory 'lib/zimplinc'
610 ** missing soft-link 'lib/spxinc'
611 ** enter soft-link target file or directory for 'lib/spxinc' (return if not needed): /sw/soplex/src
612 -> creating softlink 'lib/spxinc' -> '/sw/soplex/src'
613 
614 ** missing soft-link 'lib/libsoplex.linux.x86.gnu.a'
615 ** enter soft-link target file or directory for 'lib/libsoplex.linux.x86.gnu.a' (return if not needed): /sw/soplex/lib/libsoplex.linux.x86.gnu.opt.a
616 -> creating softlink 'lib/libsoplex.linux.x86.gnu.a' -> '/sw/soplex/lib/libsoplex.linux.x86.gnu.opt.a'
617 
618 ** missing soft-link 'lib/libsoplex.linux.x86.gnu.so'
619 ** this soft-link is not necessarily needed since 'lib/libsoplex.linux.x86.gnu.a' already exists - press return to skip
620 ** enter soft-link target file or directory for 'lib/libsoplex.linux.x86.gnu.so' (return if not needed):
621 -> skipped creation of softlink 'lib/libsoplex.linux.x86.gnu.so'. Call 'make links' if needed later.
622 
623 ** missing soft-link 'lib/zimplinc/zimpl'
624 ** enter soft-link target file or directory for 'lib/zimplinc/zimpl' (return if not needed): /sw/zimpl/src
625 -> creating softlink 'lib/zimplinc/zimpl' -> '/sw/zimpl/src'
626 
627 ** missing soft-link 'lib/libzimpl.linux.x86.gnu.a'
628 ** enter soft-link target file or directory for 'lib/libzimpl.linux.x86.gnu.a' (return if not needed): /sw/zimpl/lib/libzimpl.linux.x86.gnu.opt.a
629 -> creating softlink 'lib/libzimpl.linux.x86.gnu.a' -> '/sw/zimpl/lib/libzimpl.linux.x86.gnu.opt.a'
630 
631 ** missing soft-link 'lib/libzimpl.linux.x86.gnu.so'
632 ** this soft-link is not necessarily needed since 'lib/libzimpl.linux.x86.gnu.a' already exists - press return to skip
633 ** enter soft-link target file or directory for 'lib/libzimpl.linux.x86.gnu.so' (return if not needed):
634 -> skipped creation of softlink 'lib/libzimpl.linux.x86.gnu.so'. Call 'make links' if needed later.
635 
636 make[1]: Leaving directory '/sw/scip'
637 ```
638 
639 ### Example 2 (CPLEX, no ZIMPL):
640 
641 
642 Typing `make LPS=cpx ZIMPL=false` uses CPLEX as LP solver.
643 You will be asked the following questions on the first call to `make` (example answers are already given):
644 
645 ```
646 make[1]: Entering directory '/sw/scip'
647 
648 ** creating softlinks: LPS=cpx OSTYPE=linux ARCH=x86 COMP=gnu SUFFIX= ZIMPL=false
649 
650 ** missing soft-link 'lib/cpxinc'
651 ** enter soft-link target file or directory for 'lib/cpxinc' (return to skip): /sw/cplex/include/ilcplex
652 -> creating softlink 'lib/cpxinc' -> '/sw/cplex/include/ilcplex'
653 
654 ** missing soft-link 'lib/libcplex.linux.x86.gnu.a'
655 ** enter soft-link target file or directory for 'lib/libcplex.linux.x86.gnu.a' (return to skip): /sw/cplex/lib/x86_rhel4.0_3.4/static_pic/libcplex.a
656 -> creating softlink 'lib/libcplex.linux.x86.gnu.a' -> '/sw/cplex/lib/x86_rhel4.0_3.4/static_pic/libcplex.a'
657 
658 ** missing soft-link 'lib/libcplex.linux.x86.gnu.so'
659 ** enter soft-link target file or directory for 'lib/libcplex.linux.x86.gnu.so' (return to skip):
660 -> skipped creation of softlink 'lib/libcplex.linux.x86.gnu.so'. Call 'make links' if needed later.
661 
662 make[1]: Leaving directory '/sw/scip'
663 ```
664 
665 ### Example 3 (CLP, IPOPT, no ZIMPL):
666 
667 Typing `make LPS=clp ZIMPL=false IPOPT=true` uses CLP as LP solver, and activates the interface to IPOPT.
668 You will be asked the following questions on the first call to `make` (example answers are already given):
669 
670 ```
671 make[1]: Entering directory '/sw/scip'
672 
673 - Current settings: LPS=clp OSTYPE=linux ARCH=x86_64 COMP=gnu SUFFIX= ZIMPL=false ZIMPLOPT=opt IPOPT=true IPOPTOPT=opt EXPRINT=cppad
674 
675 * SCIP needs some softlinks to external programs, in particular, LP-solvers.
676 * Please insert the paths to the corresponding directories/libraries below.
677 * The links will be installed in the 'lib' directory.
678 * For more information and if you experience problems see the 'INSTALL.md' file.
679 
680  -> 'clp.*' is a directory containing the Clp installation, i.e., 'clp.*/include/coin/ClpModel.hpp' should exist.
681  -> 'ipopt.*' is a directory containing the ipopt installation, i.e., 'ipopt.*/include/coin/IpIpoptApplication.hpp', 'ipopt.*/lib/libipopt*', ... should exist.
682 
683 - preparing missing soft-link 'lib/clp.linux.x86_64.gnu.opt':
684 > Enter soft-link target file or directory for 'lib/clp.linux.x86_64.gnu.opt' (return if not needed):
685 > /sw/Clp-1.11/build
686 -> creating softlink 'lib/clp.linux.x86_64.gnu.opt' -> '/sw/Clp-1.11/build'
687 
688 - preparing missing soft-link 'lib/ipopt.linux.x86_64.gnu.opt':
689 > Enter soft-link target file or directory for 'lib/ipopt.linux.x86_64.gnu.opt' (return if not needed):
690 > /sw/ia64_lx26/ipopt-3.12.5/
691 -> creating softlink 'lib/ipopt.linux.x86_64.gnu.opt' -> '/sw/ia64_lx26/ipopt-3.12.5/'
692 
693 make[1]: Leaving directory '/sw/scip'
694 ```
695 
696 ### Example 4 (default: SoPlex, IPOPT, WORHP, FILTERSQP):
697 
698 Typing `make IPOPT=true WORHP=true FILTERSQP=true` uses SoPlex as LP solver, and activates the interfaces to IPOPT, WORHP, and FilterSQP.
699 You will be asked the following questions on the first call to `make` (example answers are already given):
700 
701 ```
702 - Current settings: LPS=spx2 OSTYPE=linux ARCH=x86_64 COMP=gnu SHARED=false SUFFIX= ZIMPL=false ZIMPLOPT=opt IPOPT=true IPOPTOPT=opt FILTERSQP=true EXPRINT=cppad GAMS=false
703 
704 * SCIP needs some softlinks to external programs, in particular, LP-solvers.
705 * Please insert the paths to the corresponding directories/libraries below.
706 * The links will be installed in the 'lib/include' and 'lib/static' directories.
707 * For more information and if you experience problems see the 'INSTALL.md' file.
708 
709  -> 'spxinc' is the path to the SoPlex 'src' directory, e.g., '<SoPlex-path>/src'.
710  -> 'libsoplex.*' is the path to the SoPlex library, e.g., '<SoPlex-path>/lib/libsoplex.linux.x86.gnu.opt.a'
711  -> 'ipopt.linux.x86_64.gnu.opt' is a directory containing the ipopt installation, i.e., 'ipopt.linux.x86_64.gnu.opt/include/coin/IpIpoptApplication.hpp', 'ipopt.linux.x86_64.gnu.opt/lib/libipopt*', ... should exist.
712  -> 'libfiltersqp.linux.x86_64.gnu.*' is the path to the filterSQP library.
713  -> 'libbqpd.linux.x86_64.gnu.*' is the path to the BQPD library.
714  -> 'worhp.linux.x86_64.gnu.opt' is a directory containing the WORHP installation, i.e., 'worhp.linux.x86_64.gnu.opt/include/worhp/worhp.h' should exist.
715 
716 
717 > Enter soft-link target file or directory for 'lib/static/ipopt.linux.x86_64.gnu.opt' (return if not needed):
718 > /sw/ipopt-3.12.5
719 -> creating softlink 'lib/static/ipopt.linux.x86_64.gnu.opt' -> '/sw/ipopt-3.12.5'
720 
721 > Enter soft-link target file or directory for 'lib/static/libfiltersqp.linux.x86_64.gnu.a' (return if not needed):
722 > /sw/libfiltersqp.a
723 -> creating softlink 'lib/static/libfiltersqp.linux.x86_64.gnu.a' -> '/sw/libfiltersqp.a'
724 
725 > Enter soft-link target file or directory for 'lib/static/libbqpd.linux.x86_64.gnu.a' (return if not needed):
726 > /sw/libbqpd.a
727 -> creating softlink 'lib/static/libbqpd.linux.x86_64.gnu.a' -> '/sw/libbqpd.a'
728 
729 > Enter soft-link target file or directory for 'lib/static/worhp.linux.x86_64.gnu.opt' (return if not needed):
730 > /sw/worhp-2.0
731 -> creating softlink 'lib/static/worhp.linux.x86_64.gnu.opt' -> '/sw/worhp-2.0'
732 
733 make[1]: Leaving directory '/sw/scip'
734 ```
735 
736 Note on how to (locally) install CLP:
737 - create a target directory for the installation, e.g. `clp-build` (this is the directory SCIP has to link to)
738 - from within `clp-build`, run the `configure` script of coin-Clp, followed by `make install`
739 
740 If you ever need to modify the soft-link targets, delete the soft-links in the `lib/` subdirectory and enter `make links` to generate them again.
741 
742 After the soft-links have been created, the compilation of the source files should start.
743 
744 
745 Compilation problems
746 --------------------
747 
748 If the soft-link query script does not work on your machine, read step 2 for instructions on manually creating the soft-links.
749 
750 ### No rule to make target lib/???
751 If you get an error message of the type
752 ```
753 make: *** No rule to make target 'lib/???', needed by 'obj/O.linux.x86.gnu.opt/lib/scip/???.o'. Stop.
754 ```
755 the corresponding soft-link was not created or points to a wrong location.
756 Check the soft-link targets in the `lib/include`, `lib/static`, `lib/shared` subdirectories.
757 Try to delete all soft-links from those directories and call `make links` to generate them again.
758 If this still fails, read step 2 for instructions on manually creating the soft-links.
759 
760 ### No rule to make target make/make
761 
762 If you get an error message of the type
763 ```
764 make: *** No rule to make target 'make/make.?.?.?.?.?'. Stop.
765 ```
766 the corresponding machine dependent makefile for your architecture and compiler is missing.
767 Create one of the given name in the `make/` subdirectory.
768 You may take `make/make.linux.x86.gnu.opt` or any other file in the make subdirectory as example.
769 
770 ### No support for remove_history call
771 
772 The readline library seems to differ slightly on different OS distributions.
773 Some versions do not support the `remove_history()` call.
774 In this case, you have to either add `-DNO_REMOVE_HISTORY` to the FLAGS in the appropriate `make/make.*` file, or to compile with `make USRFLAGS=-DNO_REMOVE_HISTORY`.
775 Make sure, the file `src/scip/dialog.c` is recompiled.
776 If this doesn't work either, disable the readline library with `make READLINE=false`.
777 
778 ### No support for sigaction method
779 
780 On some systems, the `sigaction()` method is not available.
781 In this case, you have to either add `-DNO_SIGACTION` to the FLAGS in the appropriate `make/make.*` file, or to compile with `make USRFLAGS=-DNO_SIGACTION`.
782 Make sure, the file `src/scip/interrupt.c` is recompiled.
783 
784 ### No support for rand_r method
785 
786 On some systems, the `rand_r()` method is not available.
787 In this case, you have to either add `-DNO_RAND_R` to the FLAGS in the appropriate `make/make.*` file, or to compile with `make USRFLAGS=-DNO_RAND_R`.
788 Make sure, the file `src/scip/misc.c` is recompiled.
789 
790 ### No support for strtok_r method
791 
792 On some systems, the `strtok_r()` method is not available.
793 In this case, you have to either add `-DNO_STRTOK_R` to the FLAGS in the appropriate `make/make.*` file, or to compile with `make USRFLAGS=-DNO_STRTOK_R`.
794 Make sure, the file `src/scip/misc.c` is recompiled.
795 
796 ### No support for strerror_r method
797 
798 On some systems, the `strerror_r()` method is not available.
799 In this case, you have to either add `-DNO_STRERROR_R` to the FLAGS in the appropriate `make/make.*` file, or to compile with `make USRFLAGS=-DNO_STRERROR_R`.
800 Make sure, the file `src/scip/misc.c` is recompiled.
801 
802 ### No support for read command
803 
804 On some systems, the option [-e] is not available for the read command.
805 You have to compile with `READ=read`.
806 
807 ### Problems with Clp
808 
809 In some situations, it may be necessary to adjust the flags for linking against Clp.
810 SCIP's makefile tries to find the file `clp_addlibs.txt`, which specifies the needed libraries.
811 The first thing you should check is whether `clp_addlibs.txt` is present at in path `libclp.*/share/coin/doc/Clp/` (you may have to correct this path for some Clp versions).
812 If this file is not present in your Clp version, SCIP tries to guess the paths and libraries: it assumes that Blas and Lapack are installed as system libraries (`libblas.a`, `liblapack.a`) and are not build into the CoinUtils library.
813 If that is different in your build of Clp, you may have to remove `$(LINKCXX_l)lapack$(LINKLIBSUFFIX)` from the `LPSLDFLAGS` in `Makefile` or `make.project`.
814 Also removing `$(LINKCXX_l)bz2$(LINKLIBSUFFIX)` may help in some cases.
815 
816 ### Compiler or linker errors
817 
818 If you encounter other compiler or linker errors, you should recompile with `make VERBOSE=true ...` in order to get the full compiler invocation.
819 This might help to fix the corresponding machine dependent makefile in the make subdirectory.
820 
821 Remarks on Installing under Windows using MinGW
822 -----------------------------------------------
823 
824 To build your own Windows binaries under Windows, we recommend using the MinGW-Compiler with MSYS from mingw.org.
825 
826 First install MSYS, then MinGW to the mingw folder inside the msys folder.
827 Now you need to install the following packages to the mingw folder:
828 - zlib (or use `ZLIB=false`)
829 - pcre (or use `ZIMPL=false` since pcre is needed for ZIMPL and ZIMPL-support in SCIP)
830 - gmplib (or use `ZIMPL=false` since gmplib is needed for ZIMPL and ZIMPL-support in SCIP)
831 
832 (After calling `make clean` in the ZIMPL folder you will also need flex and bison to remake ZIMPL.
833 We recommend NOT to use `make clean` inside the ZIMPL-folder if you do not have these packages installed.)
834 
835 You can download these additional packages as precompiled binaries:
836 - [zlib&pcre](http://gnuwin32.sourceforge.net/packages.html)
837 - [gmplib](http://cs.nyu.edu/exact/core/gmp/)
838 or compile the source on your own from the project homepages:
839 - [zlib](http://www.zlib.net/)
840 - [pcre](http://www.pcre.org/)
841 - [gmplib](http://www.gmplib.org/)
842 (The command `./configure --prefix=/mingw ; make ; make install` should succeed without problems and installs the packages into the mingw folder.)
843 
844 Now `make READLINE=false` should be compiling without errors.
845 Please note that we do NOT support creating the doxygen documentation or readline-usage under Windows.
846 
847 Since there are no real symlinks in MSYS, the include and library files of SoPlex and ZIMPL are actually copied into the SCIP-lib-folder.
848 When you recompile ZIMPL or SoPlex after compiling SCIP you have to copy the libraries manually into the SCIP-lib-folder and recompile SCIP afterwards.