raphael-group / machina

Framework for Metastatic And Clonal History INtegrative Analysis
BSD 3-Clause "New" or "Revised" License
34 stars 12 forks source link

compile issue with Gurobi 8.1 on Linux #10

Open fizwit opened 5 years ago

fizwit commented 5 years ago

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 commented 5 years ago

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