<div>&nbsp;</div>
<div>Hi Alan,</div>
<div>&nbsp;</div>
<div>Thanks for the suggestion, I tried it. looks like it is not the problem. &quot;mpicxx.h&quot; is not involved in this app. </div>
<div>&nbsp;</div>
<div>Thanks again, yang<br><br>&nbsp;</div>
<div><span class="gmail_quote">On 6/20/07, <b class="gmail_sendername">Alan King</b> &lt;<a href="mailto:kingaj@us.ibm.com">kingaj@us.ibm.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br><font face="sans-serif" size="2">I saw this problem with MPICH and C++ in another context. &nbsp;I had to insert the following directive
</font> <br><br><font face="sans-serif" size="2">#define MPICH_SKIP_MPICXX</font> <br><br><font face="sans-serif" size="2">Maybe this, or something similar, will work for you, too.</font> <br><br><font face="sans-serif" size="2">
Alan</font> <br><font face="sans-serif" size="2"><br>Alan King<br>Math Sciences<br>IBM Thomas J Watson Research Center<br>914-945-1236<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.research.ibm.com/people/k/kingaj/" target="_blank">
http://www.research.ibm.com/people/k/kingaj/</a></font> <br><br><br>
<table width="100%">
<tbody>
<tr valign="top">
<td width="40%"><font face="sans-serif" size="1"><b>&quot;YANG YUAN&quot; &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:erry.yuan@gmail.com" target="_blank">erry.yuan@gmail.com</a>&gt;</b> </font>
<br><font face="sans-serif" size="1">Sent by: <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:coin-discuss-bounces@list.coin-or.org" target="_blank">coin-discuss-bounces@list.coin-or.org</a></font> 
<p><font face="sans-serif" size="1">06/20/2007 01:00 PM</font> 
<table border="1">
<tbody>
<tr valign="top">
<td bgcolor="white">
<div align="center"><font face="sans-serif" size="1">Please respond to<br>Discussions about open source software for Operations Research &nbsp; &nbsp; &nbsp; &nbsp;&lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:coin-discuss@list.coin-or.org" target="_blank">
coin-discuss@list.coin-or.org</a>&gt;</font></div></td></tr></tbody></table><br></p>
<td width="59%">
<table width="100%">
<tbody>
<tr valign="top">
<td>
<div align="right"><font face="sans-serif" size="1">To</font></div>
<td><font face="sans-serif" size="1"><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:coin-discuss@list.coin-or.org" target="_blank">coin-discuss@list.coin-or.org</a></font> 
<tr valign="top">
<td>
<div align="right"><font face="sans-serif" size="1">cc</font></div>
<td>
<tr valign="top">
<td>
<div align="right"><font face="sans-serif" size="1">Subject</font></div>
<td><font face="sans-serif" size="1">[COIN-DISCUSS] Problems with MPI application using COIN</font></td></td></tr></td></td></tr></td></td></tr></tbody></table><br>
<table>
<tbody>
<tr valign="top">
<td>
<td></td></td></tr></tbody></table><br></td>
<td><p></p></td></td></tr></tbody></table><br><br><br><font size="3">&nbsp;</font> <br><font size="3">Hi,</font> <br><font size="3">&nbsp;</font> <br><font size="3">I am working on a MPI application using COIN-cbc, clp as solvers. The COIN shared libraries have been made using gcc, however, my own MPI program together with COIN failed to compile using mpicc (a compiler and linker constructed for MPI application). Instead, i use the intel C++ compiler &quot;icpc&quot; together with some necessary MPI lib and include files. Fortunately, the compilation and linking are fine, but on the other hand, probably it is one of the reason that causes the following errors. 
</font><br><font size="3">&nbsp;</font> <br><font size="3">If I add the link flags -cxxlib-gcc or -shared while linking my program with COIN shared libraries. the executable can be successfully generated. However, everytime i run it, it directly gives me a seg fault even without getting into the main function. it is proved by no output of the first &quot;printf&quot;, as shown below. 
</font><br><font size="3">&nbsp;</font> <br><font size="3">#include ***</font> <br><font size="3">&nbsp;</font> <br><font size="3">int<br>main (int argc, char *argv[])<br>{<br>&nbsp; printf (&quot;Beginning of the code.\n&quot;);<br>......
</font> <br><font size="3">}</font> <br><font size="3">&nbsp;</font> <br><font size="3">&nbsp;</font> <br><font size="3">&nbsp;</font> <br><font size="3">If I get rid of the link flags -cxxlib-gcc or -shared, the above seg fault is gone. and the Coin utility functions seem to work fine, but it fails to solve a simple MIP problem with output &quot;Cbc: LP relaxation is infeasible or too expensive&quot;. I write the MIP out, actually the problem is ok and it can be solved very easily. 
</font><br><font size="3">&nbsp;</font> <br><font size="3">I am suspecting that there might exist some linking errors, so that although the libraries (-lCbc -lCgl -lOsiClp -lOsiCbc -lOsi -lClp -lCoinUtils) have been linked, they don&#39;t function well. I sense the usage of shared libraries might also be a problem, but so far i have no luck in finding what&#39;s wrong. If you have any idea or some experience with using MPI and COIN together, please kindly provide me some directions. Any suggestion is extremely appreciated! 
</font><br><font size="3">&nbsp;</font> <br><font size="3">Thanks!</font> <br><font size="3">&nbsp;</font> <br><font size="3">yang</font> <br><font size="3">&nbsp;</font> <br><font size="3">p.s. The following is the makefile i am using:
</font> <br><font size="3">&nbsp;</font> <br><font size="3">/******************************************</font> 
<p><font size="3">D2BAC=$(HOME)/D2-MPI</font> 
<p><font size="3">CXX = icpc </font>
<p><font size="3"># C++ Compiler options<br>CXXFLAGS = -O2 -unroll0 -mp1 -w -ip<br># -cxxlib-gcc -gcc-version=323</font> 
<p><font size="3"># additional C++ Compiler options for linking<br>CXXLINKFLAGS =<br>#-Wl,--rpath -Wl,/home/osu4502/Coin-Cbc/lib -cxxlib-gcc</font> 
<p><font size="3"># Directory with COIN header files<br>COININCDIR = $(HOME)/Coin-Cbc-T1/include</font> 
<p><font size="3"># Directory with COIN libraries<br>COINLIBDIR = $(HOME)/Coin-Cbc-T1/lib</font> 
<p><font size="3"># Directory with C library and header files<br>CINCDIR = /usr/local/intel-8.0-20040716/include/c++<br>CLIBDIR = /usr/local/intel-8.0-20040716/lib</font> 
<p><font size="3"># Libraries necessary to link with Clp<br>LIBS = -L$(COINLIBDIR) -lCbc -lCgl -lOsiClp -lOsiCbc -lOsi -lClp -lCoinUtils \<br>&nbsp; &nbsp; &nbsp; &nbsp;-lm -lc \<br>&nbsp; &nbsp; &nbsp; &nbsp;`cat $(COINLIBDIR)/cgl_addlibs.txt` \<br>&nbsp; &nbsp; &nbsp; &nbsp;`cat $(COINLIBDIR)/osi_addlibs.txt` \ 
<br>&nbsp; &nbsp; &nbsp; &nbsp;`cat $(COINLIBDIR)/clp_addlibs.txt` \<br>&nbsp; &nbsp; &nbsp; &nbsp;`cat $(COINLIBDIR)/coinutils_addlibs.txt`</font> 
<p><font size="3"># ------------------------------------------------------------</font> 
<p><font size="3">clean :<br>&nbsp; &nbsp; &nbsp; &nbsp;/bin/rm -rf *.o *~</font> 
<p><font size="3">realclean :<br>&nbsp; &nbsp; &nbsp; &nbsp;/bin/rm -rf *.o *~<br>&nbsp; &nbsp; &nbsp; &nbsp;/bin/rm -rf *.mps *.ord *.sos *.lp *.sav *.net *.msg</font> 
<p><font size="3"># ------------------------------------------------------------</font> 
<p><font size="3">d2alg: d2algFuncsV2.o &nbsp;d2algMainV2.o COINInterface.o<br>&nbsp; &nbsp; &nbsp; &nbsp;$(CXX) $(CXXLINKFLAGS) d2algMainV2.o d2algFuncsV2.o COINInterface.o &nbsp;-o d2alg &nbsp;$(MPI_LIBS) $(LIBS)<br>COINInterface.o: $(D2BAC)/ COINInterface.c
<br>&nbsp; &nbsp; &nbsp; &nbsp;$(CXX) -c $(MPI_CFLAGS) $(CXXFLAGS) -I$(COININCDIR) $(D2BAC)/COINInterface.c -o COINInterface.o<br>d2algMainV2.o: $(D2BAC)/ d2algMainV2.c<br>&nbsp; &nbsp; &nbsp; &nbsp;$(CXX) -c $(MPI_CFLAGS) $(CXXFLAGS) -I$(COININCDIR) $(D2BAC)/d2algMainV2.c -o 
d2algMainV2.o<br>d2algFuncsV2.o: $(D2BAC)/ d2algFuncsV2.c<br>&nbsp; &nbsp; &nbsp; &nbsp;$(CXX) -c $(MPI_CFLAGS) $(CXXFLAGS) -I$(CINCDIR) -I$(COININCDIR) $(D2BAC)/d2algFuncsV2.c -o d2algFuncsV2.o</font><tt><font size="2">_______________________________________________
<br>Coin-discuss mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Coin-discuss@list.coin-or.org" target="_blank">Coin-discuss@list.coin-or.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://list.coin-or.org/mailman/listinfo/coin-discuss" target="_blank">
http://list.coin-or.org/mailman/listinfo/coin-discuss</a><br></font></tt>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p><br>_______________________________________________<br>Coin-discuss mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Coin-discuss@list.coin-or.org">Coin-discuss@list.coin-or.org
</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://list.coin-or.org/mailman/listinfo/coin-discuss" target="_blank">http://list.coin-or.org/mailman/listinfo/coin-discuss</a><br><br></p></p></p></p>
</p></p></p></p></p></p></p></p></p></blockquote></div><br>