GithubHelp home page GithubHelp logo

Comments (18)

tkralphs avatar tkralphs commented on August 26, 2024 1

It should be OK to just run with --reconfigure when the configuration fails and the project has not been built.

from osi.

svigerske avatar svigerske commented on August 26, 2024

The configure script in the subdirectory Osi should list all (documented) flags.

The public project for coinbrew is https://github.com/coin-or/coinbrew/

It would be good to know what exactly you run to help on this. Osi/configure:11675 in Osi 0.108.6 does have a change-directory (cd) command, as far as I see.
https://github.com/coin-or/Osi/blob/releases/0.108.6/Osi/configure#L11662-L11678

from osi.

eli-b avatar eli-b commented on August 26, 2024

Thanks @svigerske, this is the script I'm referring to. Are the Gurobi flags not documented?

I think the checking if user provides library for Gurobi part happens around line 23840 of the script.

from osi.

svigerske avatar svigerske commented on August 26, 2024

yes, Osi/configure --help:

  --with-gurobi-incdir specify the header file directory for library Gurobi
  --with-gurobi-lib specify the flags used to link with the library Gurobi

I use

--with-gurobi-incdir="/path/to/gurobi/include"
--with-gurobi-lib="-L/path/to/gurobi/libs -lgurobi -lm -lpthread"

from osi.

eli-b avatar eli-b commented on August 26, 2024

Those flags don't seem to exist in the latest release 0.108.6. I'll have to build from master.

from osi.

svigerske avatar svigerske commented on August 26, 2024

They exist for Osi 0.108.6.

On master, they are called differently, though.

from osi.

eli-b avatar eli-b commented on August 26, 2024

I can't seem to find mention of gurobi or grb in https://github.com/coin-or/Osi/blob/releases/0.108.6/configure. I might be missing something.

After running with the flags you provided, should I expect to find OsiGrbSolverInterface.hpp in dist/include? I don't seem to get Gurobi-related include files there.

from osi.

svigerske avatar svigerske commented on August 26, 2024

As said before, look at the configure file in the Osi subdirectory: https://raw.githubusercontent.com/coin-or/Osi/releases/0.108.6/Osi/configure

If Osi's configure acknowledges the presence of Gurobi, then it should install OsiGrbSolverInterface.hpp and a libOsiGrb.so library.

from osi.

eli-b avatar eli-b commented on August 26, 2024

Thanks for your time @svigerske. I thought you meant the Osi subdirectory relative to where I'm running coinbrew. It's still a little confusing that the more high-level configure script at the root of the repo mentions some flags like --with-glpk-incdir but not others.

For anybody reading this later, I'll mention:

  • master is arranged differently. Only a single configure script.
  • The flags it takes look different

from osi.

tkralphs avatar tkralphs commented on August 26, 2024

We are in the midst of a major change in the build infrastructure and the organization of the repos. The current stable version is using the old infrastructure and master has been migrated to the new infrastructure. It is admittedly a little confusing right now if you are working with both, but we will document this carefully.

But let me just add that the easiest thing to do is to use coinbrew to get the configure help of the project, then it's uniform no matter what version you are using

 coinbrew Osi --configure-help

from osi.

eli-b avatar eli-b commented on August 26, 2024

Thanks @tkralphs, that's useful!

I'm very impressed with the dedication of both of you to addressing issues quickly.

I'm still unable to build Osi with Gurobi support, despite being able to link against Gurobi directly in my repo.

With version 0.108.6, I'm getting the following during Osi's configuration after providing --with-gurobi-incdir="$GUROBI_HOME/include" --with-gurobi-lib="-L$GUROBI_HOME/lib -llibgurobi_c++ -lgurobi" --with-gurobi:

checking whether symbol GRBloadenv is available with GRB... no
configure: error: Cannot find symbol(s) GRBloadenv with GRB

With master and its flags, I'm getting:

checking for package Gurobi with function GRBloadenv... no

from osi.

svigerske avatar svigerske commented on August 26, 2024

Check the config.log file for why it could not find symbol GRBloadenv. Often, this is due to unresolved symbols in third-party libraries, but here it is probably because it cannot find liblibgurobi_c++.a. Since OsiGrb does not use the Gurobi C++ API, you can skip this completely.

There was probably a reason why I mentioned that I also use -lm -lpthread.

from osi.

tkralphs avatar tkralphs commented on August 26, 2024

coinbrew should now print the relevant config.log whenever the configuration for a project fails, so just check the last part of the output to see what failed.

from osi.

eli-b avatar eli-b commented on August 26, 2024

Re-running without -llibgurobi_c++ and with -lm -lpthread now.

Each iteration takes forever because coinbrew warns I should only re-run with a different configuration if I know what I'm doing, and since I clearly don't, I delete all the fetched directories and start from scratch each time.

from osi.

eli-b avatar eli-b commented on August 26, 2024

Here's the relevant part from config.log:

configure:11751: checking whether symbol GRBloadenv is available with GRB
configure:11769: gcc -o conftest -O3 -pipe -DNDEBUG -Wimplicit -Wparentheses -Wsequence-point -Wreturn-type -Wcast-qual -Wall -Wno-unknown-pragmas -Wno-long-long   -DOSI_BUILD   conftest.c -L/home/eli/gurobi811/linux64/lib -lgurobi -lm -lpthread  >&5
conftest.c: In function 'main':
conftest.c:38:1: warning: implicit declaration of function 'GRBloadenv' [-Wimplicit-function-declaration]
   38 | GRBloadenv()
      | ^~~~~~~~~~
/usr/bin/ld: cannot find -lgurobi
collect2: error: ld returned 1 exit status

I've tried running with and without a --static flag and got the same failure.

I re-checked, and libgurobi.so.8.1.1 is definitely there and sane:

> ldd $GUROBI_HOME/lib/libgurobi.so.8.1.1
	linux-vdso.so.1 (0x00007ffc705b1000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f41e5151000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f41e512e000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f41e5128000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f41e4fd9000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f41e4de7000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f41e65ea000)

from osi.

svigerske avatar svigerske commented on August 26, 2024

But not libgurobi.so. Probably there is libgurobi81.so, so you want -lgurobi81.

Come on. This is the Osi issue tracker.

from osi.

eli-b avatar eli-b commented on August 26, 2024

Sorry, the original issue is definitely resolved.

I'd be happy to move the rest of the comments somewhere more appropriate.

from osi.

tkralphs avatar tkralphs commented on August 26, 2024

@eli-b No worries!

from osi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.