[Ipopt] Using a Third Party Software in IPOPT MA57 Interface

Jonathan Hogg jonathan.hogg at stfc.ac.uk
Tue Aug 26 11:35:06 EDT 2014


I must admit to being curious as to why you want that ordering when MA57 
already has an option for that (ipopt option ma57_pivot_order, 2=AMD, 
3=Min. Degree, 4=MeTiS, 5=automatic).

Regards,

Jonathan.

On 26/08/14 12:38, Senses,Begum wrote:
>
> Hi Joel,
>
> Sorry for my late reply. As Tony mentioned, I am not using CSPARSE as 
> the linear solver for IPOPT. KKT matrices arising in IPOPT are 
> indefinite matrices and CSPARSE  can not solve indefinite systems. 
> CSPARSE has the approximate minimum degree algorithm in it. I am using 
> this algorithm to change the ordering of KKT matrices.
>
> P.S I realized that my CSPARSE functions were working fine even before 
> I sent an email to group. A bug in my code was causing MATLAB crash so 
> if anyone wants to link a third party software to IPOPT you can use 
> the steps that I explained in my earlier emails.
>
> Have a great day.
>
>
> On Mon, 25 Aug 2014 10:14:22 +0200, Joel Andersson wrote:
>
>> Hello Begum,
>> For curiosity, does using CSparse work well together with IPOPT? Or 
>> did you want to avoid the other linear solvers written in Fortran 
>> (and mostly with non-permissive licenses)?
>> Did you use symbolic QR or LU? I assume you ignore symmetry?
>> Joel
>>
>>
>> 2014-08-21 3:43 GMT+02:00 Senses,Begum <bgmsenses at ufl.edu 
>> <mailto:bgmsenses at ufl.edu>>:
>>
>>
>>     I was just typing you an email about this. My code was working
>>     fine before therefore I did not even run make test. After I have
>>     started having troubles I have decided to run make test and you
>>     are right it should not work anyway because I am only adding
>>     -lcsparse into the matlabinterface makefile. I know I am having
>>     trouble using csparse functions because when I command out cparse
>>     functions I can run ipopt from Matlab without any trouble but
>>     when I add those functions my matlab crashes even before the
>>     first ipopt iteration. I am thinking maybe the problem is about
>>     an update I did in my computer (I dont remember doing any updates
>>     either but why would it stop working if I did not change anything.)
>>
>>
>>     On Wed, 20 Aug 2014 18:34:53 -0700, Tony Kelman wrote:
>>
>>         Are you sure you were running make test before, or were you just
>>         building the Matlab interface? To run standalone executables
>>         like from
>>         make test then you'll need to add -lcsparse to other link
>>         flags too,
>>         not just in the MatlabInterface folder. I think there are
>>         some ADDLIBS
>>         configure variables you can set for this.
>>
>>
>>         -----Original Message----- From: Senses,Begum
>>         Sent: Wednesday, August 20, 2014 6:18 PM
>>         To: Tony Kelman
>>         Cc: Ipopt
>>         Subject: Re: [Ipopt] Using a Third Party Software in IPOPT
>>         MA57 Interface
>>
>>
>>         Unfortunately It is still not working.
>>
>>         On Wed, 20 Aug 2014 18:03:00 -0700, Tony Kelman wrote:
>>
>>             I don't think csparse uses pkg-config, but I could be
>>             wrong there.
>>
>>             Try
>>             @COIN_HAS_PKGCONFIG_TRUE at LIBS =
>>             `PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@
>>             --libs ipopt |
>>             sed -e 's/-framework vecLib//g'` -lcsparse
>>
>>             And if you're on a system that doesn't have pkg-config
>>             installed,
>>             then you'll need to add -lcsparse to the line that starts
>>             with
>>             @COIN_HAS_PKGCONFIG_FALSE at LIBS = ...
>>
>>
>>
>>             -----Original Message----- From: Senses,Begum
>>             Sent: Wednesday, August 20, 2014 5:59 PM
>>             To: Tony Kelman
>>             Cc: Ipopt
>>             Subject: Re: [Ipopt] Using a Third Party Software in
>>             IPOPT MA57 Interface
>>
>>
>>             Hi Tony,
>>
>>             I downloaded Ipopt again did all of these steps again and
>>             it still does
>>             not work. I have also tried adding the changes to the
>>             Makefile.in file.
>>
>>             @COIN_HAS_PKGCONFIG_TRUE at LIBS =
>>             `PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@
>>             @PKG_CONFIG@ --libs ipopt | sed -e 's/-framework
>>             vecLib//g'` I changed
>>             this line with
>>
>>             @COIN_HAS_PKGCONFIG_TRUE at LIBS =
>>             `PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@
>>             @PKG_CONFIG@ --libs ipopt csparse | sed -e 's/-framework
>>             vecLib//g'`
>>
>>             and then ran the configure script again but it is still
>>             not working.
>>
>>
>>             On Wed, 20 Aug 2014 17:45:49 -0700, Tony Kelman wrote:
>>
>>                 Begum,
>>
>>                 Sounds like you reran configure since you made that
>>                 change. Configure
>>                 auto-generates the Makefiles from Makefile.in,
>>                 overwriting any changes
>>                 you made. Try making the change where you add
>>                 -lcsparse to LIBS in
>>                 Makefile.in instead, then run configure and it should
>>                 work again.
>>
>>                 -Tony
>>
>>
>>                 -----Original Message----- From: Senses,Begum
>>                 Sent: Wednesday, August 20, 2014 5:36 PM
>>                 To: Ipopt
>>                 Subject: [Ipopt] Using a Third Party Software in
>>                 IPOPT MA57 Interface
>>
>>
>>                 Hello everyone,
>>
>>                 I am trying to use a Third party software in
>>
>>
>>
>>                 ../CoinIpopt/Ipopt/src/Algorithm/LinearSolvers/IpMa57SolverInterface.cpp.
>>                 This third party software is called CSPARSE which is
>>                 written by Tim
>>                 Davis. I was able to use this software in this file
>>                 before but it
>>                 stopped working. Obviously I have changed something
>>                 somewhere but I
>>                 could not find it maybe one of you can think of anything.
>>
>>                 These are the steps that I am performing right now.
>>
>>                 1) Compile the third party software and obtain
>>                 libcsparse.a library.
>>                 2) Copy this library to CoinIpopt/lib folder.
>>                 3) Copy the main .h file of CSPARSE (cs.h) to the
>>                 same folder with
>>                 IpMa57SolverInterface.cpp file which is in
>>                 CoinIpopt/Ipopt/src/Algorithm/LinearSolvers folder.
>>                 4) Modify the makefile in
>>                 CoinIpopt/Ipopt/contrib/MatlabInterface/src .
>>                 I used to have LIBS = -L/CoinIpopt/lib -lipopt . I
>>                 added -lcsparse to
>>                 this line.
>>                 5) The last step is adding
>>
>>                 extern "C"
>>                 {
>>
>>                 #include "cs.h"
>>
>>                 }
>>
>>                 command at the beginning of the
>>                 IpMa57TSolverInterface.cpp file.
>>
>>                 As I mentioned before these steps used to work fine
>>                 but now when I run
>>                 make test it gives me the following error
>>
>>                 Undefined symbols for architecture x86_64:
>>                   "_cs_amd", referenced from:
>>                      
>>                 Ipopt::Ma57TSolverInterface::SymbolicFactorization(int const*,
>>                 int const*) in libipopt.a(IpMa57TSolverInterface.o)
>>
>>                 cs_amd is the function that I am trying to use from
>>                 CSPARSE software.
>>
>>                 Thank you.
>>
>>
>>     -- 
>>     Senses, Begum
>>     _______________________________________________
>>     Ipopt mailing list
>>     Ipopt at list.coin-or.org <mailto:Ipopt at list.coin-or.org>
>>     http://list.coin-or.org/mailman/listinfo/ipopt
>>     <http://list.coin-or.org/mailman/listinfo/ipopt>
>>
>>
>>
>> -- 
>> -- 
>> Joel Andersson, PhD
>> Ptge. Busquets 11-13, atico 3
>> E-08940 Cornella de Llobregat, Spain
>> Home: +34-93-6034011
>> Mobile: +32-486-672874 (Belgium) / +34-63-4408800 (Spain) / 
>> +46-707-360512
>> (Sweden)
>>
> -- 
> Senses, Begum
>
>
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt


-- 
Scanned by iCritical.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20140826/5b4bc811/attachment-0001.html>


More information about the Ipopt mailing list