Optimisation using spicy.cg returns error at the end

Bug #1046972 reported by emmanuel.malherbe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dolfin-adjoint
Fix Committed
Undecided
Simon Funke

Bug Description

Hi,

I'm using the optimisation, and I was trying the different algorithm. I'm not sure but it seems that it's bugged for the spicy.cg:

mopt==minimize(reduced_functional, algorithm = "scipy.cg", gtol=1e-1)

gives me that error:

Optimization terminated successfully.
         Current function value: 0.166610
         Iterations: 3
         Function evaluations: 6
         Gradient evaluations: 6
Traceback (most recent call last):
  File "PIu_eqns_stable_shocking_Heun.py", line 291, in <module>
    mopt, fopt, func_calls, grad_calls, warnflag, allvecs=minimize(reduced_functional, algorithm = "scipy.cg", gtol=1e-1)
  File "/usr/lib/python2.7/dist-packages/dolfin_adjoint/optimization.py", line 235, in minimize
    return optimization_algorithms_dict[algorithm][1](reduced_func_array, reduced_func_deriv_array, [p.data() for p in reduced_func.parameter], **kwargs)
  File "/usr/lib/python2.7/dist-packages/dolfin_adjoint/optimization.py", line 144, in minimize_scipy_cg
    mopt, fopt, func_calls, grad_calls, warnflag, allvecs = fmin_cg(J, m_global, fprime = dJ, **kwargs)
ValueError: too many values to unpack

Thank you for any comment.

Changed in dolfin-adjoint:
assignee: nobody → Simon Funke (simon-funke)
Revision history for this message
Simon Funke (simon-funke) wrote :

Hi Emmanuel.

Can you provide a minimal code example, please?

Revision history for this message
Simon Funke (simon-funke) wrote :

Fixed

Changed in dolfin-adjoint:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.