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