[Trilinos-Users] [EXTERNAL] Amesos2 Klu2 is not enabled or is not supported
Siva Rajamanickam
srajama at sandia.gov
Tue Mar 24 16:41:49 MDT 2015
Truman
What is the underlying concrete implementation you are passing to Amesos2 ?
Is it an Epetra_CrsMatrix or is it your own matrix which derives from
Epetra_RowMatrix. The concrete adapters for CrsMatrices are provided in Amesos2.
If you have your matrices, then you need an adapter for those.
Thanks
Siva
On 03/24/2015 02:47 PM, Truman Ellis wrote:
> I just upgraded to 11.14.1 and I no longer get the CMake warnings when
> building Trilinos, but I do get build errors originating from my line:
> Teuchos::RCP<Amesos2::Solver<Epetra_RowMatrix,Epetra_MultiVector> > solver =
> Amesos2::create<Epetra_RowMatrix,Epetra_MultiVector>(A, X, B);
>
> The build errors are extremely long, so I'm attaching the output as a text
> file. My theory is that somehow Epetra_RowMatrix and Epetra_MultiVector are
> not valid template arguments, but I don't know enough about Amesos2 at this
> point to know what to try next.
>
> Thanks,
> Truman
>
> On 3/24/15 2:26 PM, Siva Rajamanickam wrote:
>> That explains it. You have two options. You could use 11.8.1 and use SuperLU
>> as your solver (as that was the only one supported in that version of
>> Trilinos) or upgrade to 11.14.1 and use either
>> Basker or KLU2.
>>
>> Thanks
>> Siva
>>
>>
>> On 03/24/2015 01:20 PM, Truman Ellis wrote:
>>> 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
>>>>
>>>
>>> _______________________________________________
>>> 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
>>
>
>
>
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> https://software.sandia.gov/mailman/listinfo/trilinos-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://software.sandia.gov/pipermail/trilinos-users/attachments/20150324/ffa2caa6/attachment.html>
More information about the Trilinos-Users
mailing list