[Coin-discuss] Can't get simple Osi and Clp example to work (Newbie Question)

Alexander Gose ahgose at yahoo.com
Mon Feb 20 16:22:23 EST 2006


I appreciate you taking the time to help me, J.P. Fasano.  You were right about the zipped mps file.  I unzipped all the mps files, reran the makefile, and the unitTest.exe ran successfully.
   
  Unfortunately, I still can't get basic.cpp to compile (even after using the -mno-cygwin flag like you suggested).  Here's the output that I got: (note: the $ is the command line prompt)
   
  In directory /home/COIN/Examples/Osi
$ make -f makefile.basic
g++ -mno-cygwin -I/home/COIN/include -c basic.cpp
g++ -mno-cygwin -o basic -I/home/COIN/include -L/home/COIN/lib  -Wl,-R,/home/COI
N/lib basic.o -lCoin -lCoin-O2 -lOsi -lOsi-g -lOsiClp -OsiClp-O1 -lClp
/home/COIN/lib/libOsiClp.a(OsiClpSolverInterface.o):OsiClpSolverInterface.cpp:(.
text+0x1f9): undefined reference to `CoinMessageHandler::setLogLevel(int)'
/home/COIN/lib/libOsiClp.a(OsiClpSolverInterface.o):OsiClpSolverInterface.cpp:(.
text+0x220): undefined reference to `CoinFactorization::maximumPivots(int)'
/home/COIN/lib/libOsiClp.a(OsiClpSolverInterface.o):OsiClpSolverInterface.cpp:(.
text+0x2e8): undefined reference to `CoinMessageHandler::setLogLevel(int)'
/home/COIN/lib/libOsiClp.a(OsiClpSolverInterface.o):OsiClpSolverInterface.cpp:(.
text+0x3be): undefined reference to `CoinWarmStartBasis::numberBasicStructurals(
)'
/home/COIN/lib/libOsiClp.a(OsiClpSolverInterface.o):OsiClpSolverInterface.cpp:(.
text+0x799): undefined reference to `CoinFactorization::maximumPivots(int)'
/home/COIN/lib/libOsiClp.a(OsiClpSolverInterface.o):OsiClpSolverInterface.cpp:(.
text+0x7c3): undefined reference to `CoinFactorization::maximumPivots(int)'
  ....
   
  It keeps going like this for a long time
   
  I can't figure out why I can get the Osi unitTest source code to compile, but I can't get basic.cpp to compile.  Do you have any other ideas on what might be causing it? Maybe there's a different test I can run?  Again, I'm grateful for your assistance.  Thanks,
  
Alex

J P Fasano <jpfasano at us.ibm.com> wrote:
  
> 3) I successfully ran the makefile in Coin/Osi/Test, and I
> successfully ran the unitTest.exe file in Coin/Osi (although I did
> get the message "Assertion failed: mpsRc==0, file
> OsiSolverInterfaceTest.cpp, line 1757 This application has requested
> the! Runtime to terminate it in an unusual way. P! lease contact the
> application's support team for more information.") So, all the *.o
> files, *.a files, *.hpp files and subdirectories were created.

Are these the messages you are getting?
-------------
Coin6001E Unable to open mps input file ..\Mps\Netlib\e226.mps
Coin0008I read with -1 errors
Assertion failed: mpsRc==0, file OsiSolverInterfaceTest.cpp, line 1757

This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.
-------------

If yes, then you are missing the file COIN/Mps/Netlib/e226.mps.

You probably have the file COIN/Mps/Netlib/e226.mps.gz.
The gz file suffix indicates a compressed file format.
In the cygwin environment you should be able to uncompress these files by:
- cd COIN/Mps/Netlib
- gzip -d *.gz


> 4) I tried running the following example: http://www.coin-or.
> org/cgi-bin/cvsweb.cgi/COIN/Examples/Osi/basic.cpp?rev=1.1;content-
> type=text%2Fplain. I used the following makefile: http://www.coin-
> or.org/cgi-bin/cvsweb.cgi/COIN/Examples/Osi/Makefile.basic?rev=1.1;
> content-type=text%2Fplain and I appropriately changed "COIN_DIR :=
> /home/COIN" (where my COIN directory ! is located) and ran makefile.
> basic according to the directions at: http://www.coin-or.org/cgi-
>
bin/cvsweb.cgi/COIN/Examples/Osi/README?rev=1.2;content-type=text%2Fplain.

In COIN/Examples/Osi/Makefile.basic try changing the line
CXX := g++
to be
CXX := g++ -mno-cygwin
I suspect that the link errors are because in the cygwin environment COIN
is now building with the -mno-cygwin option and example makefile you are
using does not have this option specified.




_______________________________________________
Coin-discuss mailing list
Coin-discuss at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/coin-discuss


		
---------------------------------
 Yahoo! Autos. Looking for a sweet ride? Get pricing, reviews, & more on new and used cars.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20060220/f6db44b3/attachment.html>


More information about the Coin-discuss mailing list