[Trilinos-Users] Interfacing fftw and trilinos

Veltz Romain romain.veltz at inria.fr
Wed Nov 28 16:02:39 MST 2012


Mike,

I can distribute the data the way I want in the Epetra_Vector, there is no constraint except speed.

I have X, an epetra_vector that represents a 2d data (ultimately, 512^2 components). I have a kernel W (I don't know yet if it should be an Epetra_Vector), and I would like to compute the convolution :  W *conv X.
I would use MPI on a multicore processor (32 cores), I do not plan to spread my computations on different computers in the immediate future.

On the other hand, I also have a sparse matrix W_LR and I need to compute the matrix-vector product  W_LR * X. This sparse matrix is a Epetra_CrsMatrix but I do not have a lot of constraints about it. Each rwo is filled at about 5-7%.

Hence, I have to compute F = W *conv X   +  W_LR * X

I already have programed an operator for the Jacobian operations.

Is it enough information?

My problem is if I use fftw for example, how can I assure that the data X,W are correctly sent to fftw?

Thank you,

Romain




On Nov 28, 2012, at 2:40 PM, Heroux, Mike wrote:

> Romain,
> 
> I think Epetra_Operator is might still the right interface.  Please
> describe the operation you want to perform and how the data are
> distributed across the parallel machine.
> 
> Mike 
> 
> On 11/28/12 4:36 PM, "Veltz Romain" <romain.veltz at inria.fr> wrote:
> 
>> Mike,
>> 
>> I am sorry because I was not clear enough.
>> 
>> My basic goal is to apply a FFT to an Epetra_Vector in parallel.
>> 
>> Romain.
>> 
>> 
>> On Nov 28, 2012, at 1:57 PM, Heroux, Michael A wrote:
>> 
>>> Romain,
>>> 
>>> If I understand your situation correctly, you will want to write an
>>> adapter for the pure virtual class Epetra_Operator, which is used by all
>>> Trilinos linear solvers to apply the linear operator.  A reasonable
>>> starting point for such a class is in
>>> Trilinos/packages/AztecOO/src/AztecOO_Operator.[h|cpp].
>>> 
>>> Depending on the details of what you are doing you may need to reverse
>>> the
>>> roles of Apply() and ApplyInverse() from what AztecOO_Operator does. You
>>> will implement Apply() or ApplyInverse() using the FFT library and you
>>> will indicate that the other is not implemented.  AztecOO_Operator
>>> implements ApplyInverse() and specifies that Apply() is not implemented.
>>> In fact you should be able to use AztecOO_Operator::Apply() basically
>>> as-is for one of your own methods.
>>> 
>>> I hope this helps.
>>> 
>>> Mike
>>> 
>>> On 11/28/12 2:46 PM, "Veltz Romain" <romain.veltz at inria.fr> wrote:
>>> 
>>>> Hello,
>>>> 
>>>> 
>>>> I would like to interface a Fast Fourier Transform library with Epetra.
>>>> More precisely, I am using NOX and LOCA to solve integral equations
>>>> which
>>>> involve the computations of Fourier Transform (in Matrix-Free
>>>> formalism)
>>>> and sparse Matrix-Vector products at the same time.
>>>> 
>>>> There is an old fftw code for serial 1d FFT in Thyra but it does not
>>>> fit
>>>> my needs. 
>>>> 
>>>> Could you give me some advice me please,
>>>> 
>>>> Thank you for your help.
>>>> 
>>>> Romain
>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> 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