[Trilinos-Users] Teuchos::SerialDenseSolver equilibration: unexpected behavior

Nico Schlömer nico.schloemer at ua.ac.be
Thu Oct 20 05:24:13 MDT 2011


 > ============= *snip* =============
 > if (ierr1!=0)
 > return(ierr1);
 > else
 > return(ierr);
 >
 > // one never gets here
 > if (equilibrate_) ierr1 = unequilibrateLHS();
 > return(ierr1);
 > }
 > ============= *snap* =============

Also, this is most likely what Amesos2 devs are working around in 
Amesos2_Lapack_def.hpp:173.

Cheers,
Nico



On 10/20/2011 01:14 PM, Nico Schlömer wrote:
> Problem solved.
>
> There is a bug in the Teuchos::Serial*DenseSolver: The unequilibration
> was actually carried out on the *RHS* whereas it should be the LHS. This
> basically means that the equilibration never worked if there was a
> column scaling.
>
> Patch attached.
>
> I also noticed that in the respective solve() methods, the equilibration
> is never automatically done:
>
> ============= *snip* =============
> if (ierr1!=0)
> return(ierr1);
> else
> return(ierr);
>
> // one never gets here
> if (equilibrate_) ierr1 = unequilibrateLHS();
> return(ierr1);
> }
> ============= *snap* =============
>
> -- I guess the maintainer may want to have a look at this.
>
> Cheers,
> Nico
>
>
>
> On 10/19/2011 03:45 PM, Nico Schlömer wrote:
>> Hi,
>>
>> I just encountered a rather odd behavior of Teuchos::SerialDenseSolver
>> when used with equilibration.
>> After building a specific 3x3 equation system (code attached), I call
>>
>> solver.solve();
>>
>> without equilibration and get the output
>>
>> ================ *snip* ================
>> WARNING! SerialDenseSolver<T>::solve: System should be equilibrated!
>> -0.0416252 0.836261 0.358417
>> ================ *snap* ================
>>
>> This solution is correct. Using
>>
>> solver.equilibrateMatrix();
>> solver.equilibrateRHS();
>> solver.solve();
>> solver.unequilibrateLHS();
>>
>> however, produces
>>
>> ================ *snip* ================
>> -0.0416252 0.653305 0.323626
>> ================ *snap* ================
>>
>> I guess I must be making some sort of mistake here but I fail to see
>> what the issue could be.
>> The comments in ./packages/amesos2/src/Amesos2_Lapack_def.hpp suggest
>> that there may be more to it.
>> Any hints?
>>
>> Cheers,
>> Nico
>>
>>
>> _______________________________________________
>> 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





More information about the Trilinos-Users mailing list