Using multiple threads for MA57 with IPOPT

880 views
Skip to first unread message

Alex Dowling

unread,
Mar 21, 2016, 4:54:41 PM3/21/16
to julia-opt
Does anyone know how to tell MA57 to use multiple threads with IPOPT? I don't see it listed in the supported IPOPT configuration options: http://www.coin-or.org/Ipopt/documentation/node39.html. With GAMS one sets the "threads" option.

My model is implemented in JuMP, and I've configured Ipopt.jl to point to a version of IPOPT I compiled from source with the HSL linear algebra routines.

Thanks,
Alex

Tony Kelman

unread,
Mar 21, 2016, 5:25:19 PM3/21/16
to julia-opt
MA57 is single threaded except blas calls, but most of its blas calls are small enough that threading won't help dramatically in my experience. MA97 would be better if you have access to it, then you should be able to use the normal openmp environment variable IIRC.

Alex Dowling

unread,
Mar 21, 2016, 7:13:58 PM3/21/16
to julia-opt
Thanks. I have access to MA86 and MA97. I was planning on giving those a try. I'll look into the openmp environment variable.

Out of thoroughness, I'd also like to try MA57 with parallel blas calls. Does anyone know if this is easy to enable using Ipopt.jl?

Alex

Tony Kelman

unread,
Mar 21, 2016, 7:38:38 PM3/21/16
to julia-opt
Yes definitely a good idea to try things out on your own problems to verify random opinions on the internet :)

What platform are you on? On Linux there are a few ways to go about this: either adjust the deps/build.jl invocations of Ipopt's autotools scripts to include --with-blas pointing to your own build of a parallel BLAS (it'll have to be LP64 aka 32-bit integers though, since ILP64 doesn't work so well with Ipopt), or manually build your own Ipopt shared library separately then modify the deps/deps.jl content to point to it. The latter should also work on other platforms, though note that the next time Pkg.build("Ipopt") gets triggered it may overwrite your changes to that file.

Alex Dowling

unread,
Mar 21, 2016, 7:49:19 PM3/21/16
to julia-opt
Hello Tony,

I'm using Linux. One machine has a Haswell CPU, and the other has a multiple Xeon CPUs (I think... I didn't order that one).

I built IPOPT from source (with Blas with the ThirdParty directory), and I modified a Julia config file to point to that. Silly question, but how can I confirm IPOPT is using threaded blas? With GAMS, IPOPT will print out how many threads MA* is using. I'm not sure if that is a GAMS specific thing, or standard for IPOPT.

Alex

Tony Kelman

unread,
Mar 21, 2016, 8:04:33 PM3/21/16
to julia-opt
That might be gams-specific. You can try setting print_user_options to yes, see if that looks familiar. Otherwise I'd watch in top if your problems take long enough. Note that Blas from the ThirdParty directory is the netlib reference blas which is not multithreaded. You'll have to use something like OpenBLAS or MKL.
Reply all
Reply to author
Forward
0 new messages