[Trilinos-Users] AztecOO as smoother for ML from Stratimikos

Alberto F. Martín-Huertas amartin at cimne.upc.edu
Thu Jul 7 12:12:45 MDT 2011


 Dear Chris, Dear Mike,

 I already solved the issue. The cause of the problem
 was in my XML parameters file.
 <Parameter name="smoother: ifpack level-of-fill"
> type="double" value="0.0" /> does not assign any value to
 ifpack's "fact: ict level-of-fill", causing the exception.
 In order to solve this issue, I had to replace my XML file
 by the following one:

 <ParameterList>
   <Parameter name="Linear Solver Type" type="string" value="AztecOO"/>
   <ParameterList name="Linear Solver Types">
     <ParameterList name="AztecOO">
       <ParameterList name="Forward Solve">
         <ParameterList name="AztecOO Settings">
           <Parameter name="Aztec Preconditioner" type="string" 
 value="none"/>
           <Parameter name="Aztec Solver" type="string" value="CG"/>
           <Parameter name="Convergence Test" type="string" value="r0"/>
           <Parameter name="Output Frequency" type="int" value="25"/>
         </ParameterList>
         <Parameter name="Max Iterations" type="int" value="500"/>
         <Parameter name="Tolerance" type="double" value="1e-08"/>
       </ParameterList>
     </ParameterList>
   </ParameterList>
   <Parameter name="Preconditioner Type" type="string" value="ML"/>
   <ParameterList name="Preconditioner Types">
     <ParameterList name="ML">
       <Parameter name="Base Method Defaults" type="string" 
 value="DD-ML"/>
       <ParameterList name="ML Settings">
         <Parameter name="ML output" type="int" value="10"/>
         <Parameter name="aggregation: nodes per aggregate" type="int" 
 value="64"/>
         <Parameter name="eigen-analysis: iterations" type="int" 
 value="10"/>
         <Parameter name="eigen-analysis: type" type="string" 
 value="cg"/>
         <Parameter name="smoother: ifpack level-of-fill" type="double" 
 value="0"/>
         <ParameterList name="smoother: ifpack list">
           <Parameter name="fact: level-of-fill" type="int" value="0"/>
         </ParameterList>
         <Parameter name="smoother: ifpack overlap" type="int" 
 value="1"/>
         <Parameter name="smoother: ifpack type" type="string" 
 value="IC"/>
         <Parameter name="smoother: type" type="string" value="IFPACK"/>
       </ParameterList>
     </ParameterList>
   </ParameterList>
 </ParameterList>

 And now works properly.

 Best regards,
  Alberto.






 On Thu, 07 Jul 2011 19:41:39 +0200, Alberto F. Martín-Huertas wrote:
