This won&#39;t compile at all now when using #ifdef COIN_HAS_CPX<br><br><br>../../../../Cgl/src/CglLandP/CglLandPSimplex.cpp: In constructor &#39;LAP::CglLandPSimplex::CglLandPSimplex(const OsiSolverInterface&amp;, const CglLandP::CachedData&amp;, const CglLandP::Parameters&amp;, const LAP::Validator&amp;)&#39;:<br>

../../../../Cgl/src/CglLandP/CglLandPSimplex.cpp:212: error: &#39;else&#39; without a previous &#39;if&#39;<br>../../../../Cgl/src/CglLandP/CglLandPSimplex.cpp:213: error: &#39;OsiXprSolverInterface&#39; was not declared in this scope<br>

../../../../Cgl/src/CglLandP/CglLandPSimplex.cpp:213: error: &#39;cpxSi&#39; was not declared in this scope<br>../../../../Cgl/src/CglLandP/CglLandPSimplex.cpp:213: error: expected type-specifier before &#39;OsiXprSolverInterface&#39;<br>

../../../../Cgl/src/CglLandP/CglLandPSimplex.cpp:213: error: expected `&gt;&#39; before &#39;OsiXprSolverInterface&#39;<br>../../../../Cgl/src/CglLandP/CglLandPSimplex.cpp:213: error: expected `(&#39; before &#39;OsiXprSolverInterface&#39;<br>

../../../../Cgl/src/CglLandP/CglLandPSimplex.cpp:213: error: expected primary-expression before &#39;&gt;&#39; token<br>../../../../Cgl/src/CglLandP/CglLandPSimplex.cpp:213: error: expected `)&#39; before &#39;;&#39; token<br>

../../../../Cgl/src/CglLandP/CglLandPSimplex.cpp: At global scope:<br>../../../../Cgl/src/CglLandP/CglLandPSimplex.cpp:28: warning: &#39;void MyAssertFunc(bool, const std::string&amp;, const std::string&amp;, unsig<br><br>

<br><div class="gmail_quote"><br><br><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Matt,<br><div class="gmail_quote"><div class="im">

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>You missed a few places. Diffs pasted below. With these diffs now, it does seem that Cgl is independent of Clp.</blockquote>


</div><div>Thanks, I fixed them.<br>Best,<br><font color="#888888">Pierre <br></font></div><div><div></div><div class="h5"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>

<br><br>magh@shark:~/COIN/coin-Decomp/Cgl/src$ svn diff<br>Index: CglLandP/CglLandPSimplex.cpp<br>===================================================================<br>--- CglLandP/CglLandPSimplex.cpp        (revision 736)<br>




+++ CglLandP/CglLandPSimplex.cpp        (working copy)<br>@@ -905,10 +905,12 @@<br>     double infty = si_-&gt;getInfinity();<br>     int clpLeavingStatus = leavingStatus;<br><br>+#ifdef COIN_HAS_CLP<br>     if (solver_ == clp) {<br>




         if (basics_[leaving] &gt;= ncols_)<br>             clpLeavingStatus = - leavingStatus;<br>     }<br>+#endif<br>     //row_k_.print(std::cout, 7, nonBasics_, ncols_);<br>     //row_i_.print(std::cout, 7, nonBasics_, ncols_);<br>




 #if 0<br>Index: CglLandP/CglLandPSimplex.hpp<br>===================================================================<br>--- CglLandP/CglLandPSimplex.hpp        (revision 736)<br>+++ CglLandP/CglLandPSimplex.hpp        (working copy)<br>




