This page guides you to through the installation of GCG from Git. You can use our private repository (if you have access to it) or the public repository on GitHub (requires submodules to be cloned/set up manually). If you have a Windows computer, please see Windows Installation Guide for more information.
If you want to let an automated installer do the work for you, you can download it here.
Note: This script uses our private repository. Your SSH key has to be registered correctly for it to work. Also, it might be required to make the script executable usingsudo chmod +x installGCGfromGit.sh.
Automated Installation
If you have access to our private repository, you can use the automated installer. You can execute it like that:
The following options can be set:
Make it executable (sudo might be required):
Troubleshooting
In case of compilation errors, please first try this bugfix script. Note that GCG has to have been compiled before executing it. If it does not help, do the following manually:
- Try to perform a clean make: If that does not help and anmake cleanmake depsmake
lderror is returned, you should - Remove the links and submodules, since they could be erroneous. Note that you will lose every code changes in the SCIP folder or other submodules located in
lib.rm -rf lib/git submodule updatemake depsmake - If that also does not help, consider cloning the repository again, since with the installation script, it will most probably work again.
- If it does not: Please report that in an issue or in the meeting.
System prerequisites
If you are not working on one of the OR chair's computers make sure that the following libraries are installed:
Git prerequisites
The following steps require access to our private repository. You can also use the public one and set up the submodules manually (the folders
lib/soplex-gitandlib/scip-git)
Please make sure that you have your ssh key saved in your Git account. Otherwise, you won't be able to clone or commit anything, since you have not authorized yourself. First, clone the git repo with
git clone git@git.or.rwth-aachen.de:gcg/gcg.git [gcg-dir]
You have to clone it via ssh, otherwise the submodules won't work. To initialize the SCIP, SoPlex, and the googletest framework, goto the repository folder "gcg" and run
git submodule init git submodule sync git submodule update
Manual Installation using Makefiles
Compile SCIP and SOPLEX using makefiles
Note: Next, make is used with some arguments that you prefer. Do not use the -j option on the very first compilation as it is not compatible with the linker. As the linker is not called again once all links are set, using this option on future compilations should be fine.
Compile the depends (scip, soplex, bliss and googletest) with
make [args] deps
Links to submodules
Before compilation, you will be asked for some links. Paste the following paths:
- lib/scip is
../lib/scip-git - lib/include/spxinc is
../../../soplex-git/src/ - lib/static/libsoplex.linux.x86_64.gnu.opt.a is
../../../soplex-git/lib/libsoplex.linux.x86_64.gnu.opt.a
If compiled without flags, this should have been it.
If you used flags, you might need one of these links:
- lib/libsoplex.linux.x86_64.gnu.opt.so is not needed
- lib/cpxinc is in
PATH_TO_CPLEX_DIR/include/ilcplex/(PATH_TO_CPLEX_DIR = /opt/cplex/cplex/ on orlabXX) - lib/libcplex.a is in
PATH_TO_CPLEX_DIR/lib/x86-64_sles10_4.1/static_pic/libcplex.a - lib/libcplex.linux.x86_64.gnu.so is not needed
- lib/zimplinc/zimpl is
PATH_TO_ZIMPL_DIR/src/zimpl(PATH_TO_ZIMPL_DIR=/opt/scipoptsuite-X.X.X/zimpl/ on orlabXX; compile with argumentZIMPL=falseif not needed) - lib/libzimpl.linux.x86_64.gnu.opt.a is
PATH_TO_ZIMPL_DIR/lib/libzimpl.linux.x86_64.gnu.opt.a - lib/libzimpl.linux.x86_64.gnu.opt.so is not needed
Compile GCG
Afterward, compile GCG with
make [args]
You can set arguments as described in Makefiles Arguments.
If you used flags, you might need to set these links:
- lib/cliquerinc is
cliquer/ - lib/libcliquer.a is
cliquer/libcliquer.a - lib/gtest is
googletest/include/ - lib/libgtest.a is
googletest/build/libgtest.a
Test GCG
You can run a short test with
make [args] test
Common Errors
On some distros, including the one used on RWTH cluster, the SCIP link does not work. Do this before compiling:
cd lib && ln -s scip-git scip && cd ..
Manual Installation using CMake
Note that the available
make-commands provided by CMake's Makefile differ from the commands provided by the Makefile located in the root directory.
Build using provided CMake Presets
If your installed CMake version is equal to 3.25 or higher, you can configure and build GCG as well as test the build by calling
cmake --workflow --preset gcg-linux-release
You can replace
linuxbymacosfor MacOS builds (or even bywindows, see Microsoft Visual C++ (MSVC)). By using--preset gcg-linux-debuga debug build will be compiled and tested.
Manual CMake Build
In case of an older CMake version you can also build GCG manually.
Build
The following commands will configure and build GCG
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DGCG_DEV_BUILD=ON -DZIMPL=OFF -DIPOPT=OFF -DPAPILO=OFF cd build make gcg -j8
You can specify the number of compile jobs by changing the number appended to the -j flag if CPU/RAM usage is too high/low (using just -j will not limit the number of jobs). Moreover, you can use -DCMAKE_BUILD_TYPE=Debug instead of -DCMAKE_BUILD_TYPE=Release to compile debug builds.
Test Build
You can run a short test with
make gcg_check