<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri'; COLOR: #000000">
<DIV>I don’t have any examples that are exactly what you’re looking for, but I
can offer some advice. I’ve done a lot of work using the MKL sparse BLAS
routines, which have almost the same API as the NIST Sparse BLAS.</DIV>
<DIV> </DIV>
<DIV>If you want to call low-level BLAS or LAPACK routines directly (dense or
sparse), then usually you do the memory allocation in standard C arrays, and
call the Fortran signatures but with pointers to the C arrays for all
arguments.</DIV>
<DIV> </DIV>
<DIV>An alternative would be to use a convenience wrapper library like Eigen,
which can be easier if it has all the operations you need implemented. In my
case I don’t think Eigen had a parallel sparse matrix times dense matrix
product, so I needed to use lower-level MKL calls.</DIV>
<DIV> </DIV>
<DIV>I highly recommend taking (or going through the course material for) CS 267
here at Berkeley if you haven’t yet.</DIV>
<DIV> </DIV>
<DIV>-Tony</DIV>
<DIV> </DIV>
<DIV
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'>
<DIV style="FONT: 10pt tahoma">
<DIV> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=wsprague@berkeley.edu
href="mailto:wsprague@berkeley.edu">William W. Sprague</A> </DIV>
<DIV><B>Sent:</B> Monday, January 13, 2014 12:44 PM</DIV>
<DIV><B>To:</B> <A title=ipopt@list.coin-or.org
href="mailto:ipopt@list.coin-or.org">ipopt@list.coin-or.org</A> </DIV>
<DIV><B>Subject:</B> [Ipopt] Ipopt, blas, and C++</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'>
<P>Are there any examples of using BLAS and LAPACK to compute objectives and
constraints in an Ipopt C++ program?</P>
<P>The example in the docs uses "normal" C arrays, which i want to
avoid.</P>
<P>For bonus points, i am interested in using sparse libraries too...</P>
<P>Thanks from a super newbie....</P>
<P>
<HR>
_______________________________________________<BR>Ipopt mailing
list<BR>Ipopt@list.coin-or.org<BR>http://list.coin-or.org/mailman/listinfo/ipopt<BR></DIV></DIV></DIV></BODY></HTML>