[Ipopt] ipopt on mac os x (+ Matlab interface)

Peter Carbonetto pcarbo at uchicago.edu
Tue Mar 9 17:39:07 EST 2010


One further remark with regards to compiling Ipopt for MATLAB:

Do build the MEX file successfully, you will need to make a small 
modification to your current setup. In Mac OS X (with an Intel processor) 
you will need to add "-framework vecLib" to the LDFLAGS environment 
variable in the mexopts.sh file that was created when you ran "mex 
-setup", following the instructions on the MathWorks website.

Importantly, do *not* use the BLAS and LAPACK libraries provided with the 
Matlab installation or you will likely run into problems.

Peter

On Tue, 9 Mar 2010, Peter Carbonetto wrote:

> Nicolas Clauvelin at Rutgers generously provided some tips on installing 
> Ipopt on a computer with Mac OS X (10.6). I've included them below.
>
> Let me quickly add a couple points to Nicolas' instructions:
>
> * It is probably a better idea to download gfortran, which can be found on 
> the AT&T Research website here: http://r.research.att.com/tools/
>
> * I was able to compile & run the Ipopt examples using the -m64 flags.
>
> Peter Carbonetto, Ph.D.
> Postdoctoral Researcher
> Dept. of Human Genetics
> University of Chicago
>
> ---------- Forwarded message ----------
> Date: Mon, 8 Mar 2010 16:20:44
> From: Nicolas Clauvelin <clauvelin at biomaps.rutgers.edu>
> To: pcarbo at cs.ubc.ca
> Subject: ipopt on mac os x
>
> Hi,
> I recently found your instructions about installing Ipopt on Mac OS X; very
> useful thanks.
>
> However, after fighting a bit with the command line I find a simple and
> quite more direct way to install it (and to use an optimized version of
> BLAS/Lapack) ... I thought it could interest you.
>
> 1- install g77 compiler (http://hpc.sourceforge.net/) ... it is not the most
> recent fortran compiler but at least it is working.
>
> 2- then for configuring Ipopt:
> ./configure --with-blas="-framework vecLib" --with-lapack="-framework
> vecLib" F77=/usr/local/bin/g77 FFLAGS=-m32 CFLAGS=-m32 CXXFLAGS=-m32
> --prefix=...
>
> **so in this command I use -framework vecLib to tell Ipopt to use this
> implementation of BLAS and Lapack (this one is optimized by Apple ACG  and
> seems to be very efficient -- I tested it on linear systems with band
> matrices and it appears to be as fast as Intel MKL library).
> **the -m32 flag is to avoid architecture incompatibility since I did not
> succeed in compiling in 64 bits with g77.
> **also do not forget to use --prefix=... to indicate the installation path
> otherwise the dylib will cannot be loaded (or you have to use otool).
>
> 3- then the classic make all, make install.
>
> at the end it allows to use the dynamic library ... just have to use
> -framework vecLib in the linker flags and -lipopt (working fine in Xcode).
>
> + Nicolas Clauvelin
> + http://www.rci.rutgers.edu/~nicocvn/
> +
> + BioMaPS Institute for Quantitative Biology
> + Rutgers, The State University of New Jersey
> + 610 Taylor Road - Piscataway, NJ 08854


More information about the Ipopt mailing list