<div> </div>
<div>Hi,</div>
<div> </div>
<div>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 "icpc" 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.
</div>
<div> </div>
<div>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 "printf", as shown below.
</div>
<div> </div>
<div>#include ***</div>
<div> </div>
<div>int<br>main (int argc, char *argv[])<br>{<br> printf ("Beginning of the code.\n");<br>......</div>
<div>}</div>
<div> </div>
<div> </div>
<div> </div>
<div>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 "Cbc: LP relaxation is infeasible or too expensive". I write the MIP out, actually the problem is ok and it can be solved very easily.
</div>
<div> </div>
<div>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'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'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!
</div>
<div> </div>
<div>Thanks!</div>
<div> </div>
<div>yang</div>
<div> </div>
<div>p.s. The following is the makefile i am using:</div>
<div> </div>
<div>/******************************************</div>
<div>
<p>D2BAC=$(HOME)/D2-MPI</p>
<p>CXX = icpc </p>
<p># C++ Compiler options<br>CXXFLAGS = -O2 -unroll0 -mp1 -w -ip<br># -cxxlib-gcc -gcc-version=323</p>
<p># additional C++ Compiler options for linking<br>CXXLINKFLAGS =<br>#-Wl,--rpath -Wl,/home/osu4502/Coin-Cbc/lib -cxxlib-gcc</p>
<p># Directory with COIN header files<br>COININCDIR = $(HOME)/Coin-Cbc-T1/include</p>
<p># Directory with COIN libraries<br>COINLIBDIR = $(HOME)/Coin-Cbc-T1/lib</p>
<p># 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</p>
<p># Libraries necessary to link with Clp<br>LIBS = -L$(COINLIBDIR) -lCbc -lCgl -lOsiClp -lOsiCbc -lOsi -lClp -lCoinUtils \<br> -lm -lc \<br> `cat $(COINLIBDIR)/cgl_addlibs.txt` \<br> `cat $(COINLIBDIR)/osi_addlibs.txt` \
<br> `cat $(COINLIBDIR)/clp_addlibs.txt` \<br> `cat $(COINLIBDIR)/coinutils_addlibs.txt`</p>
<p># ------------------------------------------------------------</p>
<p>clean :<br> /bin/rm -rf *.o *~</p>
<p>realclean :<br> /bin/rm -rf *.o *~<br> /bin/rm -rf *.mps *.ord *.sos *.lp *.sav *.net *.msg</p>
<p># ------------------------------------------------------------</p>
<p>d2alg: d2algFuncsV2.o d2algMainV2.o COINInterface.o<br> $(CXX) $(CXXLINKFLAGS) d2algMainV2.o d2algFuncsV2.o COINInterface.o -o d2alg $(MPI_LIBS) $(LIBS)<br>COINInterface.o: $(D2BAC)/ COINInterface.c<br> $(CXX) -c $(MPI_CFLAGS) $(CXXFLAGS) -I$(COININCDIR) $(D2BAC)/COINInterface.c -o
COINInterface.o<br>d2algMainV2.o: $(D2BAC)/ d2algMainV2.c<br> $(CXX) -c $(MPI_CFLAGS) $(CXXFLAGS) -I$(COININCDIR) $(D2BAC)/d2algMainV2.c -o d2algMainV2.o<br>d2algFuncsV2.o: $(D2BAC)/ d2algFuncsV2.c<br> $(CXX) -c $(MPI_CFLAGS) $(CXXFLAGS) -I$(CINCDIR) -I$(COININCDIR) $(D2BAC)/d2algFuncsV2.c -o
d2algFuncsV2.o<br></p></div>