[Ipopt] Ipopt, blas, and C++

Tony Kelman kelman at berkeley.edu
Mon Jan 13 20:40:35 EST 2014

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.

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.

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.

I highly recommend taking (or going through the course material for) CS 267 here at Berkeley if you haven’t yet.


From: William W. Sprague 
Sent: Monday, January 13, 2014 12:44 PM
To: ipopt at list.coin-or.org 
Subject: [Ipopt] Ipopt, blas, and C++

Are there any examples of using BLAS and LAPACK to compute objectives and constraints in an Ipopt C++  program?

The example in the docs  uses "normal" C arrays, which i want to avoid.

For bonus points, i am interested in using sparse libraries too...

Thanks from a super newbie....

Ipopt mailing list
Ipopt at list.coin-or.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20140113/b6f8edcb/attachment.html>

More information about the Ipopt mailing list