[Symphony] trouble compiling Symphony 5.4.0 with OSI 0.102 Cplex support

Ethan L. Schreiber ethan at cs.ucla.edu
Fri Jun 15 00:40:45 EDT 2012


I am having trouble compiling Symphony with cplex support using OSI.  Here
are the details of my problem:

- I have cplex installed in this directory: /opt/ibm/ILOG/CPLEX_Studio124/

- I compiled and installed OSI 0.102 with cplex support using this
configure string:

./configure
--with-cplex-lib="-L/opt/ibm/ILOG/CPLEX_Studio124/cplex/lib/x86-64_sles10_4.1/static_pic
-lcplex -lpthread"
--with-cplex-incdir="/opt/ibm/ILOG/CPLEX_Studio124/cplex/include/ilcplex/"
-C ADD_CXXFLAGS="-Wno-long-long" --prefix="/opt/coin-or/osi"

then I rand make and sudo make-install

Now I am trying to compile symphony using this configure string:

./configure
--with-cplex-lib="-L/opt/ibm/ILOG/CPLEX_Studio124/cplex/lib/x86-64_sles10_4.1/static_pic
-lcplex -lm -lpthread"
--with-cplex-incdir="/opt/ibm/ILOG/CPLEX_Studio124/cplex/include/ilcplex/"
--with-lp-solver="cplex" --prefix="/opt/coin-or/symphony"
--enable-gnu-packages

When I run make, I get this error (I apologize for the length):

-----------------------------------------------------------------------------------------------------------
 g++ -DHAVE_CONFIG_H -I. -I../include -I../include
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Osi/src/OsiCpx
-I/opt/ibm/ILOG/CPLEX_Studio124/cplex/include/ilcplex
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Osi/src/Osi
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/CoinUtils/src
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglAllDifferent
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglClique
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglDuplicateRow
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglFlowCover
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglGomory
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglKnapsackCover
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglLandP
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglLiftAndProject
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglMixedIntegerRounding
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglMixedIntegerRounding2
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglOddHole
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglPreProcess
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglProbing
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglRedSplit
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglResidualCapacity
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglSimpleRounding
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Cgl/src/CglTwomir
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Clp/src/OsiClp
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Clp/src
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Osi/src/Osi
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/CoinUtils/src
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Clp/src/OsiClp
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Clp/src
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Osi/src/Osi
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/CoinUtils/src
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/Osi/src/Osi
-I/home/ethan/Downloads/coin/symphony/SYMPHONY-5.4.0/CoinUtils/src
-DHAS_READLINE -DUSE_CGL_CUTS -DSIGHANDLER -DHAS_RANDOM -DHAS_SRANDOM
-D__NONE__ -D__LINUX -DCOMPILE_IN_CG -DCOMPILE_IN_CP -DCOMPILE_IN_LP
-DCOMPILE_IN_TM -O3 -pipe -DNDEBUG -pedantic-errors -Wparentheses
-Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings
-Wconversion -Wno-unknown-pragmas -Wno-long-long -DSYMPHONY_BUILD
-Wno-unknown-pragmas -Wno-write-strings -Wno-sign-compare -Wno-cast-qual
-MT libSym_la-master.lo -MD -MP -MF .deps/libSym_la-master.Tpo -c
Master/master.c  -fPIC -DPIC -o .libs/libSym_la-master.o
In file included from ../include/sym_cg.h:22:0,
                 from ../include/sym_tm.h:24,
                 from ../include/sym_master.h:27,
                 from Master/master.c:34:
../include/sym_lp_solver.h:117:2: error: #error
###################################
../include/sym_lp_solver.h:118:2: error: #error # Undefined or unknown LP
solver.
../include/sym_lp_solver.h:119:2: error: #error # Please edit
SYMPHONY/Makefile
../include/sym_lp_solver.h:120:2: error: #error # and define LP_SOLVER
properly.
../include/sym_lp_solver.h:121:2: error: #error
###################################
../include/sym_lp_solver.h:298:16: error: 'OsiCuts' was not declared in
this scope
../include/sym_lp_solver.h:298:25: error: 'cutlist' was not declared in
this scope
../include/sym_lp_solver.h:298:41: error: expected primary-expression
before '*' token
../include/sym_lp_solver.h:298:42: error: 'lp_data' was not declared in
this scope
../include/sym_lp_solver.h:298:51: error: expected primary-expression
before 'int'
../include/sym_lp_solver.h:298:65: error: expected primary-expression
before 'int'
../include/sym_lp_solver.h:299:27: error: expected primary-expression
before '*' token
../include/sym_lp_solver.h:299:30: error: 'cuts' was not declared in this
scope
../include/sym_lp_solver.h:299:36: error: expected primary-expression
before 'char'
../include/sym_lp_solver.h:299:55: error: expected primary-expression
before 'int'
../include/sym_lp_solver.h:300:20: error: expected primary-expression
before '*' token
../include/sym_lp_solver.h:300:21: error: 'lp_stat' was not declared in
this scope
../include/sym_lp_solver.h:300:41: error: expected primary-expression
before '*' token
../include/sym_lp_solver.h:300:42: error: 'compe_times' was not declared in
this scope
../include/sym_lp_solver.h:300:55: error: expected primary-expression
before 'int'
../include/sym_lp_solver.h:300:68: error: expression list treated as
compound expression in initializer [-fpermissive]
In file included from ../include/sym_primal_heuristics.h:25:0,
                 from Master/master.c:37:
../include/sym_lp.h:194:30: error: 'OsiCuts' has not been declared
../include/sym_lp.h:196:28: error: 'OsiCuts' has not been declared
In file included from ../include/sym_primal_heuristics.h:25:0,
                 from Master/master.c:37:
../include/sym_lp.h:198:18: error: 'OsiCuts' has not been declared
In file included from Master/master.c:37:0:
../include/sym_primal_heuristics.h:78:44: error: 'CoinPackedMatrix' does
not name a type
../include/sym_primal_heuristics.h:78:62: error: ISO C++ forbids
declaration of 'matrix' with no type [-fpermissive]
Master/master.c: In function 'int sym_get_col_solution(sym_environment*,
double*)':
Master/master.c:3135:62: warning: suggest parentheses around '&&' within
'||' [-Wparentheses]
Master/master.c: In function 'warm_start_desc* sym_read_warm_start(char*)':
-----------------------------------------------------------------------------------------------------------



The problem seems to be in the file
~/Downloads/coin/symphony/SYMPHONY-5.4.0/SYMPHONY/include/sym_lp_solver.h

It looks like this macro is evaluating to false when it needs to be true:

#ifdef __OSI_CPLEX__

Is there something I am doing wrong with my configure string?  If anyone
could help me, I would be much obliged!

Sincerely,

Ethan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/symphony/attachments/20120614/cfcf1616/attachment.html>


More information about the Symphony mailing list