> Dear Chris, Dear Mike,
>
> I am now trying to use IFPACK preconditioners instead
> of AztecOO ones as smoothers (in particular, IC(0) factorization as 
> inexact
> solver for an Additive Schwarz with overlap=1). Although Ifpack
> support is not
> documented in ML 5.0 smoothed aggregations user's guide, I was aware
> of this support
> from the ParameterListValidator implemented in ML, Trilinos-10.6.4.
>
> However, when running my Stratimikos driver with the following XML
> parameter file
>
> <ParameterList>
>   <Parameter name="Linear Solver Type" type="string" 
> value="AztecOO"/>
>   <Parameter name="Preconditioner Type" type="string" value="ML"/>
>   <ParameterList name="Linear Solver Types">
>     <ParameterList name="AztecOO">
>       <ParameterList name="Forward Solve">
>         <ParameterList name="AztecOO Settings">
>           <Parameter name="Aztec Solver" type="string" value="CG"/>
>           <Parameter name="Convergence Test" type="string" 
> value="r0"/>
>           <Parameter name="Output Frequency" type="int" value="25"/>
>           <Parameter name="Aztec Preconditioner" type="string" 
> value="none"/>
>         </ParameterList>
>         <Parameter name="Max Iterations" type="int" value="500"/>
>         <Parameter name="Tolerance" type="double" value="1e-08"/>
>       </ParameterList>
>     </ParameterList>
>   </ParameterList>
>   <ParameterList name="Preconditioner Types">
>     <ParameterList name="ML">
>        <Parameter name="Base Method Defaults" type="string" 
> value="DD-ML"/>
>        <ParameterList name="ML Settings">
>          <Parameter name="ML output" type="int" value="10"/>
>          <Parameter name="aggregation: nodes per aggregate"
> type="int" value="64" />
>          <Parameter name="smoother: type" type="string" 
> value="IFPACK" />
>          <Parameter name="smoother: ifpack type" type="string" 
> value="IC" />
>          <Parameter name="smoother: ifpack level-of-fill"
> type="double" value="0.0" />
>          <Parameter name="smoother: ifpack overlap" type="int" 
> value="1" />
>          <Parameter name="eigen-analysis: iterations" type="int" 
> value="10"/>
>          <Parameter name="eigen-analysis: type" type="string" 
> value="cg"/>
>        </ParameterList>
>     </ParameterList>
>   </ParameterList>
> </ParameterList>
>
> the program catched the following exception:
>
>> *********************************************************
>> ML failed to compute the multigrid preconditioner. The
>> most common problem is an incorrect  data type in ML's
>> parameter list (e.g. 'int' instead of 'bool').
>
>> Note: List.set("ML print initial list",X) might help
>> figure out the bad one on pid X.
>> *********************************************************
>> ML::ERROR:: -1, 
>> /home/amartin/trilinos-10.6.4-Source/packages/ml/src/Utils/ml_MultiLevelPreconditioner.cpp, 
>> line 1694
>> p=0: *** Caught standard std::exception of type 'std::logic_error' :
>>  
>> /home/amartin/trilinos-10.6.4-Source/packages/stratimikos/adapters/ml/src/Thyra_MLPreconditionerFactory.cpp:262:
>>  Throw number = 1
>>  Throw test that evaluated to true: 
>> 0!=ml_precOp->ComputePreconditioner()
>>  Error!
>
> For the moment, I can only get rid of this exception by eliminating
> the following line in my
> XML file:
>
>          <Parameter name="smoother: ifpack type" type="string" 
> value="IC" />
>
> which seems to be correctly spelled. Any other ifpack type
> preconditioner, such as
> ICT or ILU did not throw the exception. I attach to the message the
> (very verbose)
> output generated by the driver program. There you will see that ML
> correctly recognizes the smoother
> options for AMG level 0 (except for level-of-fill, which is -1 in the
> output instead of 1 as
> in the XML), but seems to generate the exception right after it 
> enters
> level 1.
>
> Apologizes is this is not the appropiate mailing list for ML
> problems/discussions.
> If not, let me know, I'll re-address the issue over there.
>
> Thanks in advance.
>
> Best regards,
>  Alberto.
>
> On Tue, 5 Jul 2011 19:30:14 +0000, Heroux, Michael A wrote:
>> There is an adapter in AztecOO called AztecOO_Operator.  It wraps 
>> and
>> AztecOO instance as an Epetra_Operator.  Might this be a good 
>> starting
>> point?
>>
>> Mike
>>
>>
>> On 7/5/11 2:19 PM, "Chris Siefert" <csiefer at sandia.gov> wrote:
>>
>>> Alberto,
>>
>> ML has no problem with using AztecOO as a smoother.  However, there
>>> is
>> no Stratimikos wrapper for this functionality.
>>
>> -Chris
>>
>> On 07/05/2011
>>> 01:15 PM, Bartlett, Roscoe A wrote:
>>> Alberto,
>>>
>>> This sounds like a more
>>> advanced use-case that would require more hooks into ML at the 
>>> Stratimikos
>>> level and is very ML-specific.  Could you use to
>>> Stratimikos::DefaultLinearSolver builder objects and some of your 
>>> own wrapper
>>> code to construct this?  Does ML already have built-in support to 
>>> use AztecOO
>>> internally?  This might be more of question for the ML developers.
>>>
>>>
>>> -Ross
>>>
>>>> -----Original Message-----
>>>> From:
>>> trilinos-users-bounces at software.sandia.gov [mailto:trilinos-
>>>>
>>> users-bounces at software.sandia.gov] On Behalf Of Alberto F. Martín-
>>>>
>>> Huertas
>>>> Sent: Tuesday, July 05, 2011 2:31 AM
>>>> To:
>>> trilinos-users at software.sandia.gov
>>>> Subject: [Trilinos-Users] AztecOO as
>>> smoother for ML from Stratimikos
>>>>
>>>>   Dear all,
>>>>
>>>>   AztecOO solvers can
>>> be used as smoothers for
>>>>   the ML hierarchy. The AztecOO params and
>>> options
>>>>   arrays are passed to the MultilevelPreconditioner class
>>>>
>>> wrapped around RCP objects via the "smoother: Aztec options" and
>>>>
>>> "smoother: Aztec params"
>>>>   keys of a Teuchos::paramList.
>>>>
>>>>   I would
>>> like to know whether there exist any means
>>>>   from a XML file to be read by
>>> a Stratimikos
>>>>   driver to set the particular parameters for
>>>>   AztecOO
>>> solvers when they are used as smoothers
>>>>   for ML.
>>>>
>>>>   Thanks in
>>> advance.
>>>>
>>>>   Best regards,
>>>>    Alberto.
>>>>
>>>> --
>>>>   Alberto F.
>>> Martín-Huertas
>>>>   Centre Internacional de Mètodes Numèrics a l'Enginyeria
>>> (CIMNE)
>>>>   Parc Mediterrani de la Tecnologia, UPC
>>>>   Esteve Terrades 5,
>>> Building C3, Office 207,
>>>>   08860 Castelldefels (Barcelona, Spain)
>>>>
>>> e-mail: amartin at cimne.upc.edu
>>>>
>>>>   ________________
>>>>   IMPORTANT
>>> NOTICE
>>>>   All personal data contained on this mail will be processed
>>>>
>>> confidentially and registered in a file property of CIMNE in
>>>>   order to
>>> manage corporate communications. You may exercise the rights
>>>>   of access,
>>> rectification, erasure and object by
>>>>   letter sent to Ed. C1 Campus Norte
>>> UPC. Gran Capitán s/n Barcelona.
>>>>
>>>>
>>>>
>>>>
>>> _______________________________________________
>>>> Trilinos-Users mailing
>>> list
>>>> Trilinos-Users at software.sandia.gov
>>>>
>>> http://software.sandia.gov/mailman/listinfo/trilinos-users
>>>
>>> _______________________________________________
>>> Trilinos-Users mailing
>>> list
>>> Trilinos-Users at software.sandia.gov
>>>
>>> http://software.sandia.gov/mailman/listinfo/trilinos-users
>>
>> __________________
>>> _____________________________
>> Trilinos-Users mailing
>>> list
>> Trilinos-Users at software.sandia.gov
>> http://software.sandia.gov/mailman/lis
>>> tinfo/trilinos-users
>>
>>
>>
>> _______________________________________________
>> Trilinos-Users mailing list
>> Trilinos-Users at software.sandia.gov
>> http://software.sandia.gov/mailman/listinfo/trilinos-users

-- 
 Alberto F. Martín-Huertas
 Centre Internacional de Mètodes Numèrics a l'Enginyeria (CIMNE)
 Parc Mediterrani de la Tecnologia, UPC
 Esteve Terrades 5, Building C3, Office 207,
 08860 Castelldefels (Barcelona, Spain)
 e-mail: amartin at cimne.upc.edu

 ________________
 IMPORTANT NOTICE
 All personal data contained on this mail will be processed 
 confidentially and registered in a file property of CIMNE in
 order to manage corporate communications. You may exercise the rights 
 of access, rectification, erasure and object by
 letter sent to Ed. C1 Campus Norte UPC. Gran Capitán s/n Barcelona.




More information about the Trilinos-Users mailing list