[Trilinos-Users] [EXTERNAL] Amesos2 Klu2 is not enabled or is not supported

Truman Ellis truman at ices.utexas.edu
Tue Mar 24 13:20:55 MDT 2015


Siva,
I am using version 11.8.1. Our stiffness matrix is symmetric positive 
definite. At one point we were using Cholesky, but for reasons I can't 
remember at the moment, we switched to KLU as the default.

I tried
Teuchos::RCP<Amesos2::Solver<Epetra_RowMatrix,Epetra_MultiVector> > 
solver = 
Amesos2::create<Epetra_RowMatrix,Epetra_MultiVector>("Basker",A, X, B);

But got a similar error:
Basker is not enabled or is not supported
Aborted

Thanks for the response,
Truman

On 3/24/15 2:15 PM, Siva Rajamanickam wrote:
> Truman,
>   The first one is expected as KLU2 is no enabled by default. I am not 
> sure why enabling it will get ignored, so it would be nice to know 
> which version of Trilinos you are using.
>
>  Also what is your problem domain ? You might be able to use Basker, a 
> new templated solver easily, if you don't depend on specific features 
> of KLU (like the block triangular form) for performance.
>
> Thanks
> Siva
>
> On 03/24/2015 01:03 PM, Truman Ellis wrote:
>> We have a code built on Epetra and Amesos that we are gradually 
>> migrating to Tpetra and Amesos2 in order to add support for complex 
>> variables. My first step in the conversion is just getting Amesos2 to 
>> work with our Epetra objects. The old code declares an Amesos_klu solver
>> Amesos_Klu klu(problem);
>> where problem is an Epetra_LinearProblem.
>> My new code uses the following:
>>     Teuchos::RCP<Epetra_RowMatrix> A = 
>> Teuchos::rcp(problem.GetMatrix());
>>     Teuchos::RCP<Epetra_MultiVector> X = Teuchos::rcp(problem.GetLHS());
>>     Teuchos::RCP<Epetra_MultiVector> B = Teuchos::rcp(problem.GetRHS());
>> Teuchos::RCP<Amesos2::Solver<Epetra_RowMatrix,Epetra_MultiVector> > 
>> solver = Amesos2::create<Epetra_RowMatrix,Epetra_MultiVector>(A, X, B);
>>     solver->solve();
>>
>> This all compiles fine, but when I try to run it, I get the following 
>> error:
>> terminate called after throwing an instance of 'std::invalid_argument'
>>   what(): 
>> /workspace/truman/trilinos/lib/cmake/Trilinos/../../../include/Amesos2_Factory.hpp:565:
>>
>> Throw number = 1
>>
>> Throw test that evaluated to true: true
>>
>> Klu2 is not enabled or is not supported
>> Aborted
>>
>> I tried explicitly adding the following line to my do-configure 
>> script for building Trilinos:
>> -D Amesos2_ENABLE_KLU2:BOOL=ON \
>>
>> But I get a CMake warning:
>> CMake Warning:
>>   Manually-specified variables were not used by the project:
>>
>>     Amesos2_ENABLE_KLU2
>>
>> Any thoughts on how to fix this?
>>
>> Thanks,
>> Truman Ellis
>> _______________________________________________
>> Trilinos-Users mailing list
>> Trilinos-Users at software.sandia.gov
>> https://software.sandia.gov/mailman/listinfo/trilinos-users
>
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> https://software.sandia.gov/mailman/listinfo/trilinos-users
>



More information about the Trilinos-Users mailing list