When BNLS is used in my original problem, it’s very hard to converge in the second time step iteration. The residual output information indicate the iterations seems stuck in a small interval and repeat again and again. This phenomenon also appears in IPOPT, but once I turn off line search with command linesearch=false, the IPOPT can give correct results.
The results for the first time step is almost the same with IPOPT. Since IPOPT uses the primal-dual interior point method, I think maybe ipm or PDIPM may help to retrieve the correct IPOPT results. If PDIPM is not readily available, how about ipm?
Meanwhile, I’m trying other Tao solvers, but till now, the problem is not solved.
You can try both IPM and PDIPM, I was just implying that you may run into a bug. But there are indeed many available options, I don’t really know what you are solving and I’m not really a Tao expert, so I’m not very useful.
I tried to use IPM in a much smaller bound constrained example, but it can not run. So I uploaded the example (as the TAOexample_use_ipm.edp above) if you can help me point out the error.
The problem only has simple inequality constraint as xlPETSc and xuPETSc. But if I delete the funcE and funcJE, how should I write the TaoSolve information?
If I write it as follows: TaoSolve(H, J, DJ, uPETSc, xl = lbPETSc, xu = ubPETSc, sparams = “-tao_monitor -tao_view -tao_type ipm -pc_type lu -pc_factor_mat_solver_type mumps -tao_max_it 1000 -tao_gatol 1e-4”, HessianRoutine = HJ);
The error I mentioned continues to appear.
The error message is:
[0] PETSC EROOR: Out of memory. This could be due to allocating too large an object or bleeding by not properly destroyubg unneeded objects.
It still can not run properly for multiple processors? How should I correct it?
PDIPM and IPM are bugged when using no inequality or equality constraint. This will be fixed in the next PETSc release. I suggest you use other Tao solvers in the meantime.
No, I’d suggest you try different alternative. You can tune the line search parameters by looking at the PETSc/Tao documentation that I’ve already pasted above.