<div dir="ltr">Hello Begum,<div><br></div><div>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)?</div>
<div><br></div><div>Did you use symbolic QR or LU? I assume you ignore symmetry?</div><div><br></div><div>Joel</div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2014-08-21 3:43 GMT+02:00 Senses,Begum <span dir="ltr">&lt;<a href="mailto:bgmsenses@ufl.edu" target="_blank">bgmsenses@ufl.edu</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
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.)<div class="HOEnZb">
<div class="h5"><br>
<br>
On Wed, 20 Aug 2014 18:34:53 -0700, Tony Kelman wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Are you sure you were running make test before, or were you just<br>
building the Matlab interface? To run standalone executables like from<br>
make test then you&#39;ll need to add -lcsparse to other link flags too,<br>
not just in the MatlabInterface folder. I think there are some ADDLIBS<br>
configure variables you can set for this.<br>
<br>
<br>
-----Original Message----- From: Senses,Begum<br>
Sent: Wednesday, August 20, 2014 6:18 PM<br>
To: Tony Kelman<br>
Cc: Ipopt<br>
Subject: Re: [Ipopt] Using a Third Party Software in IPOPT MA57 Interface<br>
<br>
<br>
Unfortunately It is still not working.<br>
<br>
On Wed, 20 Aug 2014 18:03:00 -0700, Tony Kelman wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I don&#39;t think csparse uses pkg-config, but I could be wrong there.<br>
<br>
Try<br>
@COIN_HAS_PKGCONFIG_TRUE@LIBS =<br>
`PKG_CONFIG_PATH=@COIN_PKG_<u></u>CONFIG_PATH@ @PKG_CONFIG@ --libs ipopt |<br>
sed -e &#39;s/-framework vecLib//g&#39;` -lcsparse<br>
<br>
And if you&#39;re on a system that doesn&#39;t have pkg-config installed,<br>
then you&#39;ll need to add -lcsparse to the line that starts with<br>
@COIN_HAS_PKGCONFIG_FALSE@LIBS = ...<br>
<br>
<br>
<br>
-----Original Message----- From: Senses,Begum<br>
Sent: Wednesday, August 20, 2014 5:59 PM<br>
To: Tony Kelman<br>
Cc: Ipopt<br>
Subject: Re: [Ipopt] Using a Third Party Software in IPOPT MA57 Interface<br>
<br>
<br>
Hi Tony,<br>
<br>
I downloaded Ipopt again did all of these steps again and it still does<br>
not work. I have also tried adding the changes to the Makefile.in file.<br>
<br>
@COIN_HAS_PKGCONFIG_TRUE@LIBS = `PKG_CONFIG_PATH=@COIN_PKG_<u></u>CONFIG_PATH@<br>
@PKG_CONFIG@ --libs ipopt | sed -e &#39;s/-framework vecLib//g&#39;` I changed<br>
this line with<br>
<br>
@COIN_HAS_PKGCONFIG_TRUE@LIBS = `PKG_CONFIG_PATH=@COIN_PKG_<u></u>CONFIG_PATH@<br>
@PKG_CONFIG@ --libs ipopt csparse | sed -e &#39;s/-framework vecLib//g&#39;`<br>
<br>
and then ran the configure script again but it is still not working.<br>
<br>
<br>
On Wed, 20 Aug 2014 17:45:49 -0700, Tony Kelman wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Begum,<br>
<br>
Sounds like you reran configure since you made that change. Configure<br>
auto-generates the Makefiles from Makefile.in, overwriting any changes<br>
you made. Try making the change where you add -lcsparse to LIBS in<br>
Makefile.in instead, then run configure and it should work again.<br>
<br>
-Tony<br>
<br>
<br>
-----Original Message----- From: Senses,Begum<br>
Sent: Wednesday, August 20, 2014 5:36 PM<br>
To: Ipopt<br>
Subject: [Ipopt] Using a Third Party Software in IPOPT MA57 Interface<br>
<br>
<br>
Hello everyone,<br>
<br>
I am trying to use a Third party software in<br>
<br>
<br>
<br>
../CoinIpopt/Ipopt/src/<u></u>Algorithm/LinearSolvers/<u></u>IpMa57SolverInterface.cpp.<br>
This third party software is called CSPARSE which is written by Tim<br>
Davis. I was able to use this software in this file before but it<br>
stopped working. Obviously I have changed something somewhere but I<br>
could not find it maybe one of you can think of anything.<br>
<br>
These are the steps that I am performing right now.<br>
<br>
1) Compile the third party software and obtain libcsparse.a library.<br>
2) Copy this library to CoinIpopt/lib folder.<br>
3) Copy the main .h file of CSPARSE (cs.h) to the same folder with<br>
IpMa57SolverInterface.cpp file which is in<br>
CoinIpopt/Ipopt/src/Algorithm/<u></u>LinearSolvers folder.<br>
4) Modify the makefile in CoinIpopt/Ipopt/contrib/<u></u>MatlabInterface/src .<br>
I used to have LIBS = -L/CoinIpopt/lib -lipopt . I added -lcsparse to<br>
this line.<br>
5) The last step is adding<br>
<br>
extern &quot;C&quot;<br>
{<br>
<br>
#include &quot;cs.h&quot;<br>
<br>
}<br>
<br>
command at the beginning of the IpMa57TSolverInterface.cpp file.<br>
<br>
As I mentioned before these steps used to work fine but now when I run<br>
make test it gives me the following error<br>
<br>
Undefined symbols for architecture x86_64:<br>
  &quot;_cs_amd&quot;, referenced from:<br>
      Ipopt::Ma57TSolverInterface::<u></u>SymbolicFactorization(int const*,<br>
int const*) in libipopt.a(<u></u>IpMa57TSolverInterface.o)<br>
<br>
cs_amd is the function that I am trying to use from CSPARSE software.<br>
<br>
Thank you.<br>
</blockquote></blockquote></blockquote>
<br>
-- <br>
Senses, Begum<br>
______________________________<u></u>_________________<br>
Ipopt mailing list<br>
<a href="mailto:Ipopt@list.coin-or.org" target="_blank">Ipopt@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/ipopt" target="_blank">http://list.coin-or.org/<u></u>mailman/listinfo/ipopt</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>-- <br>Joel Andersson, PhD<br>Ptge. Busquets 11-13, atico 3<br>E-08940 Cornella de Llobregat, Spain<br>Home: +34-93-6034011<br>Mobile: +32-486-672874 (Belgium) / +34-63-4408800 (Spain) / +46-707-360512 <br>
(Sweden)<br><br>
</div>