[Trilinos-Users] Moocho question.

Luca Heltai luca.heltai at gmail.com
Tue Jun 10 08:07:07 MDT 2008

Dear Trilinos Users,

I'm trying to use the Moocho module solve a minimization problem for  
which I only have access to the (nonlinear) target g(x,p) and the  
equality constraint f(x,p), and I'm having some difficulties on  
figuring out a couple of things:

I tried running the example

NLPThyraEpetraModelEval4DOpt.exe --no-support-derivs

where I understood from the source code that in this way, all  
derivatives (except W=DfDx) should be computed by Finite Differences.  
Is this assumption correct? If this is correct, then there must be a  
problem somewhere else, since the above does not work: I get the  
following error

test_nlp = true: Testing the NLP! ...

Testing the supported NLPFirstOrder interface ...

MoochoSolver: Caught an std::exception of type std::logic_error  
described as : /usr/local/trilinos-8.0.5/packages/thyra/src/ 

Throw number = 1

Throw test that evaluated to true: !deriv.isSupportedBy(derivSupport)


model = 'Thyra::DefaultFinalPointCaptureModelEvaluator 

Error, The argument DfDp(0) = Derivative 
is not supported!

The supported types include DerivativeSupport{none}!

 From the above error lines, I understood that the thing which was  
giving me a problem was "simply" the testing of the NLP interface...  
I switched this off in the config file, run again, and now I get the  

*** Start of rSQP Iterations ***
n = 4, m = 2, nz = 0

  k    f         ||c||s    ||rGL||s  QN ||Ypy||2 ||Zpz||2 ||d||inf  
alpha    time(sec)
  ---- --------- --------- --------- -- -------- -------- --------  
-------- ---------
     0         0         -         -  -        -        -         
-        -  0.013418

Total time = 0.013452 sec

Oops!  Not the solution.  Some error has occured!


The program then hangs for a while, until I just kill it...

 From the above, my conclusions are:
1. I did not understand how this works
2. There is a problem somewhere (probably in point 1 above ... ;-) ...)

One last question: In the documentation it is stated:

"MOOCHO also includes a minimally invasive mode for reduced-space SQP  
where the
simulator application only needs to compute the objective and  
constraint functions
f (xD , xI): R(n+m) -> R,  c(xD , xI ): R(n+m) -> Rn and solve only  
forward linear
systems involving  DcDxD. All other derivatives can be approximated  
with directional
finite differences but any exact derivatives that can be computed by  
the application are
happily accepted and fully utilized by MOOCHO through the  
Thyra::ModelEvaluator interface."

Does this mean that one can also approximate DfDx (=DcDxD) in Moocho  
by finite differences? From the above statement I couldn't figure it  
out (I was hoping yes, but then in the example codes create_W is  
always specified, and trying not to specify it gives errors like the  
one I printed out above).

Assuming that one could calculate W=DfDx in some way, then how do we  
specify that all other derivatives are to be computed by finite  
difference approximations? My understanding was that this is the  
default behavior, unless the various outArgs properties are set  
accordingly. Is this correct? And if so, what is wrong in the example  
test problem when --no-support-derivs is set? The effect of this is  
precisely not to specify the unknown derivatives...

Thanks in advance,


Luca Heltai <luca.heltai at gmail.com>
There are no answers, only cross references.

More information about the Trilinos-Users mailing list