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).
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).
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).
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).
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.
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.
24 To build SCIP you may use the CMake GUI to specify the path to SCIP and the desired location for the build.
26 After the configuration step is done, open the generated Visual Studio solution file and compile it.
29 Alternatively, you may use the command line to configure and build SCIP by creating a `build` directory and then building the configuration:
46 cmake .. -DCMAKE_INSTALL_PREFIX=<install/dir> [-DSOPLEX_DIR=/path/to/soplex] # configure the build
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.
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:
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
64 - [Ipopt](https://github.com/coin-or/Ipopt/releases) with [Mumps](https://github.com/coin-or-tools/ThirdParty-Mumps/releases)
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) .
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**:
76 This option activates the automatic search for dependent packages like GMP, IPOPT, PaPILO, Readline, WORHP, ZIMPL, ZLIB, and deactivates the missing ones.
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.
96 Solution: add `-DPAPILO_DIR=/path/to/papilo/installation` or disable PaPILO by setting `-DPAPILO=off`.
111 Solution: add `-DZIMPL_DIR=/path/to/zimpl/installation` or disable ZIMPL by setting `-DZIMPL=off`.
125 Solution: add `-DIPOPT_DIR=/path/to/ipopt/installation` or disable IPOPT by setting `-DIPOPT=off`.
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`
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.
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).
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").
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.
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.
166 The main library `libscip.so` will contain all SCIP sources and won't have dependencies to the other sub-libraries.
168 There are several options that can be passed to the `cmake <path/to/SCIP>` call to modify how the code is built.
181 |------------------------|------------------------------------|----------------------------|--------------------------------------------------------------------|
182 | `AUTOBUILD` | `on`, `off` | -- | automatically find dependencies on availability, ignores individual flags of these packages |
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 |
193 | `..._DIR` | `<custom/path/to/.../package>` | -- | e.g. `IPOPT_DIR`, `CPLEX_DIR`, `WORHP_DIR`, `Readline_DIR` ... |
200 | `DEBUGSOL` | `on`, `off` | `DEBUGSOL=[true,false]` | specify a debugging solution by setting the "misc/debugsol" parameter of SCIP |
208 | `TPI` | `tny`, `omp`, `none` | `TPI=[tny,omp,none]` | enable task processing interface required for concurrent solver |
210 Parameters can be set all at once or in subsequent calls to `cmake` - extending or modifying the existing configuration.
215 There is an extensive test suite written for [CTest]("https://cmake.org/cmake/help/latest/manual/ctest.1.html)
217 To perform a quick test to see whether the compilation was really successful you may run `make check`.
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.
238 cmake </path/to/SCIP> -DCOVERAGE=on -DCOVERAGE_CTEST_ARGS="-R MIP -E stein -j4" -DCMAKE_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.
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).
256 |-----------------|-------------------------------------------------------|---------------------------------------|
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.
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
291 make install INSTALLDIR=/path/to/install/dir # (optional) install the header, libraries, and binary
294 On your first compilation you will be asked for some soft-link targets, depending on the LP solver you want to use.
303 You will need either the `.a` or the `.so` files and can skip the others by just pressing return.
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):
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.
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|
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). |
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) |
367 On your first compilation you will be asked for some soft-link targets, depending on the external software you want to use.
371 You will need either the `.a` or the `.so` files and can skip the others by just pressing return.
373 On MAC systems, GMP is often not installed in the library and include paths, e.g. in `/sw/include` and `/sw/lib`.
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`
394 For un-installing SCIP there exist the target `uninstall` which can be used in the same way as `install`.
412 Warning! The `.opt` in the name of the SOPLEX library does not appear in the name of the soft-link.
425 ln -s /cplex121/lib/x86-64_debian4.0_4.1/static_pic/libcplex.a lib/static/libcplex.linux.x86.gnu.a
467 ln -s /mosek/8/tools/platform/linux64x86/bin/libmosek64.so lib/shared/libmosek.linux.x86_64.gnu.so
474 ln -s <path to Clp main directory> <path to SCIP>/lib/include/libclp.$(OSTYPE).$(ARCH).$(COMP).$(LPSOPT)
499 ln -s <file libzimpl-<version>.<options>.a> <path to SCIP>/lib/static/libzimpl.$(OSTYPE).$(ARCH).$(COMP).a
506 ln -s <path to IPOPT installation> <path to SCIP>/lib/ipopt.$(OSTYPE).$(ARCH).$(COMP).$(IPOPTOPT)
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`.
515 ln -s <path to WORHP installation> <path to SCIP>/lib/shared/worhp.$(OSTYPE).$(ARCH).$(COMP).$(WORHPOPT)
523 It should contain the directories `include/worhp` with the WORHP header files and the directory `lib` with the WORHP libraries.
563 To run a short test, enter `make [options] test` with the same options with which you compiled SCIP in step 1.
577 | `depend` | Updates dependencies files. This is only needed if you add checks for preprocessor-defines `WITH_*` in source files. |
579 | `lint` | Statically checks the code via flexelint. The call produces the file `lint.out` which contains all the detected warnings. |
588 - `make.<sys>.<machine>.<compiler>.<dbg|opt|prf|opt-gccold>` These file contain system/compiler specific
592 If your platform or compiler is not supported by SCIP you might try and copy one of the existing
602 You will be asked the following questions on the first call to `make` (example answers are already given):
607 ** creating softlinks: LPS=spx OSTYPE=linux ARCH=x86 COMP=gnu SUFFIX= ZIMPL=true ZIMPLOPT=opt IPOPT=false IPOPTOPT=opt EXPRINT=cppad
611 ** enter soft-link target file or directory for 'lib/spxinc' (return if not needed): /sw/soplex/src
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'
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.
624 ** enter soft-link target file or directory for 'lib/zimplinc/zimpl' (return if not needed): /sw/zimpl/src
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'
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.
643 You will be asked the following questions on the first call to `make` (example answers are already given):
651 ** enter soft-link target file or directory for 'lib/cpxinc' (return to skip): /sw/cplex/include/ilcplex
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'
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.
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):
673 - Current settings: LPS=clp OSTYPE=linux ARCH=x86_64 COMP=gnu SUFFIX= ZIMPL=false ZIMPLOPT=opt IPOPT=true IPOPTOPT=opt EXPRINT=cppad
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.
684 > Enter soft-link target file or directory for 'lib/clp.linux.x86_64.gnu.opt' (return if not needed):
689 > Enter soft-link target file or directory for 'lib/ipopt.linux.x86_64.gnu.opt' (return if not needed):
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):
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
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.
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.
717 > Enter soft-link target file or directory for 'lib/static/ipopt.linux.x86_64.gnu.opt' (return if not needed):
721 > Enter soft-link target file or directory for 'lib/static/libfiltersqp.linux.x86_64.gnu.a' (return if not needed):
725 > Enter soft-link target file or directory for 'lib/static/libbqpd.linux.x86_64.gnu.a' (return if not needed):
729 > Enter soft-link target file or directory for 'lib/static/worhp.linux.x86_64.gnu.opt' (return if not needed):
737 - create a target directory for the installation, e.g. `clp-build` (this is the directory SCIP has to link to)
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.
748 If the soft-link query script does not work on your machine, read step 2 for instructions on manually creating the soft-links.
753 make: *** No rule to make target 'lib/???', needed by 'obj/O.linux.x86.gnu.opt/lib/scip/???.o'. Stop.
757 Try to delete all soft-links from those directories and call `make links` to generate them again.
768 You may take `make/make.linux.x86.gnu.opt` or any other file in the make subdirectory as example.
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`.
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`.
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`.
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`.
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`.
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`.
818 If you encounter other compiler or linker errors, you should recompile with `make VERBOSE=true ...` in order to get the full compiler invocation.
824 To build your own Windows binaries under Windows, we recommend using the MinGW-Compiler with MSYS from mingw.org.
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.)
842 (The command `./configure --prefix=/mingw ; make ; make install` should succeed without problems and installs the packages into the mingw folder.)
845 Please note that we do NOT support creating the doxygen documentation or readline-usage under Windows.