@@ -18,7 +18,9 @@<br> #include &quot;CoinWarmStartBasis.hpp&quot;<br> #include &quot;CoinPackedMatrix.hpp&quot;<br><br>+#ifdef COIN_HAS_CLP<br> #include &quot;OsiClpSolverInterface.hpp&quot;<br>+#endif<br> #include &quot;CglLandPTabRow.hpp&quot;<br>




 #include &quot;CglLandPUtils.hpp&quot;<br> #include &quot;CglLandPMessages.hpp&quot;<br>@@ -65,15 +67,19 @@<br><br>     void setSi(OsiSolverInterface *si) {<br>         si_ = si;<br>+#ifdef COIN_HAS_CLP<br>         OsiClpSolverInterface * clpSi = dynamic_cast&lt;OsiClpSolverInterface *&gt;(si_);<br>




         if (clpSi) {<br>             solver_ = clp;<br>             clp_ = clpSi;<br>         }<br>+#endif<br>     }<br>     void freeSi() {<br>         delete si_;<br>+#ifdef COIN_HAS_CLP<br>         clp_ = NULL;<br>+#endif<br>




     }<br><br>     Cuts&amp; extraCuts() {<div><div></div><div><br><br><br><br><br><br><br><br><div class="gmail_quote"><br><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">




Matt,<br>I updated makefiles in trunk so that nothing of CglLandP should be compiled if COIN_HAS_CLP is not true (I don&#39;t have writting permissions for the latest stable but modifications will come next time stable is updated). It should fix your linking problem, and remove the dependance (except if you would want to use lift-and-project cuts of course...).<br>





Best,<br><font color="#888888">Pierre</font><div><div></div><div><br><br><div class="gmail_quote">On Fri, May 22, 2009 at 9:01 AM, John J Forrest <span dir="ltr">&lt;<a href="mailto:jjforre@us.ibm.com" target="_blank">jjforre@us.ibm.com</a>&gt;</span> wrote:<br>




<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<p>Matt,<br>
<br>
As the owner of Clp I plead innocent.  If you look at code you will see that only CglLAndP uses Clp.  Other cut generators which use tableau e.g. CglGomory use Coin code to do factorization.<br>
<br>
It would probably only be an hours work to use #ifdef COIN_HAS_CLP to dummy out CglLandP.  However it might be better to get the opinion of Pierre Bonami as I also notice #ifdef COIN_HAS_CPX and #ifdef COIN_HAS_XPR in the CglLandPSimplex code.<br>






<br>
John<br>
<br>
<img alt="Inactive hide details for Matthew Galati ---05/21/2009 09:59:14 PM---So... CGL does depend on CLP. Ok. Hopefully someone can fi" border="0" width="16" height="16"><font color="#424282">Matthew Galati ---05/21/2009 09:59:14 PM---So... CGL does depend on CLP. Ok. Hopefully someone can fix that someday.</font><br>






<br>

</p><table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody><tr valign="top"><td width="1%"><img alt="" border="0" width="96" height="1"><br>
<font color="#5f5f5f" size="2">From:</font></td><td width="100%"><img alt="" border="0" width="1" height="1"><br>
<font size="2">Matthew Galati &lt;<a href="mailto:magh@lehigh.edu" target="_blank">magh@lehigh.edu</a>&gt;</font></td></tr>

<tr valign="top"><td width="1%"><img alt="" border="0" width="96" height="1"><br>
<font color="#5f5f5f" size="2">To:</font></td><td width="100%"><img alt="" border="0" width="1" height="1"><br>
<font size="2"><a href="mailto:ladanyi@watson.ibm.com" target="_blank">ladanyi@watson.ibm.com</a></font></td></tr>

<tr valign="top"><td width="1%"><img alt="" border="0" width="96" height="1"><br>
<font color="#5f5f5f" size="2">Cc:</font></td><td valign="middle" width="100%"><img alt="" border="0" width="1" height="1"><br>
<font size="2">&quot;<a href="mailto:coin-discuss@list.coin-or.org" target="_blank">coin-discuss@list.coin-or.org</a>&quot; &lt;<a href="mailto:coin-discuss@list.coin-or.org" target="_blank">coin-discuss@list.coin-or.org</a>&gt;, Matthew Galati &lt;<a href="mailto:Matthew.Galati@sas.com" target="_blank">Matthew.Galati@sas.com</a>&gt;</font></td>





</tr>

<tr valign="top"><td width="1%"><img alt="" border="0" width="96" height="1"><br>
<font color="#5f5f5f" size="2">Date:</font></td><td width="100%"><img alt="" border="0" width="1" height="1"><br>
<font size="2">05/21/2009 09:59 PM</font></td></tr>

<tr valign="top"><td width="1%"><img alt="" border="0" width="96" height="1"><br>
<font color="#5f5f5f" size="2">Subject:</font></td><td width="100%"><img alt="" border="0" width="1" height="1"><br>
<font size="2">Re: [Coin-discuss] does CGL depend on CLP?</font></td></tr>
</tbody></table>
<hr style="color: rgb(128, 145, 165);" align="left" size="2" width="100%" noshade><div><div></div><div><br>
<br>
<br>
<font size="4">So... CGL does depend on CLP. Ok. Hopefully someone can fix that someday.<br>
</font><br>

<ul><font size="4">On Thu, 21 May 2009, Matthew Galati wrote:<br>
<br>
&gt; I am trying to use CPLEX as my LP solver. Does CGL depend on CLP? if<br>
&gt; so - why? CGL should be completely independent of any LP solver -<br>
&gt; right?<br>
</font><br>
<font size="4">Yes and no... The end result is independent. However, some cut<br>
generators (e.g., CglLandP) depend on being able to perform low level<br>
tableau manipulation. Those methods are not available through OSI, so<br>
the cut generator uses an LP solver that does support these functions,<br>
and clp is a natural choice there. Actually, even if those methods<br>
would be available through OSI some LP solvers (like interior point)<br>
do not support them, so CGL would have to link with clp (or some LP<br>
solver that does support tableau methods) as a backup solution.<br>
<br>
Granted, the code could have been written with a bunch of ifdefs, but<br>
apparently that&#39;s not how it was done...<br>
<br>
--Laci</font><br>
<font size="4"><br>
&gt;<br>
&gt;<br>
&gt; bla=;\<br>
&gt;        for file in ATM_Main.o ATM_Instance.o ATM_DecompApp.o; do bla=&quot;$bla `echo $file`&quot;; done; \<br>
&gt;        g++ -Wl,--rpath -Wl,/home/magh/COIN/coin-Decomp/build/lib -O3 -fomit-frame-pointer -pipe -DNDEBUG -pedantic-errors -Wimplicit -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas   -o decomp_atm $bla  -L/home/magh/COIN/coin-Decomp/build/lib -lDecomp -L/usr/local/cplex/lib/x86_rhel4.0_3.4/static_pic -lcplex -lpthread -lm  -lAlps `cat /home/magh/COIN/coin-Decomp/build/Decomp/../Alps/alps_addlibs.txt` -lOsiCpx -lcplex -lOsiCpx -lcplex -L/home/magh/COIN/coin-Decomp/build/lib -lCgl -lOsi -lCoinUtils `cat /home/magh/COIN/coin-Decomp/build/Decomp/../Cgl/cgl_addlibs.txt` `cat /home/magh/COIN/coin-Decomp/build/Decomp/../Osi/osi_addlibs.txt` `cat /home/magh/COIN/coin-Decomp/build/Decomp/../CoinUtils/coinutils_addlibs.txt`<br>






&gt; /home/magh/COIN/coin-Decomp/build/lib/libCgl.so: undefined reference to `typeinfo for OsiClpSolverInterface&#39;<br>
&gt; /home/magh/COIN/coin-Decomp/build/lib/libCgl.so: undefined reference to `OsiClpSolverInterface::getModelPtr() const&#39;<br>
&gt; /home/magh/COIN/coin-Decomp/build/lib/libCgl.so: undefined reference to `ClpSimplex::factorize()&#39;<br>
&gt; collect2: ld returned 1 exit status<br>
&gt; make: *** [decomp_atm] Error 1<br>
&gt;<br>
</font><br>
<font size="4">_______________________________________________<br>
Coin-discuss mailing list</font><u><font color="#0000ff" size="4"><br>
</font></u><a href="mailto:Coin-discuss@list.coin-or.org" target="_blank"><u><font color="#0000ff" size="4">Coin-discuss@list.coin-or.org</font></u></a><u><font color="#0000ff" size="4"><br>
</font></u><a href="http://list.coin-or.org/mailman/listinfo/coin-discuss" target="_blank"><u><font color="#0000ff" size="4">http://list.coin-or.org/mailman/listinfo/coin-discuss</font></u></a></ul>
<tt>_______________________________________________<br>
Coin-discuss mailing list<br>
<a href="mailto:Coin-discuss@list.coin-or.org" target="_blank">Coin-discuss@list.coin-or.org</a><br>
</tt><tt><a href="http://list.coin-or.org/mailman/listinfo/coin-discuss" target="_blank">http://list.coin-or.org/mailman/listinfo/coin-discuss</a></tt><tt><br>
</tt><br>
<br>
</div></div></div>
<br>_______________________________________________<br>
Coin-discuss mailing list<br>
<a href="mailto:Coin-discuss@list.coin-or.org" target="_blank">Coin-discuss@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/coin-discuss" target="_blank">http://list.coin-or.org/mailman/listinfo/coin-discuss</a><br>
<br></blockquote></div><br>
</div></div><br>_______________________________________________<br>
Coin-discuss mailing list<br>
<a href="mailto:Coin-discuss@list.coin-or.org" target="_blank">Coin-discuss@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/coin-discuss" target="_blank">http://list.coin-or.org/mailman/listinfo/coin-discuss</a><br>
<br></blockquote></div><br>
</div></div></blockquote></div></div></div><br>
</blockquote></div><br>