Opened 10 years ago

Closed 20 months ago

#95 closed defect (migrated)

Have osi load solvers libraries at runtime rather than linking to them

Reported by: chm.duquesne Owned by: mjs
Priority: major Milestone:
Component: Osi Base Class Version: 0.100.2
Keywords: Cc:

Description

Rather than linking to solvers, Osi should try to find the solvers libraries at runtime. Attached is a patch that does this for gurobi.

Alternatively, you can clone my version of Osi at https://bitbucket.org/chmduquesne/osi-runtimeload

Attachments (4)

osi-gurobi-runtime-load.patch (38.2 KB) - added by chm.duquesne 10 years ago.
patch for loading gurobi library at runtime
runtime_library_discovery.patch (8.9 KB) - added by chm.duquesne 9 years ago.
pkgconfig.tar.gz (467 bytes) - added by chm.duquesne 9 years ago.
pkgconfig files I could not generate properly from the autotools macros
osi_solver.tar.gz (819 bytes) - added by chm.duquesne 9 years ago.
test case showing that the patch is working fine

Download all attachments as: .zip

Change History (6)

Changed 10 years ago by chm.duquesne

patch for loading gurobi library at runtime

Changed 9 years ago by chm.duquesne

Changed 9 years ago by chm.duquesne

pkgconfig files I could not generate properly from the autotools macros

Changed 9 years ago by chm.duquesne

test case showing that the patch is working fine

comment:1 Changed 9 years ago by chm.duquesne

The patch runtime_library_discovery.patch​ applies to trunk.

How to test:

  1. apply the patch
  2. run ./BuildTools/run_autotools from trunk (you should have the right version of the autotools installed. If you don't, use the patch I wrote for the BuildTools project)
  3. install lazylpsolverlibs
  4. run ./configure --prefix /usr/local; make (prefixing is optional. To be sure this works, I installed my version full time on my system so that I am the first to experiment bugs)
  5. replace the files osi-cplex.pc, osi-xpress.pc, osi-gurobi.pc with the ones I attached in the archive pkgconfig.tar.gz (sorry I could not generate these files properly using the autotools macros)
  6. (sudo) sudo make install
  7. compile the test case I attached in osi_solver.tar.gz, run ./solver:
  • if you don't specify where the solvers are, no problem should be solved.
  • otherwise if you give the full path to the proper library to lazylpsolverlibs through one of the variables LAZYLPSOLVERLIBS_CPLEX_LIB_PATH, LAZYLPSOLVERLIBS_XPRESS_LIB_PATH or LAZYLPSOLVERLIBS_GUROBI_LIB_PATH, it will solve the problem.
Last edited 9 years ago by chm.duquesne (previous) (diff)

comment:2 Changed 20 months ago by stefan

  • Resolution set to migrated
  • Status changed from new to closed

This ticket has been migrated to GitHub and will be resolved there: https://github.com/coin-or/Osi/issues/95

Note: See TracTickets for help on using tickets.