Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile issue with Gurobi 8.1 on Linux #10

Open
fizwit opened this issue May 10, 2019 · 1 comment
Open

compile issue with Gurobi 8.1 on Linux #10

fizwit opened this issue May 10, 2019 · 1 comment

Comments

@fizwit
Copy link

fizwit commented May 10, 2019

Linux 14.04, GCCcore 5.4.0, Gurobi 8.1
Made changes to FindGUROBI.cmake for Linux to allow Cmake to fine Include and library paths for Gurobi. Now getting "undefined reference" errors. Has the API for Gurobi changed since version 5? Have you tested with version 8?

GCCcore/5.4.0/bin/g++ -O2 -ftree-vectorize -march=native
-fno-math-errno -std=c++11 -O3 -DNDEBUG \
-L/app/easybuild/software/GCCcore/5.4.0/lib64
-L/app/easybuild/software/GCCcore/5.4.0/lib
-L/app/easybuild/software/OpenBLAS/0.2.18-GCC-5.4.0-2.26-LAPACK-3.6.1/lib
-L/app/easybuild/software/ScaLAPACK/2.0.2-gompi-2016b-OpenBLAS-0.2.18-LAPACK-3.6.1/lib
-L/app/easybuild/software/FFTW/3.3.4-gompi-2016b/lib
-L/app/easybuild/software/Boost/1.67.0-foss-2016b/lib
-L/app/easybuild/software/lemon/1.3.1-foss-2016b/lib
-L/app/easybuild/software/gurobi/8.1.0/lib
CMakeFiles/pmh.dir/src/pmh.cpp.o
CMakeFiles/pmh.dir/src/utils.cpp.o
CMakeFiles/pmh.dir/src/clonetree.cpp.o
CMakeFiles/pmh.dir/src/basetree.cpp.o
CMakeFiles/pmh.dir/src/old_ilps/ilpsolver.cpp.o
CMakeFiles/pmh.dir/src/ilppmhsolver.cpp.o
CMakeFiles/pmh.dir/src/migrationgraph.cpp.o
CMakeFiles/pmh.dir/src/migrationtree.cpp.o
CMakeFiles/pmh.dir/src/gabowmyers.cpp.o
-o pmh
-rdynamic
-lm
-lemon
-lpthread
-Wl,-Bstatic
-lboost_thread
-lboost_system
-lboost_filesystem
-Wl,-Bdynamic \

CMakeFiles/pmh.dir/src/old_ilps/ilpsolver.cpp.o:ilpsolver.cpp:function IlpSolver::processSolution():error: undefined reference to 'GRBVar::get(GRB_DoubleAttr) const'
CMakeFiles/pmh.dir/src/old_ilps/ilpsolver.cpp.o:ilpsolver.cpp:function IlpSolver::initParallelSingleSourceSeedingConstraints(): error: undefined reference to 'GRBQuadExpr::GRBQuadExpr(double)'
CMakeFiles/pmh.dir/src/old_ilps/ilpsolver.cpp.o:ilpsolver.cpp:function IlpSolver::initParallelSingleSourceSeedingConstraints(): error: undefined reference to 'GRBQuadExpr::GRBQuadExpr(GRBVar, double)'
CMakeFiles/pmh.dir/src/old_ilps/ilpsolver.cpp.o:ilpsolver.cpp:function IlpSolver::initParallelSingleSourceSeedingConstraints(): error: undefined reference to 'operator==(GRBQuadExpr, GRBQuadExpr)'
CMakeFiles/pmh.dir/src/old_ilps/ilpsolver.cpp.o:ilpsolver.cpp:function IlpSolver::initParallelSingleSourceSeedingConstraints(): error: undefined reference to 'GRBModel::addConstr(GRBTempConstr const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >)'
CMakeFiles/pmh.dir/src/old_ilps/ilpsolver.cpp.o:ilpsolver.cpp:function IlpSolver::initPrimaryConstraint(lemon::ListDigraphBase::Node): error: undefined reference to 'GRBLinExpr::GRBLinExpr(double)'
CMakeFiles/pmh.dir/src/old_ilps/ilpsolver.cpp.o:ilpsolver.cpp:function IlpSolver::initPrimaryConstraint(lemon::ListDigraphBase::Node): error: undefined reference to 'GRBLinExpr::GRBLinExpr(GRBVar, double)'

@melkebir
Copy link
Member

Gurobi 8.0 works. These are linker errors -- are you sure you updated the library path correctly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants