Hi
I'm making NMPC code and facing computing time in real-time.
---------------------------------------------------------------------------------------------------------------------
environment
Ubuntu 18.04, python 3.6 and 3.8 ( test ), casadi ( 3.5.5, build binary)
with hsl, clang build
and make code with opti stack
--------------------------------------------------------------------------------------------------------------------
There are three questions in total as follows,
1. ipopt code-gen problem
I tried to speed up my code, so i did code generation
================== Code line ======================
opts['ipopt.linear_solver'] = 'ma57'
opts['ipopt.expect_infeasible_problem'] = 'yes'
opts['ipopt.hessian_approximation'] = "limited-memory"
opts['expand'] = True
opts['jit'] = True
opti.solver('ipopt', opts)
function = opti.to_function(' function', [var1, var2, var3, parm1, parm2, parm3], [var1,var2,var3])
function.generate('solve_function.c')
=================================================
but i am using ipopt ma57 and seems like the warning msg as below may possibly be coming from the optimzer I'm using right now.
==================== CONSOLE ====================
CasADi - 2021-07-13 21:03:59 WARNING("The function "solver", which is of type "IpoptInterface" cannot be code generated. The generation will proceed, but compilation of the code will not be possible.") [.../casadi/core/function_internal.cpp:2453]
===================================================
i would like to use ipopt ma versions(57,86,97) to use parallel computing
( in hsl page they told that 57, 86, 97 version can do parallel computing )
Is there any way to solve this..? I think some people in the forum that they have successfully wrapped my Ipopt with c++codes using codegen. I wish there is a hope for this problem.
2. parallel computing problem
I made my code using options like expand & JIT in solver option
but when i use that options, my cpu only use one thread..
( tested with ma57, 86, 97 )
and when i deactivate options( expand, jit ), 16 threads run but only use around 30% and
computing time is worse than using one core.
i checked pre_time and wall_time but that have no big difference.
is there some way to make all thread to run in 100% maximum capacity of CPU in 16 thread?
3. considering about using OpEn
I saw other questions in this group about ipopt problems and some answers was said that using OpEn will be good attempt.
but I'm worried about accuracy and parallel computing
Is someone used OpEn and can tell me some details about pros and cons comparing to Ipopt? I've only used Ipopt so far.
Plz take my last wisdom tooth and give me any intuition for these questions.