JuliaSmoothOptimizers / SolverTools.jl

Tools for developing nonlinear optimization solvers.
Other
26 stars 18 forks source link

trunk: use operator with preallocation #31

Closed dpo closed 7 years ago

dpo commented 7 years ago

This cuts the total memory allocated by about a factor of 2. It's a safe thing to do with CG.

abelsiqueira commented 7 years ago

What if we create hess_op!? Would it make sense?

dpo commented 7 years ago

It would, but where do we store the temporary vector? And if a user doesn't use hess_op!, we've allocated an n-vector for nothing. What's the solution?

abelsiqueira commented 7 years ago

hess_op!(nlp, x, temp). The user has to create temp, like he would for other inplace methods.

dpo commented 7 years ago

Ok, that sounds good. Do you want to add that to NLPModels?

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 68.493% when pulling e8bc096e0d30c6a37c0fee632386bb74860135fe on trunk_prealloc into e11faaa0393857b91ea797ef29efffc576782363 on master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 68.493% when pulling e8bc096e0d30c6a37c0fee632386bb74860135fe on trunk_prealloc into e11faaa0393857b91ea797ef29efffc576782363 on master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 68.493% when pulling e8bc096e0d30c6a37c0fee632386bb74860135fe on trunk_prealloc into e11faaa0393857b91ea797ef29efffc576782363 on master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 68.493% when pulling e8bc096e0d30c6a37c0fee632386bb74860135fe on trunk_prealloc into e11faaa0393857b91ea797ef29efffc576782363 on master.

dpo commented 7 years ago

ps: you can probably do the same in TRON.

abelsiqueira commented 7 years ago

Implementend in https://github.com/JuliaSmoothOptimizers/NLPModels.jl/pull/66

dpo commented 7 years ago

Updated.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.1%) to 68.601% when pulling 65cbb4b2ba502114853ee5105666b2103c8b5fb6 on trunk_prealloc into e11faaa0393857b91ea797ef29efffc576782363 on master.

abelsiqueira commented 7 years ago

Thanks