Replies: 4 comments 15 replies
-
I don't think we have an option You could try setting option hsllib to point to However, when building an Ipopt for use with Matlab, there is always the risk of a mixup of Lapack versions, since Matlab uses 64bit integers and Ipopt uses 32bit integers (by default). This is also the case for Matlab's MA57, which is the reason for the Please also take a look at https://github.com/ebertolazzi/mexIPOPT and maybe join ebertolazzi/mexIPOPT#24. |
Beta Was this translation helpful? Give feedback.
-
What values does FUNNY_MA57_FINT take? Is it a string or a number? Where do I include it in the compiler options once I define its value?
Does the MATLAB MA57 library contain all of the required HSL code? In other words, if I make a symbolic link from lingual.dylib to libmwma57.dylib, does the MATLAB dynamic library contain the everything that is needed?
Thanks!
— Anil
——
Anil V. Rao, PhD
E-mail: ***@***.***
Tel: 352-672-1529
Web: http://anilvrao.com
…On Nov 9, 2023 at 12:19 PM -0500, Stefan Vigerske ***@***.***>, wrote:
I don't think we have an option --enable-matlab-ma57 in current Ipopt. The compiler processor reacts on whether FUNNY_MA57_FINT is defined and it changes the integer type to be used with MA57. I don't know whether that is still useful.
You could try setting option hsllib to point to libmwma57.dylib.
But if you have a very old Ipopt, then there is no such option and you need to use other means to make it pick up libmwma57.dylib when it is looking for libhsl.dylib.
However, when building an Ipopt for use with Matlab, there is always the risk of a mixup of Lapack versions, since Matlab uses 64bit integers and Ipopt uses 32bit integers (by default). This is also the case for Matlab's MA57, which is the reason for the FUNNY_MA57_FINT.
Please also take a look at https://github.com/ebertolazzi/mexIPOPT and maybe join ebertolazzi/mexIPOPT#24.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
My understanding (perhaps incorrect) is that the dependencies for ma57 are contained in the publicly available git repository ThirdParty-HSL.git. I would think these dependencies are required regardless of whether the ma57 source code is compiled into the Mex file or if ma57 is loaded at run time. Can one not compile this third party code into IPOPT without including ma57? If so, how does one compile this third party code into the IPOPT Mex file?
Next, I tried creating a symbolic link from libmwma57.dylib to libhsl.dylib, but that did not work. Thus, I am not sure what is needed in order to have libmwma57.dylib be recognized as the file that contains ma57.
Thanks!
——
Anil V. Rao, PhD
E-mail: ***@***.***
Tel: 352-672-1529
Web: http://anilvrao.com
…On Nov 11, 2023 at 3:09 AM -0500, Stefan Vigerske ***@***.***>, wrote:
ADD_CXXFLAGS you can set as environment variable or pass as argument to configure.
If libmwma57.dylib already includes MA57, then you won't have to build another library with HSL codes via ThirdParty-HSL. Also, the latter are not redistributable.
If you don't provide a HSL library when Ipopt is build, but select MA57 as linear solver, Ipopt will try to load a library at runtime that contains MA57 (https://coin-or.github.io/Ipopt/INSTALL.html#LINEARSOLVERLOADER). That's where you want libmwma57.dylib to be picked up.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
How do I check to see if libmwma57.dylib contains the ma57 functions you describe?
——
Anil V. Rao, PhD
E-mail: ***@***.***
Tel: 352-672-1529
Web: http://anilvrao.com
…On Nov 11, 2023 at 8:22 AM -0500, Stefan Vigerske ***@***.***>, wrote:
There is no code in ThirdParty-HSL. This is just a buildsystem for the HSL solvers. So, if you build ThirdParty-HSL without any HSL solvers, you will end up with an empty library.
> Next, I tried creating a symbolic link from libmwma57.dylib to libhsl.dylib, but that did not work.
Then check why it "didn't work".
Does Ipopt find the library? Does it contain the MA57 function symbols (ma57ad, ma57bd, etc; https://github.com/coin-or/Ipopt/blob/fdd288d7f56e73c65a17c22d6a1b6076379820c8/src/Algorithm/LinearSolvers/IpMa57TSolverInterface.cpp#L314-L318) Does something go wrong when Ipopt calls a function from that library? Etc, etc.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Dear IPOPT Users Group,
I am trying to compile a new Mex File for IPOPT. My immediate goal is to compile a Mex file for the Silicon (M) Version of MATLAB, but I would eventually like to compile new Mex files for Intel Mac and Linux.
In any case, here is where I am with my Mex file compilation and my question. First, if I use the Harwell source code for MA57 I am able to successfully compile a Mex file. The problem is that I cannot distribute this Mex file due to the Harwell licensing rules. I would like to compile a Mex file that will load the run time library "libmwma57.dylib" that is part of MATLAB and is located in the directory $MATLAB/bin/maca64. When I use the flag "--enable-matlab-ma57" I am able to successfully compile a Mex file, but upon execution I get an error that the library "libhsl.dylib" cannot be found. I know that MA57 has dependencies, and perhaps libhsl.dylib contains these dependencies, but I do not know how to include these dependencies to create a Mex file independent of the Harwell source code.
Any help is appreciated.
Anil Rao
Beta Was this translation helpful? Give feedback.
All reactions