Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #6266

NETLink vs LibraryLink for calling an external program

From Frank K <fkampas@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject NETLink vs LibraryLink for calling an external program
Date 2011-11-08 12:18 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j9b6ma$4t8$1@smc.vnet.net> (permalink)

Show all headers | View raw


I'm calling IpOpt, a COIN-OR interior point nonlinear optimizer
written in C++, from Mathematica, using some C# code and NETLink.
IpOpt requires calculating the objective function, the constraints,
the gradient of the objective function, the gradient of the
constraints and the mixed second order derivatives of the Lagrangian.
The gradients of the constraints and the Lagrangian derivatives are
passed in sparse form.
I do all that in Mathematica and then do callbacks in the C# code
(modified from csipopt) using StdLink.  The C# code is called using
NETLink.  It's working well but I'm wondering if I could speed up the
calculation significantly using LibraryLink, since I understand
NETLink and C# both have overhead, especially for passing arrays.  The
C# code is using unsafe code talking to the IpOpt dll.

For those of you wondering why I'm doing all this, rather than using
FindMinimum, there are some optimization problems I'm interested in
that blow up in FindMinimum.

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

NETLink vs LibraryLink for calling an external program Frank K <fkampas@gmail.com> - 2011-11-08 12:18 +0000

csiph-web